google-cloud-datastream-v1alpha1 0.4.0 → 0.6.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.
@@ -32,6 +32,9 @@ module Google
32
32
  # Datastream service
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "datastream.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -117,6 +120,15 @@ module Google
117
120
  @config
118
121
  end
119
122
 
123
+ ##
124
+ # The effective universe domain
125
+ #
126
+ # @return [String]
127
+ #
128
+ def universe_domain
129
+ @datastream_stub.universe_domain
130
+ end
131
+
120
132
  ##
121
133
  # Create a new Datastream REST client object.
122
134
  #
@@ -144,8 +156,9 @@ module Google
144
156
  credentials = @config.credentials
145
157
  # Use self-signed JWT if the endpoint is unchanged from default,
146
158
  # but only if the default endpoint does not have a region prefix.
147
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
- !@config.endpoint.split(".").first.include?("-")
159
+ enable_self_signed_jwt = @config.endpoint.nil? ||
160
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
161
+ !@config.endpoint.split(".").first.include?("-"))
149
162
  credentials ||= Credentials.default scope: @config.scope,
150
163
  enable_self_signed_jwt: enable_self_signed_jwt
151
164
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -159,9 +172,15 @@ module Google
159
172
  config.credentials = credentials
160
173
  config.quota_project = @quota_project_id
161
174
  config.endpoint = @config.endpoint
175
+ config.universe_domain = @config.universe_domain
162
176
  end
163
177
 
164
- @datastream_stub = ::Google::Cloud::Datastream::V1alpha1::Datastream::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
178
+ @datastream_stub = ::Google::Cloud::Datastream::V1alpha1::Datastream::Rest::ServiceStub.new(
179
+ endpoint: @config.endpoint,
180
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
181
+ universe_domain: @config.universe_domain,
182
+ credentials: credentials
183
+ )
165
184
  end
166
185
 
167
186
  ##
@@ -215,6 +234,26 @@ module Google
215
234
  # @return [::Google::Cloud::Datastream::V1alpha1::ListConnectionProfilesResponse]
216
235
  #
217
236
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
237
+ #
238
+ # @example Basic example
239
+ # require "google/cloud/datastream/v1alpha1"
240
+ #
241
+ # # Create a client object. The client can be reused for multiple calls.
242
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
243
+ #
244
+ # # Create a request. To set request fields, pass in keyword arguments.
245
+ # request = Google::Cloud::Datastream::V1alpha1::ListConnectionProfilesRequest.new
246
+ #
247
+ # # Call the list_connection_profiles method.
248
+ # result = client.list_connection_profiles request
249
+ #
250
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
251
+ # # over elements, and API calls will be issued to fetch pages as needed.
252
+ # result.each do |item|
253
+ # # Each element is of type ::Google::Cloud::Datastream::V1alpha1::ConnectionProfile.
254
+ # p item
255
+ # end
256
+ #
218
257
  def list_connection_profiles request, options = nil
219
258
  raise ::ArgumentError, "request must be provided" if request.nil?
220
259
 
@@ -277,6 +316,22 @@ module Google
277
316
  # @return [::Google::Cloud::Datastream::V1alpha1::ConnectionProfile]
278
317
  #
279
318
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
319
+ #
320
+ # @example Basic example
321
+ # require "google/cloud/datastream/v1alpha1"
322
+ #
323
+ # # Create a client object. The client can be reused for multiple calls.
324
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
325
+ #
326
+ # # Create a request. To set request fields, pass in keyword arguments.
327
+ # request = Google::Cloud::Datastream::V1alpha1::GetConnectionProfileRequest.new
328
+ #
329
+ # # Call the get_connection_profile method.
330
+ # result = client.get_connection_profile request
331
+ #
332
+ # # The returned object is of type Google::Cloud::Datastream::V1alpha1::ConnectionProfile.
333
+ # p result
334
+ #
280
335
  def get_connection_profile request, options = nil
281
336
  raise ::ArgumentError, "request must be provided" if request.nil?
