google-cloud-datastream-v1 0.7.0 → 0.9.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.
@@ -34,6 +34,9 @@ module Google
34
34
  # Datastream service
35
35
  #
36
36
  class Client
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "datastream.$UNIVERSE_DOMAIN$"
39
+
37
40
  include Paths
38
41
 
39
42
  # @private
@@ -119,6 +122,15 @@ module Google
119
122
  @config
120
123
  end
121
124
 
125
+ ##
126
+ # The effective universe domain
127
+ #
128
+ # @return [String]
129
+ #
130
+ def universe_domain
131
+ @datastream_stub.universe_domain
132
+ end
133
+
122
134
  ##
123
135
  # Create a new Datastream REST client object.
124
136
  #
@@ -146,8 +158,9 @@ module Google
146
158
  credentials = @config.credentials
147
159
  # Use self-signed JWT if the endpoint is unchanged from default,
148
160
  # but only if the default endpoint does not have a region prefix.
149
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
- !@config.endpoint.split(".").first.include?("-")
161
+ enable_self_signed_jwt = @config.endpoint.nil? ||
162
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
163
+ !@config.endpoint.split(".").first.include?("-"))
151
164
  credentials ||= Credentials.default scope: @config.scope,
152
165
  enable_self_signed_jwt: enable_self_signed_jwt
153
166
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -161,12 +174,14 @@ module Google
161
174
  config.credentials = credentials
162
175
  config.quota_project = @quota_project_id
163
176
  config.endpoint = @config.endpoint
177
+ config.universe_domain = @config.universe_domain
164
178
  end
165
179
 
166
180
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
167
181
  config.credentials = credentials
168
182
  config.quota_project = @quota_project_id
169
183
  config.endpoint = @config.endpoint
184
+ config.universe_domain = @config.universe_domain
170
185
  config.bindings_override = @config.bindings_override
171
186
  end
172
187
 
@@ -174,9 +189,15 @@ module Google
174
189
  config.credentials = credentials
175
190
  config.quota_project = @quota_project_id
176
191
  config.endpoint = @config.endpoint
192
+ config.universe_domain = @config.universe_domain
177
193
  end
178
194
 
179
- @datastream_stub = ::Google::Cloud::Datastream::V1::Datastream::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
195
+ @datastream_stub = ::Google::Cloud::Datastream::V1::Datastream::Rest::ServiceStub.new(
196
+ endpoint: @config.endpoint,
197
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
198
+ universe_domain: @config.universe_domain,
199
+ credentials: credentials
200
+ )
180
201
  end
181
202
 
182
203
  ##
@@ -244,6 +265,26 @@ module Google
244
265
  # @return [::Google::Cloud::Datastream::V1::ListConnectionProfilesResponse]
245
266
  #
246
267
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
268
+ #
269
+ # @example Basic example
270
+ # require "google/cloud/datastream/v1"
271
+ #
272
+ # # Create a client object. The client can be reused for multiple calls.
273
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
274
+ #
275
+ # # Create a request. To set request fields, pass in keyword arguments.
276
+ # request = Google::Cloud::Datastream::V1::ListConnectionProfilesRequest.new
277
+ #
278
+ # # Call the list_connection_profiles method.
279
+ # result = client.list_connection_profiles request
280
+ #
281
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
282
+ # # over elements, and API calls will be issued to fetch pages as needed.
283
+ # result.each do |item|
284
+ # # Each element is of type ::Google::Cloud::Datastream::V1::ConnectionProfile.
285
+ # p item
286
+ # end
287
+ #
247
288
  def list_connection_profiles request, options = nil
248
289
  raise ::ArgumentError, "request must be provided" if request.nil?
249
290
 
@@ -306,6 +347,22 @@ module Google
306
347
  # @return [::Google::Cloud::Datastream::V1::ConnectionProfile]
307
348
  #
