google-cloud-artifact_registry-v1beta2 0.9.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,6 +45,9 @@ module Google
45
45
  # or Version.
46
46
  #
47
47
  class Client
48
+ # @private
49
+ DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$"
50
+
48
51
  include Paths
49
52
 
50
53
  # @private
@@ -190,6 +193,15 @@ module Google
190
193
  @config
191
194
  end
192
195
 
196
+ ##
197
+ # The effective universe domain
198
+ #
199
+ # @return [String]
200
+ #
201
+ def universe_domain
202
+ @artifact_registry_stub.universe_domain
203
+ end
204
+
193
205
  ##
194
206
  # Create a new ArtifactRegistry REST client object.
195
207
  #
@@ -217,8 +229,9 @@ module Google
217
229
  credentials = @config.credentials
218
230
  # Use self-signed JWT if the endpoint is unchanged from default,
219
231
  # but only if the default endpoint does not have a region prefix.
220
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
221
- !@config.endpoint.split(".").first.include?("-")
232
+ enable_self_signed_jwt = @config.endpoint.nil? ||
233
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
234
+ !@config.endpoint.split(".").first.include?("-"))
222
235
  credentials ||= Credentials.default scope: @config.scope,
223
236
  enable_self_signed_jwt: enable_self_signed_jwt
224
237
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -232,16 +245,23 @@ module Google
232
245
  config.credentials = credentials
233
246
  config.quota_project = @quota_project_id
234
247
  config.endpoint = @config.endpoint
248
+ config.universe_domain = @config.universe_domain
235
249
  end
236
250
 
237
251
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
238
252
  config.credentials = credentials
239
253
  config.quota_project = @quota_project_id
240
254
  config.endpoint = @config.endpoint
255
+ config.universe_domain = @config.universe_domain
241
256
  config.bindings_override = @config.bindings_override
242
257
  end
243
258
 
244
- @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
259
+ @artifact_registry_stub = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::ServiceStub.new(
260
+ endpoint: @config.endpoint,
261
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
262
+ universe_domain: @config.universe_domain,
263
+ credentials: credentials
264
+ )
245
265
  end
246
266
 
247
267
  ##
@@ -292,6 +312,29 @@ module Google
292
312
  # @return [::Gapic::Operation]
293
313
  #
294
314
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
315
+ #
316
+ # @example Basic example
317
+ # require "google/cloud/artifact_registry/v1beta2"
318
+ #
319
+ # # Create a client object. The client can be reused for multiple calls.
320
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
321
+ #
322
+ # # Create a request. To set request fields, pass in keyword arguments.
323
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new
324
+ #
325
+ # # Call the import_apt_artifacts method.
326
+ # result = client.import_apt_artifacts request
327
+ #
328
+ # # The returned object is of type Gapic::Operation. You can use it to
329
+ # # check the status of an operation, cancel it, or wait for results.
330
+ # # Here is how to wait for a response.
331
+ # result.wait_until_done! timeout: 60
332
+ # if result.response?
333
+ # p result.response
334
+ # else
335
+ # puts "No response received."
336
+ # end
337
+ #
295
338
  def import_apt_artifacts request, options = nil
296
339
  raise ::ArgumentError, "request must be provided" if request.nil?
297
340
 
@@ -360,6 +403,29 @@ module Google
360
403
  # @return [::Gapic::Operation]
361
404
  #
362
405
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
406
+ #
407
+ # @example Basic example
408
+ # require "google/cloud/artifact_registry/v1beta2"
409
+ #
410
+ # # Create a client object. The client can be reused for multiple calls.
411
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
412
+ #
413
+ # # Create a request. To set request fields, pass in keyword arguments.
414
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new
415
+ #
416
+ # # Call the import_yum_artifacts method.
417
+ # result = client.import_yum_artifacts request
418
+ #
419
+ # # The returned object is of type Gapic::Operation. You can use it to
420
+ # # check the status of an operation, cancel it, or wait for results.
421
+ # # Here is how to wait for a response.
422
+ # result.wait_until_done! timeout: 60
423
+ # if result.response?
424
+ # p result.response
425
+ # else
426
+ # puts "No response received."
427
+ # end
428
+ #
363
429
  def import_yum_artifacts request, options = nil
364
430
  raise ::ArgumentError, "request must be provided" if request.nil?