282
337
 
@@ -357,6 +412,29 @@ module Google
357
412
  # @return [::Gapic::Operation]
358
413
  #
359
414
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
415
+ #
416
+ # @example Basic example
417
+ # require "google/cloud/datastream/v1alpha1"
418
+ #
419
+ # # Create a client object. The client can be reused for multiple calls.
420
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
421
+ #
422
+ # # Create a request. To set request fields, pass in keyword arguments.
423
+ # request = Google::Cloud::Datastream::V1alpha1::CreateConnectionProfileRequest.new
424
+ #
425
+ # # Call the create_connection_profile method.
426
+ # result = client.create_connection_profile request
427
+ #
428
+ # # The returned object is of type Gapic::Operation. You can use it to
429
+ # # check the status of an operation, cancel it, or wait for results.
430
+ # # Here is how to wait for a response.
431
+ # result.wait_until_done! timeout: 60
432
+ # if result.response?
433
+ # p result.response
434
+ # else
435
+ # puts "No response received."
436
+ # end
437
+ #
360
438
  def create_connection_profile request, options = nil
361
439
  raise ::ArgumentError, "request must be provided" if request.nil?
362
440
 
@@ -440,6 +518,29 @@ module Google
440
518
  # @return [::Gapic::Operation]
441
519
  #
442
520
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
521
+ #
522
+ # @example Basic example
523
+ # require "google/cloud/datastream/v1alpha1"
524
+ #
525
+ # # Create a client object. The client can be reused for multiple calls.
526
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
527
+ #
528
+ # # Create a request. To set request fields, pass in keyword arguments.
529
+ # request = Google::Cloud::Datastream::V1alpha1::UpdateConnectionProfileRequest.new
530
+ #
531
+ # # Call the update_connection_profile method.
532
+ # result = client.update_connection_profile request
533
+ #
534
+ # # The returned object is of type Gapic::Operation. You can use it to
535
+ # # check the status of an operation, cancel it, or wait for results.
536
+ # # Here is how to wait for a response.
537
+ # result.wait_until_done! timeout: 60
538
+ # if result.response?
539
+ # p result.response
540
+ # else
541
+ # puts "No response received."
542
+ # end
543
+ #
443
544
  def update_connection_profile request, options = nil
444
545
  raise ::ArgumentError, "request must be provided" if request.nil?
445
546
 
@@ -517,6 +618,29 @@ module Google
517
618
  # @return [::Gapic::Operation]
518
619
  #
519
620
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
621
+ #
622
+ # @example Basic example
623
+ # require "google/cloud/datastream/v1alpha1"
624
+ #
625
+ # # Create a client object. The client can be reused for multiple calls.
626
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
627
+ #
628
+ # # Create a request. To set request fields, pass in keyword arguments.
629
+ # request = Google::Cloud::Datastream::V1alpha1::DeleteConnectionProfileRequest.new
630
+ #
631
+ # # Call the delete_connection_profile method.
632
+ # result = client.delete_connection_profile request
633
+ #
634
+ # # The returned object is of type Gapic::Operation. You can use it to
635
+ # # check the status of an operation, cancel it, or wait for results.
636
+ # # Here is how to wait for a response.
637
+ # result.wait_until_done! timeout: 60
638
+ # if result.response?
639
+ # p result.response
640
+ # else
641
+ # puts "No response received."
642
+ # end
643
+ #
520
644
  def delete_connection_profile request, options = nil
521
645
  raise ::ArgumentError, "request must be provided" if request.nil?
522
646
 
@@ -597,6 +721,22 @@ module Google
597
721
  # @return [::Google::Cloud::Datastream::V1alpha1::DiscoverConnectionProfileResponse]
598
722
  #
