google-cloud-datastream-v1 0.4.0 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 152f2cb5e59e4fe07446a5b4099e9113df51b28808dfe2930ccb6fa5073fee85
4
- data.tar.gz: 75921d356a16e659bb219ff115676916c75809f9e2f4b794fc2d03a1cfd29e01
3
+ metadata.gz: 9b767513850a0cd633701e3b8ea8acd0ac7b6b29322dbf5110d32ebdfe5f7976
4
+ data.tar.gz: d89361c7a00f157a01ec47fbe93bf21cba03fd22f3fabe580502e6c1b88bed78
5
5
  SHA512:
6
- metadata.gz: 05c18a8e4cd079e26941d2a203f6cb8306bb9d11704b8fa2a4f21b64626e7e0c4b4d74e7be53d590a24cff5bd2b2e10f4d11820bd5b53ed107dab0735b7c6691
7
- data.tar.gz: a724ca40c93b81ac7abaf8799dffc2ef0626a6207f2f7ecd6789099f040f33639a07ae99008ea3a0ebfa5471891500ef0d9da0cbb74a78d6e976a0c8e05b26a7
6
+ metadata.gz: f99bd2a30f199046edeb7058bfc989513648f167dd46918a8caeb16ed578766be118bfb44d05fa990ca3546dab9b1118a0cf8edde19ed9fd7fa7d90b55d199c1
7
+ data.tar.gz: a2a1d23550a278064ffc5f0415f8dc49cf41b5a93b4ae573c23e7b2d717b1705c04b925469abe5f76bb057b021b8e17ef073d155db19ef6d0f08253a815b1216
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -46,7 +46,7 @@ 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,
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
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/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.
@@ -0,0 +1,102 @@
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/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Datastream
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/datastream/v1/rest"
28
+ # client = ::Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Datastream"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # @private
75
+ # Configuration class for the google.cloud.datastream.v1 package.
76
+ #
77
+ # This class contains common configuration for all services
78
+ # of the google.cloud.datastream.v1 package.
79
+ #
80
+ # This configuration is for internal use of the client library classes,
81
+ # and it is not intended that the end-users will read or change it.
82
+ #
83
+ class Configuration
84
+ extend ::Gapic::Config
85
+
86
+ # @private
87
+ # Overrides for http bindings for the RPC of the mixins for this package.
88
+ # Services in this package should use these when creating clients for the mixin services.
89
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
90
+ config_attr :bindings_override, {}, ::Hash, nil
91
+
92
+ # @private
93
+ def initialize parent_config = nil
94
+ @parent_config = parent_config unless parent_config.nil?
95
+
96
+ yield self if block_given?
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -266,13 +266,11 @@ module Google
266
266
  # # Call the list_connection_profiles method.
267
267
  # result = client.list_connection_profiles request
268
268
  #
269
- # # The returned object is of type Gapic::PagedEnumerable. You can
270
- # # iterate over all elements by calling #each, and the enumerable
271
- # # will lazily make API calls to fetch subsequent pages. Other
272
- # # methods are also available for managing paging directly.
273
- # result.each do |response|
269
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
270
+ # # over elements, and API calls will be issued to fetch pages as needed.
271
+ # result.each do |item|
274
272
  # # Each element is of type ::Google::Cloud::Datastream::V1::ConnectionProfile.
275
- # p response
273
+ # p item
276
274
  # end
277
275
  #
278
276
  def list_connection_profiles request, options = nil
@@ -466,14 +464,14 @@ module Google
466
464
  # # Call the create_connection_profile method.
467
465
  # result = client.create_connection_profile request
468
466
  #
469
- # # The returned object is of type Gapic::Operation. You can use this
470
- # # object to check the status of an operation, cancel it, or wait
471
- # # for results. Here is how to block until completion:
467
+ # # The returned object is of type Gapic::Operation. You can use it to
468
+ # # check the status of an operation, cancel it, or wait for results.
469
+ # # Here is how to wait for a response.
472
470
  # result.wait_until_done! timeout: 60
473
471
  # if result.response?
474
472
  # p result.response
475
473
  # else
476
- # puts "Error!"
474
+ # puts "No response received."
477
475
  # end
478
476
  #
479
477
  def create_connection_profile request, options = nil
@@ -584,14 +582,14 @@ module Google
584
582
  # # Call the update_connection_profile method.
585
583
  # result = client.update_connection_profile request
586
584
  #
587
- # # The returned object is of type Gapic::Operation. You can use this
588
- # # object to check the status of an operation, cancel it, or wait
589
- # # for results. Here is how to block until completion:
585
+ # # The returned object is of type Gapic::Operation. You can use it to
586
+ # # check the status of an operation, cancel it, or wait for results.
587
+ # # Here is how to wait for a response.
590
588
  # result.wait_until_done! timeout: 60
591
589
  # if result.response?
592
590
  # p result.response
593
591
  # else
594
- # puts "Error!"
592
+ # puts "No response received."
595
593
  # end
596
594
  #
597
595
  def update_connection_profile request, options = nil