365
431
 
@@ -427,6 +493,26 @@ module Google
427
493
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>]
428
494
  #
429
495
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
496
+ #
497
+ # @example Basic example
498
+ # require "google/cloud/artifact_registry/v1beta2"
499
+ #
500
+ # # Create a client object. The client can be reused for multiple calls.
501
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
502
+ #
503
+ # # Create a request. To set request fields, pass in keyword arguments.
504
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new
505
+ #
506
+ # # Call the list_repositories method.
507
+ # result = client.list_repositories request
508
+ #
509
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
510
+ # # over elements, and API calls will be issued to fetch pages as needed.
511
+ # result.each do |item|
512
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.
513
+ # p item
514
+ # end
515
+ #
430
516
  def list_repositories request, options = nil
431
517
  raise ::ArgumentError, "request must be provided" if request.nil?
432
518
 
@@ -490,6 +576,22 @@ module Google
490
576
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
491
577
  #
492
578
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
579
+ #
580
+ # @example Basic example
581
+ # require "google/cloud/artifact_registry/v1beta2"
582
+ #
583
+ # # Create a client object. The client can be reused for multiple calls.
584
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
585
+ #
586
+ # # Create a request. To set request fields, pass in keyword arguments.
587
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new
588
+ #
589
+ # # Call the get_repository method.
590
+ # result = client.get_repository request
591
+ #
592
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository.
593
+ # p result
594
+ #
493
595
  def get_repository request, options = nil
494
596
  raise ::ArgumentError, "request must be provided" if request.nil?
495
597
 
@@ -557,6 +659,29 @@ module Google
557
659
  # @return [::Gapic::Operation]
558
660
  #
559
661
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
662
+ #
663
+ # @example Basic example
664
+ # require "google/cloud/artifact_registry/v1beta2"
665
+ #
666
+ # # Create a client object. The client can be reused for multiple calls.
667
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
668
+ #
669
+ # # Create a request. To set request fields, pass in keyword arguments.
670
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new
671
+ #
672
+ # # Call the create_repository method.
673
+ # result = client.create_repository 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
+ #
560
685
  def create_repository request, options = nil
561
686
  raise ::ArgumentError, "request must be provided" if request.nil?
562
687
 
@@ -624,6 +749,22 @@ module Google
624
749
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
625
750
  #
626
751
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
752
+ #
753
+ # @example Basic example
754
+ # require "google/cloud/artifact_registry/v1beta2"
755
+ #
756
+ # # Create a client object. The client can be reused for multiple calls.
757
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
758
+ #
759
+ # # Create a request. To set request fields, pass in keyword arguments.
760
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new
761
+ #
762
+ # # Call the update_repository method.
763
+ # result = client.update_repository request
764
+ #
765
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository.
766
+ # p result
767
+ #
627
768
  def update_repository request, options = nil
628
769
  raise ::ArgumentError, "request must be provided" if request.nil?
629
770
 
@@ -688,6 +829,29 @@ module Google
688
829
  # @return [::Gapic::Operation]
689
830
  #
690
831
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
832
+ #
833
+ # @example Basic example
834
+ # require "google/cloud/artifact_registry/v1beta2"
835
+ #
836
+ # # Create a client object. The client can be reused for multiple calls.
837
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
838
+ #
839
+ # # Create a request. To set request fields, pass in keyword arguments.
840
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new
841
+ #
842
+ # # Call the delete_repository method.
843
+ # result = client.delete_repository request
844
+ #
845
+ # # The returned object is of type Gapic::Operation. You can use it to
846
+ # # check the status of an operation, cancel it, or wait for results.
847
+ # # Here is how to wait for a response.
848
+ # result.wait_until_done! timeout: 60
849
+ # if result.response?
850
+ # p result.response
851
+ # else
852
+ # puts "No response received."
853
+ # end
854
+ #
691
855
  def delete_repository request, options = nil
692
856
  raise ::ArgumentError, "request must be provided" if request.nil?
693
857
 
@@ -756,6 +920,26 @@ module Google
756
920
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>]
757
921
  #