599
723
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
724
+ #
725
+ # @example Basic example
726
+ # require "google/cloud/datastream/v1alpha1"
727
+ #
728
+ # # Create a client object. The client can be reused for multiple calls.
729
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
730
+ #
731
+ # # Create a request. To set request fields, pass in keyword arguments.
732
+ # request = Google::Cloud::Datastream::V1alpha1::DiscoverConnectionProfileRequest.new
733
+ #
734
+ # # Call the discover_connection_profile method.
735
+ # result = client.discover_connection_profile request
736
+ #
737
+ # # The returned object is of type Google::Cloud::Datastream::V1alpha1::DiscoverConnectionProfileResponse.
738
+ # p result
739
+ #
600
740
  def discover_connection_profile request, options = nil
601
741
  raise ::ArgumentError, "request must be provided" if request.nil?
602
742
 
@@ -673,6 +813,26 @@ module Google
673
813
  # @return [::Google::Cloud::Datastream::V1alpha1::ListStreamsResponse]
674
814
  #
675
815
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
816
+ #
817
+ # @example Basic example
818
+ # require "google/cloud/datastream/v1alpha1"
819
+ #
820
+ # # Create a client object. The client can be reused for multiple calls.
821
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
822
+ #
823
+ # # Create a request. To set request fields, pass in keyword arguments.
824
+ # request = Google::Cloud::Datastream::V1alpha1::ListStreamsRequest.new
825
+ #
826
+ # # Call the list_streams method.
827
+ # result = client.list_streams request
828
+ #
829
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
830
+ # # over elements, and API calls will be issued to fetch pages as needed.
831
+ # result.each do |item|
832
+ # # Each element is of type ::Google::Cloud::Datastream::V1alpha1::Stream.
833
+ # p item
834
+ # end
835
+ #
676
836
  def list_streams request, options = nil
677
837
  raise ::ArgumentError, "request must be provided" if request.nil?
678
838
 
@@ -735,6 +895,22 @@ module Google
735
895
  # @return [::Google::Cloud::Datastream::V1alpha1::Stream]
736
896
  #
737
897
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
898
+ #
899
+ # @example Basic example
900
+ # require "google/cloud/datastream/v1alpha1"
901
+ #
902
+ # # Create a client object. The client can be reused for multiple calls.
903
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
904
+ #
905
+ # # Create a request. To set request fields, pass in keyword arguments.
906
+ # request = Google::Cloud::Datastream::V1alpha1::GetStreamRequest.new
907
+ #
908
+ # # Call the get_stream method.
909
+ # result = client.get_stream request
910
+ #
911
+ # # The returned object is of type Google::Cloud::Datastream::V1alpha1::Stream.
912
+ # p result
913
+ #
738
914
  def get_stream request, options = nil
739
915
  raise ::ArgumentError, "request must be provided" if request.nil?
740
916
 
@@ -820,6 +996,29 @@ module Google
820
996
  # @return [::Gapic::Operation]
821
997
  #
822
998
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
999
+ #
1000
+ # @example Basic example
1001
+ # require "google/cloud/datastream/v1alpha1"
1002
+ #
1003
+ # # Create a client object. The client can be reused for multiple calls.
1004
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1005
+ #
1006
+ # # Create a request. To set request fields, pass in keyword arguments.
1007
+ # request = Google::Cloud::Datastream::V1alpha1::CreateStreamRequest.new
1008
+ #
1009
+ # # Call the create_stream method.
1010
+ # result = client.create_stream request
1011
+ #
1012
+ # # The returned object is of type Gapic::Operation. You can use it to
1013
+ # # check the status of an operation, cancel it, or wait for results.
1014
+ # # Here is how to wait for a response.
1015
+ # result.wait_until_done! timeout: 60
1016
+ # if result.response?
1017
+ # p result.response
1018
+ # else
1019
+ # puts "No response received."
1020
+ # end
1021
+ #
823
1022
  def create_stream request, options = nil
824
1023
  raise ::ArgumentError, "request must be provided" if request.nil?
825
1024
 
@@ -908,6 +1107,29 @@ module Google
908
1107
  # @return [::Gapic::Operation]
909
1108
  #