308
349
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
350
+ #
351
+ # @example Basic example
352
+ # require "google/cloud/datastream/v1"
353
+ #
354
+ # # Create a client object. The client can be reused for multiple calls.
355
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
356
+ #
357
+ # # Create a request. To set request fields, pass in keyword arguments.
358
+ # request = Google::Cloud::Datastream::V1::GetConnectionProfileRequest.new
359
+ #
360
+ # # Call the get_connection_profile method.
361
+ # result = client.get_connection_profile request
362
+ #
363
+ # # The returned object is of type Google::Cloud::Datastream::V1::ConnectionProfile.
364
+ # p result
365
+ #
309
366
  def get_connection_profile request, options = nil
310
367
  raise ::ArgumentError, "request must be provided" if request.nil?
311
368
 
@@ -391,6 +448,29 @@ module Google
391
448
  # @return [::Gapic::Operation]
392
449
  #
393
450
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
451
+ #
452
+ # @example Basic example
453
+ # require "google/cloud/datastream/v1"
454
+ #
455
+ # # Create a client object. The client can be reused for multiple calls.
456
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
457
+ #
458
+ # # Create a request. To set request fields, pass in keyword arguments.
459
+ # request = Google::Cloud::Datastream::V1::CreateConnectionProfileRequest.new
460
+ #
461
+ # # Call the create_connection_profile method.
462
+ # result = client.create_connection_profile request
463
+ #
464
+ # # The returned object is of type Gapic::Operation. You can use it to
465
+ # # check the status of an operation, cancel it, or wait for results.
466
+ # # Here is how to wait for a response.
467
+ # result.wait_until_done! timeout: 60
468
+ # if result.response?
469
+ # p result.response
470
+ # else
471
+ # puts "No response received."
472
+ # end
473
+ #
394
474
  def create_connection_profile request, options = nil
395
475
  raise ::ArgumentError, "request must be provided" if request.nil?
396
476
 
@@ -479,6 +559,29 @@ module Google
479
559
  # @return [::Gapic::Operation]
480
560
  #
481
561
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
562
+ #
563
+ # @example Basic example
564
+ # require "google/cloud/datastream/v1"
565
+ #
566
+ # # Create a client object. The client can be reused for multiple calls.
567
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
568
+ #
569
+ # # Create a request. To set request fields, pass in keyword arguments.
570
+ # request = Google::Cloud::Datastream::V1::UpdateConnectionProfileRequest.new
571
+ #
572
+ # # Call the update_connection_profile method.
573
+ # result = client.update_connection_profile request
574
+ #
575
+ # # The returned object is of type Gapic::Operation. You can use it to
576
+ # # check the status of an operation, cancel it, or wait for results.
577
+ # # Here is how to wait for a response.
578
+ # result.wait_until_done! timeout: 60
579
+ # if result.response?
580
+ # p result.response
581
+ # else
582
+ # puts "No response received."
583
+ # end
584
+ #
482
585
  def update_connection_profile request, options = nil
483
586
  raise ::ArgumentError, "request must be provided" if request.nil?
484
587
 
@@ -556,6 +659,29 @@ module Google
556
659
  # @return [::Gapic::Operation]
557
660
  #
558
661
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
662
+ #
663
+ # @example Basic example
664
+ # require "google/cloud/datastream/v1"
665
+ #
666
+ # # Create a client object. The client can be reused for multiple calls.
667
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
668
+ #
669
+ # # Create a request. To set request fields, pass in keyword arguments.
670
+ # request = Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest.new
671
+ #
672
+ # # Call the delete_connection_profile method.
673
+ # result = client.delete_connection_profile request
674
+ #
675
+ # # The returned object is of type Gapic::Operation. You can use it to
676
+ # # check the status of an operation, cancel it, or wait for results.
677
+ # # Here is how to wait for a response.
678
+ # result.wait_until_done! timeout: 60
679
+ # if result.response?
680
+ # p result.response
681
+ # else
682
+ # puts "No response received."
683
+ # end
684
+ #
559
685
  def delete_connection_profile request, options = nil
