google-cloud-iot-v1 0.5.0 → 0.7.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: 34f03668eb50c6a244365cdbe6ece654c3441e28a96fd18e32002ee53eadef13
4
- data.tar.gz: 170cba542612a332244827303bfbd384a7a3a9bb1ca9cfbfa5041fb0c966811c
3
+ metadata.gz: 4e78b386bc7f04b5d2db46968d4122c6beef5a9eff63c12b6f55d2813ee00ef5
4
+ data.tar.gz: 7cae6927159c587a2cea00cc6fa6626afc48d7a3e640be37cbb66607847b7f20
5
5
  SHA512:
6
- metadata.gz: f9ed560cdfd18de8067c9c0d241f9a3ef94043b1e6106fe70738b5eabdda53f9d0a80f32ed28ceb66804ed87d8f678125b41233232e93a5e88aa26682d8ac4f0
7
- data.tar.gz: d0d89b8a6445ca35162c8c25080857f64f6da8d8b4264a1884b6ed5f3b58541c8d44e71e332e2a5feaad129b2cf25e426d6803088637d9644f30988710fb4185
6
+ metadata.gz: 072e1d327ce7c31846d394c289328bcae88d8a936d776f307515875e344a907c4da418d309ffd6d74946c0d06e5f808aa0258db28dad919e08112b66e26b6c1f
7
+ data.tar.gz: cbcbe23c6efa29bd6404c9b9235af9f6a7491954d4bfcf5b841f05175a61d166a93190afccbe733de27068a64e0ca9015a4fc6ab4b220b8d35eff8765f197fb0
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud IoT V1 API
2
2
 
3
- API Client library for the Cloud IoT V1 API
3
+ Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.
4
4
 
5
5
  Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.
6
6
 
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -191,7 +191,7 @@ module Google
191
191
  credentials = @config.credentials
192
192
  # Use self-signed JWT if the endpoint is unchanged from default,
193
193
  # but only if the default endpoint does not have a region prefix.
194
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
194
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
195
195
  !@config.endpoint.split(".").first.include?("-")
196
196
  credentials ||= Credentials.default scope: @config.scope,
197
197
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -618,13 +618,11 @@ module Google
618
618
  # # Call the list_device_registries method.
619
619
  # result = client.list_device_registries request
620
620
  #
621
- # # The returned object is of type Gapic::PagedEnumerable. You can
622
- # # iterate over all elements by calling #each, and the enumerable
623
- # # will lazily make API calls to fetch subsequent pages. Other
624
- # # methods are also available for managing paging directly.
625
- # result.each do |response|
621
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
622
+ # # over elements, and API calls will be issued to fetch pages as needed.
623
+ # result.each do |item|
626
624
  # # Each element is of type ::Google::Cloud::Iot::V1::DeviceRegistry.
627
- # p response
625
+ # p item
628
626
  # end
629
627
  #
630
628
  def list_device_registries request, options = nil
@@ -1095,13 +1093,11 @@ module Google
1095
1093
  # # Call the list_devices method.
1096
1094
  # result = client.list_devices request
1097
1095
  #
1098
- # # The returned object is of type Gapic::PagedEnumerable. You can
1099
- # # iterate over all elements by calling #each, and the enumerable
1100
- # # will lazily make API calls to fetch subsequent pages. Other
1101
- # # methods are also available for managing paging directly.
1102
- # result.each do |response|
1096
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1097
+ # # over elements, and API calls will be issued to fetch pages as needed.
1098
+ # result.each do |item|
1103
1099
  # # Each element is of type ::Google::Cloud::Iot::V1::Device.
1104
- # p response
1100
+ # p item
1105
1101
  # end
1106
1102
  #
1107
1103
  def list_devices request, options = nil
@@ -2040,9 +2036,9 @@ module Google
2040
2036
  # * (`String`) The path to a service account key file in JSON format
2041
2037
  # * (`Hash`) A service account key as a Hash
2042
2038
  # * (`Google::Auth::Credentials`) A googleauth credentials object
2043
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2039
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2044
2040
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2045
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2041
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2046
2042
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2047
2043
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2048
2044
  # * (`nil`) indicating no credentials
@@ -2084,7 +2080,9 @@ module Google
2084
2080
  class Configuration
2085
2081
  extend ::Gapic::Config
2086
2082
 
2087
- config_attr :endpoint, "cloudiot.googleapis.com", ::String
2083
+ DEFAULT_ENDPOINT = "cloudiot.googleapis.com"
2084
+
2085
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2088
2086
  config_attr :credentials, nil do |value|
2089
2087
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2090
2088
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC