google-cloud-iot-v1 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/iot/v1/version"
24
+
25
+ require "google/cloud/iot/v1/device_manager/credentials"
26
+ require "google/cloud/iot/v1/device_manager/paths"
27
+ require "google/cloud/iot/v1/device_manager/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Iot
32
+ module V1
33
+ ##
34
+ # Internet of Things (IoT) service. Securely connect and manage IoT devices.
35
+ #
36
+ # To load this service and instantiate a REST client:
37
+ #
38
+ # require "google/cloud/iot/v1/device_manager/rest"
39
+ # client = ::Google::Cloud::Iot::V1::DeviceManager::Rest::Client.new
40
+ #
41
+ module DeviceManager
42
+ # Client for the REST transport
43
+ module Rest
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
52
+ require "google/cloud/iot/v1/device_manager/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/iot/v1/version"
25
25
  require "google/cloud/iot/v1/device_manager/credentials"
26
26
  require "google/cloud/iot/v1/device_manager/paths"
27
27
  require "google/cloud/iot/v1/device_manager/client"
28
+ require "google/cloud/iot/v1/device_manager/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -33,11 +34,16 @@ module Google
33
34
  ##
34
35
  # Internet of Things (IoT) service. Securely connect and manage IoT devices.
35
36
  #
36
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
37
38
  #
38
39
  # require "google/cloud/iot/v1/device_manager"
39
40
  # client = ::Google::Cloud::Iot::V1::DeviceManager::Client.new
40
41
  #
42
+ # @example Load this service and instantiate a REST client
43
+ #
44
+ # require "google/cloud/iot/v1/device_manager/rest"
45
+ # client = ::Google::Cloud::Iot::V1::DeviceManager::Rest::Client.new
46
+ #
41
47
  module DeviceManager
42
48
  end
43
49
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/iot/v1/device_manager.proto
3
4
 
@@ -12,109 +13,34 @@ require 'google/iam/v1/iam_policy_pb'
12
13
  require 'google/iam/v1/policy_pb'
13
14
  require 'google/protobuf/empty_pb'
14
15
  require 'google/protobuf/field_mask_pb'
15
- require 'google/rpc/status_pb'
16
16
 