560
686
  raise ::ArgumentError, "request must be provided" if request.nil?
561
687
 
@@ -638,6 +764,22 @@ module Google
638
764
  # @return [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse]
639
765
  #
640
766
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
767
+ #
768
+ # @example Basic example
769
+ # require "google/cloud/datastream/v1"
770
+ #
771
+ # # Create a client object. The client can be reused for multiple calls.
772
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
773
+ #
774
+ # # Create a request. To set request fields, pass in keyword arguments.
775
+ # request = Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest.new
776
+ #
777
+ # # Call the discover_connection_profile method.
778
+ # result = client.discover_connection_profile request
779
+ #
780
+ # # The returned object is of type Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse.
781
+ # p result
782
+ #
641
783
  def discover_connection_profile request, options = nil
642
784
  raise ::ArgumentError, "request must be provided" if request.nil?
643
785
 
@@ -714,6 +856,26 @@ module Google
714
856
  # @return [::Google::Cloud::Datastream::V1::ListStreamsResponse]
715
857
  #
716
858
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
859
+ #
860
+ # @example Basic example
861
+ # require "google/cloud/datastream/v1"
862
+ #
863
+ # # Create a client object. The client can be reused for multiple calls.
864
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
865
+ #
866
+ # # Create a request. To set request fields, pass in keyword arguments.
867
+ # request = Google::Cloud::Datastream::V1::ListStreamsRequest.new
868
+ #
869
+ # # Call the list_streams method.
870
+ # result = client.list_streams request
871
+ #
872
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
873
+ # # over elements, and API calls will be issued to fetch pages as needed.
874
+ # result.each do |item|
875
+ # # Each element is of type ::Google::Cloud::Datastream::V1::Stream.
876
+ # p item
877
+ # end
878
+ #
717
879
  def list_streams request, options = nil
718
880
  raise ::ArgumentError, "request must be provided" if request.nil?
719
881
 
@@ -776,6 +938,22 @@ module Google
776
938
  # @return [::Google::Cloud::Datastream::V1::Stream]
777
939
  #
778
940
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
941
+ #
942
+ # @example Basic example
943
+ # require "google/cloud/datastream/v1"
944
+ #
945
+ # # Create a client object. The client can be reused for multiple calls.
946
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
947
+ #
948
+ # # Create a request. To set request fields, pass in keyword arguments.
949
+ # request = Google::Cloud::Datastream::V1::GetStreamRequest.new
950
+ #
951
+ # # Call the get_stream method.
952
+ # result = client.get_stream request
953
+ #
954
+ # # The returned object is of type Google::Cloud::Datastream::V1::Stream.
955
+ # p result
956
+ #
779
957
  def get_stream request, options = nil
780
958
  raise ::ArgumentError, "request must be provided" if request.nil?
781
959
 
@@ -861,6 +1039,29 @@ module Google
861
1039
  # @return [::Gapic::Operation]
862
1040
  #
863
1041
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1042
+ #
1043
+ # @example Basic example
1044
+ # require "google/cloud/datastream/v1"
1045
+ #
1046
+ # # Create a client object. The client can be reused for multiple calls.
1047
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1048
+ #
1049
+ # # Create a request. To set request fields, pass in keyword arguments.
1050
+ # request = Google::Cloud::Datastream::V1::CreateStreamRequest.new
1051
+ #
1052
+ # # Call the create_stream method.
1053
+ # result = client.create_stream request
1054
+ #
1055
+ # # The returned object is of type Gapic::Operation. You can use it to
1056
+ # # check the status of an operation, cancel it, or wait for results.
1057
+ # # Here is how to wait for a response.
1058
+ # result.wait_until_done! timeout: 60
1059
+ # if result.response?
1060
+ # p result.response
1061
+ # else
1062
+ # puts "No response received."
1063
+ # end
1064
+ #
864
1065
  def create_stream request, options = nil
