google-cloud-iot-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-iot-v1.rb +21 -0
- data/lib/google/cloud/iot/v1.rb +35 -0
- data/lib/google/cloud/iot/v1/device_manager.rb +49 -0
- data/lib/google/cloud/iot/v1/device_manager/client.rb +1936 -0
- data/lib/google/cloud/iot/v1/device_manager/credentials.rb +52 -0
- data/lib/google/cloud/iot/v1/device_manager/paths.rb +90 -0
- data/lib/google/cloud/iot/v1/device_manager_pb.rb +150 -0
- data/lib/google/cloud/iot/v1/device_manager_services_pb.rb +103 -0
- data/lib/google/cloud/iot/v1/resources_pb.rb +167 -0
- data/lib/google/cloud/iot/v1/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/iot/v1/device_manager.rb +397 -0
- data/proto_docs/google/cloud/iot/v1/resources.rb +517 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +231 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Iot
|
24
|
+
module V1
|
25
|
+
module DeviceManager
|
26
|
+
# Credentials for the DeviceManager API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
30
|
+
"https://www.googleapis.com/auth/cloudiot"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"IOT_CREDENTIALS",
|
34
|
+
"IOT_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"IOT_CREDENTIALS_JSON",
|
39
|
+
"IOT_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Iot
|
23
|
+
module V1
|
24
|
+
module DeviceManager
|
25
|
+
# Path helper methods for the DeviceManager API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Device resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/registries/{registry}/devices/{device}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param registry [String]
|
37
|
+
# @param device [String]
|
38
|
+
#
|
39
|
+
# @return [::String]
|
40
|
+
def device_path project:, location:, registry:, device:
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
43
|
+
raise ::ArgumentError, "registry cannot contain /" if registry.to_s.include? "/"
|
44
|
+
|
45
|
+
"projects/#{project}/locations/#{location}/registries/#{registry}/devices/#{device}"
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Create a fully-qualified Location resource string.
|
50
|
+
#
|
51
|
+
# The resource will be in the following format:
|
52
|
+
#
|
53
|
+
# `projects/{project}/locations/{location}`
|
54
|
+
#
|
55
|
+
# @param project [String]
|
56
|
+
# @param location [String]
|
57
|
+
#
|
58
|
+
# @return [::String]
|
59
|
+
def location_path project:, location:
|
60
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
61
|
+
|
62
|
+
"projects/#{project}/locations/#{location}"
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Create a fully-qualified Registry resource string.
|
67
|
+
#
|
68
|
+
# The resource will be in the following format:
|
69
|
+
#
|
70
|
+
# `projects/{project}/locations/{location}/registries/{registry}`
|
71
|
+
#
|
72
|
+
# @param project [String]
|
73
|
+
# @param location [String]
|
74
|
+
# @param registry [String]
|
75
|
+
#
|
76
|
+
# @return [::String]
|
77
|
+
def registry_path project:, location:, registry:
|
78
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
79
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
80
|
+
|
81
|
+
"projects/#{project}/locations/#{location}/registries/#{registry}"
|
82
|
+
end
|
83
|
+
|
84
|
+
extend self
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/iot/v1/device_manager.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/iot/v1/resources_pb'
|
11
|
+
require 'google/iam/v1/iam_policy_pb'
|
12
|
+
require 'google/iam/v1/policy_pb'
|
13
|
+
require 'google/protobuf/empty_pb'
|
14
|
+
require 'google/protobuf/field_mask_pb'
|
15
|
+
require 'google/rpc/status_pb'
|
16
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
|
+
add_file("google/cloud/iot/v1/device_manager.proto", :syntax => :proto3) do
|
18
|
+
add_message "google.cloud.iot.v1.CreateDeviceRegistryRequest" do
|
19
|
+
optional :parent, :string, 1
|
20
|
+
optional :device_registry, :message, 2, "google.cloud.iot.v1.DeviceRegistry"
|
21
|
+
end
|
22
|
+
add_message "google.cloud.iot.v1.GetDeviceRegistryRequest" do
|
23
|
+
optional :name, :string, 1
|
24
|
+
end
|
25
|
+
add_message "google.cloud.iot.v1.DeleteDeviceRegistryRequest" do
|
26
|
+
optional :name, :string, 1
|
27
|
+
end
|
28
|
+
add_message "google.cloud.iot.v1.UpdateDeviceRegistryRequest" do
|
29
|
+
optional :device_registry, :message, 1, "google.cloud.iot.v1.DeviceRegistry"
|
30
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
31
|
+
end
|
32
|
+
add_message "google.cloud.iot.v1.ListDeviceRegistriesRequest" do
|
33
|
+
optional :parent, :string, 1
|
34
|
+
optional :page_size, :int32, 2
|
35
|
+
optional :page_token, :string, 3
|
36
|
+
end
|
37
|
+
add_message "google.cloud.iot.v1.ListDeviceRegistriesResponse" do
|
38
|
+
repeated :device_registries, :message, 1, "google.cloud.iot.v1.DeviceRegistry"
|
39
|
+
optional :next_page_token, :string, 2
|
40
|
+
end
|
41
|
+
add_message "google.cloud.iot.v1.CreateDeviceRequest" do
|
42
|
+
optional :parent, :string, 1
|
43
|
+
optional :device, :message, 2, "google.cloud.iot.v1.Device"
|
44
|
+
end
|
45
|
+
add_message "google.cloud.iot.v1.GetDeviceRequest" do
|
46
|
+
optional :name, :string, 1
|
47
|
+
optional :field_mask, :message, 2, "google.protobuf.FieldMask"
|
48
|
+
end
|
49
|
+
add_message "google.cloud.iot.v1.UpdateDeviceRequest" do
|
50
|
+
optional :device, :message, 2, "google.cloud.iot.v1.Device"
|
51
|
+
optional :update_mask, :message, 3, "google.protobuf.FieldMask"
|
52
|
+
end
|
53
|
+
add_message "google.cloud.iot.v1.DeleteDeviceRequest" do
|
54
|
+
optional :name, :string, 1
|
55
|
+
end
|
56
|
+
add_message "google.cloud.iot.v1.ListDevicesRequest" do
|
57
|
+
optional :parent, :string, 1
|
58
|
+
repeated :device_num_ids, :uint64, 2
|
59
|
+
repeated :device_ids, :string, 3
|
60
|
+
optional :field_mask, :message, 4, "google.protobuf.FieldMask"
|
61
|
+
optional :gateway_list_options, :message, 6, "google.cloud.iot.v1.GatewayListOptions"
|
62
|
+
optional :page_size, :int32, 100
|
63
|
+
optional :page_token, :string, 101
|
64
|
+
end
|
65
|
+
add_message "google.cloud.iot.v1.GatewayListOptions" do
|
66
|
+
oneof :filter do
|
67
|
+
optional :gateway_type, :enum, 1, "google.cloud.iot.v1.GatewayType"
|
68
|
+
optional :associations_gateway_id, :string, 2
|
69
|
+
optional :associations_device_id, :string, 3
|
70
|
+
end
|
71
|
+
end
|
72
|
+
add_message "google.cloud.iot.v1.ListDevicesResponse" do
|
73
|
+
repeated :devices, :message, 1, "google.cloud.iot.v1.Device"
|
74
|
+
optional :next_page_token, :string, 2
|
75
|
+
end
|
76
|
+
add_message "google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest" do
|
77
|
+
optional :name, :string, 1
|
78
|
+
optional :version_to_update, :int64, 2
|
79
|
+
optional :binary_data, :bytes, 3
|
80
|
+
end
|
81
|
+
add_message "google.cloud.iot.v1.ListDeviceConfigVersionsRequest" do
|
82
|
+
optional :name, :string, 1
|
83
|
+
optional :num_versions, :int32, 2
|
84
|
+
end
|
85
|
+
add_message "google.cloud.iot.v1.ListDeviceConfigVersionsResponse" do
|
86
|
+
repeated :device_configs, :message, 1, "google.cloud.iot.v1.DeviceConfig"
|
87
|
+
end
|
88
|
+
add_message "google.cloud.iot.v1.ListDeviceStatesRequest" do
|
89
|
+
optional :name, :string, 1
|
90
|
+
optional :num_states, :int32, 2
|
91
|
+
end
|
92
|
+
add_message "google.cloud.iot.v1.ListDeviceStatesResponse" do
|
93
|
+
repeated :device_states, :message, 1, "google.cloud.iot.v1.DeviceState"
|
94
|
+
end
|
95
|
+
add_message "google.cloud.iot.v1.SendCommandToDeviceRequest" do
|
96
|
+
optional :name, :string, 1
|
97
|
+
optional :binary_data, :bytes, 2
|
98
|
+
optional :subfolder, :string, 3
|
99
|
+
end
|
100
|
+
add_message "google.cloud.iot.v1.SendCommandToDeviceResponse" do
|
101
|
+
end
|
102
|
+
add_message "google.cloud.iot.v1.BindDeviceToGatewayRequest" do
|
103
|
+
optional :parent, :string, 1
|
104
|
+
optional :gateway_id, :string, 2
|
105
|
+
optional :device_id, :string, 3
|
106
|
+
end
|
107
|
+
add_message "google.cloud.iot.v1.BindDeviceToGatewayResponse" do
|
108
|
+
end
|
109
|
+
add_message "google.cloud.iot.v1.UnbindDeviceFromGatewayRequest" do
|
110
|
+
optional :parent, :string, 1
|
111
|
+
optional :gateway_id, :string, 2
|
112
|
+
optional :device_id, :string, 3
|
113
|
+
end
|
114
|
+
add_message "google.cloud.iot.v1.UnbindDeviceFromGatewayResponse" do
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
module Google
|
120
|
+
module Cloud
|
121
|
+
module Iot
|
122
|
+
module V1
|
123
|
+
CreateDeviceRegistryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.CreateDeviceRegistryRequest").msgclass
|
124
|
+
GetDeviceRegistryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.GetDeviceRegistryRequest").msgclass
|
125
|
+
DeleteDeviceRegistryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.DeleteDeviceRegistryRequest").msgclass
|
126
|
+
UpdateDeviceRegistryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.UpdateDeviceRegistryRequest").msgclass
|
127
|
+
ListDeviceRegistriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDeviceRegistriesRequest").msgclass
|
128
|
+
ListDeviceRegistriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDeviceRegistriesResponse").msgclass
|
129
|
+
CreateDeviceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.CreateDeviceRequest").msgclass
|
130
|
+
GetDeviceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.GetDeviceRequest").msgclass
|
131
|
+
UpdateDeviceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.UpdateDeviceRequest").msgclass
|
132
|
+
DeleteDeviceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.DeleteDeviceRequest").msgclass
|
133
|
+
ListDevicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDevicesRequest").msgclass
|
134
|
+
GatewayListOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.GatewayListOptions").msgclass
|
135
|
+
ListDevicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDevicesResponse").msgclass
|
136
|
+
ModifyCloudToDeviceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest").msgclass
|
137
|
+
ListDeviceConfigVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDeviceConfigVersionsRequest").msgclass
|
138
|
+
ListDeviceConfigVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDeviceConfigVersionsResponse").msgclass
|
139
|
+
ListDeviceStatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDeviceStatesRequest").msgclass
|
140
|
+
ListDeviceStatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.ListDeviceStatesResponse").msgclass
|
141
|
+
SendCommandToDeviceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.SendCommandToDeviceRequest").msgclass
|
142
|
+
SendCommandToDeviceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.SendCommandToDeviceResponse").msgclass
|
143
|
+
BindDeviceToGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.BindDeviceToGatewayRequest").msgclass
|
144
|
+
BindDeviceToGatewayResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.BindDeviceToGatewayResponse").msgclass
|
145
|
+
UnbindDeviceFromGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.UnbindDeviceFromGatewayRequest").msgclass
|
146
|
+
UnbindDeviceFromGatewayResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.UnbindDeviceFromGatewayResponse").msgclass
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/iot/v1/device_manager.proto for package 'google.cloud.iot.v1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2019 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'google/cloud/iot/v1/device_manager_pb'
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Iot
|
26
|
+
module V1
|
27
|
+
module DeviceManager
|
28
|
+
# Internet of Things (IoT) service. Securely connect and manage IoT devices.
|
29
|
+
class Service
|
30
|
+
|
31
|
+
include GRPC::GenericService
|
32
|
+
|
33
|
+
self.marshal_class_method = :encode
|
34
|
+
self.unmarshal_class_method = :decode
|
35
|
+
self.service_name = 'google.cloud.iot.v1.DeviceManager'
|
36
|
+
|
37
|
+
# Creates a device registry that contains devices.
|
38
|
+
rpc :CreateDeviceRegistry, CreateDeviceRegistryRequest, DeviceRegistry
|
39
|
+
# Gets a device registry configuration.
|
40
|
+
rpc :GetDeviceRegistry, GetDeviceRegistryRequest, DeviceRegistry
|
41
|
+
# Updates a device registry configuration.
|
42
|
+
rpc :UpdateDeviceRegistry, UpdateDeviceRegistryRequest, DeviceRegistry
|
43
|
+
# Deletes a device registry configuration.
|
44
|
+
rpc :DeleteDeviceRegistry, DeleteDeviceRegistryRequest, Google::Protobuf::Empty
|
45
|
+
# Lists device registries.
|
46
|
+
rpc :ListDeviceRegistries, ListDeviceRegistriesRequest, ListDeviceRegistriesResponse
|
47
|
+
# Creates a device in a device registry.
|
48
|
+
rpc :CreateDevice, CreateDeviceRequest, Device
|
49
|
+
# Gets details about a device.
|
50
|
+
rpc :GetDevice, GetDeviceRequest, Device
|
51
|
+
# Updates a device.
|
52
|
+
rpc :UpdateDevice, UpdateDeviceRequest, Device
|
53
|
+
# Deletes a device.
|
54
|
+
rpc :DeleteDevice, DeleteDeviceRequest, Google::Protobuf::Empty
|
55
|
+
# List devices in a device registry.
|
56
|
+
rpc :ListDevices, ListDevicesRequest, ListDevicesResponse
|
57
|
+
# Modifies the configuration for the device, which is eventually sent from
|
58
|
+
# the Cloud IoT Core servers. Returns the modified configuration version and
|
59
|
+
# its metadata.
|
60
|
+
rpc :ModifyCloudToDeviceConfig, ModifyCloudToDeviceConfigRequest, DeviceConfig
|
61
|
+
# Lists the last few versions of the device configuration in descending
|
62
|
+
# order (i.e.: newest first).
|
63
|
+
rpc :ListDeviceConfigVersions, ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse
|
64
|
+
# Lists the last few versions of the device state in descending order (i.e.:
|
65
|
+
# newest first).
|
66
|
+
rpc :ListDeviceStates, ListDeviceStatesRequest, ListDeviceStatesResponse
|
67
|
+
# Sets the access control policy on the specified resource. Replaces any
|
68
|
+
# existing policy.
|
69
|
+
rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
|
70
|
+
# Gets the access control policy for a resource.
|
71
|
+
# Returns an empty policy if the resource exists and does not have a policy
|
72
|
+
# set.
|
73
|
+
rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
|
74
|
+
# Returns permissions that a caller has on the specified resource.
|
75
|
+
# If the resource does not exist, this will return an empty set of
|
76
|
+
# permissions, not a NOT_FOUND error.
|
77
|
+
rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
|
78
|
+
# Sends a command to the specified device. In order for a device to be able
|
79
|
+
# to receive commands, it must:
|
80
|
+
# 1) be connected to Cloud IoT Core using the MQTT protocol, and
|
81
|
+
# 2) be subscribed to the group of MQTT topics specified by
|
82
|
+
# /devices/{device-id}/commands/#. This subscription will receive commands
|
83
|
+
# at the top-level topic /devices/{device-id}/commands as well as commands
|
84
|
+
# for subfolders, like /devices/{device-id}/commands/subfolder.
|
85
|
+
# Note that subscribing to specific subfolders is not supported.
|
86
|
+
# If the command could not be delivered to the device, this method will
|
87
|
+
# return an error; in particular, if the device is not subscribed, this
|
88
|
+
# method will return FAILED_PRECONDITION. Otherwise, this method will
|
89
|
+
# return OK. If the subscription is QoS 1, at least once delivery will be
|
90
|
+
# guaranteed; for QoS 0, no acknowledgment will be expected from the device.
|
91
|
+
rpc :SendCommandToDevice, SendCommandToDeviceRequest, SendCommandToDeviceResponse
|
92
|
+
# Associates the device with the gateway.
|
93
|
+
rpc :BindDeviceToGateway, BindDeviceToGatewayRequest, BindDeviceToGatewayResponse
|
94
|
+
# Deletes the association between the device and the gateway.
|
95
|
+
rpc :UnbindDeviceFromGateway, UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse
|
96
|
+
end
|
97
|
+
|
98
|
+
Stub = Service.rpc_stub_class
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/iot/v1/resources.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/rpc/status_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/cloud/iot/v1/resources.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.cloud.iot.v1.Device" do
|
12
|
+
optional :id, :string, 1
|
13
|
+
optional :name, :string, 2
|
14
|
+
optional :num_id, :uint64, 3
|
15
|
+
repeated :credentials, :message, 12, "google.cloud.iot.v1.DeviceCredential"
|
16
|
+
optional :last_heartbeat_time, :message, 7, "google.protobuf.Timestamp"
|
17
|
+
optional :last_event_time, :message, 8, "google.protobuf.Timestamp"
|
18
|
+
optional :last_state_time, :message, 20, "google.protobuf.Timestamp"
|
19
|
+
optional :last_config_ack_time, :message, 14, "google.protobuf.Timestamp"
|
20
|
+
optional :last_config_send_time, :message, 18, "google.protobuf.Timestamp"
|
21
|
+
optional :blocked, :bool, 19
|
22
|
+
optional :last_error_time, :message, 10, "google.protobuf.Timestamp"
|
23
|
+
optional :last_error_status, :message, 11, "google.rpc.Status"
|
24
|
+
optional :config, :message, 13, "google.cloud.iot.v1.DeviceConfig"
|
25
|
+
optional :state, :message, 16, "google.cloud.iot.v1.DeviceState"
|
26
|
+
optional :log_level, :enum, 21, "google.cloud.iot.v1.LogLevel"
|
27
|
+
map :metadata, :string, :string, 17
|
28
|
+
optional :gateway_config, :message, 24, "google.cloud.iot.v1.GatewayConfig"
|
29
|
+
end
|
30
|
+
add_message "google.cloud.iot.v1.GatewayConfig" do
|
31
|
+
optional :gateway_type, :enum, 1, "google.cloud.iot.v1.GatewayType"
|
32
|
+
optional :gateway_auth_method, :enum, 2, "google.cloud.iot.v1.GatewayAuthMethod"
|
33
|
+
optional :last_accessed_gateway_id, :string, 3
|
34
|
+
optional :last_accessed_gateway_time, :message, 4, "google.protobuf.Timestamp"
|
35
|
+
end
|
36
|
+
add_message "google.cloud.iot.v1.DeviceRegistry" do
|
37
|
+
optional :id, :string, 1
|
38
|
+
optional :name, :string, 2
|
39
|
+
repeated :event_notification_configs, :message, 10, "google.cloud.iot.v1.EventNotificationConfig"
|
40
|
+
optional :state_notification_config, :message, 7, "google.cloud.iot.v1.StateNotificationConfig"
|
41
|
+
optional :mqtt_config, :message, 4, "google.cloud.iot.v1.MqttConfig"
|
42
|
+
optional :http_config, :message, 9, "google.cloud.iot.v1.HttpConfig"
|
43
|
+
optional :log_level, :enum, 11, "google.cloud.iot.v1.LogLevel"
|
44
|
+
repeated :credentials, :message, 8, "google.cloud.iot.v1.RegistryCredential"
|
45
|
+
end
|
46
|
+
add_message "google.cloud.iot.v1.MqttConfig" do
|
47
|
+
optional :mqtt_enabled_state, :enum, 1, "google.cloud.iot.v1.MqttState"
|
48
|
+
end
|
49
|
+
add_message "google.cloud.iot.v1.HttpConfig" do
|
50
|
+
optional :http_enabled_state, :enum, 1, "google.cloud.iot.v1.HttpState"
|
51
|
+
end
|
52
|
+
add_message "google.cloud.iot.v1.EventNotificationConfig" do
|
53
|
+
optional :subfolder_matches, :string, 2
|
54
|
+
optional :pubsub_topic_name, :string, 1
|
55
|
+
end
|
56
|
+
add_message "google.cloud.iot.v1.StateNotificationConfig" do
|
57
|
+
optional :pubsub_topic_name, :string, 1
|
58
|
+
end
|
59
|
+
add_message "google.cloud.iot.v1.RegistryCredential" do
|
60
|
+
oneof :credential do
|
61
|
+
optional :public_key_certificate, :message, 1, "google.cloud.iot.v1.PublicKeyCertificate"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
add_message "google.cloud.iot.v1.X509CertificateDetails" do
|
65
|
+
optional :issuer, :string, 1
|
66
|
+
optional :subject, :string, 2
|
67
|
+
optional :start_time, :message, 3, "google.protobuf.Timestamp"
|
68
|
+
optional :expiry_time, :message, 4, "google.protobuf.Timestamp"
|
69
|
+
optional :signature_algorithm, :string, 5
|
70
|
+
optional :public_key_type, :string, 6
|
71
|
+
end
|
72
|
+
add_message "google.cloud.iot.v1.PublicKeyCertificate" do
|
73
|
+
optional :format, :enum, 1, "google.cloud.iot.v1.PublicKeyCertificateFormat"
|
74
|
+
optional :certificate, :string, 2
|
75
|
+
optional :x509_details, :message, 3, "google.cloud.iot.v1.X509CertificateDetails"
|
76
|
+
end
|
77
|
+
add_message "google.cloud.iot.v1.DeviceCredential" do
|
78
|
+
optional :expiration_time, :message, 6, "google.protobuf.Timestamp"
|
79
|
+
oneof :credential do
|
80
|
+
optional :public_key, :message, 2, "google.cloud.iot.v1.PublicKeyCredential"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
add_message "google.cloud.iot.v1.PublicKeyCredential" do
|
84
|
+
optional :format, :enum, 1, "google.cloud.iot.v1.PublicKeyFormat"
|
85
|
+
optional :key, :string, 2
|
86
|
+
end
|
87
|
+
add_message "google.cloud.iot.v1.DeviceConfig" do
|
88
|
+
optional :version, :int64, 1
|
89
|
+
optional :cloud_update_time, :message, 2, "google.protobuf.Timestamp"
|
90
|
+
optional :device_ack_time, :message, 3, "google.protobuf.Timestamp"
|
91
|
+
optional :binary_data, :bytes, 4
|
92
|
+
end
|
93
|
+
add_message "google.cloud.iot.v1.DeviceState" do
|
94
|
+
optional :update_time, :message, 1, "google.protobuf.Timestamp"
|
95
|
+
optional :binary_data, :bytes, 2
|
96
|
+
end
|
97
|
+
add_enum "google.cloud.iot.v1.MqttState" do
|
98
|
+
value :MQTT_STATE_UNSPECIFIED, 0
|
99
|
+
value :MQTT_ENABLED, 1
|
100
|
+
value :MQTT_DISABLED, 2
|
101
|
+
end
|
102
|
+
add_enum "google.cloud.iot.v1.HttpState" do
|
103
|
+
value :HTTP_STATE_UNSPECIFIED, 0
|
104
|
+
value :HTTP_ENABLED, 1
|
105
|
+
value :HTTP_DISABLED, 2
|
106
|
+
end
|
107
|
+
add_enum "google.cloud.iot.v1.LogLevel" do
|
108
|
+
value :LOG_LEVEL_UNSPECIFIED, 0
|
109
|
+
value :NONE, 10
|
110
|
+
value :ERROR, 20
|
111
|
+
value :INFO, 30
|
112
|
+
value :DEBUG, 40
|
113
|
+
end
|
114
|
+
add_enum "google.cloud.iot.v1.GatewayType" do
|
115
|
+
value :GATEWAY_TYPE_UNSPECIFIED, 0
|
116
|
+
value :GATEWAY, 1
|
117
|
+
value :NON_GATEWAY, 2
|
118
|
+
end
|
119
|
+
add_enum "google.cloud.iot.v1.GatewayAuthMethod" do
|
120
|
+
value :GATEWAY_AUTH_METHOD_UNSPECIFIED, 0
|
121
|
+
value :ASSOCIATION_ONLY, 1
|
122
|
+
value :DEVICE_AUTH_TOKEN_ONLY, 2
|
123
|
+
value :ASSOCIATION_AND_DEVICE_AUTH_TOKEN, 3
|
124
|
+
end
|
125
|
+
add_enum "google.cloud.iot.v1.PublicKeyCertificateFormat" do
|
126
|
+
value :UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT, 0
|
127
|
+
value :X509_CERTIFICATE_PEM, 1
|
128
|
+
end
|
129
|
+
add_enum "google.cloud.iot.v1.PublicKeyFormat" do
|
130
|
+
value :UNSPECIFIED_PUBLIC_KEY_FORMAT, 0
|
131
|
+
value :RSA_PEM, 3
|
132
|
+
value :RSA_X509_PEM, 1
|
133
|
+
value :ES256_PEM, 2
|
134
|
+
value :ES256_X509_PEM, 4
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
module Google
|
140
|
+
module Cloud
|
141
|
+
module Iot
|
142
|
+
module V1
|
143
|
+
Device = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.Device").msgclass
|
144
|
+
GatewayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.GatewayConfig").msgclass
|
145
|
+
DeviceRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.DeviceRegistry").msgclass
|
146
|
+
MqttConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.MqttConfig").msgclass
|
147
|
+
HttpConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.HttpConfig").msgclass
|
148
|
+
EventNotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.EventNotificationConfig").msgclass
|
149
|
+
StateNotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.StateNotificationConfig").msgclass
|
150
|
+
RegistryCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.RegistryCredential").msgclass
|
151
|
+
X509CertificateDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.X509CertificateDetails").msgclass
|
152
|
+
PublicKeyCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.PublicKeyCertificate").msgclass
|
153
|
+
DeviceCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.DeviceCredential").msgclass
|
154
|
+
PublicKeyCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.PublicKeyCredential").msgclass
|
155
|
+
DeviceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.DeviceConfig").msgclass
|
156
|
+
DeviceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.DeviceState").msgclass
|
157
|
+
MqttState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.MqttState").enummodule
|
158
|
+
HttpState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.HttpState").enummodule
|
159
|
+
LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.LogLevel").enummodule
|
160
|
+
GatewayType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.GatewayType").enummodule
|
161
|
+
GatewayAuthMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.GatewayAuthMethod").enummodule
|
162
|
+
PublicKeyCertificateFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.PublicKeyCertificateFormat").enummodule
|
163
|
+
PublicKeyFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.iot.v1.PublicKeyFormat").enummodule
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|