17
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_file("google/cloud/iot/v1/device_manager.proto", :syntax => :proto3) do
19
- add_message "google.cloud.iot.v1.CreateDeviceRegistryRequest" do
20
- optional :parent, :string, 1
21
- optional :device_registry, :message, 2, "google.cloud.iot.v1.DeviceRegistry"
22
- end
23
- add_message "google.cloud.iot.v1.GetDeviceRegistryRequest" do
24
- optional :name, :string, 1
25
- end
26
- add_message "google.cloud.iot.v1.DeleteDeviceRegistryRequest" do
27
- optional :name, :string, 1
28
- end
29
- add_message "google.cloud.iot.v1.UpdateDeviceRegistryRequest" do
30
- optional :device_registry, :message, 1, "google.cloud.iot.v1.DeviceRegistry"
31
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
32
- end
33
- add_message "google.cloud.iot.v1.ListDeviceRegistriesRequest" do
34
- optional :parent, :string, 1
35
- optional :page_size, :int32, 2
36
- optional :page_token, :string, 3
37
- end
38
- add_message "google.cloud.iot.v1.ListDeviceRegistriesResponse" do
39
- repeated :device_registries, :message, 1, "google.cloud.iot.v1.DeviceRegistry"
40
- optional :next_page_token, :string, 2
41
- end
42
- add_message "google.cloud.iot.v1.CreateDeviceRequest" do
43
- optional :parent, :string, 1
44
- optional :device, :message, 2, "google.cloud.iot.v1.Device"
45
- end
46
- add_message "google.cloud.iot.v1.GetDeviceRequest" do
47
- optional :name, :string, 1
48
- optional :field_mask, :message, 2, "google.protobuf.FieldMask"
49
- end
50
- add_message "google.cloud.iot.v1.UpdateDeviceRequest" do
51
- optional :device, :message, 2, "google.cloud.iot.v1.Device"
52
- optional :update_mask, :message, 3, "google.protobuf.FieldMask"
53
- end
54
- add_message "google.cloud.iot.v1.DeleteDeviceRequest" do
55
- optional :name, :string, 1
56
- end
57
- add_message "google.cloud.iot.v1.ListDevicesRequest" do
58
- optional :parent, :string, 1
59
- repeated :device_num_ids, :uint64, 2
60
- repeated :device_ids, :string, 3
61
- optional :field_mask, :message, 4, "google.protobuf.FieldMask"
62
- optional :gateway_list_options, :message, 6, "google.cloud.iot.v1.GatewayListOptions"
63
- optional :page_size, :int32, 100
64
- optional :page_token, :string, 101
65
- end
66
- add_message "google.cloud.iot.v1.GatewayListOptions" do
67
- oneof :filter do
68
- optional :gateway_type, :enum, 1, "google.cloud.iot.v1.GatewayType"
69
- optional :associations_gateway_id, :string, 2
70
- optional :associations_device_id, :string, 3
71
- end
72
- end
73
- add_message "google.cloud.iot.v1.ListDevicesResponse" do
74
- repeated :devices, :message, 1, "google.cloud.iot.v1.Device"
75
- optional :next_page_token, :string, 2
76
- end
77
- add_message "google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest" do
78
- optional :name, :string, 1
79
- optional :version_to_update, :int64, 2
80
- optional :binary_data, :bytes, 3
81
- end
82
- add_message "google.cloud.iot.v1.ListDeviceConfigVersionsRequest" do
83
- optional :name, :string, 1
84
- optional :num_versions, :int32, 2
85
- end
86
- add_message "google.cloud.iot.v1.ListDeviceConfigVersionsResponse" do
87
- repeated :device_configs, :message, 1, "google.cloud.iot.v1.DeviceConfig"
88
- end
89
- add_message "google.cloud.iot.v1.ListDeviceStatesRequest" do
90
- optional :name, :string, 1
91
- optional :num_states, :int32, 2
92
- end
93
- add_message "google.cloud.iot.v1.ListDeviceStatesResponse" do
94
- repeated :device_states, :message, 1, "google.cloud.iot.v1.DeviceState"
95
- end
96
- add_message "google.cloud.iot.v1.SendCommandToDeviceRequest" do
97
- optional :name, :string, 1
98
- optional :binary_data, :bytes, 2
99
- optional :subfolder, :string, 3
100
- end
101
- add_message "google.cloud.iot.v1.SendCommandToDeviceResponse" do
102
- end
103
- add_message "google.cloud.iot.v1.BindDeviceToGatewayRequest" do
104
- optional :parent, :string, 1
105
- optional :gateway_id, :string, 2
106
- optional :device_id, :string, 3
107
- end
108
- add_message "google.cloud.iot.v1.BindDeviceToGatewayResponse" do
109
- end
110
- add_message "google.cloud.iot.v1.UnbindDeviceFromGatewayRequest" do
111
- optional :parent, :string, 1
112
- optional :gateway_id, :string, 2
113
- optional :device_id, :string, 3
114
- end
115
- add_message "google.cloud.iot.v1.UnbindDeviceFromGatewayResponse" do
17
+
18
+ descriptor_data = "\n(google/cloud/iot/v1/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/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\"\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/cloudiotB]\n\x17\x63om.google.cloud.iot.v1B\x12\x44\x65viceManagerProtoP\x01Z)cloud.google.com/go/iot/apiv1/iotpb;iotpb\xf8\x01\x01\x62\x06proto3"
19
+
20
+ pool = Google::Protobuf::DescriptorPool.generated_pool
21
+
22
+ begin
23
+ pool.add_serialized_file(descriptor_data)
24
+ rescue TypeError => e
25
+ # Compatibility code: will be removed in the next major version.
26
+ require 'google/protobuf/descriptor_pb'
27
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
+ parsed.clear_dependency
29
+ serialized = parsed.class.encode(parsed)
30
+ file = pool.add_serialized_file(serialized)
31
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
+ imports = [
33
+ ["google.cloud.iot.v1.DeviceRegistry", "google/cloud/iot/v1/resources.proto"],
34
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
35
+ ]
36
+ imports.each do |type_name, expected_filename|
37
+ import_file = pool.lookup(type_name).file_descriptor
38
+ if import_file.name != expected_filename
39
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
116
40
  end
117
41
  end
42
+ warn "Each proto file must use a consistent fully-qualified name."
43
+ warn "This will become an error in the next major version."
118
44
  end
119
45
 
120
46
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/iot/v1/resources.proto
3
4
 
@@ -7,134 +8,33 @@ require 'google/api/resource_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
9
  require 'google/rpc/status_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/cloud/iot/v1/resources.proto", :syntax => :proto3) do