865
1066
  raise ::ArgumentError, "request must be provided" if request.nil?
866
1067
 
@@ -949,6 +1150,29 @@ module Google
949
1150
  # @return [::Gapic::Operation]
950
1151
  #
951
1152
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1153
+ #
1154
+ # @example Basic example
1155
+ # require "google/cloud/datastream/v1"
1156
+ #
1157
+ # # Create a client object. The client can be reused for multiple calls.
1158
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1159
+ #
1160
+ # # Create a request. To set request fields, pass in keyword arguments.
1161
+ # request = Google::Cloud::Datastream::V1::UpdateStreamRequest.new
1162
+ #
1163
+ # # Call the update_stream method.
1164
+ # result = client.update_stream request
1165
+ #
1166
+ # # The returned object is of type Gapic::Operation. You can use it to
1167
+ # # check the status of an operation, cancel it, or wait for results.
1168
+ # # Here is how to wait for a response.
1169
+ # result.wait_until_done! timeout: 60
1170
+ # if result.response?
1171
+ # p result.response
1172
+ # else
1173
+ # puts "No response received."
1174
+ # end
1175
+ #
952
1176
  def update_stream request, options = nil
953
1177
  raise ::ArgumentError, "request must be provided" if request.nil?
954
1178
 
@@ -1026,6 +1250,29 @@ module Google
1026
1250
  # @return [::Gapic::Operation]
1027
1251
  #
1028
1252
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1253
+ #
1254
+ # @example Basic example
1255
+ # require "google/cloud/datastream/v1"
1256
+ #
1257
+ # # Create a client object. The client can be reused for multiple calls.
1258
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1259
+ #
1260
+ # # Create a request. To set request fields, pass in keyword arguments.
1261
+ # request = Google::Cloud::Datastream::V1::DeleteStreamRequest.new
1262
+ #
1263
+ # # Call the delete_stream method.
1264
+ # result = client.delete_stream request
1265
+ #
1266
+ # # The returned object is of type Gapic::Operation. You can use it to
1267
+ # # check the status of an operation, cancel it, or wait for results.
1268
+ # # Here is how to wait for a response.
1269
+ # result.wait_until_done! timeout: 60
1270
+ # if result.response?
1271
+ # p result.response
1272
+ # else
1273
+ # puts "No response received."
1274
+ # end
1275
+ #
1029
1276
  def delete_stream request, options = nil
1030
1277
  raise ::ArgumentError, "request must be provided" if request.nil?
1031
1278
 
@@ -1089,6 +1336,22 @@ module Google
1089
1336
  # @return [::Google::Cloud::Datastream::V1::StreamObject]
1090
1337
  #
1091
1338
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1339
+ #
1340
+ # @example Basic example
1341
+ # require "google/cloud/datastream/v1"
1342
+ #
1343
+ # # Create a client object. The client can be reused for multiple calls.
1344
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1345
+ #
1346
+ # # Create a request. To set request fields, pass in keyword arguments.
1347
+ # request = Google::Cloud::Datastream::V1::GetStreamObjectRequest.new
1348
+ #
1349
+ # # Call the get_stream_object method.
1350
+ # result = client.get_stream_object request
1351
+ #
1352
+ # # The returned object is of type Google::Cloud::Datastream::V1::StreamObject.
1353
+ # p result
1354
+ #
1092
1355
  def get_stream_object request, options = nil
1093
1356
  raise ::ArgumentError, "request must be provided" if request.nil?
1094
1357
 
@@ -1153,6 +1416,22 @@ module Google
1153
1416
  # @return [::Google::Cloud::Datastream::V1::StreamObject]
1154
1417
  #