910
1109
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1110
+ #
1111
+ # @example Basic example
1112
+ # require "google/cloud/datastream/v1alpha1"
1113
+ #
1114
+ # # Create a client object. The client can be reused for multiple calls.
1115
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1116
+ #
1117
+ # # Create a request. To set request fields, pass in keyword arguments.
1118
+ # request = Google::Cloud::Datastream::V1alpha1::UpdateStreamRequest.new
1119
+ #
1120
+ # # Call the update_stream method.
1121
+ # result = client.update_stream request
1122
+ #
1123
+ # # The returned object is of type Gapic::Operation. You can use it to
1124
+ # # check the status of an operation, cancel it, or wait for results.
1125
+ # # Here is how to wait for a response.
1126
+ # result.wait_until_done! timeout: 60
1127
+ # if result.response?
1128
+ # p result.response
1129
+ # else
1130
+ # puts "No response received."
1131
+ # end
1132
+ #
911
1133
  def update_stream request, options = nil
912
1134
  raise ::ArgumentError, "request must be provided" if request.nil?
913
1135
 
@@ -985,6 +1207,29 @@ module Google
985
1207
  # @return [::Gapic::Operation]
986
1208
  #
987
1209
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1210
+ #
1211
+ # @example Basic example
1212
+ # require "google/cloud/datastream/v1alpha1"
1213
+ #
1214
+ # # Create a client object. The client can be reused for multiple calls.
1215
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1216
+ #
1217
+ # # Create a request. To set request fields, pass in keyword arguments.
1218
+ # request = Google::Cloud::Datastream::V1alpha1::DeleteStreamRequest.new
1219
+ #
1220
+ # # Call the delete_stream method.
1221
+ # result = client.delete_stream request
1222
+ #
1223
+ # # The returned object is of type Gapic::Operation. You can use it to
1224
+ # # check the status of an operation, cancel it, or wait for results.
1225
+ # # Here is how to wait for a response.
1226
+ # result.wait_until_done! timeout: 60
1227
+ # if result.response?
1228
+ # p result.response
1229
+ # else
1230
+ # puts "No response received."
1231
+ # end
1232
+ #
988
1233
  def delete_stream request, options = nil
989
1234
  raise ::ArgumentError, "request must be provided" if request.nil?
990
1235
 
@@ -1048,6 +1293,29 @@ module Google
1048
1293
  # @return [::Gapic::Operation]
1049
1294
  #
1050
1295
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1296
+ #
1297
+ # @example Basic example
1298
+ # require "google/cloud/datastream/v1alpha1"
1299
+ #
1300
+ # # Create a client object. The client can be reused for multiple calls.
1301
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1302
+ #
1303
+ # # Create a request. To set request fields, pass in keyword arguments.
1304
+ # request = Google::Cloud::Datastream::V1alpha1::FetchErrorsRequest.new
1305
+ #
1306
+ # # Call the fetch_errors method.
1307
+ # result = client.fetch_errors request
1308
+ #
1309
+ # # The returned object is of type Gapic::Operation. You can use it to
1310
+ # # check the status of an operation, cancel it, or wait for results.
1311
+ # # Here is how to wait for a response.
1312
+ # result.wait_until_done! timeout: 60
1313
+ # if result.response?
1314
+ # p result.response
1315
+ # else
1316
+ # puts "No response received."
1317
+ # end
1318
+ #
1051
1319
  def fetch_errors request, options = nil
1052
1320
  raise ::ArgumentError, "request must be provided" if request.nil?
1053
1321
 
@@ -1119,6 +1387,22 @@ module Google
1119
1387
  # @return [::Gapic::Rest::PagedEnumerable<::String>]
1120
1388
  #