758
922
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
923
+ #
924
+ # @example Basic example
925
+ # require "google/cloud/artifact_registry/v1beta2"
926
+ #
927
+ # # Create a client object. The client can be reused for multiple calls.
928
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
929
+ #
930
+ # # Create a request. To set request fields, pass in keyword arguments.
931
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new
932
+ #
933
+ # # Call the list_packages method.
934
+ # result = client.list_packages request
935
+ #
936
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
937
+ # # over elements, and API calls will be issued to fetch pages as needed.
938
+ # result.each do |item|
939
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package.
940
+ # p item
941
+ # end
942
+ #
759
943
  def list_packages request, options = nil
760
944
  raise ::ArgumentError, "request must be provided" if request.nil?
761
945
 
@@ -819,6 +1003,22 @@ module Google
819
1003
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package]
820
1004
  #
821
1005
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1006
+ #
1007
+ # @example Basic example
1008
+ # require "google/cloud/artifact_registry/v1beta2"
1009
+ #
1010
+ # # Create a client object. The client can be reused for multiple calls.
1011
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1012
+ #
1013
+ # # Create a request. To set request fields, pass in keyword arguments.
1014
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new
1015
+ #
1016
+ # # Call the get_package method.
1017
+ # result = client.get_package request
1018
+ #
1019
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package.
1020
+ # p result
1021
+ #
822
1022
  def get_package request, options = nil
823
1023
  raise ::ArgumentError, "request must be provided" if request.nil?
824
1024
 
@@ -882,6 +1082,29 @@ module Google
882
1082
  # @return [::Gapic::Operation]
883
1083
  #
884
1084
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1085
+ #
1086
+ # @example Basic example
1087
+ # require "google/cloud/artifact_registry/v1beta2"
1088
+ #
1089
+ # # Create a client object. The client can be reused for multiple calls.
1090
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1091
+ #
1092
+ # # Create a request. To set request fields, pass in keyword arguments.
1093
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new
1094
+ #
1095
+ # # Call the delete_package method.
1096
+ # result = client.delete_package request
1097
+ #
1098
+ # # The returned object is of type Gapic::Operation. You can use it to
1099
+ # # check the status of an operation, cancel it, or wait for results.
1100
+ # # Here is how to wait for a response.
1101
+ # result.wait_until_done! timeout: 60
1102
+ # if result.response?
1103
+ # p result.response
1104
+ # else
1105
+ # puts "No response received."
1106
+ # end
1107
+ #
885
1108
  def delete_package request, options = nil
886
1109
  raise ::ArgumentError, "request must be provided" if request.nil?
887
1110
 
@@ -953,6 +1176,26 @@ module Google
953
1176
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>]
954
1177
  #
955
1178
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1179
+ #
1180
+ # @example Basic example
1181
+ # require "google/cloud/artifact_registry/v1beta2"
1182
+ #
1183
+ # # Create a client object. The client can be reused for multiple calls.
1184
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1185
+ #
1186
+ # # Create a request. To set request fields, pass in keyword arguments.
1187
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new
1188
+ #
1189
+ # # Call the list_versions method.
1190
+ # result = client.list_versions request
1191
+ #
1192
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1193
+ # # over elements, and API calls will be issued to fetch pages as needed.
1194
+ # result.each do |item|
1195
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version.
1196
+ # p item
1197
+ # end
1198
+ #
956
1199
  def list_versions request, options = nil
957
1200
  raise ::ArgumentError, "request must be provided" if request.nil?
958
1201
 
@@ -1018,6 +1261,22 @@ module Google
1018
1261
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version]
1019
1262
  #
1020
1263
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1264
+ #
1265
+ # @example Basic example
1266
+ # require "google/cloud/artifact_registry/v1beta2"
1267
+ #
1268
+ # # Create a client object. The client can be reused for multiple calls.
1269
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1270
+ #
1271
+ # # Create a request. To set request fields, pass in keyword arguments.
1272
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new
1273
+ #
1274
+ # # Call the get_version method.
1275
+ # result = client.get_version request
1276
+ #
1277
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version.
1278
+ # p result
1279
+ #
1021
1280
  def get_version request, options = nil
1022
1281
  raise ::ArgumentError, "request must be provided" if request.nil?
1023
1282
 
@@ -1084,6 +1343,29 @@ module Google
1084
1343
  # @return [::Gapic::Operation]
1085
1344
  #