1155
1418
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1419
+ #
1420
+ # @example Basic example
1421
+ # require "google/cloud/datastream/v1"
1422
+ #
1423
+ # # Create a client object. The client can be reused for multiple calls.
1424
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1425
+ #
1426
+ # # Create a request. To set request fields, pass in keyword arguments.
1427
+ # request = Google::Cloud::Datastream::V1::LookupStreamObjectRequest.new
1428
+ #
1429
+ # # Call the lookup_stream_object method.
1430
+ # result = client.lookup_stream_object request
1431
+ #
1432
+ # # The returned object is of type Google::Cloud::Datastream::V1::StreamObject.
1433
+ # p result
1434
+ #
1156
1435
  def lookup_stream_object request, options = nil
1157
1436
  raise ::ArgumentError, "request must be provided" if request.nil?
1158
1437
 
@@ -1225,6 +1504,26 @@ module Google
1225
1504
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>]
1226
1505
  #
1227
1506
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1507
+ #
1508
+ # @example Basic example
1509
+ # require "google/cloud/datastream/v1"
1510
+ #
1511
+ # # Create a client object. The client can be reused for multiple calls.
1512
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1513
+ #
1514
+ # # Create a request. To set request fields, pass in keyword arguments.
1515
+ # request = Google::Cloud::Datastream::V1::ListStreamObjectsRequest.new
1516
+ #
1517
+ # # Call the list_stream_objects method.
1518
+ # result = client.list_stream_objects request
1519
+ #
1520
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1521
+ # # over elements, and API calls will be issued to fetch pages as needed.
1522
+ # result.each do |item|
1523
+ # # Each element is of type ::Google::Cloud::Datastream::V1::StreamObject.
1524
+ # p item
1525
+ # end
1526
+ #
1228
1527
  def list_stream_objects request, options = nil
1229
1528
  raise ::ArgumentError, "request must be provided" if request.nil?
1230
1529
 
@@ -1289,6 +1588,22 @@ module Google
1289
1588
  # @return [::Google::Cloud::Datastream::V1::StartBackfillJobResponse]
1290
1589
  #
1291
1590
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1591
+ #
1592
+ # @example Basic example
1593
+ # require "google/cloud/datastream/v1"
1594
+ #
1595
+ # # Create a client object. The client can be reused for multiple calls.
1596
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1597
+ #
1598
+ # # Create a request. To set request fields, pass in keyword arguments.
1599
+ # request = Google::Cloud::Datastream::V1::StartBackfillJobRequest.new
1600
+ #
1601
+ # # Call the start_backfill_job method.
1602
+ # result = client.start_backfill_job request
1603
+ #
1604
+ # # The returned object is of type Google::Cloud::Datastream::V1::StartBackfillJobResponse.
1605
+ # p result
1606
+ #
1292
1607
  def start_backfill_job request, options = nil
1293
1608
  raise ::ArgumentError, "request must be provided" if request.nil?
1294
1609
 
@@ -1352,6 +1667,22 @@ module Google
1352
1667
  # @return [::Google::Cloud::Datastream::V1::StopBackfillJobResponse]
1353
1668
  #
1354
1669
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1670
+ #
1671
+ # @example Basic example
1672
+ # require "google/cloud/datastream/v1"
1673
+ #
1674
+ # # Create a client object. The client can be reused for multiple calls.
1675
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1676
+ #
1677
+ # # Create a request. To set request fields, pass in keyword arguments.
1678
+ # request = Google::Cloud::Datastream::V1::StopBackfillJobRequest.new
1679
+ #
1680
+ # # Call the stop_backfill_job method.
1681
+ # result = client.stop_backfill_job request
1682
+ #
1683
+ # # The returned object is of type Google::Cloud::Datastream::V1::StopBackfillJobResponse.
1684
+ # p result
1685
+ #
1355
1686
  def stop_backfill_job request, options = nil
1356
1687
  raise ::ArgumentError, "request must be provided" if request.nil?
1357
1688
 
@@ -1421,6 +1752,22 @@ module Google
1421
1752
  # @return [::Gapic::Rest::PagedEnumerable<::String>]
1422
1753
  #
1423
1754
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1755
+ #
1756
+ # @example Basic example
1757
+ # require "google/cloud/datastream/v1"
1758
+ #
1759
+ # # Create a client object. The client can be reused for multiple calls.
1760
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1761
+ #
1762
+ # # Create a request. To set request fields, pass in keyword arguments.
1763
+ # request = Google::Cloud::Datastream::V1::FetchStaticIpsRequest.new
1764
+ #
1765
+ # # Call the fetch_static_ips method.
1766
+ # result = client.fetch_static_ips request
1767
+ #
1768
+ # # The returned object is of type Google::Cloud::Datastream::V1::FetchStaticIpsResponse.
1769
+ # p result
1770
+ #
1424
1771
  def fetch_static_ips request, options = nil
1425
1772
  raise ::ArgumentError, "request must be provided" if request.nil?
1426
1773
 
@@ -1504,6 +1851,29 @@ module Google
1504
1851
  # @return [::Gapic::Operation]
1505
1852
  #
1506
1853
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1854
+ #
1855
+ # @example Basic example
1856
+ # require "google/cloud/datastream/v1"
1857
+ #
1858
+ # # Create a client object. The client can be reused for multiple calls.
1859
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1860
+ #
1861
+ # # Create a request. To set request fields, pass in keyword arguments.
1862
+ # request = Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest.new
1863
+ #
1864
+ # # Call the create_private_connection method.
1865
+ # result = client.create_private_connection request
1866
+ #
1867
+ # # The returned object is of type Gapic::Operation. You can use it to
1868
+ # # check the status of an operation, cancel it, or wait for results.
1869
+ # # Here is how to wait for a response.
1870
+ # result.wait_until_done! timeout: 60
1871
+ # if result.response?
1872
+ # p result.response
1873
+ # else
1874
+ # puts "No response received."
1875
+ # end
1876
+ #
1507
1877
  def create_private_connection request, options = nil
1508
1878
  raise ::ArgumentError, "request must be provided" if request.nil?
1509
1879
 
@@ -1567,6 +1937,22 @@ module Google
1567
1937
  # @return [::Google::Cloud::Datastream::V1::PrivateConnection]
1568
1938
  #
1569
1939
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1940
+ #
1941
+ # @example Basic example
1942
+ # require "google/cloud/datastream/v1"
1943
+ #
1944
+ # # Create a client object. The client can be reused for multiple calls.
1945
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
1946
+ #
1947
+ # # Create a request. To set request fields, pass in keyword arguments.
1948
+ # request = Google::Cloud::Datastream::V1::GetPrivateConnectionRequest.new
1949
+ #
1950
+ # # Call the get_private_connection method.
1951
+ # result = client.get_private_connection request
1952
+ #
1953
+ # # The returned object is of type Google::Cloud::Datastream::V1::PrivateConnection.
1954
+ # p result
1955
+ #
1570
1956
  def get_private_connection request, options = nil
1571
1957
  raise ::ArgumentError, "request must be provided" if request.nil?
1572
1958
 
@@ -1647,6 +2033,26 @@ module Google
1647
2033
  # @return [::Google::Cloud::Datastream::V1::ListPrivateConnectionsResponse]
1648
2034
  #
1649
2035
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2036
+ #
2037
+ # @example Basic example
2038
+ # require "google/cloud/datastream/v1"
2039
+ #
2040
+ # # Create a client object. The client can be reused for multiple calls.
2041
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
2042
+ #
2043
+ # # Create a request. To set request fields, pass in keyword arguments.
2044
+ # request = Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest.new
2045
+ #
2046
+ # # Call the list_private_connections method.
2047
+ # result = client.list_private_connections request
2048
+ #
2049
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2050
+ # # over elements, and API calls will be issued to fetch pages as needed.
2051
+ # result.each do |item|
2052
+ # # Each element is of type ::Google::Cloud::Datastream::V1::PrivateConnection.
2053
+ # p item
2054
+ # end
2055
+ #
1650
2056
  def list_private_connections request, options = nil