@@ -691,14 +689,14 @@ module Google
691
689
  # # Call the delete_connection_profile method.
692
690
  # result = client.delete_connection_profile request
693
691
  #
694
- # # The returned object is of type Gapic::Operation. You can use this
695
- # # object to check the status of an operation, cancel it, or wait
696
- # # for results. Here is how to block until completion:
692
+ # # The returned object is of type Gapic::Operation. You can use it to
693
+ # # check the status of an operation, cancel it, or wait for results.
694
+ # # Here is how to wait for a response.
697
695
  # result.wait_until_done! timeout: 60
698
696
  # if result.response?
699
697
  # p result.response
700
698
  # else
701
- # puts "Error!"
699
+ # puts "No response received."
702
700
  # end
703
701
  #
704
702
  def delete_connection_profile request, options = nil
@@ -902,13 +900,11 @@ module Google
902
900
  # # Call the list_streams method.
903
901
  # result = client.list_streams request
904
902
  #
905
- # # The returned object is of type Gapic::PagedEnumerable. You can
906
- # # iterate over all elements by calling #each, and the enumerable
907
- # # will lazily make API calls to fetch subsequent pages. Other
908
- # # methods are also available for managing paging directly.
909
- # result.each do |response|
903
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
904
+ # # over elements, and API calls will be issued to fetch pages as needed.
905
+ # result.each do |item|
910
906
  # # Each element is of type ::Google::Cloud::Datastream::V1::Stream.
911
- # p response
907
+ # p item
912
908
  # end
913
909
  #
914
910
  def list_streams request, options = nil
@@ -1102,14 +1098,14 @@ module Google
1102
1098
  # # Call the create_stream method.
1103
1099
  # result = client.create_stream request
1104
1100
  #
1105
- # # The returned object is of type Gapic::Operation. You can use this
1106
- # # object to check the status of an operation, cancel it, or wait
1107
- # # for results. Here is how to block until completion:
1101
+ # # The returned object is of type Gapic::Operation. You can use it to
1102
+ # # check the status of an operation, cancel it, or wait for results.
1103
+ # # Here is how to wait for a response.
1108
1104
  # result.wait_until_done! timeout: 60
1109
1105
  # if result.response?
1110
1106
  # p result.response
1111
1107
  # else
1112
- # puts "Error!"
1108
+ # puts "No response received."
1113
1109
  # end
1114
1110
  #
1115
1111
  def create_stream request, options = nil
@@ -1220,14 +1216,14 @@ module Google
1220
1216
  # # Call the update_stream method.
1221
1217
  # result = client.update_stream request
1222
1218
  #
1223
- # # The returned object is of type Gapic::Operation. You can use this
1224
- # # object to check the status of an operation, cancel it, or wait
1225
- # # for results. Here is how to block until completion:
1219
+ # # The returned object is of type Gapic::Operation. You can use it to
1220
+ # # check the status of an operation, cancel it, or wait for results.
1221
+ # # Here is how to wait for a response.
1226
1222
  # result.wait_until_done! timeout: 60
1227
1223
  # if result.response?
1228
1224
  # p result.response
1229
1225
  # else
1230
- # puts "Error!"
1226
+ # puts "No response received."
1231
1227
  # end
1232
1228
  #
1233
1229
  def update_stream request, options = nil
@@ -1327,14 +1323,14 @@ module Google
1327
1323
  # # Call the delete_stream method.
1328
1324
  # result = client.delete_stream request
1329
1325
  #
1330
- # # The returned object is of type Gapic::Operation. You can use this
1331
- # # object to check the status of an operation, cancel it, or wait
1332
- # # for results. Here is how to block until completion:
1326
+ # # The returned object is of type Gapic::Operation. You can use it to
1327
+ # # check the status of an operation, cancel it, or wait for results.
1328
+ # # Here is how to wait for a response.
1333
1329
  # result.wait_until_done! timeout: 60
1334
1330
  # if result.response?
1335
1331
  # p result.response
1336
1332
  # else
1337
- # puts "Error!"
1333
+ # puts "No response received."
1338
1334
  # end
1339
1335
  #
1340
1336
  def delete_stream request, options = nil
@@ -1602,13 +1598,11 @@ module Google
1602
1598
  # # Call the list_stream_objects method.
1603
1599
  # result = client.list_stream_objects request
1604
1600
  #
1605
- # # The returned object is of type Gapic::PagedEnumerable. You can
1606
- # # iterate over all elements by calling #each, and the enumerable
1607
- # # will lazily make API calls to fetch subsequent pages. Other
1608
- # # methods are also available for managing paging directly.
1609
- # result.each do |response|
1601
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1602
+ # # over elements, and API calls will be issued to fetch pages as needed.
1603
+ # result.each do |item|
1610
1604
  # # Each element is of type ::Google::Cloud::Datastream::V1::StreamObject.
1611
- # p response
1605
+ # p item
1612
1606
  # end
1613
1607
  #
1614
1608
  def list_stream_objects request, options = nil
@@ -1974,14 +1968,14 @@ module Google
1974
1968
  # # Call the create_private_connection method.
1975
1969
  # result = client.create_private_connection request
1976
1970
  #
1977
- # # The returned object is of type Gapic::Operation. You can use this
1978
- # # object to check the status of an operation, cancel it, or wait
1979
- # # for results. Here is how to block until completion:
1971
+ # # The returned object is of type Gapic::Operation. You can use it to
1972
+ # # check the status of an operation, cancel it, or wait for results.
1973
+ # # Here is how to wait for a response.
1980
1974
  # result.wait_until_done! timeout: 60
1981
1975
  # if result.response?
1982
1976
  # p result.response
1983
1977
  # else
1984
- # puts "Error!"
1978
+ # puts "No response received."
1985
1979
  # end
1986
1980
  #
1987
1981
  def create_private_connection request, options = nil
@@ -2169,13 +2163,11 @@ module Google
2169
2163
  # # Call the list_private_connections method.
2170
2164
  # result = client.list_private_connections request
2171
2165
  #
2172
- # # The returned object is of type Gapic::PagedEnumerable. You can
2173
- # # iterate over all elements by calling #each, and the enumerable
2174
- # # will lazily make API calls to fetch subsequent pages. Other
2175
- # # methods are also available for managing paging directly.
2176
- # result.each do |response|
2166
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2167
+ # # over elements, and API calls will be issued to fetch pages as needed.
2168
+ # result.each do |item|
2177
2169
  # # Each element is of type ::Google::Cloud::Datastream::V1::PrivateConnection.
2178
- # p response
2170
+ # p item
2179
2171
  # end
2180
2172
  #
2181
2173
  def list_private_connections request, options = nil
@@ -2278,14 +2270,14 @@ module Google
2278
2270
  # # Call the delete_private_connection method.
2279
2271
  # result = client.delete_private_connection request
2280
2272
  #
2281
- # # The returned object is of type Gapic::Operation. You can use this
2282
- # # object to check the status of an operation, cancel it, or wait
2283
- # # for results. Here is how to block until completion:
2273
+ # # The returned object is of type Gapic::Operation. You can use it to
2274
+ # # check the status of an operation, cancel it, or wait for results.
2275
+ # # Here is how to wait for a response.
2284
2276
  # result.wait_until_done! timeout: 60
2285
2277
  # if result.response?
2286
2278
  # p result.response
2287
2279
  # else
2288
- # puts "Error!"
2280
+ # puts "No response received."
2289
2281
  # end
2290
2282
  #
2291
2283
  def delete_private_connection request, options = nil
@@ -2390,14 +2382,14 @@ module Google
2390
2382
  # # Call the create_route method.
2391
2383
  # result = client.create_route request
2392
2384
  #
2393
- # # The returned object is of type Gapic::Operation. You can use this
2394
- # # object to check the status of an operation, cancel it, or wait
2395
- # # for results. Here is how to block until completion:
2385
+ # # The returned object is of type Gapic::Operation. You can use it to
2386
+ # # check the status of an operation, cancel it, or wait for results.
2387
+ # # Here is how to wait for a response.
2396
2388
  # result.wait_until_done! timeout: 60
2397
2389
  # if result.response?
2398
2390
  # p result.response
2399
2391
  # else
2400
- # puts "Error!"
2392
+ # puts "No response received."
2401
2393
  # end
2402
2394
  #
2403
2395
  def create_route request, options = nil
@@ -2585,13 +2577,11 @@ module Google
2585
2577
  # # Call the list_routes method.
2586
2578
  # result = client.list_routes request
2587
2579
  #
2588
- # # The returned object is of type Gapic::PagedEnumerable. You can
2589
- # # iterate over all elements by calling #each, and the enumerable
2590
- # # will lazily make API calls to fetch subsequent pages. Other
2591
- # # methods are also available for managing paging directly.
2592
- # result.each do |response|
2580
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2581
+ # # over elements, and API calls will be issued to fetch pages as needed.
2582
+ # result.each do |item|
2593
2583
  # # Each element is of type ::Google::Cloud::Datastream::V1::Route.
2594
- # p response
2584
+ # p item
2595
2585
  # end
2596
2586
  #
2597
2587
  def list_routes request, options = nil
@@ -2691,14 +2681,14 @@ module Google
2691
2681
  # # Call the delete_route method.
2692
2682
  # result = client.delete_route request
2693
2683
  #
2694
- # # The returned object is of type Gapic::Operation. You can use this
2695
- # # object to check the status of an operation, cancel it, or wait
2696
- # # for results. Here is how to block until completion:
2684
+ # # The returned object is of type Gapic::Operation. You can use it to
2685
+ # # check the status of an operation, cancel it, or wait for results.
2686
+ # # Here is how to wait for a response.
2697
2687
  # result.wait_until_done! timeout: 60
2698
2688
  # if result.response?
2699
2689
  # p result.response
2700
2690
  # else
2701
- # puts "Error!"
2691
+ # puts "No response received."
2702
2692
  # end
2703
2693
  #
2704
2694
  def delete_route request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil