google-cloud-iot-v1 0.1.0 → 0.2.0

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: f223a22f0b2b6a131c57d45d65b5655a6adc9c254c6fe23d1af1b8104d71ce40
4
- data.tar.gz: d3ac20ac90ae56fe90c42fa3de9fcb22e3ae9e7a0569a7a08e83ed9dc8f6d689
3
+ metadata.gz: 45a8f4fd6710fc347550a6dd5da307d99f90158843963af70972e44f66bd7c10
4
+ data.tar.gz: 23d2ee75ebca40924d2790a91830ee606fb9e11f2efb30aca248d21a72d0c59d
5
5
  SHA512:
6
- metadata.gz: 528e52d61174c1010a0f085bc1b68b5a89471b4acd63dd49ce64edeea9e72b1ae04980b21c853d07077a2b0ae29e11a8accd406f0dc3e43556c4c5fa4f5d39b5
7
- data.tar.gz: d0ce5c3eadbeaea89c6675d191b931acf9b3192aba5bf27eea490e2270b6da85a9b9ee9f61ed6a3791fc8eaa8e207ac7457c4ac00af29b4a233d1cf3292ced44
6
+ metadata.gz: 8aa3a685226071074d83f0603a12d7e5020b7f337c30ef627442f85ae1964e46efdfd67066a76d913703ff6e65c2e2737535b1d1b5dac50ccb4165fb8022c668
7
+ data.tar.gz: 8958b8aa16f18689a00db86d2e6b7a145a008903ede2e9db15520ecae6616bd2547005a77715f633b869b5d9d795ae8b1df8d6a3283ae5914b5d4050e92cda2b
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud IoT API V1 API
2
+ --title=Cloud IoT V1 API
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/README.md CHANGED
@@ -1,11 +1,17 @@
1
- # Ruby Client for the Cloud IoT API V1 API
1
+ # Ruby Client for the Cloud IoT V1 API
2
2
 
3
- API Client library for the Cloud IoT API V1 API
3
+ API Client library for the Cloud IoT V1 API
4
4
 
5
5
  Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.
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
  ```
@@ -18,6 +24,7 @@ In order to use this library, you first need to go through the following steps:
18
24
 
19
25
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
26
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
27
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudiot.googleapis.com)
21
28
  1. {file:AUTHENTICATION.md Set up authentication.}
22
29
 
23
30
  ## Quick Start
@@ -33,6 +40,9 @@ response = client.create_device_registry request
33
40
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-iot-v1/latest)
34
41
  for class and method documentation.
35
42
 
43
+ See also the [Product Documentation](https://cloud.google.com/iot)
44
+ for general usage information.
45
+
36
46
  ## Enabling Logging
37
47
 
38
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -69,3 +79,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
69
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
70
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
71
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
@@ -1736,7 +1742,7 @@ module Google
1736
1742
 
1737
1743
  config_attr :endpoint, "cloudiot.googleapis.com", ::String
1738
1744
  config_attr :credentials, nil do |value|
1739
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1745
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1740
1746
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1741
1747
  allowed.any? { |klass| klass === value }
1742
1748
  end
@@ -1776,7 +1782,7 @@ module Google
1776
1782
  # Each configuration object is of type `Gapic::Config::Method` and includes
1777
1783
  # the following configuration fields:
1778
1784
  #
1779
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
1785
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1780
1786
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1781
1787
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1782
1788
  # include the following keys:
@@ -35,46 +35,46 @@ module Google
35
35
  self.service_name = 'google.cloud.iot.v1.DeviceManager'
36
36
 
37
37
  # Creates a device registry that contains devices.
38
- rpc :CreateDeviceRegistry, CreateDeviceRegistryRequest, DeviceRegistry
38
+ rpc :CreateDeviceRegistry, ::Google::Cloud::Iot::V1::CreateDeviceRegistryRequest, ::Google::Cloud::Iot::V1::DeviceRegistry
39
39
  # Gets a device registry configuration.
40
- rpc :GetDeviceRegistry, GetDeviceRegistryRequest, DeviceRegistry
40
+ rpc :GetDeviceRegistry, ::Google::Cloud::Iot::V1::GetDeviceRegistryRequest, ::Google::Cloud::Iot::V1::DeviceRegistry
41
41
  # Updates a device registry configuration.
42
- rpc :UpdateDeviceRegistry, UpdateDeviceRegistryRequest, DeviceRegistry
42
+ rpc :UpdateDeviceRegistry, ::Google::Cloud::Iot::V1::UpdateDeviceRegistryRequest, ::Google::Cloud::Iot::V1::DeviceRegistry
43
43
  # Deletes a device registry configuration.
44
- rpc :DeleteDeviceRegistry, DeleteDeviceRegistryRequest, Google::Protobuf::Empty
44
+ rpc :DeleteDeviceRegistry, ::Google::Cloud::Iot::V1::DeleteDeviceRegistryRequest, ::Google::Protobuf::Empty
45
45
  # Lists device registries.
46
- rpc :ListDeviceRegistries, ListDeviceRegistriesRequest, ListDeviceRegistriesResponse
46
+ rpc :ListDeviceRegistries, ::Google::Cloud::Iot::V1::ListDeviceRegistriesRequest, ::Google::Cloud::Iot::V1::ListDeviceRegistriesResponse
47
47
  # Creates a device in a device registry.
48
- rpc :CreateDevice, CreateDeviceRequest, Device
48
+ rpc :CreateDevice, ::Google::Cloud::Iot::V1::CreateDeviceRequest, ::Google::Cloud::Iot::V1::Device
49
49
  # Gets details about a device.
50
- rpc :GetDevice, GetDeviceRequest, Device
50
+ rpc :GetDevice, ::Google::Cloud::Iot::V1::GetDeviceRequest, ::Google::Cloud::Iot::V1::Device
51
51
  # Updates a device.
52
- rpc :UpdateDevice, UpdateDeviceRequest, Device
52
+ rpc :UpdateDevice, ::Google::Cloud::Iot::V1::UpdateDeviceRequest, ::Google::Cloud::Iot::V1::Device
53
53
  # Deletes a device.
54
- rpc :DeleteDevice, DeleteDeviceRequest, Google::Protobuf::Empty
54
+ rpc :DeleteDevice, ::Google::Cloud::Iot::V1::DeleteDeviceRequest, ::Google::Protobuf::Empty
55
55
  # List devices in a device registry.
56
- rpc :ListDevices, ListDevicesRequest, ListDevicesResponse
56
+ rpc :ListDevices, ::Google::Cloud::Iot::V1::ListDevicesRequest, ::Google::Cloud::Iot::V1::ListDevicesResponse
57
57
  # Modifies the configuration for the device, which is eventually sent from
58
58
  # the Cloud IoT Core servers. Returns the modified configuration version and
59
59
  # its metadata.
60
- rpc :ModifyCloudToDeviceConfig, ModifyCloudToDeviceConfigRequest, DeviceConfig
60
+ rpc :ModifyCloudToDeviceConfig, ::Google::Cloud::Iot::V1::ModifyCloudToDeviceConfigRequest, ::Google::Cloud::Iot::V1::DeviceConfig
61
61
  # Lists the last few versions of the device configuration in descending
62
62
  # order (i.e.: newest first).
63
- rpc :ListDeviceConfigVersions, ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse
63
+ rpc :ListDeviceConfigVersions, ::Google::Cloud::Iot::V1::ListDeviceConfigVersionsRequest, ::Google::Cloud::Iot::V1::ListDeviceConfigVersionsResponse
64
64
  # Lists the last few versions of the device state in descending order (i.e.:
65
65
  # newest first).
66
- rpc :ListDeviceStates, ListDeviceStatesRequest, ListDeviceStatesResponse
66
+ rpc :ListDeviceStates, ::Google::Cloud::Iot::V1::ListDeviceStatesRequest, ::Google::Cloud::Iot::V1::ListDeviceStatesResponse
67
67
  # Sets the access control policy on the specified resource. Replaces any
68
68
  # existing policy.
69
- rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
69
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
70
70
  # Gets the access control policy for a resource.
71
71
  # Returns an empty policy if the resource exists and does not have a policy
72
72
  # set.
73
- rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
73
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
74
74
  # Returns permissions that a caller has on the specified resource.
75
75
  # If the resource does not exist, this will return an empty set of
76
76
  # permissions, not a NOT_FOUND error.
77
- rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
77
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
78
78
  # Sends a command to the specified device. In order for a device to be able
79
79
  # to receive commands, it must:
80
80
  # 1) be connected to Cloud IoT Core using the MQTT protocol, and
@@ -88,11 +88,11 @@ module Google
88
88
  # method will return FAILED_PRECONDITION. Otherwise, this method will
89
89
  # return OK. If the subscription is QoS 1, at least once delivery will be
90
90
  # guaranteed; for QoS 0, no acknowledgment will be expected from the device.
91
- rpc :SendCommandToDevice, SendCommandToDeviceRequest, SendCommandToDeviceResponse
91
+ rpc :SendCommandToDevice, ::Google::Cloud::Iot::V1::SendCommandToDeviceRequest, ::Google::Cloud::Iot::V1::SendCommandToDeviceResponse
92
92
  # Associates the device with the gateway.
93
- rpc :BindDeviceToGateway, BindDeviceToGatewayRequest, BindDeviceToGatewayResponse
93
+ rpc :BindDeviceToGateway, ::Google::Cloud::Iot::V1::BindDeviceToGatewayRequest, ::Google::Cloud::Iot::V1::BindDeviceToGatewayResponse
94
94
  # Deletes the association between the device and the gateway.
95
- rpc :UnbindDeviceFromGateway, UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse
95
+ rpc :UnbindDeviceFromGateway, ::Google::Cloud::Iot::V1::UnbindDeviceFromGatewayRequest, ::Google::Cloud::Iot::V1::UnbindDeviceFromGatewayResponse
96
96
  end
97
97
 
98
98
  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.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
data/proto_docs/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Cloud IoT API V1 Protocol Buffer Documentation
1
+ # Cloud IoT V1 Protocol Buffer Documentation
2
2
 
3
3
  These files are for the YARD documentation of the generated protobuf files.
4
4
  They are not intended to be required or loaded at runtime.
@@ -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
@@ -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.0
4
+ version: 0.2.0
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-15 00:00:00.000000000 Z
11
+ date: 2021-02-02 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,8 +226,8 @@ 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
- summary: API Client library for the Cloud IoT API V1 API
232
+ summary: API Client library for the Cloud IoT V1 API
231
233
  test_files: []