google-cloud-iot-v1 0.1.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b093633f8a1b9ec0c7f1f1a9ed02978eaa4b11b7ed2e08564cfa2e43fad93404
4
- data.tar.gz: 06376eced0113153e84162e3b141421830f28bcb4d53841b4e07b3cf625e3c5b
3
+ metadata.gz: 7b19cf653622e059ecbb99b7f6372827f39b6d74d3e362e3bd8dcf84da633363
4
+ data.tar.gz: 76189cbdfa0ba948239c1e13f0b5713a1fa7d74e294c1d860fa14a143b4a19ec
5
5
  SHA512:
6
- metadata.gz: ce4080b6678bfe53e513dc06549135d788aea5a79df231ed19efc85226ab57f1e9f060b52451e2b9cac6c8812c116e83560b94962ab178d1b54e1d29c753c704
7
- data.tar.gz: e9c33dee857c232835092612937097fac592116823d3ca3eea6a7c6b0bda8fe6f2e04b19caeba68696b90bd3643d95f64116c98bdcf65532dce45d56e96d61d9
6
+ metadata.gz: 03d8a849971a3c6495c908bc985a567907e516eead6b12fcb6cde27597e48c1f772c225b526794a6aba7aec04d06a8a6934df702e1de4c2999baa601e66612f9
7
+ data.tar.gz: 67cdaeb6c36b09e29c40a5c52e3edd83b7db121d0bd891cb3e74b3c48af11c13df380be96a7a989853b2f8b72006102dd49c6d579dfbddfcdc02d46b70740a6e
data/README.md CHANGED
@@ -6,6 +6,12 @@ Registers and manages IoT (Internet of Things) devices that connect to the Googl
6
6
 
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
9
+ This gem is a _versioned_ client. It provides basic client classes for a
10
+ specific version of the Cloud IoT V1 API. Most users should consider using
11
+ the main client gem,
12
+ [google-cloud-iot](https://rubygems.org/gems/google-cloud-iot).
13
+ See the section below titled *Which client should I use?* for more information.
14
+
9
15
  ## Installation
10
16
 
11
17
  ```
@@ -73,3 +79,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
73
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
74
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
75
81
  about the Ruby support schedule.
82
+
83
+ ## Which client should I use?
84
+
85
+ Most modern Ruby client libraries for Google APIs come in two flavors: the main
86
+ client library with a name such as `google-cloud-iot`,
87
+ and lower-level _versioned_ client libraries with names such as
88
+ `google-cloud-iot-v1`.
89
+ _In most cases, you should install the main client._
90
+
91
+ ### What's the difference between the main client and a versioned client?
92
+
93
+ A _versioned client_ provides a basic set of data types and client classes for
94
+ a _single version_ of a specific service. (That is, for a service with multiple
95
+ versions, there might be a separate versioned client for each service version.)
96
+ Most versioned clients are written and maintained by a code generator.
97
+
98
+ The _main client_ is designed to provide you with the _recommended_ client
99
+ interfaces for the service. There will be only one main client for any given
100
+ service, even a service with multiple versions. The main client includes
101
+ factory methods for constructing the client objects we recommend for most
102
+ users. In some cases, those will be classes provided by an underlying versioned
103
+ client; in other cases, they will be handwritten higher-level client objects
104
+ with additional capabilities, convenience methods, or best practices built in.
105
+ Generally, the main client will default to a recommended service version,
106
+ although in some cases you can override this if you need to talk to a specific
107
+ service version.
108
+
109
+ ### Why would I want to use the main client?
110
+
111
+ We recommend that most users install the main client gem for a service. You can
112
+ identify this gem as the one _without_ a version in its name, e.g.
113
+ `google-cloud-iot`.
114
+ The main client is recommended because it will embody the best practices for
115
+ accessing the service, and may also provide more convenient interfaces or
116
+ tighter integration into frameworks and third-party libraries. In addition, the
117
+ documentation and samples published by Google will generally demonstrate use of
118
+ the main client.
119
+
120
+ ### Why would I want to use a versioned client?
121
+
122
+ You can use a versioned client if you are content with a possibly lower-level
123
+ class interface, you explicitly want to avoid features provided by the main
124
+ client, or you want to access a specific service version not be covered by the
125
+ main client. You can identify versioned client gems because the service version
126
+ is part of the name, e.g. `google-cloud-iot-v1`.
127
+
128
+ ### What about the google-apis-<name> clients?
129
+
130
+ Client library gems with names that begin with `google-apis-` are based on an
131
+ older code generation technology. They talk to a REST/JSON backend (whereas
132
+ most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
133
+ not offer the same performance, features, and ease of use provided by more
134
+ modern clients.
135
+
136
+ The `google-apis-` clients have wide coverage across Google services, so you
137
+ might need to use one if there is no modern client available for the service.
138
+ However, if a modern client is available, we generally recommend it over the
139
+ older `google-apis-` clients.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/iot/v1/_helpers" if ::File.file? helper_path
@@ -72,7 +72,7 @@ module Google
72
72
  initial_delay: 0.1,
73
73
  max_delay: 60.0,
74
74
  multiplier: 1.3,
75
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
75
+ retry_codes: [14, 4]
76
76
  }
77
77
 
78
78
  default_config.rpcs.update_device_registry.timeout = 120.0
@@ -82,7 +82,7 @@ module Google
82
82
  initial_delay: 0.1,
83
83
  max_delay: 60.0,
84
84
  multiplier: 1.3,
85
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
85
+ retry_codes: [14, 4]
86
86
  }
87
87
 
88
88
  default_config.rpcs.list_device_registries.timeout = 120.0
@@ -90,7 +90,7 @@ module Google
90
90
  initial_delay: 0.1,
91
91
  max_delay: 60.0,
92
92
  multiplier: 1.3,
93
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
93
+ retry_codes: [14, 4]
94
94
  }
95
95
 
96
96
  default_config.rpcs.create_device.timeout = 120.0
@@ -100,7 +100,7 @@ module Google
100
100
  initial_delay: 0.1,
101
101
  max_delay: 60.0,
102
102
  multiplier: 1.3,
103
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
103
+ retry_codes: [14, 4]
104
104
  }
105
105
 
106
106
  default_config.rpcs.update_device.timeout = 120.0
@@ -110,7 +110,7 @@ module Google
110
110
  initial_delay: 0.1,
111
111
  max_delay: 60.0,
112
112
  multiplier: 1.3,
113
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
113
+ retry_codes: [14, 4]
114
114
  }
115
115
 
116
116
  default_config.rpcs.list_devices.timeout = 120.0
@@ -118,7 +118,7 @@ module Google
118
118
  initial_delay: 0.1,
119
119
  max_delay: 60.0,
120
120
  multiplier: 1.3,
121
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
121
+ retry_codes: [14, 4]
122
122
  }
123
123
 
124
124
  default_config.rpcs.modify_cloud_to_device_config.timeout = 120.0
@@ -126,7 +126,7 @@ module Google
126
126
  initial_delay: 1.0,
127
127
  max_delay: 60.0,
128
128
  multiplier: 1.3,
129
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED", "RESOURCE_EXHAUSTED"]
129
+ retry_codes: [14, 4, 8]
130
130
  }
131
131
 
132
132
  default_config.rpcs.list_device_config_versions.timeout = 120.0
@@ -134,7 +134,7 @@ module Google
134
134
  initial_delay: 0.1,
135
135
  max_delay: 60.0,
136
136
  multiplier: 1.3,
137
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
137
+ retry_codes: [14, 4]
138
138
  }
139
139
 
140
140
  default_config.rpcs.list_device_states.timeout = 120.0
@@ -142,7 +142,7 @@ module Google
142
142
  initial_delay: 0.1,
143
143
  max_delay: 60.0,
144
144
  multiplier: 1.3,
145
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
145
+ retry_codes: [14, 4]
146
146
  }
147
147
 
148
148
  default_config.rpcs.set_iam_policy.timeout = 120.0
@@ -156,7 +156,7 @@ module Google
156
156
  initial_delay: 1.0,
157
157
  max_delay: 60.0,
158
158
  multiplier: 1.3,
159
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED", "RESOURCE_EXHAUSTED"]
159
+ retry_codes: [14, 4, 8]
160
160
  }
161
161
 
162
162
  default_config.rpcs.bind_device_to_gateway.timeout = 120.0
@@ -224,7 +224,13 @@ module Google
224
224
 
225
225
  # Create credentials
226
226
  credentials = @config.credentials
227
- credentials ||= Credentials.default scope: @config.scope
227
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
228
+ # but only if the default endpoint does not have a region prefix.
229
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
230
+ @config.endpoint == Client.configure.endpoint &&
231
+ !@config.endpoint.split(".").first.include?("-")
232
+ credentials ||= Credentials.default scope: @config.scope,
233
+ enable_self_signed_jwt: enable_self_signed_jwt
228
234
  if credentials.is_a?(String) || credentials.is_a?(Hash)
229
235
  credentials = Credentials.new credentials, scope: @config.scope
230
236
  end
@@ -694,7 +700,8 @@ module Google
694
700
  # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
695
701
  # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
696
702
  # The fields of the `Device` resource to be returned in the response. If the
697
- # field mask is unset or empty, all fields are returned.
703
+ # field mask is unset or empty, all fields are returned. Fields have to be
704
+ # provided in snake_case format, for example: `last_heartbeat_time`.
698
705
  #
699
706
  # @yield [response, operation] Access the result along with the RPC operation
700
707
  # @yieldparam response [::Google::Cloud::Iot::V1::Device]
@@ -913,7 +920,8 @@ module Google
913
920
  # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
914
921
  # The fields of the `Device` resource to be returned in the response. The
915
922
  # fields `id` and `num_id` are always returned, along with any
916
- # other fields specified.
923
+ # other fields specified in snake_case format, for example:
924
+ # `last_heartbeat_time`.
917
925
  # @param gateway_list_options [::Google::Cloud::Iot::V1::GatewayListOptions, ::Hash]
918
926
  # Options related to gateways.
919
927
  # @param page_size [::Integer]
@@ -1736,7 +1744,7 @@ module Google
1736
1744
 
1737
1745
  config_attr :endpoint, "cloudiot.googleapis.com", ::String
1738
1746
  config_attr :credentials, nil do |value|
1739
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1747
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1740
1748
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1741
1749
  allowed.any? { |klass| klass === value }
1742
1750
  end
@@ -1776,7 +1784,7 @@ module Google
1776
1784
  # Each configuration object is of type `Gapic::Config::Method` and includes
1777
1785
  # the following configuration fields:
1778
1786
  #
1779
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
1787
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1780
1788
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1781
1789
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1782
1790
  # include the following keys:
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/iot/v1/device_manager.proto for package 'google.cloud.iot.v1'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/cloud/iot/v1/device_manager_pb'
@@ -35,46 +34,46 @@ module Google
35
34
  self.service_name = 'google.cloud.iot.v1.DeviceManager'
36
35
 
37
36
  # Creates a device registry that contains devices.
38
- rpc :CreateDeviceRegistry, CreateDeviceRegistryRequest, DeviceRegistry
37
+ rpc :CreateDeviceRegistry, ::Google::Cloud::Iot::V1::CreateDeviceRegistryRequest, ::Google::Cloud::Iot::V1::DeviceRegistry
39
38
  # Gets a device registry configuration.
40
- rpc :GetDeviceRegistry, GetDeviceRegistryRequest, DeviceRegistry
39
+ rpc :GetDeviceRegistry, ::Google::Cloud::Iot::V1::GetDeviceRegistryRequest, ::Google::Cloud::Iot::V1::DeviceRegistry
41
40
  # Updates a device registry configuration.
42
- rpc :UpdateDeviceRegistry, UpdateDeviceRegistryRequest, DeviceRegistry
41
+ rpc :UpdateDeviceRegistry, ::Google::Cloud::Iot::V1::UpdateDeviceRegistryRequest, ::Google::Cloud::Iot::V1::DeviceRegistry
43
42
  # Deletes a device registry configuration.
44
- rpc :DeleteDeviceRegistry, DeleteDeviceRegistryRequest, Google::Protobuf::Empty
43
+ rpc :DeleteDeviceRegistry, ::Google::Cloud::Iot::V1::DeleteDeviceRegistryRequest, ::Google::Protobuf::Empty
45
44
  # Lists device registries.
46
- rpc :ListDeviceRegistries, ListDeviceRegistriesRequest, ListDeviceRegistriesResponse
45
+ rpc :ListDeviceRegistries, ::Google::Cloud::Iot::V1::ListDeviceRegistriesRequest, ::Google::Cloud::Iot::V1::ListDeviceRegistriesResponse
47
46
  # Creates a device in a device registry.
48
- rpc :CreateDevice, CreateDeviceRequest, Device
47
+ rpc :CreateDevice, ::Google::Cloud::Iot::V1::CreateDeviceRequest, ::Google::Cloud::Iot::V1::Device
49
48
  # Gets details about a device.
50
- rpc :GetDevice, GetDeviceRequest, Device
49
+ rpc :GetDevice, ::Google::Cloud::Iot::V1::GetDeviceRequest, ::Google::Cloud::Iot::V1::Device
51
50
  # Updates a device.
52
- rpc :UpdateDevice, UpdateDeviceRequest, Device
51
+ rpc :UpdateDevice, ::Google::Cloud::Iot::V1::UpdateDeviceRequest, ::Google::Cloud::Iot::V1::Device
53
52
  # Deletes a device.
54
- rpc :DeleteDevice, DeleteDeviceRequest, Google::Protobuf::Empty
53
+ rpc :DeleteDevice, ::Google::Cloud::Iot::V1::DeleteDeviceRequest, ::Google::Protobuf::Empty
55
54
  # List devices in a device registry.
56
- rpc :ListDevices, ListDevicesRequest, ListDevicesResponse
55
+ rpc :ListDevices, ::Google::Cloud::Iot::V1::ListDevicesRequest, ::Google::Cloud::Iot::V1::ListDevicesResponse
57
56
  # Modifies the configuration for the device, which is eventually sent from
58
57
  # the Cloud IoT Core servers. Returns the modified configuration version and
59
58
  # its metadata.
60
- rpc :ModifyCloudToDeviceConfig, ModifyCloudToDeviceConfigRequest, DeviceConfig
59
+ rpc :ModifyCloudToDeviceConfig, ::Google::Cloud::Iot::V1::ModifyCloudToDeviceConfigRequest, ::Google::Cloud::Iot::V1::DeviceConfig
61
60
  # Lists the last few versions of the device configuration in descending
62
61
  # order (i.e.: newest first).
63
- rpc :ListDeviceConfigVersions, ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse
62
+ rpc :ListDeviceConfigVersions, ::Google::Cloud::Iot::V1::ListDeviceConfigVersionsRequest, ::Google::Cloud::Iot::V1::ListDeviceConfigVersionsResponse
64
63
  # Lists the last few versions of the device state in descending order (i.e.:
65
64
  # newest first).
66
- rpc :ListDeviceStates, ListDeviceStatesRequest, ListDeviceStatesResponse
65
+ rpc :ListDeviceStates, ::Google::Cloud::Iot::V1::ListDeviceStatesRequest, ::Google::Cloud::Iot::V1::ListDeviceStatesResponse
67
66
  # Sets the access control policy on the specified resource. Replaces any
68
67
  # existing policy.
69
- rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
68
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
70
69
  # Gets the access control policy for a resource.
71
70
  # Returns an empty policy if the resource exists and does not have a policy
72
71
  # set.
73
- rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
72
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
74
73
  # Returns permissions that a caller has on the specified resource.
75
74
  # If the resource does not exist, this will return an empty set of
76
75
  # permissions, not a NOT_FOUND error.
77
- rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
76
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
78
77
  # Sends a command to the specified device. In order for a device to be able
79
78
  # to receive commands, it must:
80
79
  # 1) be connected to Cloud IoT Core using the MQTT protocol, and
@@ -88,11 +87,11 @@ module Google
88
87
  # method will return FAILED_PRECONDITION. Otherwise, this method will
89
88
  # return OK. If the subscription is QoS 1, at least once delivery will be
90
89
  # guaranteed; for QoS 0, no acknowledgment will be expected from the device.
91
- rpc :SendCommandToDevice, SendCommandToDeviceRequest, SendCommandToDeviceResponse
90
+ rpc :SendCommandToDevice, ::Google::Cloud::Iot::V1::SendCommandToDeviceRequest, ::Google::Cloud::Iot::V1::SendCommandToDeviceResponse
92
91
  # Associates the device with the gateway.
93
- rpc :BindDeviceToGateway, BindDeviceToGatewayRequest, BindDeviceToGatewayResponse
92
+ rpc :BindDeviceToGateway, ::Google::Cloud::Iot::V1::BindDeviceToGatewayRequest, ::Google::Cloud::Iot::V1::BindDeviceToGatewayResponse
94
93
  # Deletes the association between the device and the gateway.
95
- rpc :UnbindDeviceFromGateway, UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse
94
+ rpc :UnbindDeviceFromGateway, ::Google::Cloud::Iot::V1::UnbindDeviceFromGatewayRequest, ::Google::Cloud::Iot::V1::UnbindDeviceFromGatewayResponse
96
95
  end
97
96
 
98
97
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Iot
23
23
  module V1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.2.1"
25
25
  end
26
26
  end
27
27
  end
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -134,7 +134,8 @@ module Google
134
134
  # @!attribute [rw] field_mask
135
135
  # @return [::Google::Protobuf::FieldMask]
136
136
  # The fields of the `Device` resource to be returned in the response. If the
137
- # field mask is unset or empty, all fields are returned.
137
+ # field mask is unset or empty, all fields are returned. Fields have to be
138
+ # provided in snake_case format, for example: `last_heartbeat_time`.
138
139
  class GetDeviceRequest
139
140
  include ::Google::Protobuf::MessageExts
140
141
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -186,7 +187,8 @@ module Google
186
187
  # @return [::Google::Protobuf::FieldMask]
187
188
  # The fields of the `Device` resource to be returned in the response. The
188
189
  # fields `id` and `num_id` are always returned, along with any
189
- # other fields specified.
190
+ # other fields specified in snake_case format, for example:
191
+ # `last_heartbeat_time`.
190
192
  # @!attribute [rw] gateway_list_options
191
193
  # @return [::Google::Cloud::Iot::V1::GatewayListOptions]
192
194
  # Options related to gateways.
@@ -57,10 +57,13 @@ module Google
57
57
  # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
- # any, err := ptypes.MarshalAny(foo)
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
61
64
  # ...
62
65
  # foo := &pb.Foo{}
63
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
66
+ # if err := any.UnmarshalTo(foo); err != nil {
64
67
  # ...
65
68
  # }
66
69
  #
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-iot-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2021-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -171,7 +171,9 @@ dependencies:
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0.9'
173
173
  description: Registers and manages IoT (Internet of Things) devices that connect to
174
- the Google Cloud Platform.
174
+ the Google Cloud Platform. Note that google-cloud-iot-v1 is a version-specific client
175
+ library. For most uses, we recommend installing the main client library google-cloud-iot
176
+ instead. See the readme for more details.
175
177
  email: googleapis-packages@google.com
176
178
  executables: []
177
179
  extensions: []
@@ -224,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
226
  - !ruby/object:Gem::Version
225
227
  version: '0'
226
228
  requirements: []
227
- rubygems_version: 3.1.3
229
+ rubygems_version: 3.2.6
228
230
  signing_key:
229
231
  specification_version: 4
230
232
  summary: API Client library for the Cloud IoT V1 API