1086
1345
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1346
+ #
1347
+ # @example Basic example
1348
+ # require "google/cloud/artifact_registry/v1beta2"
1349
+ #
1350
+ # # Create a client object. The client can be reused for multiple calls.
1351
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1352
+ #
1353
+ # # Create a request. To set request fields, pass in keyword arguments.
1354
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new
1355
+ #
1356
+ # # Call the delete_version method.
1357
+ # result = client.delete_version request
1358
+ #
1359
+ # # The returned object is of type Gapic::Operation. You can use it to
1360
+ # # check the status of an operation, cancel it, or wait for results.
1361
+ # # Here is how to wait for a response.
1362
+ # result.wait_until_done! timeout: 60
1363
+ # if result.response?
1364
+ # p result.response
1365
+ # else
1366
+ # puts "No response received."
1367
+ # end
1368
+ #
1087
1369
  def delete_version request, options = nil
1088
1370
  raise ::ArgumentError, "request must be provided" if request.nil?
1089
1371
 
@@ -1165,6 +1447,26 @@ module Google
1165
1447
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>]
1166
1448
  #
1167
1449
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1450
+ #
1451
+ # @example Basic example
1452
+ # require "google/cloud/artifact_registry/v1beta2"
1453
+ #
1454
+ # # Create a client object. The client can be reused for multiple calls.
1455
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1456
+ #
1457
+ # # Create a request. To set request fields, pass in keyword arguments.
1458
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new
1459
+ #
1460
+ # # Call the list_files method.
1461
+ # result = client.list_files request
1462
+ #
1463
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1464
+ # # over elements, and API calls will be issued to fetch pages as needed.
1465
+ # result.each do |item|
1466
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File.
1467
+ # p item
1468
+ # end
1469
+ #
1168
1470
  def list_files request, options = nil
1169
1471
  raise ::ArgumentError, "request must be provided" if request.nil?
1170
1472
 
@@ -1228,6 +1530,22 @@ module Google
1228
1530
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::File]
1229
1531
  #
1230
1532
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1533
+ #
1534
+ # @example Basic example
1535
+ # require "google/cloud/artifact_registry/v1beta2"
1536
+ #
1537
+ # # Create a client object. The client can be reused for multiple calls.
1538
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1539
+ #
1540
+ # # Create a request. To set request fields, pass in keyword arguments.
1541
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new
1542
+ #
1543
+ # # Call the get_file method.
1544
+ # result = client.get_file request
1545
+ #
1546
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File.
1547
+ # p result
1548
+ #
1231
1549
  def get_file request, options = nil
1232
1550
  raise ::ArgumentError, "request must be provided" if request.nil?
1233
1551
 
@@ -1304,6 +1622,26 @@ module Google
1304
1622
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>]
1305
1623
  #
1306
1624
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1625
+ #
1626
+ # @example Basic example
1627
+ # require "google/cloud/artifact_registry/v1beta2"
1628
+ #
1629
+ # # Create a client object. The client can be reused for multiple calls.
1630
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1631
+ #
1632
+ # # Create a request. To set request fields, pass in keyword arguments.
1633
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new
1634
+ #
1635
+ # # Call the list_tags method.
1636
+ # result = client.list_tags request
1637
+ #
1638
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1639
+ # # over elements, and API calls will be issued to fetch pages as needed.
1640
+ # result.each do |item|
1641
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.
1642
+ # p item
1643
+ # end
1644
+ #
1307
1645
  def list_tags request, options = nil
1308
1646
  raise ::ArgumentError, "request must be provided" if request.nil?
1309
1647
 
@@ -1367,6 +1705,22 @@ module Google
1367
1705
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
1368
1706
  #
1369
1707
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1708
+ #
1709
+ # @example Basic example
1710
+ # require "google/cloud/artifact_registry/v1beta2"
1711
+ #
1712
+ # # Create a client object. The client can be reused for multiple calls.
1713
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1714
+ #
1715
+ # # Create a request. To set request fields, pass in keyword arguments.
1716
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new
1717
+ #
1718
+ # # Call the get_tag method.
1719
+ # result = client.get_tag request
1720
+ #
1721
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag.
1722
+ # p result
1723
+ #
1370
1724
  def get_tag request, options = nil
1371
1725
  raise ::ArgumentError, "request must be provided" if request.nil?
1372
1726
 
