From ce6f5cf2c1611af179da8dba3f73b1f8dc1bb1e1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 8 Jan 2020 09:39:07 -0800 Subject: [PATCH] fix(iot): modify retry and timeout configs; add 2.7 deprecation warning; add 'required' to docstring for required args; add 3.8 unit tests (via synth) (#10069) --- docs/_static/custom.css | 2 +- docs/_templates/layout.html | 1 + google/cloud/iot_v1/__init__.py | 11 + .../iot_v1/gapic/device_manager_client.py | 95 ++--- .../gapic/device_manager_client_config.py | 30 +- .../cloud/iot_v1/proto/device_manager.proto | 265 ++++++++----- .../cloud/iot_v1/proto/device_manager_pb2.py | 358 ++++++++++-------- google/cloud/iot_v1/proto/resources.proto | 266 ++++++------- google/cloud/iot_v1/proto/resources_pb2.py | 104 ++--- noxfile.py | 2 +- synth.metadata | 12 +- .../gapic/v1/test_device_manager_client_v1.py | 12 +- 12 files changed, 658 insertions(+), 500 deletions(-) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 9a6f9f8d..0abaf229 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,4 +1,4 @@ div#python2-eol { border-color: red; border-width: medium; -} \ No newline at end of file +} \ No newline at end of file diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index de457b2c..228529ef 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,3 +1,4 @@ + {% extends "!layout.html" %} {%- block content %} {%- if theme_fixed_sidebar|lower == 'true' %} diff --git a/google/cloud/iot_v1/__init__.py b/google/cloud/iot_v1/__init__.py index 257cd53f..7383e5b8 100644 --- a/google/cloud/iot_v1/__init__.py +++ b/google/cloud/iot_v1/__init__.py @@ -16,12 +16,23 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.iot_v1 import types from google.cloud.iot_v1.gapic import device_manager_client from google.cloud.iot_v1.gapic import enums +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class DeviceManagerClient(device_manager_client.DeviceManagerClient): __doc__ = device_manager_client.DeviceManagerClient.__doc__ enums = enums diff --git a/google/cloud/iot_v1/gapic/device_manager_client.py b/google/cloud/iot_v1/gapic/device_manager_client.py index 872ad4eb..78763b9b 100644 --- a/google/cloud/iot_v1/gapic/device_manager_client.py +++ b/google/cloud/iot_v1/gapic/device_manager_client.py @@ -244,11 +244,12 @@ def create_device_registry( >>> response = client.create_device_registry(parent, device_registry) Args: - parent (str): The project and cloud region where this device registry must be created. - For example, ``projects/example-project/locations/us-central1``. - device_registry (Union[dict, ~google.cloud.iot_v1.types.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. + parent (str): Required. The project and cloud region where this device registry must + be created. For example, + ``projects/example-project/locations/us-central1``. + device_registry (Union[dict, ~google.cloud.iot_v1.types.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. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.iot_v1.types.DeviceRegistry` @@ -322,7 +323,7 @@ def get_device_registry( >>> response = client.get_device_registry(name) Args: - name (str): The name of the device registry. For example, + name (str): Required. The name of the device registry. For example, ``projects/example-project/locations/us-central1/registries/my-registry``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -397,16 +398,16 @@ def update_device_registry( >>> response = client.update_device_registry(device_registry, update_mask) Args: - device_registry (Union[dict, ~google.cloud.iot_v1.types.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, + device_registry (Union[dict, ~google.cloud.iot_v1.types.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``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.iot_v1.types.DeviceRegistry` - update_mask (Union[dict, ~google.cloud.iot_v1.types.FieldMask]): 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: + update_mask (Union[dict, ~google.cloud.iot_v1.types.FieldMask]): 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``. @@ -482,7 +483,7 @@ def delete_device_registry( >>> client.delete_device_registry(name) Args: - name (str): The name of the device registry. For example, + name (str): Required. The name of the device registry. For example, ``projects/example-project/locations/us-central1/registries/my-registry``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -562,7 +563,7 @@ def list_device_registries( ... pass Args: - parent (str): The project and cloud region path. For example, + parent (str): Required. The project and cloud region path. For example, ``projects/example-project/locations/us-central1``. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- @@ -657,12 +658,12 @@ def create_device( >>> response = client.create_device(parent, device) Args: - parent (str): The name of the device registry where this device should be created. For - example, + parent (str): Required. The name of the device registry where this device should be + created. For example, ``projects/example-project/locations/us-central1/registries/my-registry``. - device (Union[dict, ~google.cloud.iot_v1.types.Device]): The device registration details. The field ``name`` must be empty. The - server generates ``name`` from the device registry ``id`` and the - ``parent`` field. + device (Union[dict, ~google.cloud.iot_v1.types.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. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.iot_v1.types.Device` @@ -735,7 +736,7 @@ def get_device( >>> response = client.get_device(name) Args: - name (str): The name of the device. For example, + name (str): 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}``. @@ -817,15 +818,16 @@ def update_device( >>> response = client.update_device(device, update_mask) Args: - device (Union[dict, ~google.cloud.iot_v1.types.Device]): 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, + device (Union[dict, ~google.cloud.iot_v1.types.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}``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.iot_v1.types.Device` - update_mask (Union[dict, ~google.cloud.iot_v1.types.FieldMask]): Only updates the ``device`` fields indicated by this mask. The field - mask must not be empty, and it must not contain fields that are + update_mask (Union[dict, ~google.cloud.iot_v1.types.FieldMask]): 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`` @@ -901,7 +903,7 @@ def delete_device( >>> client.delete_device(name) Args: - name (str): The name of the device. For example, + name (str): 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}``. @@ -987,7 +989,7 @@ def list_devices( ... pass Args: - parent (str): The device registry path. Required. For example, + parent (str): Required. The device registry path. Required. For example, ``projects/my-project/locations/us-central1/registries/my-registry``. device_num_ids (list[long]): A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000. @@ -1104,11 +1106,11 @@ def modify_cloud_to_device_config( >>> response = client.modify_cloud_to_device_config(name, binary_data) Args: - name (str): The name of the device. For example, + name (str): 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}``. - binary_data (bytes): The configuration data for the device. + binary_data (bytes): Required. The configuration data for the device. version_to_update (long): 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 @@ -1188,7 +1190,7 @@ def list_device_config_versions( >>> response = client.list_device_config_versions(name) Args: - name (str): The name of the device. For example, + name (str): 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}``. @@ -1269,7 +1271,7 @@ def list_device_states( >>> response = client.list_device_states(name) Args: - name (str): The name of the device. For example, + name (str): 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}``. @@ -1343,7 +1345,8 @@ def set_iam_policy( >>> >>> client = iot_v1.DeviceManagerClient() >>> - >>> resource = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `policy`: >>> policy = {} @@ -1426,7 +1429,8 @@ def get_iam_policy( >>> >>> client = iot_v1.DeviceManagerClient() >>> - >>> resource = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> response = client.get_iam_policy(resource) @@ -1506,7 +1510,8 @@ def test_iam_permissions( >>> >>> client = iot_v1.DeviceManagerClient() >>> - >>> resource = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `permissions`: >>> permissions = [] @@ -1609,11 +1614,11 @@ def send_command_to_device( >>> response = client.send_command_to_device(name, binary_data) Args: - name (str): The name of the device. For example, + name (str): 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}``. - binary_data (bytes): The command data to send to the device. + binary_data (bytes): Required. The command data to send to the device. subfolder (str): 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 @@ -1697,12 +1702,12 @@ def bind_device_to_gateway( >>> response = client.bind_device_to_gateway(parent, gateway_id, device_id) Args: - parent (str): The name of the registry. For example, + parent (str): Required. The name of the registry. For example, ``projects/example-project/locations/us-central1/registries/my-registry``. - gateway_id (str): The value of ``gateway_id`` can be either the device numeric ID or the - user-defined device identifier. - device_id (str): The device to associate with the specified gateway. The value of - ``device_id`` can be either the device numeric ID or the user-defined + gateway_id (str): Required. The value of ``gateway_id`` can be either the device numeric + ID or the user-defined device identifier. + device_id (str): 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. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -1782,13 +1787,13 @@ def unbind_device_from_gateway( >>> response = client.unbind_device_from_gateway(parent, gateway_id, device_id) Args: - parent (str): The name of the registry. For example, + parent (str): Required. The name of the registry. For example, ``projects/example-project/locations/us-central1/registries/my-registry``. - gateway_id (str): The value of ``gateway_id`` can be either the device numeric ID or the + gateway_id (str): Required. The value of ``gateway_id`` can be either the device numeric + ID or the user-defined device identifier. + device_id (str): 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. - device_id (str): 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. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. diff --git a/google/cloud/iot_v1/gapic/device_manager_client_config.py b/google/cloud/iot_v1/gapic/device_manager_client_config.py index 67a037f8..ca24328a 100644 --- a/google/cloud/iot_v1/gapic/device_manager_client_config.py +++ b/google/cloud/iot_v1/gapic/device_manager_client_config.py @@ -4,11 +4,6 @@ "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], - "rate_limited_aware": [ - "DEADLINE_EXCEEDED", - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - ], }, "retry_params": { "default": { @@ -18,17 +13,8 @@ "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": { "CreateDeviceRegistry": { @@ -48,7 +34,7 @@ }, "DeleteDeviceRegistry": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListDeviceRegistries": { @@ -73,7 +59,7 @@ }, "DeleteDevice": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListDevices": { @@ -83,8 +69,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, @@ -113,8 +99,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/google/cloud/iot_v1/proto/device_manager.proto b/google/cloud/iot_v1/proto/device_manager.proto index 27ec0f03..44d11afe 100644 --- a/google/cloud/iot_v1/proto/device_manager.proto +++ b/google/cloud/iot_v1/proto/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/Registry" + } + ]; } // 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/Registry" + } + ]; } // 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/Registry" + } + ]; + + // 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/Registry" + } + ]; // 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/Registry" + } + ]; + + // 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/Registry" + } + ]; + + // 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/google/cloud/iot_v1/proto/device_manager_pb2.py b/google/cloud/iot_v1/proto/device_manager_pb2.py index f4120bfd..bd598fa1 100644 --- a/google/cloud/iot_v1/proto/device_manager_pb2.py +++ b/google/cloud/iot_v1/proto/device_manager_pb2.py @@ -16,15 +16,16 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.iot_v1.proto import ( resources_pb2 as google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2, ) from google.iam.v1 import iam_policy_pb2 as google_dot_iam_dot_v1_dot_iam__policy__pb2 from google.iam.v1 import policy_pb2 as google_dot_iam_dot_v1_dot_policy__pb2 -from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 @@ -36,17 +37,18 @@ "\n\027com.google.cloud.iot.v1B\022DeviceManagerProtoP\001Z6google.golang.org/genproto/googleapis/cloud/iot/v1;iot\370\001\001" ), serialized_pb=_b( - '\n.google/cloud/iot_v1/proto/device_manager.proto\x12\x13google.cloud.iot.v1\x1a\x1cgoogle/api/annotations.proto\x1a)google/cloud/iot_v1/proto/resources.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"k\n\x1b\x43reateDeviceRegistryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x0f\x64\x65vice_registry\x18\x02 \x01(\x0b\x32#.google.cloud.iot.v1.DeviceRegistry"(\n\x18GetDeviceRegistryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"+\n\x1b\x44\x65leteDeviceRegistryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x8c\x01\n\x1bUpdateDeviceRegistryRequest\x12<\n\x0f\x64\x65vice_registry\x18\x01 \x01(\x0b\x32#.google.cloud.iot.v1.DeviceRegistry\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"T\n\x1bListDeviceRegistriesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"w\n\x1cListDeviceRegistriesResponse\x12>\n\x11\x64\x65vice_registries\x18\x01 \x03(\x0b\x32#.google.cloud.iot.v1.DeviceRegistry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"R\n\x13\x43reateDeviceRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12+\n\x06\x64\x65vice\x18\x02 \x01(\x0b\x32\x1b.google.cloud.iot.v1.Device"P\n\x10GetDeviceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"s\n\x13UpdateDeviceRequest\x12+\n\x06\x64\x65vice\x18\x02 \x01(\x0b\x32\x1b.google.cloud.iot.v1.Device\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"#\n\x13\x44\x65leteDeviceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\xee\x01\n\x12ListDevicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65vice_num_ids\x18\x02 \x03(\x04\x12\x12\n\ndevice_ids\x18\x03 \x03(\t\x12.\n\nfield_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x45\n\x14gateway_list_options\x18\x06 \x01(\x0b\x32\'.google.cloud.iot.v1.GatewayListOptions\x12\x11\n\tpage_size\x18\x64 \x01(\x05\x12\x12\n\npage_token\x18\x65 \x01(\t"\x9d\x01\n\x12GatewayListOptions\x12\x38\n\x0cgateway_type\x18\x01 \x01(\x0e\x32 .google.cloud.iot.v1.GatewayTypeH\x00\x12!\n\x17\x61ssociations_gateway_id\x18\x02 \x01(\tH\x00\x12 \n\x16\x61ssociations_device_id\x18\x03 \x01(\tH\x00\x42\x08\n\x06\x66ilter"\\\n\x13ListDevicesResponse\x12,\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1b.google.cloud.iot.v1.Device\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"`\n ModifyCloudToDeviceConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11version_to_update\x18\x02 \x01(\x03\x12\x13\n\x0b\x62inary_data\x18\x03 \x01(\x0c"E\n\x1fListDeviceConfigVersionsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cnum_versions\x18\x02 \x01(\x05"]\n ListDeviceConfigVersionsResponse\x12\x39\n\x0e\x64\x65vice_configs\x18\x01 \x03(\x0b\x32!.google.cloud.iot.v1.DeviceConfig";\n\x17ListDeviceStatesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nnum_states\x18\x02 \x01(\x05"S\n\x18ListDeviceStatesResponse\x12\x37\n\rdevice_states\x18\x01 \x03(\x0b\x32 .google.cloud.iot.v1.DeviceState"R\n\x1aSendCommandToDeviceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x62inary_data\x18\x02 \x01(\x0c\x12\x11\n\tsubfolder\x18\x03 \x01(\t"\x1d\n\x1bSendCommandToDeviceResponse"S\n\x1a\x42indDeviceToGatewayRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\ngateway_id\x18\x02 \x01(\t\x12\x11\n\tdevice_id\x18\x03 \x01(\t"\x1d\n\x1b\x42indDeviceToGatewayResponse"W\n\x1eUnbindDeviceFromGatewayRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\ngateway_id\x18\x02 \x01(\t\x12\x11\n\tdevice_id\x18\x03 \x01(\t"!\n\x1fUnbindDeviceFromGatewayResponse2\xe5"\n\rDeviceManager\x12\xb6\x01\n\x14\x43reateDeviceRegistry\x12\x30.google.cloud.iot.v1.CreateDeviceRegistryRequest\x1a#.google.cloud.iot.v1.DeviceRegistry"G\x82\xd3\xe4\x93\x02\x41"./v1/{parent=projects/*/locations/*}/registries:\x0f\x64\x65vice_registry\x12\x9f\x01\n\x11GetDeviceRegistry\x12-.google.cloud.iot.v1.GetDeviceRegistryRequest\x1a#.google.cloud.iot.v1.DeviceRegistry"6\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/registries/*}\x12\xc6\x01\n\x14UpdateDeviceRegistry\x12\x30.google.cloud.iot.v1.UpdateDeviceRegistryRequest\x1a#.google.cloud.iot.v1.DeviceRegistry"W\x82\xd3\xe4\x93\x02Q2>/v1/{device_registry.name=projects/*/locations/*/registries/*}:\x0f\x64\x65vice_registry\x12\x98\x01\n\x14\x44\x65leteDeviceRegistry\x12\x30.google.cloud.iot.v1.DeleteDeviceRegistryRequest\x1a\x16.google.protobuf.Empty"6\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/registries/*}\x12\xb3\x01\n\x14ListDeviceRegistries\x12\x30.google.cloud.iot.v1.ListDeviceRegistriesRequest\x1a\x31.google.cloud.iot.v1.ListDeviceRegistriesResponse"6\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/registries\x12\x9f\x01\n\x0c\x43reateDevice\x12(.google.cloud.iot.v1.CreateDeviceRequest\x1a\x1b.google.cloud.iot.v1.Device"H\x82\xd3\xe4\x93\x02\x42"8/v1/{parent=projects/*/locations/*/registries/*}/devices:\x06\x64\x65vice\x12\xd7\x01\n\tGetDevice\x12%.google.cloud.iot.v1.GetDeviceRequest\x1a\x1b.google.cloud.iot.v1.Device"\x85\x01\x82\xd3\xe4\x93\x02\x7f\x12\x38/v1/{name=projects/*/locations/*/registries/*/devices/*}ZC\x12\x41/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}\x12\xfc\x01\n\x0cUpdateDevice\x12(.google.cloud.iot.v1.UpdateDeviceRequest\x1a\x1b.google.cloud.iot.v1.Device"\xa4\x01\x82\xd3\xe4\x93\x02\x9d\x01\x32?/v1/{device.name=projects/*/locations/*/registries/*/devices/*}:\x06\x64\x65viceZR2H/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}:\x06\x64\x65vice\x12\x92\x01\n\x0c\x44\x65leteDevice\x12(.google.cloud.iot.v1.DeleteDeviceRequest\x1a\x16.google.protobuf.Empty"@\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/registries/*/devices/*}\x12\xe8\x01\n\x0bListDevices\x12\'.google.cloud.iot.v1.ListDevicesRequest\x1a(.google.cloud.iot.v1.ListDevicesResponse"\x85\x01\x82\xd3\xe4\x93\x02\x7f\x12\x38/v1/{parent=projects/*/locations/*/registries/*}/devicesZC\x12\x41/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices\x12\xb8\x02\n\x19ModifyCloudToDeviceConfig\x12\x35.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest\x1a!.google.cloud.iot.v1.DeviceConfig"\xc0\x01\x82\xd3\xe4\x93\x02\xb9\x01"R/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig:\x01*Z`"[/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig:\x01*\x12\xae\x02\n\x18ListDeviceConfigVersions\x12\x34.google.cloud.iot.v1.ListDeviceConfigVersionsRequest\x1a\x35.google.cloud.iot.v1.ListDeviceConfigVersionsResponse"\xa4\x01\x82\xd3\xe4\x93\x02\x9d\x01\x12G/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersionsZR\x12P/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions\x12\x86\x02\n\x10ListDeviceStates\x12,.google.cloud.iot.v1.ListDeviceStatesRequest\x1a-.google.cloud.iot.v1.ListDeviceStatesResponse"\x94\x01\x82\xd3\xe4\x93\x02\x8d\x01\x12?/v1/{name=projects/*/locations/*/registries/*/devices/*}/statesZJ\x12H/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states\x12\xe6\x01\n\x0cSetIamPolicy\x12".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy"\x9a\x01\x82\xd3\xe4\x93\x02\x93\x01"?/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy:\x01*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy:\x01*\x12\xe6\x01\n\x0cGetIamPolicy\x12".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy"\x9a\x01\x82\xd3\xe4\x93\x02\x93\x01"?/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy:\x01*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy:\x01*\x12\x92\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse"\xa6\x01\x82\xd3\xe4\x93\x02\x9f\x01"E/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions:\x01*ZS"N/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions:\x01*\x12\xaf\x02\n\x13SendCommandToDevice\x12/.google.cloud.iot.v1.SendCommandToDeviceRequest\x1a\x30.google.cloud.iot.v1.SendCommandToDeviceResponse"\xb4\x01\x82\xd3\xe4\x93\x02\xad\x01"L/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice:\x01*ZZ"U/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice:\x01*\x12\x9f\x02\n\x13\x42indDeviceToGateway\x12/.google.cloud.iot.v1.BindDeviceToGatewayRequest\x1a\x30.google.cloud.iot.v1.BindDeviceToGatewayResponse"\xa4\x01\x82\xd3\xe4\x93\x02\x9d\x01"D/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway:\x01*ZR"M/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway:\x01*\x12\xb3\x02\n\x17UnbindDeviceFromGateway\x12\x33.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest\x1a\x34.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse"\xac\x01\x82\xd3\xe4\x93\x02\xa5\x01"H/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway:\x01*ZV"Q/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway:\x01*Bj\n\x17\x63om.google.cloud.iot.v1B\x12\x44\x65viceManagerProtoP\x01Z6google.golang.org/genproto/googleapis/cloud/iot/v1;iot\xf8\x01\x01\x62\x06proto3' + '\n.google/cloud/iot_v1/proto/device_manager.proto\x12\x13google.cloud.iot.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/iot_v1/proto/resources.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto"\x9b\x01\n\x1b\x43reateDeviceRegistryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x41\n\x0f\x64\x65vice_registry\x18\x02 \x01(\x0b\x32#.google.cloud.iot.v1.DeviceRegistryB\x03\xe0\x41\x02"R\n\x18GetDeviceRegistryRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n cloudiot.googleapis.com/Registry"U\n\x1b\x44\x65leteDeviceRegistryRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n cloudiot.googleapis.com/Registry"\x96\x01\n\x1bUpdateDeviceRegistryRequest\x12\x41\n\x0f\x64\x65vice_registry\x18\x01 \x01(\x0b\x32#.google.cloud.iot.v1.DeviceRegistryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"\x7f\n\x1bListDeviceRegistriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"w\n\x1cListDeviceRegistriesResponse\x12>\n\x11\x64\x65vice_registries\x18\x01 \x03(\x0b\x32#.google.cloud.iot.v1.DeviceRegistry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x81\x01\n\x13\x43reateDeviceRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n cloudiot.googleapis.com/Registry\x12\x30\n\x06\x64\x65vice\x18\x02 \x01(\x0b\x32\x1b.google.cloud.iot.v1.DeviceB\x03\xe0\x41\x02"x\n\x10GetDeviceRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudiot.googleapis.com/Device\x12.\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"}\n\x13UpdateDeviceRequest\x12\x30\n\x06\x64\x65vice\x18\x02 \x01(\x0b\x32\x1b.google.cloud.iot.v1.DeviceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"K\n\x13\x44\x65leteDeviceRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudiot.googleapis.com/Device"\x98\x02\n\x12ListDevicesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n cloudiot.googleapis.com/Registry\x12\x16\n\x0e\x64\x65vice_num_ids\x18\x02 \x03(\x04\x12\x12\n\ndevice_ids\x18\x03 \x03(\t\x12.\n\nfield_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x45\n\x14gateway_list_options\x18\x06 \x01(\x0b\x32\'.google.cloud.iot.v1.GatewayListOptions\x12\x11\n\tpage_size\x18\x64 \x01(\x05\x12\x12\n\npage_token\x18\x65 \x01(\t"\x9d\x01\n\x12GatewayListOptions\x12\x38\n\x0cgateway_type\x18\x01 \x01(\x0e\x32 .google.cloud.iot.v1.GatewayTypeH\x00\x12!\n\x17\x61ssociations_gateway_id\x18\x02 \x01(\tH\x00\x12 \n\x16\x61ssociations_device_id\x18\x03 \x01(\tH\x00\x42\x08\n\x06\x66ilter"\\\n\x13ListDevicesResponse\x12,\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1b.google.cloud.iot.v1.Device\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8d\x01\n ModifyCloudToDeviceConfigRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudiot.googleapis.com/Device\x12\x19\n\x11version_to_update\x18\x02 \x01(\x03\x12\x18\n\x0b\x62inary_data\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02"m\n\x1fListDeviceConfigVersionsRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudiot.googleapis.com/Device\x12\x14\n\x0cnum_versions\x18\x02 \x01(\x05"]\n ListDeviceConfigVersionsResponse\x12\x39\n\x0e\x64\x65vice_configs\x18\x01 \x03(\x0b\x32!.google.cloud.iot.v1.DeviceConfig"c\n\x17ListDeviceStatesRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudiot.googleapis.com/Device\x12\x12\n\nnum_states\x18\x02 \x01(\x05"S\n\x18ListDeviceStatesResponse\x12\x37\n\rdevice_states\x18\x01 \x03(\x0b\x32 .google.cloud.iot.v1.DeviceState"\x7f\n\x1aSendCommandToDeviceRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63loudiot.googleapis.com/Device\x12\x18\n\x0b\x62inary_data\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x11\n\tsubfolder\x18\x03 \x01(\t"\x1d\n\x1bSendCommandToDeviceResponse"\x87\x01\n\x1a\x42indDeviceToGatewayRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n cloudiot.googleapis.com/Registry\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tdevice_id\x18\x03 \x01(\tB\x03\xe0\x41\x02"\x1d\n\x1b\x42indDeviceToGatewayResponse"\x8b\x01\n\x1eUnbindDeviceFromGatewayRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n cloudiot.googleapis.com/Registry\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tdevice_id\x18\x03 \x01(\tB\x03\xe0\x41\x02"!\n\x1fUnbindDeviceFromGatewayResponse2\xa6&\n\rDeviceManager\x12\xcf\x01\n\x14\x43reateDeviceRegistry\x12\x30.google.cloud.iot.v1.CreateDeviceRegistryRequest\x1a#.google.cloud.iot.v1.DeviceRegistry"`\x82\xd3\xe4\x93\x02\x41"./v1/{parent=projects/*/locations/*}/registries:\x0f\x64\x65vice_registry\xda\x41\x16parent,device_registry\x12\xa6\x01\n\x11GetDeviceRegistry\x12-.google.cloud.iot.v1.GetDeviceRegistryRequest\x1a#.google.cloud.iot.v1.DeviceRegistry"=\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/registries/*}\xda\x41\x04name\x12\xe4\x01\n\x14UpdateDeviceRegistry\x12\x30.google.cloud.iot.v1.UpdateDeviceRegistryRequest\x1a#.google.cloud.iot.v1.DeviceRegistry"u\x82\xd3\xe4\x93\x02Q2>/v1/{device_registry.name=projects/*/locations/*/registries/*}:\x0f\x64\x65vice_registry\xda\x41\x1b\x64\x65vice_registry,update_mask\x12\x9f\x01\n\x14\x44\x65leteDeviceRegistry\x12\x30.google.cloud.iot.v1.DeleteDeviceRegistryRequest\x1a\x16.google.protobuf.Empty"=\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/registries/*}\xda\x41\x04name\x12\xbc\x01\n\x14ListDeviceRegistries\x12\x30.google.cloud.iot.v1.ListDeviceRegistriesRequest\x1a\x31.google.cloud.iot.v1.ListDeviceRegistriesResponse"?\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/registries\xda\x41\x06parent\x12\xaf\x01\n\x0c\x43reateDevice\x12(.google.cloud.iot.v1.CreateDeviceRequest\x1a\x1b.google.cloud.iot.v1.Device"X\x82\xd3\xe4\x93\x02\x42"8/v1/{parent=projects/*/locations/*/registries/*}/devices:\x06\x64\x65vice\xda\x41\rparent,device\x12\xde\x01\n\tGetDevice\x12%.google.cloud.iot.v1.GetDeviceRequest\x1a\x1b.google.cloud.iot.v1.Device"\x8c\x01\x82\xd3\xe4\x93\x02\x7f\x12\x38/v1/{name=projects/*/locations/*/registries/*/devices/*}ZC\x12\x41/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}\xda\x41\x04name\x12\x91\x02\n\x0cUpdateDevice\x12(.google.cloud.iot.v1.UpdateDeviceRequest\x1a\x1b.google.cloud.iot.v1.Device"\xb9\x01\x82\xd3\xe4\x93\x02\x9d\x01\x32?/v1/{device.name=projects/*/locations/*/registries/*/devices/*}:\x06\x64\x65viceZR2H/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}:\x06\x64\x65vice\xda\x41\x12\x64\x65vice,update_mask\x12\x99\x01\n\x0c\x44\x65leteDevice\x12(.google.cloud.iot.v1.DeleteDeviceRequest\x1a\x16.google.protobuf.Empty"G\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/registries/*/devices/*}\xda\x41\x04name\x12\xf1\x01\n\x0bListDevices\x12\'.google.cloud.iot.v1.ListDevicesRequest\x1a(.google.cloud.iot.v1.ListDevicesResponse"\x8e\x01\x82\xd3\xe4\x93\x02\x7f\x12\x38/v1/{parent=projects/*/locations/*/registries/*}/devicesZC\x12\x41/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices\xda\x41\x06parent\x12\xcb\x02\n\x19ModifyCloudToDeviceConfig\x12\x35.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest\x1a!.google.cloud.iot.v1.DeviceConfig"\xd3\x01\x82\xd3\xe4\x93\x02\xb9\x01"R/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig:\x01*Z`"[/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig:\x01*\xda\x41\x10name,binary_data\x12\xb5\x02\n\x18ListDeviceConfigVersions\x12\x34.google.cloud.iot.v1.ListDeviceConfigVersionsRequest\x1a\x35.google.cloud.iot.v1.ListDeviceConfigVersionsResponse"\xab\x01\x82\xd3\xe4\x93\x02\x9d\x01\x12G/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersionsZR\x12P/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions\xda\x41\x04name\x12\x8d\x02\n\x10ListDeviceStates\x12,.google.cloud.iot.v1.ListDeviceStatesRequest\x1a-.google.cloud.iot.v1.ListDeviceStatesResponse"\x9b\x01\x82\xd3\xe4\x93\x02\x8d\x01\x12?/v1/{name=projects/*/locations/*/registries/*/devices/*}/statesZJ\x12H/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states\xda\x41\x04name\x12\xf8\x01\n\x0cSetIamPolicy\x12".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy"\xac\x01\x82\xd3\xe4\x93\x02\x93\x01"?/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy:\x01*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy:\x01*\xda\x41\x0fresource,policy\x12\xf1\x01\n\x0cGetIamPolicy\x12".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy"\xa5\x01\x82\xd3\xe4\x93\x02\x93\x01"?/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy:\x01*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy:\x01*\xda\x41\x08resource\x12\xa9\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse"\xbd\x01\x82\xd3\xe4\x93\x02\x9f\x01"E/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions:\x01*ZS"N/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions:\x01*\xda\x41\x14resource,permissions\x12\xdf\x02\n\x13SendCommandToDevice\x12/.google.cloud.iot.v1.SendCommandToDeviceRequest\x1a\x30.google.cloud.iot.v1.SendCommandToDeviceResponse"\xe4\x01\x82\xd3\xe4\x93\x02\xad\x01"L/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice:\x01*ZZ"U/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice:\x01*\xda\x41\x10name,binary_data\xda\x41\x1aname,binary_data,subfolder\x12\xbd\x02\n\x13\x42indDeviceToGateway\x12/.google.cloud.iot.v1.BindDeviceToGatewayRequest\x1a\x30.google.cloud.iot.v1.BindDeviceToGatewayResponse"\xc2\x01\x82\xd3\xe4\x93\x02\x9d\x01"D/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway:\x01*ZR"M/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway:\x01*\xda\x41\x1bparent,gateway_id,device_id\x12\xd1\x02\n\x17UnbindDeviceFromGateway\x12\x33.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest\x1a\x34.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse"\xca\x01\x82\xd3\xe4\x93\x02\xa5\x01"H/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway:\x01*ZV"Q/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway:\x01*\xda\x41\x1bparent,gateway_id,device_id\x1at\xca\x41\x17\x63loudiot.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudiotBj\n\x17\x63om.google.cloud.iot.v1B\x12\x44\x65viceManagerProtoP\x01Z6google.golang.org/genproto/googleapis/cloud/iot/v1;iot\xf8\x01\x01\x62\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DESCRIPTOR, google_dot_iam_dot_v1_dot_iam__policy__pb2.DESCRIPTOR, google_dot_iam_dot_v1_dot_policy__pb2.DESCRIPTOR, - google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, ], ) @@ -74,7 +76,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -92,7 +96,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -104,8 +108,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=357, - serialized_end=464, + serialized_start=378, + serialized_end=533, ) @@ -131,7 +135,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n cloudiot.googleapis.com/Registry'), file=DESCRIPTOR, ) ], @@ -143,8 +147,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=466, - serialized_end=506, + serialized_start=535, + serialized_end=617, ) @@ -170,7 +174,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n cloudiot.googleapis.com/Registry'), file=DESCRIPTOR, ) ], @@ -182,8 +186,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=508, - serialized_end=551, + serialized_start=619, + serialized_end=704, ) @@ -209,7 +213,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -227,7 +231,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -239,8 +243,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=554, - serialized_end=694, + serialized_start=707, + serialized_end=857, ) @@ -266,7 +270,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -314,8 +320,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=696, - serialized_end=780, + serialized_start=859, + serialized_end=986, ) @@ -371,8 +377,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=782, - serialized_end=901, + serialized_start=988, + serialized_end=1107, ) @@ -398,7 +404,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n cloudiot.googleapis.com/Registry'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -416,7 +422,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -428,8 +434,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=903, - serialized_end=985, + serialized_start=1110, + serialized_end=1239, ) @@ -455,7 +461,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudiot.googleapis.com/Device" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -485,8 +493,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=987, - serialized_end=1067, + serialized_start=1241, + serialized_end=1361, ) @@ -512,7 +520,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -530,7 +538,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -542,8 +550,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1069, - serialized_end=1184, + serialized_start=1363, + serialized_end=1488, ) @@ -569,7 +577,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudiot.googleapis.com/Device" + ), file=DESCRIPTOR, ) ], @@ -581,8 +591,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1186, - serialized_end=1221, + serialized_start=1490, + serialized_end=1565, ) @@ -608,7 +618,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n cloudiot.googleapis.com/Registry'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -728,8 +738,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1224, - serialized_end=1462, + serialized_start=1568, + serialized_end=1848, ) @@ -811,8 +821,8 @@ fields=[], ) ], - serialized_start=1465, - serialized_end=1622, + serialized_start=1851, + serialized_end=2008, ) @@ -868,8 +878,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1624, - serialized_end=1716, + serialized_start=2010, + serialized_end=2102, ) @@ -895,7 +905,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudiot.googleapis.com/Device" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -931,7 +943,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -943,8 +955,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1718, - serialized_end=1814, + serialized_start=2105, + serialized_end=2246, ) @@ -970,7 +982,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudiot.googleapis.com/Device" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1000,8 +1014,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1816, - serialized_end=1885, + serialized_start=2248, + serialized_end=2357, ) @@ -1039,8 +1053,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1887, - serialized_end=1980, + serialized_start=2359, + serialized_end=2452, ) @@ -1066,7 +1080,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudiot.googleapis.com/Device" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1096,8 +1112,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1982, - serialized_end=2041, + serialized_start=2454, + serialized_end=2553, ) @@ -1135,8 +1151,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2043, - serialized_end=2126, + serialized_start=2555, + serialized_end=2638, ) @@ -1162,7 +1178,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A \n\036cloudiot.googleapis.com/Device" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1180,7 +1198,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1210,8 +1228,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2128, - serialized_end=2210, + serialized_start=2640, + serialized_end=2767, ) @@ -1230,8 +1248,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2212, - serialized_end=2241, + serialized_start=2769, + serialized_end=2798, ) @@ -1257,7 +1275,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n cloudiot.googleapis.com/Registry'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1275,7 +1293,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1293,7 +1311,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1305,8 +1323,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2243, - serialized_end=2326, + serialized_start=2801, + serialized_end=2936, ) @@ -1325,8 +1343,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2328, - serialized_end=2357, + serialized_start=2938, + serialized_end=2967, ) @@ -1352,7 +1370,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n cloudiot.googleapis.com/Registry'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1370,7 +1388,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1388,7 +1406,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1400,8 +1418,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2359, - serialized_end=2446, + serialized_start=2970, + serialized_end=3109, ) @@ -1420,8 +1438,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2448, - serialized_end=2481, + serialized_start=3111, + serialized_end=3144, ) _CREATEDEVICEREGISTRYREQUEST.fields_by_name[ @@ -1555,13 +1573,13 @@ Attributes: parent: - The project and cloud region where this device registry must - be created. For example, ``projects/example- + Required. The project and cloud region where this device + registry must be created. For example, ``projects/example- project/locations/us-central1``. device_registry: - 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. + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.CreateDeviceRegistryRequest) ), @@ -1579,7 +1597,7 @@ Attributes: 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``. """, @@ -1599,7 +1617,7 @@ Attributes: 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``. """, @@ -1619,17 +1637,17 @@ Attributes: device_registry: - 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- + 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``. update_mask: - 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``. + 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``. """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.UpdateDeviceRegistryRequest) ), @@ -1647,7 +1665,7 @@ Attributes: parent: - The project and cloud region path. For example, + Required. The project and cloud region path. For example, ``projects/example-project/locations/us-central1``. page_size: The maximum number of registries to return in the response. If @@ -1699,13 +1717,13 @@ Attributes: parent: - The name of the device registry where this device should be - created. For example, ``projects/example-project/locations/us- - central1/registries/my-registry``. + Required. The name of the device registry where this device + should be created. For example, ``projects/example- + project/locations/us-central1/registries/my-registry``. device: - The device registration details. The field ``name`` must be - empty. The server generates ``name`` from the device registry - ``id`` and the ``parent`` field. + Required. The device registration details. The field ``name`` + must be empty. The server generates ``name`` from the device + registry ``id`` and the ``parent`` field. """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.CreateDeviceRequest) ), @@ -1723,7 +1741,7 @@ Attributes: 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- @@ -1749,17 +1767,19 @@ Attributes: device: - 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- + 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}``. update_mask: - 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`` + 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`` """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.UpdateDeviceRequest) ), @@ -1777,7 +1797,7 @@ Attributes: 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- @@ -1799,7 +1819,7 @@ Attributes: 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``. device_num_ids: @@ -1901,7 +1921,7 @@ Attributes: 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- @@ -1914,7 +1934,7 @@ version number. This is used to support multiple simultaneous updates without losing data. binary_data: - The configuration data for the device. + Required. The configuration data for the device. """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest) ), @@ -1932,7 +1952,7 @@ Attributes: 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- @@ -1979,7 +1999,7 @@ Attributes: 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- @@ -2026,13 +2046,13 @@ Attributes: 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}``. binary_data: - The command data to send to the device. + Required. The command data to send to the device. subfolder: Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, @@ -2071,15 +2091,16 @@ Attributes: parent: - The name of the registry. For example, ``projects/example- - project/locations/us-central1/registries/my-registry``. + Required. The name of the registry. For example, + ``projects/example-project/locations/us- + central1/registries/my-registry``. gateway_id: - The value of ``gateway_id`` can be either the device numeric - ID or the user-defined device identifier. + Required. The value of ``gateway_id`` can be either the device + numeric ID or the user-defined device identifier. device_id: - 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. + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.BindDeviceToGatewayRequest) ), @@ -2110,15 +2131,16 @@ Attributes: parent: - The name of the registry. For example, ``projects/example- - project/locations/us-central1/registries/my-registry``. + Required. The name of the registry. For example, + ``projects/example-project/locations/us- + central1/registries/my-registry``. gateway_id: - The value of ``gateway_id`` can be either the device numeric - ID or the user-defined device identifier. + Required. The value of ``gateway_id`` can be either the device + numeric ID or the user-defined device identifier. device_id: - 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. + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) ), @@ -2140,15 +2162,43 @@ DESCRIPTOR._options = None +_CREATEDEVICEREGISTRYREQUEST.fields_by_name["parent"]._options = None +_CREATEDEVICEREGISTRYREQUEST.fields_by_name["device_registry"]._options = None +_GETDEVICEREGISTRYREQUEST.fields_by_name["name"]._options = None +_DELETEDEVICEREGISTRYREQUEST.fields_by_name["name"]._options = None +_UPDATEDEVICEREGISTRYREQUEST.fields_by_name["device_registry"]._options = None +_UPDATEDEVICEREGISTRYREQUEST.fields_by_name["update_mask"]._options = None +_LISTDEVICEREGISTRIESREQUEST.fields_by_name["parent"]._options = None +_CREATEDEVICEREQUEST.fields_by_name["parent"]._options = None +_CREATEDEVICEREQUEST.fields_by_name["device"]._options = None +_GETDEVICEREQUEST.fields_by_name["name"]._options = None +_UPDATEDEVICEREQUEST.fields_by_name["device"]._options = None +_UPDATEDEVICEREQUEST.fields_by_name["update_mask"]._options = None +_DELETEDEVICEREQUEST.fields_by_name["name"]._options = None +_LISTDEVICESREQUEST.fields_by_name["parent"]._options = None +_MODIFYCLOUDTODEVICECONFIGREQUEST.fields_by_name["name"]._options = None +_MODIFYCLOUDTODEVICECONFIGREQUEST.fields_by_name["binary_data"]._options = None +_LISTDEVICECONFIGVERSIONSREQUEST.fields_by_name["name"]._options = None +_LISTDEVICESTATESREQUEST.fields_by_name["name"]._options = None +_SENDCOMMANDTODEVICEREQUEST.fields_by_name["name"]._options = None +_SENDCOMMANDTODEVICEREQUEST.fields_by_name["binary_data"]._options = None +_BINDDEVICETOGATEWAYREQUEST.fields_by_name["parent"]._options = None +_BINDDEVICETOGATEWAYREQUEST.fields_by_name["gateway_id"]._options = None +_BINDDEVICETOGATEWAYREQUEST.fields_by_name["device_id"]._options = None +_UNBINDDEVICEFROMGATEWAYREQUEST.fields_by_name["parent"]._options = None +_UNBINDDEVICEFROMGATEWAYREQUEST.fields_by_name["gateway_id"]._options = None +_UNBINDDEVICEFROMGATEWAYREQUEST.fields_by_name["device_id"]._options = None _DEVICEMANAGER = _descriptor.ServiceDescriptor( name="DeviceManager", full_name="google.cloud.iot.v1.DeviceManager", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=2484, - serialized_end=6937, + serialized_options=_b( + "\312A\027cloudiot.googleapis.com\322AWhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudiot" + ), + serialized_start=3147, + serialized_end=8049, methods=[ _descriptor.MethodDescriptor( name="CreateDeviceRegistry", @@ -2158,7 +2208,7 @@ input_type=_CREATEDEVICEREGISTRYREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICEREGISTRY, serialized_options=_b( - '\202\323\344\223\002A"./v1/{parent=projects/*/locations/*}/registries:\017device_registry' + '\202\323\344\223\002A"./v1/{parent=projects/*/locations/*}/registries:\017device_registry\332A\026parent,device_registry' ), ), _descriptor.MethodDescriptor( @@ -2169,7 +2219,7 @@ input_type=_GETDEVICEREGISTRYREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICEREGISTRY, serialized_options=_b( - "\202\323\344\223\0020\022./v1/{name=projects/*/locations/*/registries/*}" + "\202\323\344\223\0020\022./v1/{name=projects/*/locations/*/registries/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2180,7 +2230,7 @@ input_type=_UPDATEDEVICEREGISTRYREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICEREGISTRY, serialized_options=_b( - "\202\323\344\223\002Q2>/v1/{device_registry.name=projects/*/locations/*/registries/*}:\017device_registry" + "\202\323\344\223\002Q2>/v1/{device_registry.name=projects/*/locations/*/registries/*}:\017device_registry\332A\033device_registry,update_mask" ), ), _descriptor.MethodDescriptor( @@ -2191,7 +2241,7 @@ input_type=_DELETEDEVICEREGISTRYREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\0020*./v1/{name=projects/*/locations/*/registries/*}" + "\202\323\344\223\0020*./v1/{name=projects/*/locations/*/registries/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2202,7 +2252,7 @@ input_type=_LISTDEVICEREGISTRIESREQUEST, output_type=_LISTDEVICEREGISTRIESRESPONSE, serialized_options=_b( - "\202\323\344\223\0020\022./v1/{parent=projects/*/locations/*}/registries" + "\202\323\344\223\0020\022./v1/{parent=projects/*/locations/*}/registries\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2213,7 +2263,7 @@ input_type=_CREATEDEVICEREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICE, serialized_options=_b( - '\202\323\344\223\002B"8/v1/{parent=projects/*/locations/*/registries/*}/devices:\006device' + '\202\323\344\223\002B"8/v1/{parent=projects/*/locations/*/registries/*}/devices:\006device\332A\rparent,device' ), ), _descriptor.MethodDescriptor( @@ -2224,7 +2274,7 @@ input_type=_GETDEVICEREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICE, serialized_options=_b( - "\202\323\344\223\002\177\0228/v1/{name=projects/*/locations/*/registries/*/devices/*}ZC\022A/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}" + "\202\323\344\223\002\177\0228/v1/{name=projects/*/locations/*/registries/*/devices/*}ZC\022A/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2235,7 +2285,7 @@ input_type=_UPDATEDEVICEREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICE, serialized_options=_b( - "\202\323\344\223\002\235\0012?/v1/{device.name=projects/*/locations/*/registries/*/devices/*}:\006deviceZR2H/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}:\006device" + "\202\323\344\223\002\235\0012?/v1/{device.name=projects/*/locations/*/registries/*/devices/*}:\006deviceZR2H/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}:\006device\332A\022device,update_mask" ), ), _descriptor.MethodDescriptor( @@ -2246,7 +2296,7 @@ input_type=_DELETEDEVICEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002:*8/v1/{name=projects/*/locations/*/registries/*/devices/*}" + "\202\323\344\223\002:*8/v1/{name=projects/*/locations/*/registries/*/devices/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2257,7 +2307,7 @@ input_type=_LISTDEVICESREQUEST, output_type=_LISTDEVICESRESPONSE, serialized_options=_b( - "\202\323\344\223\002\177\0228/v1/{parent=projects/*/locations/*/registries/*}/devicesZC\022A/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices" + "\202\323\344\223\002\177\0228/v1/{parent=projects/*/locations/*/registries/*}/devicesZC\022A/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2268,7 +2318,7 @@ input_type=_MODIFYCLOUDTODEVICECONFIGREQUEST, output_type=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2._DEVICECONFIG, serialized_options=_b( - '\202\323\344\223\002\271\001"R/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig:\001*Z`"[/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig:\001*' + '\202\323\344\223\002\271\001"R/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig:\001*Z`"[/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig:\001*\332A\020name,binary_data' ), ), _descriptor.MethodDescriptor( @@ -2279,7 +2329,7 @@ input_type=_LISTDEVICECONFIGVERSIONSREQUEST, output_type=_LISTDEVICECONFIGVERSIONSRESPONSE, serialized_options=_b( - "\202\323\344\223\002\235\001\022G/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersionsZR\022P/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions" + "\202\323\344\223\002\235\001\022G/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersionsZR\022P/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2290,7 +2340,7 @@ input_type=_LISTDEVICESTATESREQUEST, output_type=_LISTDEVICESTATESRESPONSE, serialized_options=_b( - "\202\323\344\223\002\215\001\022?/v1/{name=projects/*/locations/*/registries/*/devices/*}/statesZJ\022H/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states" + "\202\323\344\223\002\215\001\022?/v1/{name=projects/*/locations/*/registries/*/devices/*}/statesZJ\022H/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2301,7 +2351,7 @@ input_type=google_dot_iam_dot_v1_dot_iam__policy__pb2._SETIAMPOLICYREQUEST, output_type=google_dot_iam_dot_v1_dot_policy__pb2._POLICY, serialized_options=_b( - '\202\323\344\223\002\223\001"?/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy:\001*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy:\001*' + '\202\323\344\223\002\223\001"?/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy:\001*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy:\001*\332A\017resource,policy' ), ), _descriptor.MethodDescriptor( @@ -2312,7 +2362,7 @@ input_type=google_dot_iam_dot_v1_dot_iam__policy__pb2._GETIAMPOLICYREQUEST, output_type=google_dot_iam_dot_v1_dot_policy__pb2._POLICY, serialized_options=_b( - '\202\323\344\223\002\223\001"?/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy:\001*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy:\001*' + '\202\323\344\223\002\223\001"?/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy:\001*ZM"H/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy:\001*\332A\010resource' ), ), _descriptor.MethodDescriptor( @@ -2323,7 +2373,7 @@ input_type=google_dot_iam_dot_v1_dot_iam__policy__pb2._TESTIAMPERMISSIONSREQUEST, output_type=google_dot_iam_dot_v1_dot_iam__policy__pb2._TESTIAMPERMISSIONSRESPONSE, serialized_options=_b( - '\202\323\344\223\002\237\001"E/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions:\001*ZS"N/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions:\001*' + '\202\323\344\223\002\237\001"E/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions:\001*ZS"N/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions:\001*\332A\024resource,permissions' ), ), _descriptor.MethodDescriptor( @@ -2334,7 +2384,7 @@ input_type=_SENDCOMMANDTODEVICEREQUEST, output_type=_SENDCOMMANDTODEVICERESPONSE, serialized_options=_b( - '\202\323\344\223\002\255\001"L/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice:\001*ZZ"U/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice:\001*' + '\202\323\344\223\002\255\001"L/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice:\001*ZZ"U/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice:\001*\332A\020name,binary_data\332A\032name,binary_data,subfolder' ), ), _descriptor.MethodDescriptor( @@ -2345,7 +2395,7 @@ input_type=_BINDDEVICETOGATEWAYREQUEST, output_type=_BINDDEVICETOGATEWAYRESPONSE, serialized_options=_b( - '\202\323\344\223\002\235\001"D/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway:\001*ZR"M/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway:\001*' + '\202\323\344\223\002\235\001"D/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway:\001*ZR"M/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway:\001*\332A\033parent,gateway_id,device_id' ), ), _descriptor.MethodDescriptor( @@ -2356,7 +2406,7 @@ input_type=_UNBINDDEVICEFROMGATEWAYREQUEST, output_type=_UNBINDDEVICEFROMGATEWAYRESPONSE, serialized_options=_b( - '\202\323\344\223\002\245\001"H/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway:\001*ZV"Q/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway:\001*' + '\202\323\344\223\002\245\001"H/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway:\001*ZV"Q/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway:\001*\332A\033parent,gateway_id,device_id' ), ), ], diff --git a/google/cloud/iot_v1/proto/resources.proto b/google/cloud/iot_v1/proto/resources.proto index 2a91e989..2201d330 100644 --- a/google/cloud/iot_v1/proto/resources.proto +++ b/google/cloud/iot_v1/proto/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/Registry" + 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/google/cloud/iot_v1/proto/resources_pb2.py b/google/cloud/iot_v1/proto/resources_pb2.py index 86af058d..b77a6544 100644 --- a/google/cloud/iot_v1/proto/resources_pb2.py +++ b/google/cloud/iot_v1/proto/resources_pb2.py @@ -16,7 +16,7 @@ _sym_db = _symbol_database.Default() -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 @@ -29,10 +29,10 @@ "\n\027com.google.cloud.iot.v1B\016ResourcesProtoP\001Z6google.golang.org/genproto/googleapis/cloud/iot/v1;iot\370\001\001" ), serialized_pb=_b( - '\n)google/cloud/iot_v1/proto/resources.proto\x12\x13google.cloud.iot.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"\xbb\x06\n\x06\x44\x65vice\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06num_id\x18\x03 \x01(\x04\x12:\n\x0b\x63redentials\x18\x0c \x03(\x0b\x32%.google.cloud.iot.v1.DeviceCredential\x12\x37\n\x13last_heartbeat_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0flast_event_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0flast_state_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14last_config_ack_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x15last_config_send_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x62locked\x18\x13 \x01(\x08\x12\x33\n\x0flast_error_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12-\n\x11last_error_status\x18\x0b \x01(\x0b\x32\x12.google.rpc.Status\x12\x31\n\x06\x63onfig\x18\r \x01(\x0b\x32!.google.cloud.iot.v1.DeviceConfig\x12/\n\x05state\x18\x10 \x01(\x0b\x32 .google.cloud.iot.v1.DeviceState\x12\x30\n\tlog_level\x18\x15 \x01(\x0e\x32\x1d.google.cloud.iot.v1.LogLevel\x12;\n\x08metadata\x18\x11 \x03(\x0b\x32).google.cloud.iot.v1.Device.MetadataEntry\x12:\n\x0egateway_config\x18\x18 \x01(\x0b\x32".google.cloud.iot.v1.GatewayConfig\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xee\x01\n\rGatewayConfig\x12\x36\n\x0cgateway_type\x18\x01 \x01(\x0e\x32 .google.cloud.iot.v1.GatewayType\x12\x43\n\x13gateway_auth_method\x18\x02 \x01(\x0e\x32&.google.cloud.iot.v1.GatewayAuthMethod\x12 \n\x18last_accessed_gateway_id\x18\x03 \x01(\t\x12>\n\x1alast_accessed_gateway_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xa9\x03\n\x0e\x44\x65viceRegistry\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12P\n\x1a\x65vent_notification_configs\x18\n \x03(\x0b\x32,.google.cloud.iot.v1.EventNotificationConfig\x12O\n\x19state_notification_config\x18\x07 \x01(\x0b\x32,.google.cloud.iot.v1.StateNotificationConfig\x12\x34\n\x0bmqtt_config\x18\x04 \x01(\x0b\x32\x1f.google.cloud.iot.v1.MqttConfig\x12\x34\n\x0bhttp_config\x18\t \x01(\x0b\x32\x1f.google.cloud.iot.v1.HttpConfig\x12\x30\n\tlog_level\x18\x0b \x01(\x0e\x32\x1d.google.cloud.iot.v1.LogLevel\x12<\n\x0b\x63redentials\x18\x08 \x03(\x0b\x32\'.google.cloud.iot.v1.RegistryCredential"H\n\nMqttConfig\x12:\n\x12mqtt_enabled_state\x18\x01 \x01(\x0e\x32\x1e.google.cloud.iot.v1.MqttState"H\n\nHttpConfig\x12:\n\x12http_enabled_state\x18\x01 \x01(\x0e\x32\x1e.google.cloud.iot.v1.HttpState"O\n\x17\x45ventNotificationConfig\x12\x19\n\x11subfolder_matches\x18\x02 \x01(\t\x12\x19\n\x11pubsub_topic_name\x18\x01 \x01(\t"4\n\x17StateNotificationConfig\x12\x19\n\x11pubsub_topic_name\x18\x01 \x01(\t"o\n\x12RegistryCredential\x12K\n\x16public_key_certificate\x18\x01 \x01(\x0b\x32).google.cloud.iot.v1.PublicKeyCertificateH\x00\x42\x0c\n\ncredential"\xd0\x01\n\x16X509CertificateDetails\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpiry_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x13signature_algorithm\x18\x05 \x01(\t\x12\x17\n\x0fpublic_key_type\x18\x06 \x01(\t"\xaf\x01\n\x14PublicKeyCertificate\x12?\n\x06\x66ormat\x18\x01 \x01(\x0e\x32/.google.cloud.iot.v1.PublicKeyCertificateFormat\x12\x13\n\x0b\x63\x65rtificate\x18\x02 \x01(\t\x12\x41\n\x0cx509_details\x18\x03 \x01(\x0b\x32+.google.cloud.iot.v1.X509CertificateDetails"\x95\x01\n\x10\x44\x65viceCredential\x12>\n\npublic_key\x18\x02 \x01(\x0b\x32(.google.cloud.iot.v1.PublicKeyCredentialH\x00\x12\x33\n\x0f\x65xpiration_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0c\n\ncredential"X\n\x13PublicKeyCredential\x12\x34\n\x06\x66ormat\x18\x01 \x01(\x0e\x32$.google.cloud.iot.v1.PublicKeyFormat\x12\x0b\n\x03key\x18\x02 \x01(\t"\xa0\x01\n\x0c\x44\x65viceConfig\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\x35\n\x11\x63loud_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x64\x65vice_ack_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x62inary_data\x18\x04 \x01(\x0c"S\n\x0b\x44\x65viceState\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x62inary_data\x18\x02 \x01(\x0c*L\n\tMqttState\x12\x1a\n\x16MQTT_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMQTT_ENABLED\x10\x01\x12\x11\n\rMQTT_DISABLED\x10\x02*L\n\tHttpState\x12\x1a\n\x16HTTP_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cHTTP_ENABLED\x10\x01\x12\x11\n\rHTTP_DISABLED\x10\x02*O\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\n\x12\t\n\x05\x45RROR\x10\x14\x12\x08\n\x04INFO\x10\x1e\x12\t\n\x05\x44\x45\x42UG\x10(*I\n\x0bGatewayType\x12\x1c\n\x18GATEWAY_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GATEWAY\x10\x01\x12\x0f\n\x0bNON_GATEWAY\x10\x02*\x91\x01\n\x11GatewayAuthMethod\x12#\n\x1fGATEWAY_AUTH_METHOD_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41SSOCIATION_ONLY\x10\x01\x12\x1a\n\x16\x44\x45VICE_AUTH_TOKEN_ONLY\x10\x02\x12%\n!ASSOCIATION_AND_DEVICE_AUTH_TOKEN\x10\x03*e\n\x1aPublicKeyCertificateFormat\x12-\n)UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT\x10\x00\x12\x18\n\x14X509_CERTIFICATE_PEM\x10\x01*v\n\x0fPublicKeyFormat\x12!\n\x1dUNSPECIFIED_PUBLIC_KEY_FORMAT\x10\x00\x12\x0b\n\x07RSA_PEM\x10\x03\x12\x10\n\x0cRSA_X509_PEM\x10\x01\x12\r\n\tES256_PEM\x10\x02\x12\x12\n\x0e\x45S256_X509_PEM\x10\x04\x42\x66\n\x17\x63om.google.cloud.iot.v1B\x0eResourcesProtoP\x01Z6google.golang.org/genproto/googleapis/cloud/iot/v1;iot\xf8\x01\x01\x62\x06proto3' + '\n)google/cloud/iot_v1/proto/resources.proto\x12\x13google.cloud.iot.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"\xb0\x07\n\x06\x44\x65vice\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06num_id\x18\x03 \x01(\x04\x12:\n\x0b\x63redentials\x18\x0c \x03(\x0b\x32%.google.cloud.iot.v1.DeviceCredential\x12\x37\n\x13last_heartbeat_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0flast_event_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0flast_state_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14last_config_ack_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x15last_config_send_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x62locked\x18\x13 \x01(\x08\x12\x33\n\x0flast_error_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12-\n\x11last_error_status\x18\x0b \x01(\x0b\x32\x12.google.rpc.Status\x12\x31\n\x06\x63onfig\x18\r \x01(\x0b\x32!.google.cloud.iot.v1.DeviceConfig\x12/\n\x05state\x18\x10 \x01(\x0b\x32 .google.cloud.iot.v1.DeviceState\x12\x30\n\tlog_level\x18\x15 \x01(\x0e\x32\x1d.google.cloud.iot.v1.LogLevel\x12;\n\x08metadata\x18\x11 \x03(\x0b\x32).google.cloud.iot.v1.Device.MetadataEntry\x12:\n\x0egateway_config\x18\x18 \x01(\x0b\x32".google.cloud.iot.v1.GatewayConfig\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:s\xea\x41p\n\x1e\x63loudiot.googleapis.com/Device\x12Nprojects/{project}/locations/{location}/registries/{registry}/devices/{device}"\xee\x01\n\rGatewayConfig\x12\x36\n\x0cgateway_type\x18\x01 \x01(\x0e\x32 .google.cloud.iot.v1.GatewayType\x12\x43\n\x13gateway_auth_method\x18\x02 \x01(\x0e\x32&.google.cloud.iot.v1.GatewayAuthMethod\x12 \n\x18last_accessed_gateway_id\x18\x03 \x01(\t\x12>\n\x1alast_accessed_gateway_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8f\x04\n\x0e\x44\x65viceRegistry\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12P\n\x1a\x65vent_notification_configs\x18\n \x03(\x0b\x32,.google.cloud.iot.v1.EventNotificationConfig\x12O\n\x19state_notification_config\x18\x07 \x01(\x0b\x32,.google.cloud.iot.v1.StateNotificationConfig\x12\x34\n\x0bmqtt_config\x18\x04 \x01(\x0b\x32\x1f.google.cloud.iot.v1.MqttConfig\x12\x34\n\x0bhttp_config\x18\t \x01(\x0b\x32\x1f.google.cloud.iot.v1.HttpConfig\x12\x30\n\tlog_level\x18\x0b \x01(\x0e\x32\x1d.google.cloud.iot.v1.LogLevel\x12<\n\x0b\x63redentials\x18\x08 \x03(\x0b\x32\'.google.cloud.iot.v1.RegistryCredential:d\xea\x41\x61\n cloudiot.googleapis.com/Registry\x12=projects/{project}/locations/{location}/registries/{registry}"H\n\nMqttConfig\x12:\n\x12mqtt_enabled_state\x18\x01 \x01(\x0e\x32\x1e.google.cloud.iot.v1.MqttState"H\n\nHttpConfig\x12:\n\x12http_enabled_state\x18\x01 \x01(\x0e\x32\x1e.google.cloud.iot.v1.HttpState"O\n\x17\x45ventNotificationConfig\x12\x19\n\x11subfolder_matches\x18\x02 \x01(\t\x12\x19\n\x11pubsub_topic_name\x18\x01 \x01(\t"4\n\x17StateNotificationConfig\x12\x19\n\x11pubsub_topic_name\x18\x01 \x01(\t"o\n\x12RegistryCredential\x12K\n\x16public_key_certificate\x18\x01 \x01(\x0b\x32).google.cloud.iot.v1.PublicKeyCertificateH\x00\x42\x0c\n\ncredential"\xd0\x01\n\x16X509CertificateDetails\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpiry_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x13signature_algorithm\x18\x05 \x01(\t\x12\x17\n\x0fpublic_key_type\x18\x06 \x01(\t"\xaf\x01\n\x14PublicKeyCertificate\x12?\n\x06\x66ormat\x18\x01 \x01(\x0e\x32/.google.cloud.iot.v1.PublicKeyCertificateFormat\x12\x13\n\x0b\x63\x65rtificate\x18\x02 \x01(\t\x12\x41\n\x0cx509_details\x18\x03 \x01(\x0b\x32+.google.cloud.iot.v1.X509CertificateDetails"\x95\x01\n\x10\x44\x65viceCredential\x12>\n\npublic_key\x18\x02 \x01(\x0b\x32(.google.cloud.iot.v1.PublicKeyCredentialH\x00\x12\x33\n\x0f\x65xpiration_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0c\n\ncredential"X\n\x13PublicKeyCredential\x12\x34\n\x06\x66ormat\x18\x01 \x01(\x0e\x32$.google.cloud.iot.v1.PublicKeyFormat\x12\x0b\n\x03key\x18\x02 \x01(\t"\xa0\x01\n\x0c\x44\x65viceConfig\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\x35\n\x11\x63loud_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x64\x65vice_ack_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x62inary_data\x18\x04 \x01(\x0c"S\n\x0b\x44\x65viceState\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x62inary_data\x18\x02 \x01(\x0c*L\n\tMqttState\x12\x1a\n\x16MQTT_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMQTT_ENABLED\x10\x01\x12\x11\n\rMQTT_DISABLED\x10\x02*L\n\tHttpState\x12\x1a\n\x16HTTP_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cHTTP_ENABLED\x10\x01\x12\x11\n\rHTTP_DISABLED\x10\x02*O\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\n\x12\t\n\x05\x45RROR\x10\x14\x12\x08\n\x04INFO\x10\x1e\x12\t\n\x05\x44\x45\x42UG\x10(*I\n\x0bGatewayType\x12\x1c\n\x18GATEWAY_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07GATEWAY\x10\x01\x12\x0f\n\x0bNON_GATEWAY\x10\x02*\x91\x01\n\x11GatewayAuthMethod\x12#\n\x1fGATEWAY_AUTH_METHOD_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41SSOCIATION_ONLY\x10\x01\x12\x1a\n\x16\x44\x45VICE_AUTH_TOKEN_ONLY\x10\x02\x12%\n!ASSOCIATION_AND_DEVICE_AUTH_TOKEN\x10\x03*e\n\x1aPublicKeyCertificateFormat\x12-\n)UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT\x10\x00\x12\x18\n\x14X509_CERTIFICATE_PEM\x10\x01*v\n\x0fPublicKeyFormat\x12!\n\x1dUNSPECIFIED_PUBLIC_KEY_FORMAT\x10\x00\x12\x0b\n\x07RSA_PEM\x10\x03\x12\x10\n\x0cRSA_X509_PEM\x10\x01\x12\r\n\tES256_PEM\x10\x02\x12\x12\n\x0e\x45S256_X509_PEM\x10\x04\x42\x66\n\x17\x63om.google.cloud.iot.v1B\x0eResourcesProtoP\x01Z6google.golang.org/genproto/googleapis/cloud/iot/v1;iot\xf8\x01\x01\x62\x06proto3' ), dependencies=[ - google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, ], @@ -60,8 +60,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2928, - serialized_end=3004, + serialized_start=3144, + serialized_end=3220, ) _sym_db.RegisterEnumDescriptor(_MQTTSTATE) @@ -88,8 +88,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3006, - serialized_end=3082, + serialized_start=3222, + serialized_end=3298, ) _sym_db.RegisterEnumDescriptor(_HTTPSTATE) @@ -122,8 +122,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3084, - serialized_end=3163, + serialized_start=3300, + serialized_end=3379, ) _sym_db.RegisterEnumDescriptor(_LOGLEVEL) @@ -150,8 +150,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3165, - serialized_end=3238, + serialized_start=3381, + serialized_end=3454, ) _sym_db.RegisterEnumDescriptor(_GATEWAYTYPE) @@ -193,8 +193,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3241, - serialized_end=3386, + serialized_start=3457, + serialized_end=3602, ) _sym_db.RegisterEnumDescriptor(_GATEWAYAUTHMETHOD) @@ -222,8 +222,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3388, - serialized_end=3489, + serialized_start=3604, + serialized_end=3705, ) _sym_db.RegisterEnumDescriptor(_PUBLICKEYCERTIFICATEFORMAT) @@ -258,8 +258,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3491, - serialized_end=3609, + serialized_start=3707, + serialized_end=3825, ) _sym_db.RegisterEnumDescriptor(_PUBLICKEYFORMAT) @@ -343,8 +343,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=935, - serialized_end=982, + serialized_start=932, + serialized_end=979, ) _DEVICE = _descriptor.Descriptor( @@ -664,13 +664,15 @@ extensions=[], nested_types=[_DEVICE_METADATAENTRY], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352Ap\n\036cloudiot.googleapis.com/Device\022Nprojects/{project}/locations/{location}/registries/{registry}/devices/{device}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=155, - serialized_end=982, + serialized_start=152, + serialized_end=1096, ) @@ -762,8 +764,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=985, - serialized_end=1223, + serialized_start=1099, + serialized_end=1337, ) @@ -922,13 +924,15 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352Aa\n cloudiot.googleapis.com/Registry\022=projects/{project}/locations/{location}/registries/{registry}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1226, - serialized_end=1651, + serialized_start=1340, + serialized_end=1867, ) @@ -966,8 +970,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1653, - serialized_end=1725, + serialized_start=1869, + serialized_end=1941, ) @@ -1005,8 +1009,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1727, - serialized_end=1799, + serialized_start=1943, + serialized_end=2015, ) @@ -1062,8 +1066,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1801, - serialized_end=1880, + serialized_start=2017, + serialized_end=2096, ) @@ -1101,8 +1105,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1882, - serialized_end=1934, + serialized_start=2098, + serialized_end=2150, ) @@ -1148,8 +1152,8 @@ fields=[], ) ], - serialized_start=1936, - serialized_end=2047, + serialized_start=2152, + serialized_end=2263, ) @@ -1277,8 +1281,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2050, - serialized_end=2258, + serialized_start=2266, + serialized_end=2474, ) @@ -1352,8 +1356,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2261, - serialized_end=2436, + serialized_start=2477, + serialized_end=2652, ) @@ -1417,8 +1421,8 @@ fields=[], ) ], - serialized_start=2439, - serialized_end=2588, + serialized_start=2655, + serialized_end=2804, ) @@ -1474,8 +1478,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2590, - serialized_end=2678, + serialized_start=2806, + serialized_end=2894, ) @@ -1567,8 +1571,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2681, - serialized_end=2841, + serialized_start=2897, + serialized_end=3057, ) @@ -1624,8 +1628,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2843, - serialized_end=2926, + serialized_start=3059, + serialized_end=3142, ) _DEVICE_METADATAENTRY.containing_type = _DEVICE @@ -2215,4 +2219,6 @@ DESCRIPTOR._options = None _DEVICE_METADATAENTRY._options = None +_DEVICE._options = None +_DEVICEREGISTRY._options = None # @@protoc_insertion_point(module_scope) diff --git a/noxfile.py b/noxfile.py index 3d92df19..08c709fa 100644 --- a/noxfile.py +++ b/noxfile.py @@ -86,7 +86,7 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) def unit(session): """Run the unit test suite.""" default(session) diff --git a/synth.metadata b/synth.metadata index f93b32da..8d3cfdc2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-05T12:26:06.841344Z", + "updateTime": "2020-01-08T13:23:37.503033Z", "sources": [ { "generator": { "name": "artman", - "version": "0.38.0", - "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" + "version": "0.43.0", + "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ceb8e2fb12f048cc94caae532ef0b4cf026a78f3", - "internalRef": "272971705" + "sha": "08b488e0660c59842a7dee0e3e2b65d9e3a514a9", + "internalRef": "288625007" } }, { "template": { "name": "python_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], diff --git a/tests/unit/gapic/v1/test_device_manager_client_v1.py b/tests/unit/gapic/v1/test_device_manager_client_v1.py index 3bf279f2..eb0e30ea 100644 --- a/tests/unit/gapic/v1/test_device_manager_client_v1.py +++ b/tests/unit/gapic/v1/test_device_manager_client_v1.py @@ -625,7 +625,7 @@ def test_set_iam_policy(self): client = iot_v1.DeviceManagerClient() # Setup Request - resource = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") + resource = "resource-341064690" policy = {} response = client.set_iam_policy(resource, policy) @@ -647,7 +647,7 @@ def test_set_iam_policy_exception(self): client = iot_v1.DeviceManagerClient() # Setup request - resource = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") + resource = "resource-341064690" policy = {} with pytest.raises(CustomException): @@ -668,7 +668,7 @@ def test_get_iam_policy(self): client = iot_v1.DeviceManagerClient() # Setup Request - resource = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") + resource = "resource-341064690" response = client.get_iam_policy(resource) assert expected_response == response @@ -687,7 +687,7 @@ def test_get_iam_policy_exception(self): client = iot_v1.DeviceManagerClient() # Setup request - resource = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") + resource = "resource-341064690" with pytest.raises(CustomException): client.get_iam_policy(resource) @@ -707,7 +707,7 @@ def test_test_iam_permissions(self): client = iot_v1.DeviceManagerClient() # Setup Request - resource = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") + resource = "resource-341064690" permissions = [] response = client.test_iam_permissions(resource, permissions) @@ -729,7 +729,7 @@ def test_test_iam_permissions_exception(self): client = iot_v1.DeviceManagerClient() # Setup request - resource = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") + resource = "resource-341064690" permissions = [] with pytest.raises(CustomException):