1121
1389
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1390
+ #
1391
+ # @example Basic example
1392
+ # require "google/cloud/datastream/v1alpha1"
1393
+ #
1394
+ # # Create a client object. The client can be reused for multiple calls.
1395
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1396
+ #
1397
+ # # Create a request. To set request fields, pass in keyword arguments.
1398
+ # request = Google::Cloud::Datastream::V1alpha1::FetchStaticIpsRequest.new
1399
+ #
1400
+ # # Call the fetch_static_ips method.
1401
+ # result = client.fetch_static_ips request
1402
+ #
1403
+ # # The returned object is of type Google::Cloud::Datastream::V1alpha1::FetchStaticIpsResponse.
1404
+ # p result
1405
+ #
1122
1406
  def fetch_static_ips request, options = nil
1123
1407
  raise ::ArgumentError, "request must be provided" if request.nil?
1124
1408
 
@@ -1200,6 +1484,29 @@ module Google
1200
1484
  # @return [::Gapic::Operation]
1201
1485
  #
1202
1486
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1487
+ #
1488
+ # @example Basic example
1489
+ # require "google/cloud/datastream/v1alpha1"
1490
+ #
1491
+ # # Create a client object. The client can be reused for multiple calls.
1492
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1493
+ #
1494
+ # # Create a request. To set request fields, pass in keyword arguments.
1495
+ # request = Google::Cloud::Datastream::V1alpha1::CreatePrivateConnectionRequest.new
1496
+ #
1497
+ # # Call the create_private_connection method.
1498
+ # result = client.create_private_connection request
1499
+ #
1500
+ # # The returned object is of type Gapic::Operation. You can use it to
1501
+ # # check the status of an operation, cancel it, or wait for results.
1502
+ # # Here is how to wait for a response.
1503
+ # result.wait_until_done! timeout: 60
1504
+ # if result.response?
1505
+ # p result.response
1506
+ # else
1507
+ # puts "No response received."
1508
+ # end
1509
+ #
1203
1510
  def create_private_connection request, options = nil
1204
1511
  raise ::ArgumentError, "request must be provided" if request.nil?
1205
1512
 
@@ -1263,6 +1570,22 @@ module Google
1263
1570
  # @return [::Google::Cloud::Datastream::V1alpha1::PrivateConnection]
1264
1571
  #
1265
1572
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1573
+ #
1574
+ # @example Basic example
1575
+ # require "google/cloud/datastream/v1alpha1"
1576
+ #
1577
+ # # Create a client object. The client can be reused for multiple calls.
1578
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1579
+ #
1580
+ # # Create a request. To set request fields, pass in keyword arguments.
1581
+ # request = Google::Cloud::Datastream::V1alpha1::GetPrivateConnectionRequest.new
1582
+ #
1583
+ # # Call the get_private_connection method.
1584
+ # result = client.get_private_connection request
1585
+ #
1586
+ # # The returned object is of type Google::Cloud::Datastream::V1alpha1::PrivateConnection.
1587
+ # p result
1588
+ #
1266
1589
  def get_private_connection request, options = nil
1267
1590
  raise ::ArgumentError, "request must be provided" if request.nil?
1268
1591
 
@@ -1342,6 +1665,26 @@ module Google
1342
1665
  # @return [::Google::Cloud::Datastream::V1alpha1::ListPrivateConnectionsResponse]
1343
1666
  #
1344
1667
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1668
+ #
1669
+ # @example Basic example
1670
+ # require "google/cloud/datastream/v1alpha1"
1671
+ #
1672
+ # # Create a client object. The client can be reused for multiple calls.
1673
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1674
+ #
1675
+ # # Create a request. To set request fields, pass in keyword arguments.
1676
+ # request = Google::Cloud::Datastream::V1alpha1::ListPrivateConnectionsRequest.new
1677
+ #
1678
+ # # Call the list_private_connections method.
1679
+ # result = client.list_private_connections request
1680
+ #
1681
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1682
+ # # over elements, and API calls will be issued to fetch pages as needed.
1683
+ # result.each do |item|
1684
+ # # Each element is of type ::Google::Cloud::Datastream::V1alpha1::PrivateConnection.
1685
+ # p item
1686
+ # end
1687
+ #
1345
1688
  def list_private_connections request, options = nil
1346
1689
  raise ::ArgumentError, "request must be provided" if request.nil?
1347
1690
 
@@ -1421,6 +1764,29 @@ module Google
1421
1764
  # @return [::Gapic::Operation]
1422
1765
  #
1423
1766
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1767
+ #
1768
+ # @example Basic example
1769
+ # require "google/cloud/datastream/v1alpha1"
1770
+ #
1771
+ # # Create a client object. The client can be reused for multiple calls.
1772
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1773
+ #
1774
+ # # Create a request. To set request fields, pass in keyword arguments.
1775
+ # request = Google::Cloud::Datastream::V1alpha1::DeletePrivateConnectionRequest.new
1776
+ #
1777
+ # # Call the delete_private_connection method.
1778
+ # result = client.delete_private_connection request
1779
+ #
1780
+ # # The returned object is of type Gapic::Operation. You can use it to
1781
+ # # check the status of an operation, cancel it, or wait for results.
1782
+ # # Here is how to wait for a response.
1783
+ # result.wait_until_done! timeout: 60
1784
+ # if result.response?
1785
+ # p result.response
1786
+ # else
1787
+ # puts "No response received."
1788
+ # end
1789
+ #
1424
1790
  def delete_private_connection request, options = nil
1425
1791
  raise ::ArgumentError, "request must be provided" if request.nil?
1426
1792
 
@@ -1503,6 +1869,29 @@ module Google
1503
1869
  # @return [::Gapic::Operation]
1504
1870
  #
1505
1871
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1872
+ #
1873
+ # @example Basic example
1874
+ # require "google/cloud/datastream/v1alpha1"
1875
+ #
1876
+ # # Create a client object. The client can be reused for multiple calls.
1877
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1878
+ #
1879
+ # # Create a request. To set request fields, pass in keyword arguments.
1880
+ # request = Google::Cloud::Datastream::V1alpha1::CreateRouteRequest.new
1881
+ #
1882
+ # # Call the create_route method.
1883
+ # result = client.create_route request
1884
+ #
1885
+ # # The returned object is of type Gapic::Operation. You can use it to
1886
+ # # check the status of an operation, cancel it, or wait for results.
1887
+ # # Here is how to wait for a response.
1888
+ # result.wait_until_done! timeout: 60
1889
+ # if result.response?
1890
+ # p result.response
1891
+ # else
1892
+ # puts "No response received."
1893
+ # end
1894
+ #
1506
1895
  def create_route request, options = nil
1507
1896
  raise ::ArgumentError, "request must be provided" if request.nil?
1508
1897
 
@@ -1566,6 +1955,22 @@ module Google
1566
1955
  # @return [::Google::Cloud::Datastream::V1alpha1::Route]
1567
1956
  #
1568
1957
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1958
+ #
1959
+ # @example Basic example
1960
+ # require "google/cloud/datastream/v1alpha1"
1961
+ #
1962
+ # # Create a client object. The client can be reused for multiple calls.
1963
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
1964
+ #
1965
+ # # Create a request. To set request fields, pass in keyword arguments.
1966
+ # request = Google::Cloud::Datastream::V1alpha1::GetRouteRequest.new
1967
+ #
1968
+ # # Call the get_route method.
1969
+ # result = client.get_route request
1970
+ #
1971
+ # # The returned object is of type Google::Cloud::Datastream::V1alpha1::Route.
1972
+ # p result
1973
+ #
1569
1974
  def get_route request, options = nil
1570
1975
  raise ::ArgumentError, "request must be provided" if request.nil?
1571
1976
 
@@ -1645,6 +2050,26 @@ module Google
1645
2050
  # @return [::Google::Cloud::Datastream::V1alpha1::ListRoutesResponse]
1646
2051
  #