@@ -1433,6 +1787,22 @@ module Google
1433
1787
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
1434
1788
  #
1435
1789
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1790
+ #
1791
+ # @example Basic example
1792
+ # require "google/cloud/artifact_registry/v1beta2"
1793
+ #
1794
+ # # Create a client object. The client can be reused for multiple calls.
1795
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1796
+ #
1797
+ # # Create a request. To set request fields, pass in keyword arguments.
1798
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new
1799
+ #
1800
+ # # Call the create_tag method.
1801
+ # result = client.create_tag request
1802
+ #
1803
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag.
1804
+ # p result
1805
+ #
1436
1806
  def create_tag request, options = nil
1437
1807
  raise ::ArgumentError, "request must be provided" if request.nil?
1438
1808
 
@@ -1499,6 +1869,22 @@ module Google
1499
1869
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
1500
1870
  #
1501
1871
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1872
+ #
1873
+ # @example Basic example
1874
+ # require "google/cloud/artifact_registry/v1beta2"
1875
+ #
1876
+ # # Create a client object. The client can be reused for multiple calls.
1877
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1878
+ #
1879
+ # # Create a request. To set request fields, pass in keyword arguments.
1880
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new
1881
+ #
1882
+ # # Call the update_tag method.
1883
+ # result = client.update_tag request
1884
+ #
1885
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag.
1886
+ # p result
1887
+ #
1502
1888
  def update_tag request, options = nil
1503
1889
  raise ::ArgumentError, "request must be provided" if request.nil?
1504
1890
 
@@ -1561,6 +1947,22 @@ module Google
1561
1947
  # @return [::Google::Protobuf::Empty]
1562
1948
  #
1563
1949
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1950
+ #
1951
+ # @example Basic example
1952
+ # require "google/cloud/artifact_registry/v1beta2"
1953
+ #
1954
+ # # Create a client object. The client can be reused for multiple calls.
1955
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
1956
+ #
1957
+ # # Create a request. To set request fields, pass in keyword arguments.
1958
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new
1959
+ #
1960
+ # # Call the delete_tag method.
1961
+ # result = client.delete_tag request
1962
+ #
1963
+ # # The returned object is of type Google::Protobuf::Empty.
1964
+ # p result
1965
+ #
1564
1966
  def delete_tag request, options = nil
1565
1967
  raise ::ArgumentError, "request must be provided" if request.nil?
1566
1968
 
@@ -1635,6 +2037,22 @@ module Google
1635
2037
  # @return [::Google::Iam::V1::Policy]
1636
2038
  #
1637
2039
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2040
+ #
2041
+ # @example Basic example
2042
+ # require "google/cloud/artifact_registry/v1beta2"
2043
+ #
2044
+ # # Create a client object. The client can be reused for multiple calls.
2045
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
2046
+ #
2047
+ # # Create a request. To set request fields, pass in keyword arguments.
2048
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
2049
+ #
2050
+ # # Call the set_iam_policy method.
2051
+ # result = client.set_iam_policy request
2052
+ #
2053
+ # # The returned object is of type Google::Iam::V1::Policy.
2054
+ # p result
2055
+ #
1638
2056
  def set_iam_policy request, options = nil
1639
2057
  raise ::ArgumentError, "request must be provided" if request.nil?
1640
2058
 
@@ -1701,6 +2119,22 @@ module Google
1701
2119
  # @return [::Google::Iam::V1::Policy]
1702
2120
  #
1703
2121
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2122
+ #
2123
+ # @example Basic example
2124
+ # require "google/cloud/artifact_registry/v1beta2"
2125
+ #
2126
+ # # Create a client object. The client can be reused for multiple calls.
2127
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
2128
+ #
2129
+ # # Create a request. To set request fields, pass in keyword arguments.
2130
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
2131
+ #
2132
+ # # Call the get_iam_policy method.
2133
+ # result = client.get_iam_policy request
2134
+ #
2135
+ # # The returned object is of type Google::Iam::V1::Policy.
2136
+ # p result
2137
+ #
1704
2138
  def get_iam_policy request, options = nil
1705
2139
  raise ::ArgumentError, "request must be provided" if request.nil?
1706
2140
 
@@ -1769,6 +2203,22 @@ module Google
1769
2203
  # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1770