1651
2057
  raise ::ArgumentError, "request must be provided" if request.nil?
1652
2058
 
@@ -1726,6 +2132,29 @@ module Google
1726
2132
  # @return [::Gapic::Operation]
1727
2133
  #
1728
2134
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2135
+ #
2136
+ # @example Basic example
2137
+ # require "google/cloud/datastream/v1"
2138
+ #
2139
+ # # Create a client object. The client can be reused for multiple calls.
2140
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
2141
+ #
2142
+ # # Create a request. To set request fields, pass in keyword arguments.
2143
+ # request = Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest.new
2144
+ #
2145
+ # # Call the delete_private_connection method.
2146
+ # result = client.delete_private_connection request
2147
+ #
2148
+ # # The returned object is of type Gapic::Operation. You can use it to
2149
+ # # check the status of an operation, cancel it, or wait for results.
2150
+ # # Here is how to wait for a response.
2151
+ # result.wait_until_done! timeout: 60
2152
+ # if result.response?
2153
+ # p result.response
2154
+ # else
2155
+ # puts "No response received."
2156
+ # end
2157
+ #
1729
2158
  def delete_private_connection request, options = nil
1730
2159
  raise ::ArgumentError, "request must be provided" if request.nil?
1731
2160
 
@@ -1808,6 +2237,29 @@ module Google
1808
2237
  # @return [::Gapic::Operation]
1809
2238
  #
1810
2239
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2240
+ #
2241
+ # @example Basic example
2242
+ # require "google/cloud/datastream/v1"
2243
+ #
2244
+ # # Create a client object. The client can be reused for multiple calls.
2245
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
2246
+ #
2247
+ # # Create a request. To set request fields, pass in keyword arguments.
2248
+ # request = Google::Cloud::Datastream::V1::CreateRouteRequest.new
2249
+ #
2250
+ # # Call the create_route method.
2251
+ # result = client.create_route request
2252
+ #
2253
+ # # The returned object is of type Gapic::Operation. You can use it to
2254
+ # # check the status of an operation, cancel it, or wait for results.
2255
+ # # Here is how to wait for a response.
2256
+ # result.wait_until_done! timeout: 60
2257
+ # if result.response?
2258
+ # p result.response
2259
+ # else
2260
+ # puts "No response received."
2261
+ # end
2262
+ #
1811
2263
  def create_route request, options = nil
1812
2264
  raise ::ArgumentError, "request must be provided" if request.nil?
1813
2265
 
@@ -1871,6 +2323,22 @@ module Google
1871
2323
  # @return [::Google::Cloud::Datastream::V1::Route]
1872
2324
  #
1873
2325
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2326
+ #
2327
+ # @example Basic example
2328
+ # require "google/cloud/datastream/v1"
2329
+ #
2330
+ # # Create a client object. The client can be reused for multiple calls.
2331
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
2332
+ #
2333
+ # # Create a request. To set request fields, pass in keyword arguments.
2334
+ # request = Google::Cloud::Datastream::V1::GetRouteRequest.new
2335
+ #
2336
+ # # Call the get_route method.
2337
+ # result = client.get_route request
2338
+ #
2339
+ # # The returned object is of type Google::Cloud::Datastream::V1::Route.
2340
+ # p result
2341
+ #
1874
2342
  def get_route request, options = nil
1875
2343
  raise ::ArgumentError, "request must be provided" if request.nil?
1876
2344
 
@@ -1950,6 +2418,26 @@ module Google
1950
2418
  # @return [::Google::Cloud::Datastream::V1::ListRoutesResponse]
1951
2419
  #
1952
2420
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2421
+ #
2422
+ # @example Basic example
2423
+ # require "google/cloud/datastream/v1"
2424
+ #
2425
+ # # Create a client object. The client can be reused for multiple calls.
2426
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
2427
+ #
2428
+ # # Create a request. To set request fields, pass in keyword arguments.
2429
+ # request = Google::Cloud::Datastream::V1::ListRoutesRequest.new
2430
+ #
2431
+ # # Call the list_routes method.
2432
+ # result = client.list_routes request
2433
+ #
2434
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2435
+ # # over elements, and API calls will be issued to fetch pages as needed.
2436
+ # result.each do |item|
2437
+ # # Each element is of type ::Google::Cloud::Datastream::V1::Route.
2438
+ # p item
2439
+ # end
2440
+ #
1953
2441
  def list_routes request, options = nil
1954
2442
  raise ::ArgumentError, "request must be provided" if request.nil?
1955
2443
 
@@ -2026,6 +2514,29 @@ module Google
2026
2514
  # @return [::Gapic::Operation]
2027
2515
  #
2028
2516
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2517
+ #
2518
+ # @example Basic example
2519
+ # require "google/cloud/datastream/v1"
2520
+ #
2521
+ # # Create a client object. The client can be reused for multiple calls.
2522
+ # client = Google::Cloud::Datastream::V1::Datastream::Rest::Client.new
2523
+ #
2524
+ # # Create a request. To set request fields, pass in keyword arguments.
2525
+ # request = Google::Cloud::Datastream::V1::DeleteRouteRequest.new
2526
+ #
2527
+ # # Call the delete_route method.
2528
+ # result = client.delete_route request
2529
+ #
2530
+ # # The returned object is of type Gapic::Operation. You can use it to
2531
+ # # check the status of an operation, cancel it, or wait for results.
2532
+ # # Here is how to wait for a response.
2533
+ # result.wait_until_done! timeout: 60
2534
+ # if result.response?
2535
+ # p result.response
2536
+ # else
2537
+ # puts "No response received."
2538
+ # end
2539
+ #
2029
2540
  def delete_route request, options = nil
2030
2541
  raise ::ArgumentError, "request must be provided" if request.nil?
2031
2542
 
@@ -2092,9 +2603,9 @@ module Google
2092
2603
  # end
2093
2604
  #
2094
2605
  # @!attribute [rw] endpoint
2095
- # The hostname or hostname:port of the service endpoint.
2096
- # Defaults to `"datastream.googleapis.com"`.
2097
- # @return [::String]
2606
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2607
+ # nil, indicating to use the default endpoint in the current universe domain.
2608
+ # @return [::String,nil]
2098
2609
  # @!attribute [rw] credentials
2099
2610
  # Credentials to send with calls. You may provide any of the following types:
2100
2611
  # * (`String`) The path to a service account key file in JSON format
@@ -2131,13 +2642,20 @@ module Google
2131
2642
  # @!attribute [rw] quota_project
2132
2643
  # A separate project against which to charge quota.
2133
2644
  # @return [::String]
2645
+ # @!attribute [rw] universe_domain
2646
+ # The universe domain within which to make requests. This determines the
2647
+ # default endpoint URL. The default value of nil uses the environment
2648
+ # universe (usually the default "googleapis.com" universe).
2649
+ # @return [::String,nil]
2134
2650
  #
2135
2651
  class Configuration
2136
2652
  extend ::Gapic::Config
2137
2653
 
2654
+ # @private
2655
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2138
2656
  DEFAULT_ENDPOINT = "datastream.googleapis.com"
2139
2657
 
2140
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2658
+ config_attr :endpoint, nil, ::String, nil
2141
2659
  config_attr :credentials, nil do |value|
2142
2660
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2143
2661
  allowed.any? { |klass| klass === value }
@@ -2149,6 +2667,7 @@ module Google
2149
2667
  config_attr :metadata, nil, ::Hash, nil
2150
2668
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2151
2669
  config_attr :quota_project, nil, ::String, nil
2670
+ config_attr :universe_domain, nil, ::String, nil
2152
2671
 
2153
2672
  # @private
2154
2673
  # Overrides for http bindings for the RPCs of this service