google-cloud-datastream-v1 0.3.0 → 0.5.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: 4141790686c2d1d906f9179dc6af21e8c1b9c799c45fa3657da48a848f45e897
4
- data.tar.gz: 1a8bd136dfd8f6d13896f1b95ded6d9e4e9030e3afa06d19db7620c3c74010de
3
+ metadata.gz: 9b767513850a0cd633701e3b8ea8acd0ac7b6b29322dbf5110d32ebdfe5f7976
4
+ data.tar.gz: d89361c7a00f157a01ec47fbe93bf21cba03fd22f3fabe580502e6c1b88bed78
5
5
  SHA512:
6
- metadata.gz: 7d63f5285681958bdca89f589d6c7e87d7e6567c4d5a81be1f2f9d890647d9b470bce1fb281ef0b3878b5b2a127a63caf0478ccbf23ed4c8d9d761d79ff19e10
7
- data.tar.gz: 47e553df276c8338ee6f607ca5e5cca5281cc4879260a87ca1a5b68a6a6e542f880e606cd0c64d885e7c8cda67543389a35181518bbdc54641494940689b9c20
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
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/datastream/v1/datastream_pb"
21
21
  require "google/cloud/location"
22
+ require "google/iam/v1"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -171,6 +172,12 @@ module Google
171
172
  config.endpoint = @config.endpoint
172
173
  end
173
174
 