2204
  #
1771
2205
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2206
+ #
2207
+ # @example Basic example
2208
+ # require "google/cloud/artifact_registry/v1beta2"
2209
+ #
2210
+ # # Create a client object. The client can be reused for multiple calls.
2211
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
2212
+ #
2213
+ # # Create a request. To set request fields, pass in keyword arguments.
2214
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2215
+ #
2216
+ # # Call the test_iam_permissions method.
2217
+ # result = client.test_iam_permissions request
2218
+ #
2219
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2220
+ # p result
2221
+ #
1772
2222
  def test_iam_permissions request, options = nil
1773
2223
  raise ::ArgumentError, "request must be provided" if request.nil?
1774
2224
 
@@ -1831,6 +2281,22 @@ module Google
1831
2281
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
1832
2282
  #
1833
2283
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2284
+ #
2285
+ # @example Basic example
2286
+ # require "google/cloud/artifact_registry/v1beta2"
2287
+ #
2288
+ # # Create a client object. The client can be reused for multiple calls.
2289
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
2290
+ #
2291
+ # # Create a request. To set request fields, pass in keyword arguments.
2292
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new
2293
+ #
2294
+ # # Call the get_project_settings method.
2295
+ # result = client.get_project_settings request
2296
+ #
2297
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
2298
+ # p result
2299
+ #
1834
2300
  def get_project_settings request, options = nil
1835
2301
  raise ::ArgumentError, "request must be provided" if request.nil?
1836
2302
 
@@ -1895,6 +2361,22 @@ module Google
1895
2361
  # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
1896
2362
  #
1897
2363
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2364
+ #
2365
+ # @example Basic example
2366
+ # require "google/cloud/artifact_registry/v1beta2"
2367
+ #
2368
+ # # Create a client object. The client can be reused for multiple calls.
2369
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Rest::Client.new
2370
+ #
2371
+ # # Create a request. To set request fields, pass in keyword arguments.
2372
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new
2373
+ #
2374
+ # # Call the update_project_settings method.
2375
+ # result = client.update_project_settings request
2376
+ #
2377
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
2378
+ # p result
2379
+ #
1898
2380
  def update_project_settings request, options = nil
1899
2381
  raise ::ArgumentError, "request must be provided" if request.nil?
1900
2382
 
@@ -1960,9 +2442,9 @@ module Google
1960
2442
  # end
1961
2443
  #
1962
2444
  # @!attribute [rw] endpoint
1963
- # The hostname or hostname:port of the service endpoint.
1964
- # Defaults to `"artifactregistry.googleapis.com"`.
1965
- # @return [::String]
2445
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2446
+ # nil, indicating to use the default endpoint in the current universe domain.
2447
+ # @return [::String,nil]
1966
2448
  # @!attribute [rw] credentials
1967
2449
  # Credentials to send with calls. You may provide any of the following types:
1968
2450
  # * (`String`) The path to a service account key file in JSON format
@@ -1999,13 +2481,20 @@ module Google
1999
2481
  # @!attribute [rw] quota_project
2000
2482
  # A separate project against which to charge quota.
2001
2483
  # @return [::String]
2484
+ # @!attribute [rw] universe_domain
2485
+ # The universe domain within which to make requests. This determines the
2486
+ # default endpoint URL. The default value of nil uses the environment
2487
+ # universe (usually the default "googleapis.com" universe).
2488
+ # @return [::String,nil]
2002
2489
  #
2003
2490
  class Configuration
2004
2491
  extend ::Gapic::Config
2005
2492
 
2493
+ # @private
2494
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2006
2495
  DEFAULT_ENDPOINT = "artifactregistry.googleapis.com"
2007
2496
 
2008
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2497
+ config_attr :endpoint, nil, ::String, nil
2009
2498
  config_attr :credentials, nil do |value|
2010
2499
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2011
2500
  allowed.any? { |klass| klass === value }
@@ -2017,6 +2506,7 @@ module Google
2017
2506
  config_attr :metadata, nil, ::Hash, nil
2018
2507
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2019
2508
  config_attr :quota_project, nil, ::String, nil
2509
+ config_attr :universe_domain, nil, ::String, nil
2020
2510
 
2021
2511
  # @private
2022
2512
  # Overrides for http bindings for the RPCs of this service