12
- add_message "google.cloud.iot.v1.Device" do
13
- optional :id, :string, 1
14
- optional :name, :string, 2
15
- optional :num_id, :uint64, 3
16
- repeated :credentials, :message, 12, "google.cloud.iot.v1.DeviceCredential"
17
- optional :last_heartbeat_time, :message, 7, "google.protobuf.Timestamp"
18
- optional :last_event_time, :message, 8, "google.protobuf.Timestamp"
19
- optional :last_state_time, :message, 20, "google.protobuf.Timestamp"
20
- optional :last_config_ack_time, :message, 14, "google.protobuf.Timestamp"
21
- optional :last_config_send_time, :message, 18, "google.protobuf.Timestamp"
22
- optional :blocked, :bool, 19
23
- optional :last_error_time, :message, 10, "google.protobuf.Timestamp"
24
- optional :last_error_status, :message, 11, "google.rpc.Status"
25
- optional :config, :message, 13, "google.cloud.iot.v1.DeviceConfig"
26
- optional :state, :message, 16, "google.cloud.iot.v1.DeviceState"
27
- optional :log_level, :enum, 21, "google.cloud.iot.v1.LogLevel"
28
- map :metadata, :string, :string, 17
29
- optional :gateway_config, :message, 24, "google.cloud.iot.v1.GatewayConfig"
30
- end
31
- add_message "google.cloud.iot.v1.GatewayConfig" do
32
- optional :gateway_type, :enum, 1, "google.cloud.iot.v1.GatewayType"
33
- optional :gateway_auth_method, :enum, 2, "google.cloud.iot.v1.GatewayAuthMethod"
34
- optional :last_accessed_gateway_id, :string, 3
35
- optional :last_accessed_gateway_time, :message, 4, "google.protobuf.Timestamp"
36
- end
37
- add_message "google.cloud.iot.v1.DeviceRegistry" do
38
- optional :id, :string, 1
39
- optional :name, :string, 2
40
- repeated :event_notification_configs, :message, 10, "google.cloud.iot.v1.EventNotificationConfig"
41
- optional :state_notification_config, :message, 7, "google.cloud.iot.v1.StateNotificationConfig"
42
- optional :mqtt_config, :message, 4, "google.cloud.iot.v1.MqttConfig"
43
- optional :http_config, :message, 9, "google.cloud.iot.v1.HttpConfig"
44
- optional :log_level, :enum, 11, "google.cloud.iot.v1.LogLevel"
45
- repeated :credentials, :message, 8, "google.cloud.iot.v1.RegistryCredential"
46
- end
47
- add_message "google.cloud.iot.v1.MqttConfig" do
48
- optional :mqtt_enabled_state, :enum, 1, "google.cloud.iot.v1.MqttState"
49
- end
50
- add_message "google.cloud.iot.v1.HttpConfig" do
51
- optional :http_enabled_state, :enum, 1, "google.cloud.iot.v1.HttpState"
52
- end
53
- add_message "google.cloud.iot.v1.EventNotificationConfig" do
54
- optional :subfolder_matches, :string, 2
55
- optional :pubsub_topic_name, :string, 1
56
- end
57
- add_message "google.cloud.iot.v1.StateNotificationConfig" do
58
- optional :pubsub_topic_name, :string, 1
59
- end
60
- add_message "google.cloud.iot.v1.RegistryCredential" do
61
- oneof :credential do
62
- optional :public_key_certificate, :message, 1, "google.cloud.iot.v1.PublicKeyCertificate"
63
- end
64
- end
65
- add_message "google.cloud.iot.v1.X509CertificateDetails" do
66
- optional :issuer, :string, 1
67
- optional :subject, :string, 2
68
- optional :start_time, :message, 3, "google.protobuf.Timestamp"
69
- optional :expiry_time, :message, 4, "google.protobuf.Timestamp"
70
- optional :signature_algorithm, :string, 5
71
- optional :public_key_type, :string, 6
72
- end
73
- add_message "google.cloud.iot.v1.PublicKeyCertificate" do
74
- optional :format, :enum, 1, "google.cloud.iot.v1.PublicKeyCertificateFormat"
75
- optional :certificate, :string, 2
76
- optional :x509_details, :message, 3, "google.cloud.iot.v1.X509CertificateDetails"
77
- end
78
- add_message "google.cloud.iot.v1.DeviceCredential" do
79
- optional :expiration_time, :message, 6, "google.protobuf.Timestamp"
80
- oneof :credential do
81
- optional :public_key, :message, 2, "google.cloud.iot.v1.PublicKeyCredential"
82
- end
83
- end
84
- add_message "google.cloud.iot.v1.PublicKeyCredential" do
85
- optional :format, :enum, 1, "google.cloud.iot.v1.PublicKeyFormat"
86
- optional :key, :string, 2
87
- end
88
- add_message "google.cloud.iot.v1.DeviceConfig" do
89
- optional :version, :int64, 1
90
- optional :cloud_update_time, :message, 2, "google.protobuf.Timestamp"
91
- optional :device_ack_time, :message, 3, "google.protobuf.Timestamp"
92
- optional :binary_data, :bytes, 4
93
- end
94
- add_message "google.cloud.iot.v1.DeviceState" do
95
- optional :update_time, :message, 1, "google.protobuf.Timestamp"
96
- optional :binary_data, :bytes, 2
97
- end
98
- add_enum "google.cloud.iot.v1.MqttState" do
99
- value :MQTT_STATE_UNSPECIFIED, 0
100
- value :MQTT_ENABLED, 1
101
- value :MQTT_DISABLED, 2
102
- end
103
- add_enum "google.cloud.iot.v1.HttpState" do
104
- value :HTTP_STATE_UNSPECIFIED, 0
105
- value :HTTP_ENABLED, 1
106
- value :HTTP_DISABLED, 2
107
- end
108
- add_enum "google.cloud.iot.v1.LogLevel" do
109
- value :LOG_LEVEL_UNSPECIFIED, 0
110
- value :NONE, 10
111
- value :ERROR, 20
112
- value :INFO, 30
113
- value :DEBUG, 40
114
- end
115
- add_enum "google.cloud.iot.v1.GatewayType" do
116
- value :GATEWAY_TYPE_UNSPECIFIED, 0
117
- value :GATEWAY, 1
118
- value :NON_GATEWAY, 2
119
- end
120
- add_enum "google.cloud.iot.v1.GatewayAuthMethod" do
121
- value :GATEWAY_AUTH_METHOD_UNSPECIFIED, 0
122
- value :ASSOCIATION_ONLY, 1
123
- value :DEVICE_AUTH_TOKEN_ONLY, 2
124
- value :ASSOCIATION_AND_DEVICE_AUTH_TOKEN, 3
125
- end
126
- add_enum "google.cloud.iot.v1.PublicKeyCertificateFormat" do
127
- value :UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT, 0
128
- value :X509_CERTIFICATE_PEM, 1
129
- end
130
- add_enum "google.cloud.iot.v1.PublicKeyFormat" do
131
- value :UNSPECIFIED_PUBLIC_KEY_FORMAT, 0
132
- value :RSA_PEM, 3
133
- value :RSA_X509_PEM, 1
134
- value :ES256_PEM, 2
135
- value :ES256_X509_PEM, 4
11
+
12
+ descriptor_data = "\n#google/cloud/iot/v1/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\x42Y\n\x17\x63om.google.cloud.iot.v1B\x0eResourcesProtoP\x01Z)cloud.google.com/go/iot/apiv1/iotpb;iotpb\xf8\x01\x01\x62\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
28
+ ["google.rpc.Status", "google/rpc/status.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
136
34
  end
137
35
  end
36
+ warn "Each proto file must use a consistent fully-qualified name."
37
+ warn "This will become an error in the next major version."
138
38
  end
139
39
 
140
40
  module Google
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/iot/v1/device_manager/rest"
20
+ require "google/cloud/iot/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Iot
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/iot/v1/rest"
31
+ # client = ::Google::Cloud::Iot::V1::DeviceManager::Rest::Client.new
32
+ #
33
+ module V1
34
+ end
35
+ end
36
+ end
37
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Iot
23
23
  module V1
24
- VERSION = "0.5.0"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -23,13 +23,18 @@ module Google
23
23
  module Cloud
24
24
  module Iot
25
25
  ##
26
- # To load this package, including all its services, and instantiate a client:
26
+ # API client module.
27
27
  #
28
- # @example
28
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
29
  #
30
30
  # require "google/cloud/iot/v1"
31
31
  # client = ::Google::Cloud::Iot::V1::DeviceManager::Client.new
32
32
  #
33
+ # @example Load this package, including all its services, and instantiate a REST client
34
+ #
35
+ # require "google/cloud/iot/v1"
36
+ # client = ::Google::Cloud::Iot::V1::DeviceManager::Rest::Client.new
37
+ #
33
38
  module V1
34
39
  end
35
40
  end