1647
2052
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2053
+ #
2054
+ # @example Basic example
2055
+ # require "google/cloud/datastream/v1alpha1"
2056
+ #
2057
+ # # Create a client object. The client can be reused for multiple calls.
2058
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
2059
+ #
2060
+ # # Create a request. To set request fields, pass in keyword arguments.
2061
+ # request = Google::Cloud::Datastream::V1alpha1::ListRoutesRequest.new
2062
+ #
2063
+ # # Call the list_routes method.
2064
+ # result = client.list_routes request
2065
+ #
2066
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2067
+ # # over elements, and API calls will be issued to fetch pages as needed.
2068
+ # result.each do |item|
2069
+ # # Each element is of type ::Google::Cloud::Datastream::V1alpha1::Route.
2070
+ # p item
2071
+ # end
2072
+ #
1648
2073
  def list_routes request, options = nil
1649
2074
  raise ::ArgumentError, "request must be provided" if request.nil?
1650
2075
 
@@ -1721,6 +2146,29 @@ module Google
1721
2146
  # @return [::Gapic::Operation]
1722
2147
  #
1723
2148
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2149
+ #
2150
+ # @example Basic example
2151
+ # require "google/cloud/datastream/v1alpha1"
2152
+ #
2153
+ # # Create a client object. The client can be reused for multiple calls.
2154
+ # client = Google::Cloud::Datastream::V1alpha1::Datastream::Rest::Client.new
2155
+ #
2156
+ # # Create a request. To set request fields, pass in keyword arguments.
2157
+ # request = Google::Cloud::Datastream::V1alpha1::DeleteRouteRequest.new
2158
+ #
2159
+ # # Call the delete_route method.
2160
+ # result = client.delete_route request
2161
+ #
2162
+ # # The returned object is of type Gapic::Operation. You can use it to
2163
+ # # check the status of an operation, cancel it, or wait for results.
2164
+ # # Here is how to wait for a response.
2165
+ # result.wait_until_done! timeout: 60
2166
+ # if result.response?
2167
+ # p result.response
2168
+ # else
2169
+ # puts "No response received."
2170
+ # end
2171
+ #
1724
2172
  def delete_route request, options = nil
1725
2173
  raise ::ArgumentError, "request must be provided" if request.nil?
1726
2174
 
@@ -1787,9 +2235,9 @@ module Google
1787
2235
  # end
1788
2236
  #
1789
2237
  # @!attribute [rw] endpoint
1790
- # The hostname or hostname:port of the service endpoint.
1791
- # Defaults to `"datastream.googleapis.com"`.
1792
- # @return [::String]
2238
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2239
+ # nil, indicating to use the default endpoint in the current universe domain.
2240
+ # @return [::String,nil]
1793
2241
  # @!attribute [rw] credentials
1794
2242
  # Credentials to send with calls. You may provide any of the following types:
1795
2243
  # * (`String`) The path to a service account key file in JSON format
@@ -1826,13 +2274,20 @@ module Google
1826
2274
  # @!attribute [rw] quota_project
1827
2275
  # A separate project against which to charge quota.
1828
2276
  # @return [::String]
2277
+ # @!attribute [rw] universe_domain
2278
+ # The universe domain within which to make requests. This determines the
2279
+ # default endpoint URL. The default value of nil uses the environment
2280
+ # universe (usually the default "googleapis.com" universe).
2281
+ # @return [::String,nil]
1829
2282
  #
1830
2283
  class Configuration
1831
2284
  extend ::Gapic::Config
1832
2285
 
2286
+ # @private
2287
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1833
2288
  DEFAULT_ENDPOINT = "datastream.googleapis.com"
1834
2289
 
1835
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2290
+ config_attr :endpoint, nil, ::String, nil
1836
2291
  config_attr :credentials, nil do |value|
1837
2292
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1838
2293
  allowed.any? { |klass| klass === value }
@@ -1844,6 +2299,7 @@ module Google
1844
2299
  config_attr :metadata, nil, ::Hash, nil
1845
2300
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1846
2301
  config_attr :quota_project, nil, ::String, nil
2302
+ config_attr :universe_domain, nil, ::String, nil
1847
2303
 
1848
2304
  # @private
1849
2305
  def initialize parent_config = nil