175
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
176
+ config.credentials = credentials
177
+ config.quota_project = @quota_project_id
178
+ config.endpoint = @config.endpoint
179
+ end
180
+
174
181
  @datastream_stub = ::Gapic::ServiceStub.new(
175
182
  ::Google::Cloud::Datastream::V1::Datastream::Stub,
176
183
  credentials: credentials,
@@ -194,6 +201,13 @@ module Google
194
201
  #
195
202
  attr_reader :location_client
196
203
 
204
+ ##
205
+ # Get the associated client for mix-in of the IAMPolicy.
206
+ #
207
+ # @return [Google::Iam::V1::IAMPolicy::Client]
208
+ #
209
+ attr_reader :iam_policy_client
210
+
197
211
  # Service calls
198
212
 
199
213
  ##
@@ -252,13 +266,11 @@ module Google
252
266
  # # Call the list_connection_profiles method.
253
267
  # result = client.list_connection_profiles request
254
268
  #
255
- # # The returned object is of type Gapic::PagedEnumerable. You can
256
- # # iterate over all elements by calling #each, and the enumerable
257
- # # will lazily make API calls to fetch subsequent pages. Other
258
- # # methods are also available for managing paging directly.
259
- # 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|
260
272
  # # Each element is of type ::Google::Cloud::Datastream::V1::ConnectionProfile.
261
- # p response
273
+ # p item
262
274
  # end
263
275
  #
264
276
  def list_connection_profiles request, options = nil
@@ -452,14 +464,14 @@ module Google
452
464
  # # Call the create_connection_profile method.
453
465
  # result = client.create_connection_profile request
454
466
  #
455
- # # The returned object is of type Gapic::Operation. You can use this
456
- # # object to check the status of an operation, cancel it, or wait
457
- # # 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.
458
470
  # result.wait_until_done! timeout: 60
459
471
  # if result.response?
460
472
  # p result.response
461
473
  # else
462
- # puts "Error!"
474
+ # puts "No response received."
463
475
  # end
464
476
  #
465
477
  def create_connection_profile request, options = nil
@@ -570,14 +582,14 @@ module Google
570
582
  # # Call the update_connection_profile method.
571
583
  # result = client.update_connection_profile request
572
584
  #
573
- # # The returned object is of type Gapic::Operation. You can use this
574
- # # object to check the status of an operation, cancel it, or wait
575
- # # 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.
576
588
  # result.wait_until_done! timeout: 60
577
589
  # if result.response?
578
590
  # p result.response
579
591
  # else
580
- # puts "Error!"
592
+ # puts "No response received."
581
593
  # end
582
594
  #
583
595
  def update_connection_profile request, options = nil
@@ -677,14 +689,14 @@ module Google
677
689
  # # Call the delete_connection_profile method.
678
690
  # result = client.delete_connection_profile request
679
691
  #
680
- # # The returned object is of type Gapic::Operation. You can use this
681
- # # object to check the status of an operation, cancel it, or wait
682
- # # 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.
683
695
  # result.wait_until_done! timeout: 60
684
696
  # if result.response?
685
697
  # p result.response
686
698
  # else
687
- # puts "Error!"
699
+ # puts "No response received."
688
700
  # end
689
701
  #
690
702
  def delete_connection_profile request, options = nil
@@ -745,7 +757,7 @@ module Google
745
757
  # @param options [::Gapic::CallOptions, ::Hash]
746
758
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
747
759
  #
748
- # @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil)
760
+ # @overload discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil)
749
761
  # Pass arguments to `discover_connection_profile` via keyword arguments. Note that at
750
762
  # least one keyword argument is required. To specify no parameters, or to keep all
751
763
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -766,6 +778,8 @@ module Google
766
778
  # Oracle RDBMS to enrich with child data objects and metadata.
767
779
  # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash]
768
780
  # MySQL RDBMS to enrich with child data objects and metadata.
781
+ # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash]
782
+ # PostgreSQL RDBMS to enrich with child data objects and metadata.
769
783
  #
770
784
  # @yield [response, operation] Access the result along with the RPC operation
771
785
  # @yieldparam response [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse]
@@ -886,13 +900,11 @@ module Google
886
900
  # # Call the list_streams method.
887
901
  # result = client.list_streams request
888
902
  #
889
- # # The returned object is of type Gapic::PagedEnumerable. You can
890
- # # iterate over all elements by calling #each, and the enumerable
891
- # # will lazily make API calls to fetch subsequent pages. Other
892
- # # methods are also available for managing paging directly.
893
- # 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|
894
906
  # # Each element is of type ::Google::Cloud::Datastream::V1::Stream.
895
- # p response
907
+ # p item
896
908
  # end
897
909
  #
898
910
  def list_streams request, options = nil
@@ -1086,14 +1098,14 @@ module Google
1086
1098
  # # Call the create_stream method.
1087
1099
  # result = client.create_stream request
1088
1100
  #
1089
- # # The returned object is of type Gapic::Operation. You can use this
1090
- # # object to check the status of an operation, cancel it, or wait
1091
- # # 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.
1092
1104
  # result.wait_until_done! timeout: 60
1093
1105
  # if result.response?
1094
1106
  # p result.response
1095
1107
  # else
1096
- # puts "Error!"
1108
+ # puts "No response received."
1097
1109
  # end
1098
1110
  #
1099
1111
  def create_stream request, options = nil
@@ -1204,14 +1216,14 @@ module Google
1204
1216
  # # Call the update_stream method.
1205
1217
  # result = client.update_stream request
1206
1218
  #
1207
- # # The returned object is of type Gapic::Operation. You can use this
1208
- # # object to check the status of an operation, cancel it, or wait
1209
- # # 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.
1210
1222
  # result.wait_until_done! timeout: 60
1211
1223
  # if result.response?
1212
1224
  # p result.response
1213
1225
  # else
1214
- # puts "Error!"
1226
+ # puts "No response received."
1215
1227
  # end
1216
1228
  #
1217
1229
  def update_stream request, options = nil
@@ -1311,14 +1323,14 @@ module Google
1311
1323
  # # Call the delete_stream method.
1312
1324
  # result = client.delete_stream request
1313
1325
  #
1314
- # # The returned object is of type Gapic::Operation. You can use this
1315
- # # object to check the status of an operation, cancel it, or wait
1316
- # # 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.
1317
1329
  # result.wait_until_done! timeout: 60
1318
1330
  # if result.response?
1319
1331
  # p result.response
1320
1332
  # else
1321
- # puts "Error!"
1333
+ # puts "No response received."
1322
1334
  # end
1323
1335
  #
1324
1336
  def delete_stream request, options = nil
@@ -1586,13 +1598,11 @@ module Google
1586
1598
  # # Call the list_stream_objects method.
1587
1599
  # result = client.list_stream_objects request
1588
1600
  #
1589
- # # The returned object is of type Gapic::PagedEnumerable. You can
1590
- # # iterate over all elements by calling #each, and the enumerable
1591
- # # will lazily make API calls to fetch subsequent pages. Other
1592
- # # methods are also available for managing paging directly.
1593
- # 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|
1594
1604
  # # Each element is of type ::Google::Cloud::Datastream::V1::StreamObject.
1595
- # p response
1605
+ # p item
1596
1606
  # end
1597
1607
  #
1598
1608
  def list_stream_objects request, options = nil
@@ -1958,14 +1968,14 @@ module Google
1958
1968
  # # Call the create_private_connection method.
1959
1969
  # result = client.create_private_connection request
1960
1970
  #
1961
- # # The returned object is of type Gapic::Operation. You can use this
1962
- # # object to check the status of an operation, cancel it, or wait
1963
- # # 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.
1964
1974
  # result.wait_until_done! timeout: 60
1965
1975
  # if result.response?
1966
1976
  # p result.response
1967
1977
  # else
1968
- # puts "Error!"
1978
+ # puts "No response received."
1969
1979
  # end
1970
1980
  #
1971
1981
  def create_private_connection request, options = nil
@@ -2153,13 +2163,11 @@ module Google
2153
2163
  # # Call the list_private_connections method.
2154
2164
  # result = client.list_private_connections request
2155
2165
  #
2156
- # # The returned object is of type Gapic::PagedEnumerable. You can
2157
- # # iterate over all elements by calling #each, and the enumerable
2158
- # # will lazily make API calls to fetch subsequent pages. Other
2159
- # # methods are also available for managing paging directly.
2160
- # 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|
2161
2169
  # # Each element is of type ::Google::Cloud::Datastream::V1::PrivateConnection.
2162
- # p response
2170
+ # p item
2163
2171
  # end
2164
2172
  #
2165
2173
  def list_private_connections request, options = nil
@@ -2262,14 +2270,14 @@ module Google
2262
2270
  # # Call the delete_private_connection method.
2263
2271
  # result = client.delete_private_connection request
2264
2272
  #
2265
- # # The returned object is of type Gapic::Operation. You can use this
2266
- # # object to check the status of an operation, cancel it, or wait
2267
- # # 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.
2268
2276
  # result.wait_until_done! timeout: 60
2269
2277
  # if result.response?
2270
2278
  # p result.response
2271
2279
  # else
2272
- # puts "Error!"
2280
+ # puts "No response received."
2273
2281
  # end
2274
2282
  #
2275
2283
  def delete_private_connection request, options = nil
@@ -2374,14 +2382,14 @@ module Google
2374
2382
  # # Call the create_route method.
2375
2383
  # result = client.create_route request
2376
2384
  #
2377
- # # The returned object is of type Gapic::Operation. You can use this
2378
- # # object to check the status of an operation, cancel it, or wait
2379
- # # 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.
2380
2388
  # result.wait_until_done! timeout: 60
2381
2389
  # if result.response?
2382
2390
  # p result.response
2383
2391
  # else
2384
- # puts "Error!"
2392
+ # puts "No response received."
2385
2393
  # end
2386
2394
  #
2387
2395
  def create_route request, options = nil
@@ -2569,13 +2577,11 @@ module Google
2569
2577
  # # Call the list_routes method.
2570
2578
  # result = client.list_routes request
2571
2579
  #
2572
- # # The returned object is of type Gapic::PagedEnumerable. You can
2573
- # # iterate over all elements by calling #each, and the enumerable
2574
- # # will lazily make API calls to fetch subsequent pages. Other
2575
- # # methods are also available for managing paging directly.
2576
- # 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|
2577
2583
  # # Each element is of type ::Google::Cloud::Datastream::V1::Route.
2578
- # p response
2584
+ # p item
2579
2585
  # end
2580
2586
  #
2581
2587
  def list_routes request, options = nil
@@ -2675,14 +2681,14 @@ module Google
2675
2681
  # # Call the delete_route method.
2676
2682
  # result = client.delete_route request
2677
2683
  #
2678
- # # The returned object is of type Gapic::Operation. You can use this
2679
- # # object to check the status of an operation, cancel it, or wait
2680
- # # 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.
2681
2687
  # result.wait_until_done! timeout: 60
2682
2688
  # if result.response?
2683
2689
  # p result.response
2684
2690
  # else
2685
- # puts "Error!"
2691
+ # puts "No response received."
2686
2692
  # end
2687
2693
  #
2688
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