google-cloud-artifact_registry-v1 1.0.1 → 1.2.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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +1794 -333
  4. data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +12 -15
  5. data/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +42 -0
  6. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +1680 -310
  7. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +43 -38
  8. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +1106 -223
  9. data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
  10. data/lib/google/devtools/artifactregistry/v1/attachment_pb.rb +52 -0
  11. data/lib/google/devtools/artifactregistry/v1/file_pb.rb +5 -1
  12. data/lib/google/devtools/artifactregistry/v1/generic_pb.rb +47 -0
  13. data/lib/google/devtools/artifactregistry/v1/package_pb.rb +4 -1
  14. data/lib/google/devtools/artifactregistry/v1/repository_pb.rb +11 -1
  15. data/lib/google/devtools/artifactregistry/v1/rule_pb.rb +57 -0
  16. data/lib/google/devtools/artifactregistry/v1/service_pb.rb +3 -1
  17. data/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +31 -0
  18. data/lib/google/devtools/artifactregistry/v1/settings_pb.rb +1 -1
  19. data/lib/google/devtools/artifactregistry/v1/version_pb.rb +4 -1
  20. data/proto_docs/google/api/client.rb +39 -0
  21. data/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +4 -4
  22. data/proto_docs/google/devtools/artifactregistry/v1/attachment.rb +152 -0
  23. data/proto_docs/google/devtools/artifactregistry/v1/file.rb +80 -7
  24. data/proto_docs/google/devtools/artifactregistry/v1/generic.rb +48 -0
  25. data/proto_docs/google/devtools/artifactregistry/v1/package.rb +76 -0
  26. data/proto_docs/google/devtools/artifactregistry/v1/repository.rb +188 -1
  27. data/proto_docs/google/devtools/artifactregistry/v1/rule.rb +149 -0
  28. data/proto_docs/google/devtools/artifactregistry/v1/settings.rb +10 -0
  29. data/proto_docs/google/devtools/artifactregistry/v1/tag.rb +23 -5
  30. data/proto_docs/google/devtools/artifactregistry/v1/version.rb +74 -1
  31. data/proto_docs/google/longrunning/operations.rb +19 -14
  32. metadata +11 -5
@@ -172,15 +172,27 @@ module Google
172
172
  endpoint: @config.endpoint,
173
173
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
174
174
  universe_domain: @config.universe_domain,
175
- credentials: credentials
175
+ credentials: credentials,
176
+ logger: @config.logger
176
177
  )
177
178
 
179
+ @artifact_registry_stub.logger(stub: true)&.info do |entry|
180
+ entry.set_system_name
181
+ entry.set_service
182
+ entry.message = "Created client for #{entry.service}"
183
+ entry.set_credentials_fields credentials
184
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
185
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
186
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
187
+ end
188
+
178
189
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
179
190
  config.credentials = credentials
180
191
  config.quota_project = @quota_project_id
181
192
  config.endpoint = @artifact_registry_stub.endpoint
182
193
  config.universe_domain = @artifact_registry_stub.universe_domain
183
194
  config.bindings_override = @config.bindings_override
195
+ config.logger = @artifact_registry_stub.logger if config.respond_to? :logger=
184
196
  end
185
197
  end
186
198
 
@@ -198,6 +210,15 @@ module Google
198
210
  #
199
211
  attr_reader :location_client
200
212
 
213
+ ##
214
+ # The logger used for request/response debug logging.
215
+ #
216
+ # @return [Logger]
217
+ #
218
+ def logger
219
+ @artifact_registry_stub.logger
220
+ end
221
+
201
222
  # Service calls
202
223
 
203
224
  ##
@@ -222,7 +243,7 @@ module Google
222
243
  # Required. The name of the parent resource whose docker images will be
223
244
  # listed.
224
245
  # @param page_size [::Integer]
225
- # The maximum number of artifacts to return.
246
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
226
247
  # @param page_token [::String]
227
248
  # The next_page_token value returned from a previous list request, if any.
228
249
  # @param order_by [::String]
@@ -285,7 +306,7 @@ module Google
285
306
  @artifact_registry_stub.list_docker_images request, options do |result, operation|
286
307
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, "docker_images", request, result, options
287
308
  yield result, operation if block_given?
288
- return result
309
+ throw :response, result
289
310
  end
290
311
  rescue ::Gapic::Rest::Error => e
291
312
  raise ::Google::Cloud::Error.from_error(e)
@@ -364,7 +385,6 @@ module Google
364
385
 
365
386
  @artifact_registry_stub.get_docker_image request, options do |result, operation|
366
387
  yield result, operation if block_given?
367
- return result
368
388
  end
369
389
  rescue ::Gapic::Rest::Error => e
370
390
  raise ::Google::Cloud::Error.from_error(e)
@@ -392,7 +412,7 @@ module Google
392
412
  # Required. The name of the parent resource whose maven artifacts will be
393
413
  # listed.
394
414
  # @param page_size [::Integer]
395
- # The maximum number of artifacts to return.
415
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
396
416
  # @param page_token [::String]
397
417
  # The next_page_token value returned from a previous list request, if any.
398
418
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -453,7 +473,7 @@ module Google
453
473
  @artifact_registry_stub.list_maven_artifacts request, options do |result, operation|
454
474
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, "maven_artifacts", request, result, options
455
475
  yield result, operation if block_given?
456
- return result
476
+ throw :response, result
457
477
  end
458
478
  rescue ::Gapic::Rest::Error => e
459
479
  raise ::Google::Cloud::Error.from_error(e)
@@ -532,7 +552,6 @@ module Google
532
552
 
533
553
  @artifact_registry_stub.get_maven_artifact request, options do |result, operation|
534
554
  yield result, operation if block_given?
535
- return result
536
555
  end
537
556
  rescue ::Gapic::Rest::Error => e
538
557
  raise ::Google::Cloud::Error.from_error(e)
@@ -560,7 +579,7 @@ module Google
560
579
  # Required. The name of the parent resource whose npm packages will be
561
580
  # listed.
562
581
  # @param page_size [::Integer]
563
- # The maximum number of artifacts to return.
582
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
564
583
  # @param page_token [::String]
565
584
  # The next_page_token value returned from a previous list request, if any.
566
585
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -621,7 +640,7 @@ module Google
621
640
  @artifact_registry_stub.list_npm_packages request, options do |result, operation|
622
641
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, "npm_packages", request, result, options
623
642
  yield result, operation if block_given?
624
- return result
643
+ throw :response, result
625
644
  end
626
645
  rescue ::Gapic::Rest::Error => e
627
646
  raise ::Google::Cloud::Error.from_error(e)
@@ -700,7 +719,6 @@ module Google
700
719
 
701
720
  @artifact_registry_stub.get_npm_package request, options do |result, operation|
702
721
  yield result, operation if block_given?
703
- return result
704
722
  end
705
723
  rescue ::Gapic::Rest::Error => e
706
724
  raise ::Google::Cloud::Error.from_error(e)
@@ -728,7 +746,7 @@ module Google
728
746
  # Required. The name of the parent resource whose python packages will be
729
747
  # listed.
730
748
  # @param page_size [::Integer]
731
- # The maximum number of artifacts to return.
749
+ # The maximum number of artifacts to return. Maximum page size is 1,000.
732
750
  # @param page_token [::String]
733
751
  # The next_page_token value returned from a previous list request, if any.
734
752
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -789,7 +807,7 @@ module Google
789
807
  @artifact_registry_stub.list_python_packages request, options do |result, operation|
790
808
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, "python_packages", request, result, options
791
809
  yield result, operation if block_given?
792
- return result
810
+ throw :response, result
793
811
  end
794
812
  rescue ::Gapic::Rest::Error => e
795
813
  raise ::Google::Cloud::Error.from_error(e)
@@ -868,7 +886,6 @@ module Google
868
886
 
869
887
  @artifact_registry_stub.get_python_package request, options do |result, operation|
870
888
  yield result, operation if block_given?
871
- return result
872
889
  end
873
890
  rescue ::Gapic::Rest::Error => e
874
891
  raise ::Google::Cloud::Error.from_error(e)
@@ -960,7 +977,7 @@ module Google
960
977
  @artifact_registry_stub.import_apt_artifacts request, options do |result, operation|
961
978
  result = ::Gapic::Operation.new result, @operations_client, options: options
962
979
  yield result, operation if block_given?
963
- return result
980
+ throw :response, result
964
981
  end
965
982
  rescue ::Gapic::Rest::Error => e
966
983
  raise ::Google::Cloud::Error.from_error(e)
@@ -1052,7 +1069,7 @@ module Google
1052
1069
  @artifact_registry_stub.import_yum_artifacts request, options do |result, operation|
1053
1070
  result = ::Gapic::Operation.new result, @operations_client, options: options
1054
1071
  yield result, operation if block_given?
1055
- return result
1072
+ throw :response, result
1056
1073
  end
1057
1074
  rescue ::Gapic::Rest::Error => e
1058
1075
  raise ::Google::Cloud::Error.from_error(e)
@@ -1071,7 +1088,7 @@ module Google
1071
1088
  # @param options [::Gapic::CallOptions, ::Hash]
1072
1089
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1073
1090
  #
1074
- # @overload list_repositories(parent: nil, page_size: nil, page_token: nil)
1091
+ # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1075
1092
  # Pass arguments to `list_repositories` via keyword arguments. Note that at
1076
1093
  # least one keyword argument is required. To specify no parameters, or to keep all
1077
1094
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1083,6 +1100,28 @@ module Google
1083
1100
  # The maximum number of repositories to return. Maximum page size is 1,000.
1084
1101
  # @param page_token [::String]
1085
1102
  # The next_page_token value returned from a previous list request, if any.
1103
+ # @param filter [::String]
1104
+ # Optional. An expression for filtering the results of the request. Filter
1105
+ # rules are case insensitive. The fields eligible for filtering are:
1106
+ #
1107
+ # * `name`
1108
+ #
1109
+ # Examples of using a filter:
1110
+ #
1111
+ # To filter the results of your request to repositories with the name
1112
+ # `my-repo` in project `my-project` in the `us-central` region, append the
1113
+ # following filter expression to your request:
1114
+ #
1115
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo"`
1116
+ #
1117
+ # You can also use wildcards to match any number of characters before or
1118
+ # after the value:
1119
+ #
1120
+ # * `name="projects/my-project/locations/us-central1/repositories/my-*"`
1121
+ # * `name="projects/my-project/locations/us-central1/repositories/*repo"`
1122
+ # * `name="projects/my-project/locations/us-central1/repositories/*repo*"`
1123
+ # @param order_by [::String]
1124
+ # Optional. The field to order the results by.
1086
1125
  # @yield [result, operation] Access the result along with the TransportOperation object
1087
1126
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>]
1088
1127
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1141,7 +1180,7 @@ module Google
1141
1180
  @artifact_registry_stub.list_repositories request, options do |result, operation|
1142
1181
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options
1143
1182
  yield result, operation if block_given?
1144
- return result
1183
+ throw :response, result
1145
1184
  end
1146
1185
  rescue ::Gapic::Rest::Error => e
1147
1186
  raise ::Google::Cloud::Error.from_error(e)
@@ -1220,7 +1259,6 @@ module Google
1220
1259
 
1221
1260
  @artifact_registry_stub.get_repository request, options do |result, operation|
1222
1261
  yield result, operation if block_given?
1223
- return result
1224
1262
  end
1225
1263
  rescue ::Gapic::Rest::Error => e
1226
1264
  raise ::Google::Cloud::Error.from_error(e)
@@ -1313,7 +1351,7 @@ module Google
1313
1351
  @artifact_registry_stub.create_repository request, options do |result, operation|
1314
1352
  result = ::Gapic::Operation.new result, @operations_client, options: options
1315
1353
  yield result, operation if block_given?
1316
- return result
1354
+ throw :response, result
1317
1355
  end
1318
1356
  rescue ::Gapic::Rest::Error => e
1319
1357
  raise ::Google::Cloud::Error.from_error(e)
@@ -1396,7 +1434,6 @@ module Google
1396
1434
 
1397
1435
  @artifact_registry_stub.update_repository request, options do |result, operation|
1398
1436
  yield result, operation if block_given?
1399
- return result
1400
1437
  end
1401
1438
  rescue ::Gapic::Rest::Error => e
1402
1439
  raise ::Google::Cloud::Error.from_error(e)
@@ -1485,7 +1522,7 @@ module Google
1485
1522
  @artifact_registry_stub.delete_repository request, options do |result, operation|
1486
1523
  result = ::Gapic::Operation.new result, @operations_client, options: options
1487
1524
  yield result, operation if block_given?
1488
- return result
1525
+ throw :response, result
1489
1526
  end
1490
1527
  rescue ::Gapic::Rest::Error => e
1491
1528
  raise ::Google::Cloud::Error.from_error(e)
@@ -1504,7 +1541,7 @@ module Google
1504
1541
  # @param options [::Gapic::CallOptions, ::Hash]
1505
1542
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1506
1543
  #
1507
- # @overload list_packages(parent: nil, page_size: nil, page_token: nil)
1544
+ # @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1508
1545
  # Pass arguments to `list_packages` via keyword arguments. Note that at
1509
1546
  # least one keyword argument is required. To specify no parameters, or to keep all
1510
1547
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1515,6 +1552,54 @@ module Google
1515
1552
  # The maximum number of packages to return. Maximum page size is 1,000.
1516
1553
  # @param page_token [::String]
1517
1554
  # The next_page_token value returned from a previous list request, if any.
1555
+ # @param filter [::String]
1556
+ # Optional. An expression for filtering the results of the request. Filter
1557
+ # rules are case insensitive. The fields eligible for filtering are:
1558
+ #
1559
+ # * `name`
1560
+ # * `annotations`
1561
+ #
1562
+ # Examples of using a filter:
1563
+ #
1564
+ # To filter the results of your request to packages with the name
1565
+ # `my-package` in project `my-project` in the `us-central` region, in
1566
+ # repository `my-repo`, append the following filter expression to your
1567
+ # request:
1568
+ #
1569
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"`
1570
+ #
1571
+ # You can also use wildcards to match any number of characters before or
1572
+ # after the value:
1573
+ #
1574
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"`
1575
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"`
1576
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"`
1577
+ #
1578
+ # To filter the results of your request to packages with the annotation
1579
+ # key-value pair [`external_link`: `external_link_value`], append the
1580
+ # following filter expression to your request":
1581
+ #
1582
+ # * `"annotations.external_link:external_link_value"`
1583
+ #
1584
+ # To filter the results just for a specific annotation key `external_link`,
1585
+ # append the following filter expression to your request:
1586
+ #
1587
+ # * `"annotations.external_link"`
1588
+ #
1589
+ # If the annotation key or value contains special characters, you can escape
1590
+ # them by surrounding the value with backticks. For example, to filter the
1591
+ # results of your request to packages with the annotation key-value pair
1592
+ # [`external.link`:`https://example.com/my-package`], append the following
1593
+ # filter expression to your request:
1594
+ #
1595
+ # * `` "annotations.`external.link`:`https://example.com/my-package`" ``
1596
+ #
1597
+ # You can also filter with annotations with a wildcard to
1598
+ # match any number of characters before or after the value:
1599
+ #
1600
+ # * `` "annotations.*_link:`*example.com*`" ``
1601
+ # @param order_by [::String]
1602
+ # Optional. The field to order the results by.
1518
1603
  # @yield [result, operation] Access the result along with the TransportOperation object
1519
1604
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>]
1520
1605
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1573,7 +1658,7 @@ module Google
1573
1658
  @artifact_registry_stub.list_packages request, options do |result, operation|
1574
1659
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options
1575
1660
  yield result, operation if block_given?
1576
- return result
1661
+ throw :response, result
1577
1662
  end
1578
1663
  rescue ::Gapic::Rest::Error => e
1579
1664
  raise ::Google::Cloud::Error.from_error(e)
@@ -1652,7 +1737,6 @@ module Google
1652
1737
 
1653
1738
  @artifact_registry_stub.get_package request, options do |result, operation|
1654
1739
  yield result, operation if block_given?
1655
- return result
1656
1740
  end
1657
1741
  rescue ::Gapic::Rest::Error => e
1658
1742
  raise ::Google::Cloud::Error.from_error(e)
@@ -1740,7 +1824,7 @@ module Google
1740
1824
  @artifact_registry_stub.delete_package request, options do |result, operation|
1741
1825
  result = ::Gapic::Operation.new result, @operations_client, options: options
1742
1826
  yield result, operation if block_given?
1743
- return result
1827
+ throw :response, result
1744
1828
  end
1745
1829
  rescue ::Gapic::Rest::Error => e
1746
1830
  raise ::Google::Cloud::Error.from_error(e)
@@ -1759,7 +1843,7 @@ module Google
1759
1843
  # @param options [::Gapic::CallOptions, ::Hash]
1760
1844
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1761
1845
  #
1762
- # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil)
1846
+ # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil)
1763
1847
  # Pass arguments to `list_versions` via keyword arguments. Note that at
1764
1848
  # least one keyword argument is required. To specify no parameters, or to keep all
1765
1849
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1774,6 +1858,52 @@ module Google
1774
1858
  # The view that should be returned in the response.
1775
1859
  # @param order_by [::String]
1776
1860
  # Optional. The field to order the results by.
1861
+ # @param filter [::String]
1862
+ # Optional. An expression for filtering the results of the request. Filter
1863
+ # rules are case insensitive. The fields eligible for filtering are:
1864
+ #
1865
+ # * `name`
1866
+ # * `annotations`
1867
+ #
1868
+ # Examples of using a filter:
1869
+ #
1870
+ # To filter the results of your request to versions with the name
1871
+ # `my-version` in project `my-project` in the `us-central` region, in
1872
+ # repository `my-repo`, append the following filter expression to your
1873
+ # request:
1874
+ #
1875
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"`
1876
+ #
1877
+ # You can also use wildcards to match any number of characters before or
1878
+ # after the value:
1879
+ #
1880
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"`
1881
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"`
1882
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"`
1883
+ #
1884
+ # To filter the results of your request to versions with the annotation
1885
+ # key-value pair [`external_link`: `external_link_value`], append the
1886
+ # following filter expression to your request:
1887
+ #
1888
+ # * `"annotations.external_link:external_link_value"`
1889
+ #
1890
+ # To filter just for a specific annotation key `external_link`, append the
1891
+ # following filter expression to your request:
1892
+ #
1893
+ # * `"annotations.external_link"`
1894
+ #
1895
+ # If the annotation key or value contains special characters, you can escape
1896
+ # them by surrounding the value with backticks. For example, to filter the
1897
+ # results of your request to versions with the annotation key-value pair
1898
+ # [`external.link`:`https://example.com/my-version`], append the following
1899
+ # filter expression to your request:
1900
+ #
1901
+ # * `` "annotations.`external.link`:`https://example.com/my-version`" ``
1902
+ #
1903
+ # You can also filter with annotations with a wildcard to
1904
+ # match any number of characters before or after the value:
1905
+ #
1906
+ # * `` "annotations.*_link:`*example.com*`" ``
1777
1907
  # @yield [result, operation] Access the result along with the TransportOperation object
1778
1908
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>]
1779
1909
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1832,7 +1962,7 @@ module Google
1832
1962
  @artifact_registry_stub.list_versions request, options do |result, operation|
1833
1963
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options
1834
1964
  yield result, operation if block_given?
1835
- return result
1965
+ throw :response, result
1836
1966
  end
1837
1967
  rescue ::Gapic::Rest::Error => e
1838
1968
  raise ::Google::Cloud::Error.from_error(e)
@@ -1913,7 +2043,6 @@ module Google
1913
2043
 
1914
2044
  @artifact_registry_stub.get_version request, options do |result, operation|
1915
2045
  yield result, operation if block_given?
1916
- return result
1917
2046
  end
1918
2047
  rescue ::Gapic::Rest::Error => e
1919
2048
  raise ::Google::Cloud::Error.from_error(e)
@@ -2004,7 +2133,7 @@ module Google
2004
2133
  @artifact_registry_stub.delete_version request, options do |result, operation|
2005
2134
  result = ::Gapic::Operation.new result, @operations_client, options: options
2006
2135
  yield result, operation if block_given?
2007
- return result
2136
+ throw :response, result
2008
2137
  end
2009
2138
  rescue ::Gapic::Rest::Error => e
2010
2139
  raise ::Google::Cloud::Error.from_error(e)
@@ -2097,7 +2226,89 @@ module Google
2097
2226
  @artifact_registry_stub.batch_delete_versions request, options do |result, operation|
2098
2227
  result = ::Gapic::Operation.new result, @operations_client, options: options
2099
2228
  yield result, operation if block_given?
2100
- return result
2229
+ throw :response, result
2230
+ end
2231
+ rescue ::Gapic::Rest::Error => e
2232
+ raise ::Google::Cloud::Error.from_error(e)
2233
+ end
2234
+
2235
+ ##
2236
+ # Updates a version.
2237
+ #
2238
+ # @overload update_version(request, options = nil)
2239
+ # Pass arguments to `update_version` via a request object, either of type
2240
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash.
2241
+ #
2242
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash]
2243
+ # A request object representing the call parameters. Required. To specify no
2244
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2245
+ # @param options [::Gapic::CallOptions, ::Hash]
2246
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2247
+ #
2248
+ # @overload update_version(version: nil, update_mask: nil)
2249
+ # Pass arguments to `update_version` via keyword arguments. Note that at
2250
+ # least one keyword argument is required. To specify no parameters, or to keep all
2251
+ # the default parameter values, pass an empty Hash as a request object (see above).
2252
+ #
2253
+ # @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash]
2254
+ # Required. The Version that replaces the resource on the server.
2255
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2256
+ # The update mask applies to the resource. For the `FieldMask` definition,
2257
+ # see
2258
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
2259
+ # @yield [result, operation] Access the result along with the TransportOperation object
2260
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Version]
2261
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2262
+ #
2263
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Version]
2264
+ #
2265
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2266
+ #
2267
+ # @example Basic example
2268
+ # require "google/cloud/artifact_registry/v1"
2269
+ #
2270
+ # # Create a client object. The client can be reused for multiple calls.
2271
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2272
+ #
2273
+ # # Create a request. To set request fields, pass in keyword arguments.
2274
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new
2275
+ #
2276
+ # # Call the update_version method.
2277
+ # result = client.update_version request
2278
+ #
2279
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version.
2280
+ # p result
2281
+ #
2282
+ def update_version request, options = nil
2283
+ raise ::ArgumentError, "request must be provided" if request.nil?
2284
+
2285
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest
2286
+
2287
+ # Converts hash and nil to an options object
2288
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2289
+
2290
+ # Customize the options with defaults
2291
+ call_metadata = @config.rpcs.update_version.metadata.to_h
2292
+
2293
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2294
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2295
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2296
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
2297
+ transports_version_send: [:rest]
2298
+
2299
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2300
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2301
+
2302
+ options.apply_defaults timeout: @config.rpcs.update_version.timeout,
2303
+ metadata: call_metadata,
2304
+ retry_policy: @config.rpcs.update_version.retry_policy
2305
+
2306
+ options.apply_defaults timeout: @config.timeout,
2307
+ metadata: @config.metadata,
2308
+ retry_policy: @config.retry_policy
2309
+
2310
+ @artifact_registry_stub.update_version request, options do |result, operation|
2311
+ yield result, operation if block_given?
2101
2312
  end
2102
2313
  rescue ::Gapic::Rest::Error => e
2103
2314
  raise ::Google::Cloud::Error.from_error(e)
@@ -2130,15 +2341,53 @@ module Google
2130
2341
  #
2131
2342
  # * `name`
2132
2343
  # * `owner`
2344
+ # * `annotations`
2345
+ #
2346
+ # Examples of using a filter:
2347
+ #
2348
+ # To filter the results of your request to files with the name `my_file.txt`
2349
+ # in project `my-project` in the `us-central` region, in repository
2350
+ # `my-repo`, append the following filter expression to your request:
2351
+ #
2352
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"`
2353
+ #
2354
+ # You can also use wildcards to match any number of characters before or
2355
+ # after the value:
2356
+ #
2357
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"`
2358
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"`
2359
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"`
2360
+ #
2361
+ # To filter the results of your request to files owned by the version `1.0`
2362
+ # in package `pkg1`, append the following filter expression to your request:
2363
+ #
2364
+ # * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"`
2365
+ #
2366
+ # To filter the results of your request to files with the annotation
2367
+ # key-value pair [`external_link`: `external_link_value`], append the
2368
+ # following filter expression to your request:
2369
+ #
2370
+ # * `"annotations.external_link:external_link_value"`
2371
+ #
2372
+ # To filter just for a specific annotation key `external_link`, append the
2373
+ # following filter expression to your request:
2374
+ #
2375
+ # * `"annotations.external_link"`
2376
+ #
2377
+ # If the annotation key or value contains special characters, you can escape
2378
+ # them by surrounding the value with backticks. For example, to filter the
2379
+ # results of your request to files with the annotation key-value pair
2380
+ # [`external.link`:`https://example.com/my-file`], append the following
2381
+ # filter expression to your request:
2382
+ #
2383
+ # * `` "annotations.`external.link`:`https://example.com/my-file`" ``
2133
2384
  #
2134
- # An example of using a filter:
2385
+ # You can also filter with annotations with a wildcard to
2386
+ # match any number of characters before or after the value:
2135
2387
  #
2136
- # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an
2137
- # ID starting with "a/b/".
2138
- # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` -->
2139
- # Files owned by the version `1.0` in package `pkg1`.
2388
+ # * `` "annotations.*_link:`*example.com*`" ``
2140
2389
  # @param page_size [::Integer]
2141
- # The maximum number of files to return.
2390
+ # The maximum number of files to return. Maximum page size is 1,000.
2142
2391
  # @param page_token [::String]
2143
2392
  # The next_page_token value returned from a previous list request, if any.
2144
2393
  # @param order_by [::String]
@@ -2201,7 +2450,7 @@ module Google
2201
2450
  @artifact_registry_stub.list_files request, options do |result, operation|
2202
2451
  result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options
2203
2452
  yield result, operation if block_given?
2204
- return result
2453
+ throw :response, result
2205
2454
  end
2206
2455
  rescue ::Gapic::Rest::Error => e
2207
2456
  raise ::Google::Cloud::Error.from_error(e)
@@ -2280,53 +2529,38 @@ module Google
2280
2529
 
2281
2530
  @artifact_registry_stub.get_file request, options do |result, operation|
2282
2531
  yield result, operation if block_given?
2283
- return result
2284
2532
  end
2285
2533
  rescue ::Gapic::Rest::Error => e
2286
2534
  raise ::Google::Cloud::Error.from_error(e)
2287
2535
  end
2288
2536
 
2289
2537
  ##
2290
- # Lists tags.
2538
+ # Deletes a file and all of its content. It is only allowed on generic
2539
+ # repositories. The returned operation will complete once the file has been
2540
+ # deleted.
2291
2541
  #
2292
- # @overload list_tags(request, options = nil)
2293
- # Pass arguments to `list_tags` via a request object, either of type
2294
- # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash.
2542
+ # @overload delete_file(request, options = nil)
2543
+ # Pass arguments to `delete_file` via a request object, either of type
2544
+ # {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash.
2295
2545
  #
2296
- # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash]
2546
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash]
2297
2547
  # A request object representing the call parameters. Required. To specify no
2298
2548
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2299
2549
  # @param options [::Gapic::CallOptions, ::Hash]
2300
2550
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2301
2551
  #
2302
- # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil)
2303
- # Pass arguments to `list_tags` via keyword arguments. Note that at
2552
+ # @overload delete_file(name: nil)
2553
+ # Pass arguments to `delete_file` via keyword arguments. Note that at
2304
2554
  # least one keyword argument is required. To specify no parameters, or to keep all
2305
2555
  # the default parameter values, pass an empty Hash as a request object (see above).
2306
2556
  #
2307
- # @param parent [::String]
2308
- # The name of the parent package whose tags will be listed.
2309
- # For example:
2310
- # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
2311
- # @param filter [::String]
2312
- # An expression for filtering the results of the request. Filter rules are
2313
- # case insensitive. The fields eligible for filtering are:
2314
- #
2315
- # * `version`
2316
- #
2317
- # An example of using a filter:
2318
- #
2319
- # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
2320
- # --> Tags that are applied to the version `1.0` in package `pkg1`.
2321
- # @param page_size [::Integer]
2322
- # The maximum number of tags to return. Maximum page size is 10,000.
2323
- # @param page_token [::String]
2324
- # The next_page_token value returned from a previous list request, if any.
2557
+ # @param name [::String]
2558
+ # Required. The name of the file to delete.
2325
2559
  # @yield [result, operation] Access the result along with the TransportOperation object
2326
- # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2560
+ # @yieldparam result [::Gapic::Operation]
2327
2561
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2328
2562
  #
2329
- # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2563
+ # @return [::Gapic::Operation]
2330
2564
  #
2331
2565
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2332
2566
  #
@@ -2337,28 +2571,31 @@ module Google
2337
2571
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2338
2572
  #
2339
2573
  # # Create a request. To set request fields, pass in keyword arguments.
2340
- # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new
2574
+ # request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new
2341
2575
  #
2342
- # # Call the list_tags method.
2343
- # result = client.list_tags request
2576
+ # # Call the delete_file method.
2577
+ # result = client.delete_file request
2344
2578
  #
2345
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2346
- # # over elements, and API calls will be issued to fetch pages as needed.
2347
- # result.each do |item|
2348
- # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag.
2349
- # p item
2579
+ # # The returned object is of type Gapic::Operation. You can use it to
2580
+ # # check the status of an operation, cancel it, or wait for results.
2581
+ # # Here is how to wait for a response.
2582
+ # result.wait_until_done! timeout: 60
2583
+ # if result.response?
2584
+ # p result.response
2585
+ # else
2586
+ # puts "No response received."
2350
2587
  # end
2351
2588
  #
2352
- def list_tags request, options = nil
2589
+ def delete_file request, options = nil
2353
2590
  raise ::ArgumentError, "request must be provided" if request.nil?
2354
2591
 
2355
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest
2592
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest
2356
2593
 
2357
2594
  # Converts hash and nil to an options object
2358
2595
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2359
2596
 
2360
2597
  # Customize the options with defaults
2361
- call_metadata = @config.rpcs.list_tags.metadata.to_h
2598
+ call_metadata = @config.rpcs.delete_file.metadata.to_h
2362
2599
 
2363
2600
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2364
2601
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2369,48 +2606,52 @@ module Google
2369
2606
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2370
2607
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2371
2608
 
2372
- options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
2609
+ options.apply_defaults timeout: @config.rpcs.delete_file.timeout,
2373
2610
  metadata: call_metadata,
2374
- retry_policy: @config.rpcs.list_tags.retry_policy
2611
+ retry_policy: @config.rpcs.delete_file.retry_policy
2375
2612
 
2376
2613
  options.apply_defaults timeout: @config.timeout,
2377
2614
  metadata: @config.metadata,
2378
2615
  retry_policy: @config.retry_policy
2379
2616
 
2380
- @artifact_registry_stub.list_tags request, options do |result, operation|
2381
- result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options
2617
+ @artifact_registry_stub.delete_file request, options do |result, operation|
2618
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2382
2619
  yield result, operation if block_given?
2383
- return result
2620
+ throw :response, result
2384
2621
  end
2385
2622
  rescue ::Gapic::Rest::Error => e
2386
2623
  raise ::Google::Cloud::Error.from_error(e)
2387
2624
  end
2388
2625
 
2389
2626
  ##
2390
- # Gets a tag.
2627
+ # Updates a file.
2391
2628
  #
2392
- # @overload get_tag(request, options = nil)
2393
- # Pass arguments to `get_tag` via a request object, either of type
2394
- # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash.
2629
+ # @overload update_file(request, options = nil)
2630
+ # Pass arguments to `update_file` via a request object, either of type
2631
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash.
2395
2632
  #
2396
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash]
2633
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash]
2397
2634
  # A request object representing the call parameters. Required. To specify no
2398
2635
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2399
2636
  # @param options [::Gapic::CallOptions, ::Hash]
2400
2637
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2401
2638
  #
2402
- # @overload get_tag(name: nil)
2403
- # Pass arguments to `get_tag` via keyword arguments. Note that at
2639
+ # @overload update_file(file: nil, update_mask: nil)
2640
+ # Pass arguments to `update_file` via keyword arguments. Note that at
2404
2641
  # least one keyword argument is required. To specify no parameters, or to keep all
2405
2642
  # the default parameter values, pass an empty Hash as a request object (see above).
2406
2643
  #
2407
- # @param name [::String]
2408
- # The name of the tag to retrieve.
2644
+ # @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash]
2645
+ # Required. The File that replaces the resource on the server.
2646
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2647
+ # Required. The update mask applies to the resource. For the `FieldMask`
2648
+ # definition, see
2649
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
2409
2650
  # @yield [result, operation] Access the result along with the TransportOperation object
2410
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2651
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::File]
2411
2652
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2412
2653
  #
2413
- # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2654
+ # @return [::Google::Cloud::ArtifactRegistry::V1::File]
2414
2655
  #
2415
2656
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2416
2657
  #
@@ -2421,24 +2662,24 @@ module Google
2421
2662
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2422
2663
  #
2423
2664
  # # Create a request. To set request fields, pass in keyword arguments.
2424
- # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new
2665
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new
2425
2666
  #
2426
- # # Call the get_tag method.
2427
- # result = client.get_tag request
2667
+ # # Call the update_file method.
2668
+ # result = client.update_file request
2428
2669
  #
2429
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2670
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File.
2430
2671
  # p result
2431
2672
  #
2432
- def get_tag request, options = nil
2673
+ def update_file request, options = nil
2433
2674
  raise ::ArgumentError, "request must be provided" if request.nil?
2434
2675
 
2435
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest
2676
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest
2436
2677
 
2437
2678
  # Converts hash and nil to an options object
2438
2679
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2439
2680
 
2440
2681
  # Customize the options with defaults
2441
- call_metadata = @config.rpcs.get_tag.metadata.to_h
2682
+ call_metadata = @config.rpcs.update_file.metadata.to_h
2442
2683
 
2443
2684
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2444
2685
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2449,51 +2690,80 @@ module Google
2449
2690
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2450
2691
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2451
2692
 
2452
- options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
2693
+ options.apply_defaults timeout: @config.rpcs.update_file.timeout,
2453
2694
  metadata: call_metadata,
2454
- retry_policy: @config.rpcs.get_tag.retry_policy
2695
+ retry_policy: @config.rpcs.update_file.retry_policy
2455
2696
 
2456
2697
  options.apply_defaults timeout: @config.timeout,
2457
2698
  metadata: @config.metadata,
2458
2699
  retry_policy: @config.retry_policy
2459
2700
 
2460
- @artifact_registry_stub.get_tag request, options do |result, operation|
2701
+ @artifact_registry_stub.update_file request, options do |result, operation|
2461
2702
  yield result, operation if block_given?
2462
- return result
2463
2703
  end
2464
2704
  rescue ::Gapic::Rest::Error => e
2465
2705
  raise ::Google::Cloud::Error.from_error(e)
2466
2706
  end
2467
2707
 
2468
2708
  ##
2469
- # Creates a tag.
2709
+ # Lists tags.
2470
2710
  #
2471
- # @overload create_tag(request, options = nil)
2472
- # Pass arguments to `create_tag` via a request object, either of type
2473
- # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash.
2711
+ # @overload list_tags(request, options = nil)
2712
+ # Pass arguments to `list_tags` via a request object, either of type
2713
+ # {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash.
2474
2714
  #
2475
- # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash]
2715
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash]
2476
2716
  # A request object representing the call parameters. Required. To specify no
2477
2717
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2478
2718
  # @param options [::Gapic::CallOptions, ::Hash]
2479
2719
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2480
2720
  #
2481
- # @overload create_tag(parent: nil, tag_id: nil, tag: nil)
2482
- # Pass arguments to `create_tag` via keyword arguments. Note that at
2721
+ # @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil)
2722
+ # Pass arguments to `list_tags` via keyword arguments. Note that at
2483
2723
  # least one keyword argument is required. To specify no parameters, or to keep all
2484
2724
  # the default parameter values, pass an empty Hash as a request object (see above).
2485
2725
  #
2486
2726
  # @param parent [::String]
2487
- # The name of the parent resource where the tag will be created.
2488
- # @param tag_id [::String]
2489
- # The tag id to use for this repository.
2490
- # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash]
2491
- # The tag to be created.
2727
+ # The name of the parent package whose tags will be listed.
2728
+ # For example:
2729
+ # `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
2730
+ # @param filter [::String]
2731
+ # An expression for filtering the results of the request. Filter rules are
2732
+ # case insensitive. The fields eligible for filtering are:
2733
+ #
2734
+ # * `name`
2735
+ # * `version`
2736
+ #
2737
+ # Examples of using a filter:
2738
+ #
2739
+ # To filter the results of your request to tags with the name `my-tag` in
2740
+ # package `my-package` in repository `my-repo` in project "`y-project` in
2741
+ # the us-central region, append the following filter expression to your
2742
+ # request:
2743
+ #
2744
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"`
2745
+ #
2746
+ # You can also use wildcards to match any number of characters before or
2747
+ # after the value:
2748
+ #
2749
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"`
2750
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"`
2751
+ # * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"`
2752
+ #
2753
+ # To filter the results of your request to tags applied to the version
2754
+ # `1.0` in package `my-package`, append the following filter expression to
2755
+ # your request:
2756
+ #
2757
+ # * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"`
2758
+ # @param page_size [::Integer]
2759
+ # The maximum number of tags to return. Maximum page size is 1,000.
2760
+ # @param page_token [::String]
2761
+ # The next_page_token value returned from a previous list request, if any.
2492
2762
  # @yield [result, operation] Access the result along with the TransportOperation object
2493
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2763
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2494
2764
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2495
2765
  #
2496
- # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2766
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
2497
2767
  #
2498
2768
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2499
2769
  #
@@ -2504,15 +2774,181 @@ module Google
2504
2774
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2505
2775
  #
2506
2776
  # # Create a request. To set request fields, pass in keyword arguments.
2507
- # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new
2508
- #
2509
- # # Call the create_tag method.
2510
- # result = client.create_tag request
2777
+ # request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new
2511
2778
  #
2512
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2513
- # p result
2779
+ # # Call the list_tags method.
2780
+ # result = client.list_tags request
2514
2781
  #
2515
- def create_tag request, options = nil
2782
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2783
+ # # over elements, and API calls will be issued to fetch pages as needed.
2784
+ # result.each do |item|
2785
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag.
2786
+ # p item
2787
+ # end
2788
+ #
2789
+ def list_tags request, options = nil
2790
+ raise ::ArgumentError, "request must be provided" if request.nil?
2791
+
2792
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest
2793
+
2794
+ # Converts hash and nil to an options object
2795
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2796
+
2797
+ # Customize the options with defaults
2798
+ call_metadata = @config.rpcs.list_tags.metadata.to_h
2799
+
2800
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2801
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2802
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2803
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
2804
+ transports_version_send: [:rest]
2805
+
2806
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2807
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2808
+
2809
+ options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
2810
+ metadata: call_metadata,
2811
+ retry_policy: @config.rpcs.list_tags.retry_policy
2812
+
2813
+ options.apply_defaults timeout: @config.timeout,
2814
+ metadata: @config.metadata,
2815
+ retry_policy: @config.retry_policy
2816
+
2817
+ @artifact_registry_stub.list_tags request, options do |result, operation|
2818
+ result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options
2819
+ yield result, operation if block_given?
2820
+ throw :response, result
2821
+ end
2822
+ rescue ::Gapic::Rest::Error => e
2823
+ raise ::Google::Cloud::Error.from_error(e)
2824
+ end
2825
+
2826
+ ##
2827
+ # Gets a tag.
2828
+ #
2829
+ # @overload get_tag(request, options = nil)
2830
+ # Pass arguments to `get_tag` via a request object, either of type
2831
+ # {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash.
2832
+ #
2833
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash]
2834
+ # A request object representing the call parameters. Required. To specify no
2835
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2836
+ # @param options [::Gapic::CallOptions, ::Hash]
2837
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2838
+ #
2839
+ # @overload get_tag(name: nil)
2840
+ # Pass arguments to `get_tag` via keyword arguments. Note that at
2841
+ # least one keyword argument is required. To specify no parameters, or to keep all
2842
+ # the default parameter values, pass an empty Hash as a request object (see above).
2843
+ #
2844
+ # @param name [::String]
2845
+ # The name of the tag to retrieve.
2846
+ # @yield [result, operation] Access the result along with the TransportOperation object
2847
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2848
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2849
+ #
2850
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2851
+ #
2852
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2853
+ #
2854
+ # @example Basic example
2855
+ # require "google/cloud/artifact_registry/v1"
2856
+ #
2857
+ # # Create a client object. The client can be reused for multiple calls.
2858
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2859
+ #
2860
+ # # Create a request. To set request fields, pass in keyword arguments.
2861
+ # request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new
2862
+ #
2863
+ # # Call the get_tag method.
2864
+ # result = client.get_tag request
2865
+ #
2866
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2867
+ # p result
2868
+ #
2869
+ def get_tag request, options = nil
2870
+ raise ::ArgumentError, "request must be provided" if request.nil?
2871
+
2872
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest
2873
+
2874
+ # Converts hash and nil to an options object
2875
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2876
+
2877
+ # Customize the options with defaults
2878
+ call_metadata = @config.rpcs.get_tag.metadata.to_h
2879
+
2880
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2881
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2882
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2883
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
2884
+ transports_version_send: [:rest]
2885
+
2886
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2887
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2888
+
2889
+ options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
2890
+ metadata: call_metadata,
2891
+ retry_policy: @config.rpcs.get_tag.retry_policy
2892
+
2893
+ options.apply_defaults timeout: @config.timeout,
2894
+ metadata: @config.metadata,
2895
+ retry_policy: @config.retry_policy
2896
+
2897
+ @artifact_registry_stub.get_tag request, options do |result, operation|
2898
+ yield result, operation if block_given?
2899
+ end
2900
+ rescue ::Gapic::Rest::Error => e
2901
+ raise ::Google::Cloud::Error.from_error(e)
2902
+ end
2903
+
2904
+ ##
2905
+ # Creates a tag.
2906
+ #
2907
+ # @overload create_tag(request, options = nil)
2908
+ # Pass arguments to `create_tag` via a request object, either of type
2909
+ # {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash.
2910
+ #
2911
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash]
2912
+ # A request object representing the call parameters. Required. To specify no
2913
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2914
+ # @param options [::Gapic::CallOptions, ::Hash]
2915
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2916
+ #
2917
+ # @overload create_tag(parent: nil, tag_id: nil, tag: nil)
2918
+ # Pass arguments to `create_tag` via keyword arguments. Note that at
2919
+ # least one keyword argument is required. To specify no parameters, or to keep all
2920
+ # the default parameter values, pass an empty Hash as a request object (see above).
2921
+ #
2922
+ # @param parent [::String]
2923
+ # The name of the parent resource where the tag will be created.
2924
+ # @param tag_id [::String]
2925
+ # The tag id to use for this repository.
2926
+ # @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash]
2927
+ # The tag to be created.
2928
+ # @yield [result, operation] Access the result along with the TransportOperation object
2929
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Tag]
2930
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2931
+ #
2932
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
2933
+ #
2934
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2935
+ #
2936
+ # @example Basic example
2937
+ # require "google/cloud/artifact_registry/v1"
2938
+ #
2939
+ # # Create a client object. The client can be reused for multiple calls.
2940
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2941
+ #
2942
+ # # Create a request. To set request fields, pass in keyword arguments.
2943
+ # request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new
2944
+ #
2945
+ # # Call the create_tag method.
2946
+ # result = client.create_tag request
2947
+ #
2948
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
2949
+ # p result
2950
+ #
2951
+ def create_tag request, options = nil
2516
2952
  raise ::ArgumentError, "request must be provided" if request.nil?
2517
2953
 
2518
2954
  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest
@@ -2542,7 +2978,6 @@ module Google
2542
2978
 
2543
2979
  @artifact_registry_stub.create_tag request, options do |result, operation|
2544
2980
  yield result, operation if block_given?
2545
- return result
2546
2981
  end
2547
2982
  rescue ::Gapic::Rest::Error => e
2548
2983
  raise ::Google::Cloud::Error.from_error(e)
@@ -2625,7 +3060,6 @@ module Google
2625
3060
 
2626
3061
  @artifact_registry_stub.update_tag request, options do |result, operation|
2627
3062
  yield result, operation if block_given?
2628
- return result
2629
3063
  end
2630
3064
  rescue ::Gapic::Rest::Error => e
2631
3065
  raise ::Google::Cloud::Error.from_error(e)
@@ -2704,49 +3138,40 @@ module Google
2704
3138
 
2705
3139
  @artifact_registry_stub.delete_tag request, options do |result, operation|
2706
3140
  yield result, operation if block_given?
2707
- return result
2708
3141
  end
2709
3142
  rescue ::Gapic::Rest::Error => e
2710
3143
  raise ::Google::Cloud::Error.from_error(e)
2711
3144
  end
2712
3145
 
2713
3146
  ##
2714
- # Updates the IAM policy for a given resource.
3147
+ # Creates a rule.
2715
3148
  #
2716
- # @overload set_iam_policy(request, options = nil)
2717
- # Pass arguments to `set_iam_policy` via a request object, either of type
2718
- # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
3149
+ # @overload create_rule(request, options = nil)
3150
+ # Pass arguments to `create_rule` via a request object, either of type
3151
+ # {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash.
2719
3152
  #
2720
- # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
3153
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash]
2721
3154
  # A request object representing the call parameters. Required. To specify no
2722
3155
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2723
3156
  # @param options [::Gapic::CallOptions, ::Hash]
2724
3157
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2725
3158
  #
2726
- # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
2727
- # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
3159
+ # @overload create_rule(parent: nil, rule_id: nil, rule: nil)
3160
+ # Pass arguments to `create_rule` via keyword arguments. Note that at
2728
3161
  # least one keyword argument is required. To specify no parameters, or to keep all
2729
3162
  # the default parameter values, pass an empty Hash as a request object (see above).
2730
3163
  #
2731
- # @param resource [::String]
2732
- # REQUIRED: The resource for which the policy is being specified.
2733
- # See the operation documentation for the appropriate value for this field.
2734
- # @param policy [::Google::Iam::V1::Policy, ::Hash]
2735
- # REQUIRED: The complete policy to be applied to the `resource`. The size of
2736
- # the policy is limited to a few 10s of KB. An empty policy is a
2737
- # valid policy but certain Cloud Platform services (such as Projects)
2738
- # might reject them.
2739
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2740
- # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2741
- # the fields in the mask will be modified. If no mask is provided, the
2742
- # following default mask is used:
2743
- #
2744
- # `paths: "bindings, etag"`
3164
+ # @param parent [::String]
3165
+ # Required. The name of the parent resource where the rule will be created.
3166
+ # @param rule_id [::String]
3167
+ # The rule id to use for this repository.
3168
+ # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash]
3169
+ # The rule to be created.
2745
3170
  # @yield [result, operation] Access the result along with the TransportOperation object
2746
- # @yieldparam result [::Google::Iam::V1::Policy]
3171
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule]
2747
3172
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2748
3173
  #
2749
- # @return [::Google::Iam::V1::Policy]
3174
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
2750
3175
  #
2751
3176
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2752
3177
  #
@@ -2757,24 +3182,24 @@ module Google
2757
3182
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2758
3183
  #
2759
3184
  # # Create a request. To set request fields, pass in keyword arguments.
2760
- # request = Google::Iam::V1::SetIamPolicyRequest.new
3185
+ # request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new
2761
3186
  #
2762
- # # Call the set_iam_policy method.
2763
- # result = client.set_iam_policy request
3187
+ # # Call the create_rule method.
3188
+ # result = client.create_rule request
2764
3189
  #
2765
- # # The returned object is of type Google::Iam::V1::Policy.
3190
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
2766
3191
  # p result
2767
3192
  #
2768
- def set_iam_policy request, options = nil
3193
+ def create_rule request, options = nil
2769
3194
  raise ::ArgumentError, "request must be provided" if request.nil?
2770
3195
 
2771
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
3196
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest
2772
3197
 
2773
3198
  # Converts hash and nil to an options object
2774
3199
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2775
3200
 
2776
3201
  # Customize the options with defaults
2777
- call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
3202
+ call_metadata = @config.rpcs.create_rule.metadata.to_h
2778
3203
 
2779
3204
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2780
3205
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2785,51 +3210,868 @@ module Google
2785
3210
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2786
3211
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2787
3212
 
2788
- options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
3213
+ options.apply_defaults timeout: @config.rpcs.create_rule.timeout,
3214
+ metadata: call_metadata,
3215
+ retry_policy: @config.rpcs.create_rule.retry_policy
3216
+
3217
+ options.apply_defaults timeout: @config.timeout,
3218
+ metadata: @config.metadata,
3219
+ retry_policy: @config.retry_policy
3220
+
3221
+ @artifact_registry_stub.create_rule request, options do |result, operation|
3222
+ yield result, operation if block_given?
3223
+ end
3224
+ rescue ::Gapic::Rest::Error => e
3225
+ raise ::Google::Cloud::Error.from_error(e)
3226
+ end
3227
+
3228
+ ##
3229
+ # Lists rules.
3230
+ #
3231
+ # @overload list_rules(request, options = nil)
3232
+ # Pass arguments to `list_rules` via a request object, either of type
3233
+ # {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash.
3234
+ #
3235
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash]
3236
+ # A request object representing the call parameters. Required. To specify no
3237
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3238
+ # @param options [::Gapic::CallOptions, ::Hash]
3239
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3240
+ #
3241
+ # @overload list_rules(parent: nil, page_size: nil, page_token: nil)
3242
+ # Pass arguments to `list_rules` via keyword arguments. Note that at
3243
+ # least one keyword argument is required. To specify no parameters, or to keep all
3244
+ # the default parameter values, pass an empty Hash as a request object (see above).
3245
+ #
3246
+ # @param parent [::String]
3247
+ # Required. The name of the parent repository whose rules will be listed.
3248
+ # For example:
3249
+ # `projects/p1/locations/us-central1/repositories/repo1`.
3250
+ # @param page_size [::Integer]
3251
+ # The maximum number of rules to return. Maximum page size is 1,000.
3252
+ # @param page_token [::String]
3253
+ # The next_page_token value returned from a previous list request, if any.
3254
+ # @yield [result, operation] Access the result along with the TransportOperation object
3255
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>]
3256
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3257
+ #
3258
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>]
3259
+ #
3260
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3261
+ #
3262
+ # @example Basic example
3263
+ # require "google/cloud/artifact_registry/v1"
3264
+ #
3265
+ # # Create a client object. The client can be reused for multiple calls.
3266
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3267
+ #
3268
+ # # Create a request. To set request fields, pass in keyword arguments.
3269
+ # request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new
3270
+ #
3271
+ # # Call the list_rules method.
3272
+ # result = client.list_rules request
3273
+ #
3274
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3275
+ # # over elements, and API calls will be issued to fetch pages as needed.
3276
+ # result.each do |item|
3277
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule.
3278
+ # p item
3279
+ # end
3280
+ #
3281
+ def list_rules request, options = nil
3282
+ raise ::ArgumentError, "request must be provided" if request.nil?
3283
+
3284
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest
3285
+
3286
+ # Converts hash and nil to an options object
3287
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3288
+
3289
+ # Customize the options with defaults
3290
+ call_metadata = @config.rpcs.list_rules.metadata.to_h
3291
+
3292
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3293
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3294
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3295
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3296
+ transports_version_send: [:rest]
3297
+
3298
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3299
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3300
+
3301
+ options.apply_defaults timeout: @config.rpcs.list_rules.timeout,
3302
+ metadata: call_metadata,
3303
+ retry_policy: @config.rpcs.list_rules.retry_policy
3304
+
3305
+ options.apply_defaults timeout: @config.timeout,
3306
+ metadata: @config.metadata,
3307
+ retry_policy: @config.retry_policy
3308
+
3309
+ @artifact_registry_stub.list_rules request, options do |result, operation|
3310
+ result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options
3311
+ yield result, operation if block_given?
3312
+ throw :response, result
3313
+ end
3314
+ rescue ::Gapic::Rest::Error => e
3315
+ raise ::Google::Cloud::Error.from_error(e)
3316
+ end
3317
+
3318
+ ##
3319
+ # Gets a rule.
3320
+ #
3321
+ # @overload get_rule(request, options = nil)
3322
+ # Pass arguments to `get_rule` via a request object, either of type
3323
+ # {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash.
3324
+ #
3325
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash]
3326
+ # A request object representing the call parameters. Required. To specify no
3327
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3328
+ # @param options [::Gapic::CallOptions, ::Hash]
3329
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3330
+ #
3331
+ # @overload get_rule(name: nil)
3332
+ # Pass arguments to `get_rule` via keyword arguments. Note that at
3333
+ # least one keyword argument is required. To specify no parameters, or to keep all
3334
+ # the default parameter values, pass an empty Hash as a request object (see above).
3335
+ #
3336
+ # @param name [::String]
3337
+ # Required. The name of the rule to retrieve.
3338
+ # @yield [result, operation] Access the result along with the TransportOperation object
3339
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule]
3340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3341
+ #
3342
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
3343
+ #
3344
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3345
+ #
3346
+ # @example Basic example
3347
+ # require "google/cloud/artifact_registry/v1"
3348
+ #
3349
+ # # Create a client object. The client can be reused for multiple calls.
3350
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3351
+ #
3352
+ # # Create a request. To set request fields, pass in keyword arguments.
3353
+ # request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new
3354
+ #
3355
+ # # Call the get_rule method.
3356
+ # result = client.get_rule request
3357
+ #
3358
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
3359
+ # p result
3360
+ #
3361
+ def get_rule request, options = nil
3362
+ raise ::ArgumentError, "request must be provided" if request.nil?
3363
+
3364
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest
3365
+
3366
+ # Converts hash and nil to an options object
3367
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3368
+
3369
+ # Customize the options with defaults
3370
+ call_metadata = @config.rpcs.get_rule.metadata.to_h
3371
+
3372
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3373
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3374
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3375
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3376
+ transports_version_send: [:rest]
3377
+
3378
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3379
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3380
+
3381
+ options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
3382
+ metadata: call_metadata,
3383
+ retry_policy: @config.rpcs.get_rule.retry_policy
3384
+
3385
+ options.apply_defaults timeout: @config.timeout,
3386
+ metadata: @config.metadata,
3387
+ retry_policy: @config.retry_policy
3388
+
3389
+ @artifact_registry_stub.get_rule request, options do |result, operation|
3390
+ yield result, operation if block_given?
3391
+ end
3392
+ rescue ::Gapic::Rest::Error => e
3393
+ raise ::Google::Cloud::Error.from_error(e)
3394
+ end
3395
+
3396
+ ##
3397
+ # Updates a rule.
3398
+ #
3399
+ # @overload update_rule(request, options = nil)
3400
+ # Pass arguments to `update_rule` via a request object, either of type
3401
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash.
3402
+ #
3403
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash]
3404
+ # A request object representing the call parameters. Required. To specify no
3405
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3406
+ # @param options [::Gapic::CallOptions, ::Hash]
3407
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3408
+ #
3409
+ # @overload update_rule(rule: nil, update_mask: nil)
3410
+ # Pass arguments to `update_rule` via keyword arguments. Note that at
3411
+ # least one keyword argument is required. To specify no parameters, or to keep all
3412
+ # the default parameter values, pass an empty Hash as a request object (see above).
3413
+ #
3414
+ # @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash]
3415
+ # The rule that replaces the resource on the server.
3416
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3417
+ # The update mask applies to the resource. For the `FieldMask` definition,
3418
+ # see
3419
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
3420
+ # @yield [result, operation] Access the result along with the TransportOperation object
3421
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Rule]
3422
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3423
+ #
3424
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
3425
+ #
3426
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3427
+ #
3428
+ # @example Basic example
3429
+ # require "google/cloud/artifact_registry/v1"
3430
+ #
3431
+ # # Create a client object. The client can be reused for multiple calls.
3432
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3433
+ #
3434
+ # # Create a request. To set request fields, pass in keyword arguments.
3435
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new
3436
+ #
3437
+ # # Call the update_rule method.
3438
+ # result = client.update_rule request
3439
+ #
3440
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
3441
+ # p result
3442
+ #
3443
+ def update_rule request, options = nil
3444
+ raise ::ArgumentError, "request must be provided" if request.nil?
3445
+
3446
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest
3447
+
3448
+ # Converts hash and nil to an options object
3449
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3450
+
3451
+ # Customize the options with defaults
3452
+ call_metadata = @config.rpcs.update_rule.metadata.to_h
3453
+
3454
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3455
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3456
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3457
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3458
+ transports_version_send: [:rest]
3459
+
3460
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3461
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3462
+
3463
+ options.apply_defaults timeout: @config.rpcs.update_rule.timeout,
3464
+ metadata: call_metadata,
3465
+ retry_policy: @config.rpcs.update_rule.retry_policy
3466
+
3467
+ options.apply_defaults timeout: @config.timeout,
3468
+ metadata: @config.metadata,
3469
+ retry_policy: @config.retry_policy
3470
+
3471
+ @artifact_registry_stub.update_rule request, options do |result, operation|
3472
+ yield result, operation if block_given?
3473
+ end
3474
+ rescue ::Gapic::Rest::Error => e
3475
+ raise ::Google::Cloud::Error.from_error(e)
3476
+ end
3477
+
3478
+ ##
3479
+ # Deletes a rule.
3480
+ #
3481
+ # @overload delete_rule(request, options = nil)
3482
+ # Pass arguments to `delete_rule` via a request object, either of type
3483
+ # {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash.
3484
+ #
3485
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash]
3486
+ # A request object representing the call parameters. Required. To specify no
3487
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3488
+ # @param options [::Gapic::CallOptions, ::Hash]
3489
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3490
+ #
3491
+ # @overload delete_rule(name: nil)
3492
+ # Pass arguments to `delete_rule` via keyword arguments. Note that at
3493
+ # least one keyword argument is required. To specify no parameters, or to keep all
3494
+ # the default parameter values, pass an empty Hash as a request object (see above).
3495
+ #
3496
+ # @param name [::String]
3497
+ # Required. The name of the rule to delete.
3498
+ # @yield [result, operation] Access the result along with the TransportOperation object
3499
+ # @yieldparam result [::Google::Protobuf::Empty]
3500
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3501
+ #
3502
+ # @return [::Google::Protobuf::Empty]
3503
+ #
3504
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3505
+ #
3506
+ # @example Basic example
3507
+ # require "google/cloud/artifact_registry/v1"
3508
+ #
3509
+ # # Create a client object. The client can be reused for multiple calls.
3510
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3511
+ #
3512
+ # # Create a request. To set request fields, pass in keyword arguments.
3513
+ # request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new
3514
+ #
3515
+ # # Call the delete_rule method.
3516
+ # result = client.delete_rule request
3517
+ #
3518
+ # # The returned object is of type Google::Protobuf::Empty.
3519
+ # p result
3520
+ #
3521
+ def delete_rule request, options = nil
3522
+ raise ::ArgumentError, "request must be provided" if request.nil?
3523
+
3524
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest
3525
+
3526
+ # Converts hash and nil to an options object
3527
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3528
+
3529
+ # Customize the options with defaults
3530
+ call_metadata = @config.rpcs.delete_rule.metadata.to_h
3531
+
3532
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3533
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3534
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3535
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3536
+ transports_version_send: [:rest]
3537
+
3538
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3539
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3540
+
3541
+ options.apply_defaults timeout: @config.rpcs.delete_rule.timeout,
3542
+ metadata: call_metadata,
3543
+ retry_policy: @config.rpcs.delete_rule.retry_policy
3544
+
3545
+ options.apply_defaults timeout: @config.timeout,
3546
+ metadata: @config.metadata,
3547
+ retry_policy: @config.retry_policy
3548
+
3549
+ @artifact_registry_stub.delete_rule request, options do |result, operation|
3550
+ yield result, operation if block_given?
3551
+ end
3552
+ rescue ::Gapic::Rest::Error => e
3553
+ raise ::Google::Cloud::Error.from_error(e)
3554
+ end
3555
+
3556
+ ##
3557
+ # Updates the IAM policy for a given resource.
3558
+ #
3559
+ # @overload set_iam_policy(request, options = nil)
3560
+ # Pass arguments to `set_iam_policy` via a request object, either of type
3561
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
3562
+ #
3563
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
3564
+ # A request object representing the call parameters. Required. To specify no
3565
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3566
+ # @param options [::Gapic::CallOptions, ::Hash]
3567
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3568
+ #
3569
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
3570
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
3571
+ # least one keyword argument is required. To specify no parameters, or to keep all
3572
+ # the default parameter values, pass an empty Hash as a request object (see above).
3573
+ #
3574
+ # @param resource [::String]
3575
+ # REQUIRED: The resource for which the policy is being specified.
3576
+ # See the operation documentation for the appropriate value for this field.
3577
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
3578
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
3579
+ # the policy is limited to a few 10s of KB. An empty policy is a
3580
+ # valid policy but certain Cloud Platform services (such as Projects)
3581
+ # might reject them.
3582
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3583
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
3584
+ # the fields in the mask will be modified. If no mask is provided, the
3585
+ # following default mask is used:
3586
+ #
3587
+ # `paths: "bindings, etag"`
3588
+ # @yield [result, operation] Access the result along with the TransportOperation object
3589
+ # @yieldparam result [::Google::Iam::V1::Policy]
3590
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3591
+ #
3592
+ # @return [::Google::Iam::V1::Policy]
3593
+ #
3594
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3595
+ #
3596
+ # @example Basic example
3597
+ # require "google/cloud/artifact_registry/v1"
3598
+ #
3599
+ # # Create a client object. The client can be reused for multiple calls.
3600
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3601
+ #
3602
+ # # Create a request. To set request fields, pass in keyword arguments.
3603
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
3604
+ #
3605
+ # # Call the set_iam_policy method.
3606
+ # result = client.set_iam_policy request
3607
+ #
3608
+ # # The returned object is of type Google::Iam::V1::Policy.
3609
+ # p result
3610
+ #
3611
+ def set_iam_policy request, options = nil
3612
+ raise ::ArgumentError, "request must be provided" if request.nil?
3613
+
3614
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
3615
+
3616
+ # Converts hash and nil to an options object
3617
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3618
+
3619
+ # Customize the options with defaults
3620
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
3621
+
3622
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3623
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3624
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3625
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3626
+ transports_version_send: [:rest]
3627
+
3628
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3629
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3630
+
3631
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
3632
+ metadata: call_metadata,
3633
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
3634
+
3635
+ options.apply_defaults timeout: @config.timeout,
3636
+ metadata: @config.metadata,
3637
+ retry_policy: @config.retry_policy
3638
+
3639
+ @artifact_registry_stub.set_iam_policy request, options do |result, operation|
3640
+ yield result, operation if block_given?
3641
+ end
3642
+ rescue ::Gapic::Rest::Error => e
3643
+ raise ::Google::Cloud::Error.from_error(e)
3644
+ end
3645
+
3646
+ ##
3647
+ # Gets the IAM policy for a given resource.
3648
+ #
3649
+ # @overload get_iam_policy(request, options = nil)
3650
+ # Pass arguments to `get_iam_policy` via a request object, either of type
3651
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
3652
+ #
3653
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
3654
+ # A request object representing the call parameters. Required. To specify no
3655
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3656
+ # @param options [::Gapic::CallOptions, ::Hash]
3657
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3658
+ #
3659
+ # @overload get_iam_policy(resource: nil, options: nil)
3660
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
3661
+ # least one keyword argument is required. To specify no parameters, or to keep all
3662
+ # the default parameter values, pass an empty Hash as a request object (see above).
3663
+ #
3664
+ # @param resource [::String]
3665
+ # REQUIRED: The resource for which the policy is being requested.
3666
+ # See the operation documentation for the appropriate value for this field.
3667
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
3668
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
3669
+ # `GetIamPolicy`.
3670
+ # @yield [result, operation] Access the result along with the TransportOperation object
3671
+ # @yieldparam result [::Google::Iam::V1::Policy]
3672
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3673
+ #
3674
+ # @return [::Google::Iam::V1::Policy]
3675
+ #
3676
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3677
+ #
3678
+ # @example Basic example
3679
+ # require "google/cloud/artifact_registry/v1"
3680
+ #
3681
+ # # Create a client object. The client can be reused for multiple calls.
3682
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3683
+ #
3684
+ # # Create a request. To set request fields, pass in keyword arguments.
3685
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
3686
+ #
3687
+ # # Call the get_iam_policy method.
3688
+ # result = client.get_iam_policy request
3689
+ #
3690
+ # # The returned object is of type Google::Iam::V1::Policy.
3691
+ # p result
3692
+ #
3693
+ def get_iam_policy request, options = nil
3694
+ raise ::ArgumentError, "request must be provided" if request.nil?
3695
+
3696
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
3697
+
3698
+ # Converts hash and nil to an options object
3699
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3700
+
3701
+ # Customize the options with defaults
3702
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
3703
+
3704
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3705
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3706
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3707
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3708
+ transports_version_send: [:rest]
3709
+
3710
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3711
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3712
+
3713
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
3714
+ metadata: call_metadata,
3715
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
3716
+
3717
+ options.apply_defaults timeout: @config.timeout,
3718
+ metadata: @config.metadata,
3719
+ retry_policy: @config.retry_policy
3720
+
3721
+ @artifact_registry_stub.get_iam_policy request, options do |result, operation|
3722
+ yield result, operation if block_given?
3723
+ end
3724
+ rescue ::Gapic::Rest::Error => e
3725
+ raise ::Google::Cloud::Error.from_error(e)
3726
+ end
3727
+
3728
+ ##
3729
+ # Tests if the caller has a list of permissions on a resource.
3730
+ #
3731
+ # @overload test_iam_permissions(request, options = nil)
3732
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
3733
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
3734
+ #
3735
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
3736
+ # A request object representing the call parameters. Required. To specify no
3737
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3738
+ # @param options [::Gapic::CallOptions, ::Hash]
3739
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3740
+ #
3741
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
3742
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
3743
+ # least one keyword argument is required. To specify no parameters, or to keep all
3744
+ # the default parameter values, pass an empty Hash as a request object (see above).
3745
+ #
3746
+ # @param resource [::String]
3747
+ # REQUIRED: The resource for which the policy detail is being requested.
3748
+ # See the operation documentation for the appropriate value for this field.
3749
+ # @param permissions [::Array<::String>]
3750
+ # The set of permissions to check for the `resource`. Permissions with
3751
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
3752
+ # information see
3753
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
3754
+ # @yield [result, operation] Access the result along with the TransportOperation object
3755
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
3756
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3757
+ #
3758
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
3759
+ #
3760
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3761
+ #
3762
+ # @example Basic example
3763
+ # require "google/cloud/artifact_registry/v1"
3764
+ #
3765
+ # # Create a client object. The client can be reused for multiple calls.
3766
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3767
+ #
3768
+ # # Create a request. To set request fields, pass in keyword arguments.
3769
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
3770
+ #
3771
+ # # Call the test_iam_permissions method.
3772
+ # result = client.test_iam_permissions request
3773
+ #
3774
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
3775
+ # p result
3776
+ #
3777
+ def test_iam_permissions request, options = nil
3778
+ raise ::ArgumentError, "request must be provided" if request.nil?
3779
+
3780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
3781
+
3782
+ # Converts hash and nil to an options object
3783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3784
+
3785
+ # Customize the options with defaults
3786
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
3787
+
3788
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3789
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3791
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3792
+ transports_version_send: [:rest]
3793
+
3794
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3795
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3796
+
3797
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
3798
+ metadata: call_metadata,
3799
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
3800
+
3801
+ options.apply_defaults timeout: @config.timeout,
3802
+ metadata: @config.metadata,
3803
+ retry_policy: @config.retry_policy
3804
+
3805
+ @artifact_registry_stub.test_iam_permissions request, options do |result, operation|
3806
+ yield result, operation if block_given?
3807
+ end
3808
+ rescue ::Gapic::Rest::Error => e
3809
+ raise ::Google::Cloud::Error.from_error(e)
3810
+ end
3811
+
3812
+ ##
3813
+ # Retrieves the Settings for the Project.
3814
+ #
3815
+ # @overload get_project_settings(request, options = nil)
3816
+ # Pass arguments to `get_project_settings` via a request object, either of type
3817
+ # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash.
3818
+ #
3819
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash]
3820
+ # A request object representing the call parameters. Required. To specify no
3821
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3822
+ # @param options [::Gapic::CallOptions, ::Hash]
3823
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3824
+ #
3825
+ # @overload get_project_settings(name: nil)
3826
+ # Pass arguments to `get_project_settings` via keyword arguments. Note that at
3827
+ # least one keyword argument is required. To specify no parameters, or to keep all
3828
+ # the default parameter values, pass an empty Hash as a request object (see above).
3829
+ #
3830
+ # @param name [::String]
3831
+ # Required. The name of the projectSettings resource.
3832
+ # @yield [result, operation] Access the result along with the TransportOperation object
3833
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3834
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3835
+ #
3836
+ # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3837
+ #
3838
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3839
+ #
3840
+ # @example Basic example
3841
+ # require "google/cloud/artifact_registry/v1"
3842
+ #
3843
+ # # Create a client object. The client can be reused for multiple calls.
3844
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3845
+ #
3846
+ # # Create a request. To set request fields, pass in keyword arguments.
3847
+ # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new
3848
+ #
3849
+ # # Call the get_project_settings method.
3850
+ # result = client.get_project_settings request
3851
+ #
3852
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
3853
+ # p result
3854
+ #
3855
+ def get_project_settings request, options = nil
3856
+ raise ::ArgumentError, "request must be provided" if request.nil?
3857
+
3858
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest
3859
+
3860
+ # Converts hash and nil to an options object
3861
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3862
+
3863
+ # Customize the options with defaults
3864
+ call_metadata = @config.rpcs.get_project_settings.metadata.to_h
3865
+
3866
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3867
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3868
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3869
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3870
+ transports_version_send: [:rest]
3871
+
3872
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3873
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3874
+
3875
+ options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
3876
+ metadata: call_metadata,
3877
+ retry_policy: @config.rpcs.get_project_settings.retry_policy
3878
+
3879
+ options.apply_defaults timeout: @config.timeout,
3880
+ metadata: @config.metadata,
3881
+ retry_policy: @config.retry_policy
3882
+
3883
+ @artifact_registry_stub.get_project_settings request, options do |result, operation|
3884
+ yield result, operation if block_given?
3885
+ end
3886
+ rescue ::Gapic::Rest::Error => e
3887
+ raise ::Google::Cloud::Error.from_error(e)
3888
+ end
3889
+
3890
+ ##
3891
+ # Updates the Settings for the Project.
3892
+ #
3893
+ # @overload update_project_settings(request, options = nil)
3894
+ # Pass arguments to `update_project_settings` via a request object, either of type
3895
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash.
3896
+ #
3897
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash]
3898
+ # A request object representing the call parameters. Required. To specify no
3899
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3900
+ # @param options [::Gapic::CallOptions, ::Hash]
3901
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3902
+ #
3903
+ # @overload update_project_settings(project_settings: nil, update_mask: nil)
3904
+ # Pass arguments to `update_project_settings` via keyword arguments. Note that at
3905
+ # least one keyword argument is required. To specify no parameters, or to keep all
3906
+ # the default parameter values, pass an empty Hash as a request object (see above).
3907
+ #
3908
+ # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash]
3909
+ # The project settings.
3910
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3911
+ # Field mask to support partial updates.
3912
+ # @yield [result, operation] Access the result along with the TransportOperation object
3913
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3914
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3915
+ #
3916
+ # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
3917
+ #
3918
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3919
+ #
3920
+ # @example Basic example
3921
+ # require "google/cloud/artifact_registry/v1"
3922
+ #
3923
+ # # Create a client object. The client can be reused for multiple calls.
3924
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3925
+ #
3926
+ # # Create a request. To set request fields, pass in keyword arguments.
3927
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new
3928
+ #
3929
+ # # Call the update_project_settings method.
3930
+ # result = client.update_project_settings request
3931
+ #
3932
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
3933
+ # p result
3934
+ #
3935
+ def update_project_settings request, options = nil
3936
+ raise ::ArgumentError, "request must be provided" if request.nil?
3937
+
3938
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest
3939
+
3940
+ # Converts hash and nil to an options object
3941
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3942
+
3943
+ # Customize the options with defaults
3944
+ call_metadata = @config.rpcs.update_project_settings.metadata.to_h
3945
+
3946
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3947
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3948
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3949
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
3950
+ transports_version_send: [:rest]
3951
+
3952
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3953
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3954
+
3955
+ options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
3956
+ metadata: call_metadata,
3957
+ retry_policy: @config.rpcs.update_project_settings.retry_policy
3958
+
3959
+ options.apply_defaults timeout: @config.timeout,
3960
+ metadata: @config.metadata,
3961
+ retry_policy: @config.retry_policy
3962
+
3963
+ @artifact_registry_stub.update_project_settings request, options do |result, operation|
3964
+ yield result, operation if block_given?
3965
+ end
3966
+ rescue ::Gapic::Rest::Error => e
3967
+ raise ::Google::Cloud::Error.from_error(e)
3968
+ end
3969
+
3970
+ ##
3971
+ # Retrieves the VPCSC Config for the Project.
3972
+ #
3973
+ # @overload get_vpcsc_config(request, options = nil)
3974
+ # Pass arguments to `get_vpcsc_config` via a request object, either of type
3975
+ # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
3976
+ #
3977
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
3978
+ # A request object representing the call parameters. Required. To specify no
3979
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3980
+ # @param options [::Gapic::CallOptions, ::Hash]
3981
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3982
+ #
3983
+ # @overload get_vpcsc_config(name: nil)
3984
+ # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
3985
+ # least one keyword argument is required. To specify no parameters, or to keep all
3986
+ # the default parameter values, pass an empty Hash as a request object (see above).
3987
+ #
3988
+ # @param name [::String]
3989
+ # Required. The name of the VPCSCConfig resource.
3990
+ # @yield [result, operation] Access the result along with the TransportOperation object
3991
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3992
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3993
+ #
3994
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3995
+ #
3996
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3997
+ #
3998
+ # @example Basic example
3999
+ # require "google/cloud/artifact_registry/v1"
4000
+ #
4001
+ # # Create a client object. The client can be reused for multiple calls.
4002
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
4003
+ #
4004
+ # # Create a request. To set request fields, pass in keyword arguments.
4005
+ # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
4006
+ #
4007
+ # # Call the get_vpcsc_config method.
4008
+ # result = client.get_vpcsc_config request
4009
+ #
4010
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
4011
+ # p result
4012
+ #
4013
+ def get_vpcsc_config request, options = nil
4014
+ raise ::ArgumentError, "request must be provided" if request.nil?
4015
+
4016
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
4017
+
4018
+ # Converts hash and nil to an options object
4019
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4020
+
4021
+ # Customize the options with defaults
4022
+ call_metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
4023
+
4024
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4025
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4026
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4027
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION,
4028
+ transports_version_send: [:rest]
4029
+
4030
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4031
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4032
+
4033
+ options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
2789
4034
  metadata: call_metadata,
2790
- retry_policy: @config.rpcs.set_iam_policy.retry_policy
4035
+ retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
2791
4036
 
2792
4037
  options.apply_defaults timeout: @config.timeout,
2793
4038
  metadata: @config.metadata,
2794
4039
  retry_policy: @config.retry_policy
2795
4040
 
2796
- @artifact_registry_stub.set_iam_policy request, options do |result, operation|
4041
+ @artifact_registry_stub.get_vpcsc_config request, options do |result, operation|
2797
4042
  yield result, operation if block_given?
2798
- return result
2799
4043
  end
2800
4044
  rescue ::Gapic::Rest::Error => e
2801
4045
  raise ::Google::Cloud::Error.from_error(e)
2802
4046
  end
2803
4047
 
2804
4048
  ##
2805
- # Gets the IAM policy for a given resource.
4049
+ # Updates the VPCSC Config for the Project.
2806
4050
  #
2807
- # @overload get_iam_policy(request, options = nil)
2808
- # Pass arguments to `get_iam_policy` via a request object, either of type
2809
- # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
4051
+ # @overload update_vpcsc_config(request, options = nil)
4052
+ # Pass arguments to `update_vpcsc_config` via a request object, either of type
4053
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
2810
4054
  #
2811
- # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
4055
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
2812
4056
  # A request object representing the call parameters. Required. To specify no
2813
4057
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2814
4058
  # @param options [::Gapic::CallOptions, ::Hash]
2815
4059
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2816
4060
  #
2817
- # @overload get_iam_policy(resource: nil, options: nil)
2818
- # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
4061
+ # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
4062
+ # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
2819
4063
  # least one keyword argument is required. To specify no parameters, or to keep all
2820
4064
  # the default parameter values, pass an empty Hash as a request object (see above).
2821
4065
  #
2822
- # @param resource [::String]
2823
- # REQUIRED: The resource for which the policy is being requested.
2824
- # See the operation documentation for the appropriate value for this field.
2825
- # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
2826
- # OPTIONAL: A `GetPolicyOptions` object for specifying options to
2827
- # `GetIamPolicy`.
4066
+ # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
4067
+ # The project config.
4068
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4069
+ # Field mask to support partial updates.
2828
4070
  # @yield [result, operation] Access the result along with the TransportOperation object
2829
- # @yieldparam result [::Google::Iam::V1::Policy]
4071
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
2830
4072
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2831
4073
  #
2832
- # @return [::Google::Iam::V1::Policy]
4074
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
2833
4075
  #
2834
4076
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2835
4077
  #
@@ -2840,24 +4082,24 @@ module Google
2840
4082
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2841
4083
  #
2842
4084
  # # Create a request. To set request fields, pass in keyword arguments.
2843
- # request = Google::Iam::V1::GetIamPolicyRequest.new
4085
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
2844
4086
  #
2845
- # # Call the get_iam_policy method.
2846
- # result = client.get_iam_policy request
4087
+ # # Call the update_vpcsc_config method.
4088
+ # result = client.update_vpcsc_config request
2847
4089
  #
2848
- # # The returned object is of type Google::Iam::V1::Policy.
4090
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
2849
4091
  # p result
2850
4092
  #
2851
- def get_iam_policy request, options = nil
4093
+ def update_vpcsc_config request, options = nil
2852
4094
  raise ::ArgumentError, "request must be provided" if request.nil?
2853
4095
 
2854
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
4096
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
2855
4097
 
2856
4098
  # Converts hash and nil to an options object
2857
4099
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2858
4100
 
2859
4101
  # Customize the options with defaults
2860
- call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
4102
+ call_metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
2861
4103
 
2862
4104
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2863
4105
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2868,53 +4110,50 @@ module Google
2868
4110
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2869
4111
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2870
4112
 
2871
- options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
4113
+ options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
2872
4114
  metadata: call_metadata,
2873
- retry_policy: @config.rpcs.get_iam_policy.retry_policy
4115
+ retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
2874
4116
 
2875
4117
  options.apply_defaults timeout: @config.timeout,
2876
4118
  metadata: @config.metadata,
2877
4119
  retry_policy: @config.retry_policy
2878
4120
 
2879
- @artifact_registry_stub.get_iam_policy request, options do |result, operation|
4121
+ @artifact_registry_stub.update_vpcsc_config request, options do |result, operation|
2880
4122
  yield result, operation if block_given?
2881
- return result
2882
4123
  end
2883
4124
  rescue ::Gapic::Rest::Error => e
2884
4125
  raise ::Google::Cloud::Error.from_error(e)
2885
4126
  end
2886
4127
 
2887
4128
  ##
2888
- # Tests if the caller has a list of permissions on a resource.
4129
+ # Updates a package.
2889
4130
  #
2890
- # @overload test_iam_permissions(request, options = nil)
2891
- # Pass arguments to `test_iam_permissions` via a request object, either of type
2892
- # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
4131
+ # @overload update_package(request, options = nil)
4132
+ # Pass arguments to `update_package` via a request object, either of type
4133
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash.
2893
4134
  #
2894
- # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
4135
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash]
2895
4136
  # A request object representing the call parameters. Required. To specify no
2896
4137
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2897
4138
  # @param options [::Gapic::CallOptions, ::Hash]
2898
4139
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2899
4140
  #
2900
- # @overload test_iam_permissions(resource: nil, permissions: nil)
2901
- # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
4141
+ # @overload update_package(package: nil, update_mask: nil)
4142
+ # Pass arguments to `update_package` via keyword arguments. Note that at
2902
4143
  # least one keyword argument is required. To specify no parameters, or to keep all
2903
4144
  # the default parameter values, pass an empty Hash as a request object (see above).
2904
4145
  #
2905
- # @param resource [::String]
2906
- # REQUIRED: The resource for which the policy detail is being requested.
2907
- # See the operation documentation for the appropriate value for this field.
2908
- # @param permissions [::Array<::String>]
2909
- # The set of permissions to check for the `resource`. Permissions with
2910
- # wildcards (such as '*' or 'storage.*') are not allowed. For more
2911
- # information see
2912
- # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
4146
+ # @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash]
4147
+ # The package that replaces the resource on the server.
4148
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4149
+ # The update mask applies to the resource. For the `FieldMask` definition,
4150
+ # see
4151
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
2913
4152
  # @yield [result, operation] Access the result along with the TransportOperation object
2914
- # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
4153
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Package]
2915
4154
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2916
4155
  #
2917
- # @return [::Google::Iam::V1::TestIamPermissionsResponse]
4156
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Package]
2918
4157
  #
2919
4158
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2920
4159
  #
@@ -2925,24 +4164,24 @@ module Google
2925
4164
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
2926
4165
  #
2927
4166
  # # Create a request. To set request fields, pass in keyword arguments.
2928
- # request = Google::Iam::V1::TestIamPermissionsRequest.new
4167
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new
2929
4168
  #
2930
- # # Call the test_iam_permissions method.
2931
- # result = client.test_iam_permissions request
4169
+ # # Call the update_package method.
4170
+ # result = client.update_package request
2932
4171
  #
2933
- # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
4172
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package.
2934
4173
  # p result
2935
4174
  #
2936
- def test_iam_permissions request, options = nil
4175
+ def update_package request, options = nil
2937
4176
  raise ::ArgumentError, "request must be provided" if request.nil?
2938
4177
 
2939
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
4178
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest
2940
4179
 
2941
4180
  # Converts hash and nil to an options object
2942
4181
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2943
4182
 
2944
4183
  # Customize the options with defaults
2945
- call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
4184
+ call_metadata = @config.rpcs.update_package.metadata.to_h
2946
4185
 
2947
4186
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2948
4187
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2953,47 +4192,57 @@ module Google
2953
4192
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2954
4193
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2955
4194
 
2956
- options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
4195
+ options.apply_defaults timeout: @config.rpcs.update_package.timeout,
2957
4196
  metadata: call_metadata,
2958
- retry_policy: @config.rpcs.test_iam_permissions.retry_policy
4197
+ retry_policy: @config.rpcs.update_package.retry_policy
2959
4198
 
2960
4199
  options.apply_defaults timeout: @config.timeout,
2961
4200
  metadata: @config.metadata,
2962
4201
  retry_policy: @config.retry_policy
2963
4202
 
2964
- @artifact_registry_stub.test_iam_permissions request, options do |result, operation|
4203
+ @artifact_registry_stub.update_package request, options do |result, operation|
2965
4204
  yield result, operation if block_given?
2966
- return result
2967
4205
  end
2968
4206
  rescue ::Gapic::Rest::Error => e
2969
4207
  raise ::Google::Cloud::Error.from_error(e)
2970
4208
  end
2971
4209
 
2972
4210
  ##
2973
- # Retrieves the Settings for the Project.
4211
+ # Lists attachments.
2974
4212
  #
2975
- # @overload get_project_settings(request, options = nil)
2976
- # Pass arguments to `get_project_settings` via a request object, either of type
2977
- # {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash.
4213
+ # @overload list_attachments(request, options = nil)
4214
+ # Pass arguments to `list_attachments` via a request object, either of type
4215
+ # {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash.
2978
4216
  #
2979
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash]
4217
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash]
2980
4218
  # A request object representing the call parameters. Required. To specify no
2981
4219
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2982
4220
  # @param options [::Gapic::CallOptions, ::Hash]
2983
4221
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2984
4222
  #
2985
- # @overload get_project_settings(name: nil)
2986
- # Pass arguments to `get_project_settings` via keyword arguments. Note that at
4223
+ # @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil)
4224
+ # Pass arguments to `list_attachments` via keyword arguments. Note that at
2987
4225
  # least one keyword argument is required. To specify no parameters, or to keep all
2988
4226
  # the default parameter values, pass an empty Hash as a request object (see above).
2989
4227
  #
2990
- # @param name [::String]
2991
- # Required. The name of the projectSettings resource.
4228
+ # @param parent [::String]
4229
+ # Required. The name of the parent resource whose attachments will be listed.
4230
+ # @param filter [::String]
4231
+ # Optional. An expression for filtering the results of the request. Filter
4232
+ # rules are case insensitive. The fields eligible for filtering are:
4233
+ #
4234
+ # * `target`
4235
+ # * `type`
4236
+ # * `attachment_namespace`
4237
+ # @param page_size [::Integer]
4238
+ # The maximum number of attachments to return. Maximum page size is 1,000.
4239
+ # @param page_token [::String]
4240
+ # The next_page_token value returned from a previous list request, if any.
2992
4241
  # @yield [result, operation] Access the result along with the TransportOperation object
2993
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4242
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>]
2994
4243
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
2995
4244
  #
2996
- # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4245
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>]
2997
4246
  #
2998
4247
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2999
4248
  #
@@ -3004,24 +4253,28 @@ module Google
3004
4253
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3005
4254
  #
3006
4255
  # # Create a request. To set request fields, pass in keyword arguments.
3007
- # request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new
4256
+ # request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new
3008
4257
  #
3009
- # # Call the get_project_settings method.
3010
- # result = client.get_project_settings request
4258
+ # # Call the list_attachments method.
4259
+ # result = client.list_attachments request
3011
4260
  #
3012
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
3013
- # p result
4261
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4262
+ # # over elements, and API calls will be issued to fetch pages as needed.
4263
+ # result.each do |item|
4264
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment.
4265
+ # p item
4266
+ # end
3014
4267
  #
3015
- def get_project_settings request, options = nil
4268
+ def list_attachments request, options = nil
3016
4269
  raise ::ArgumentError, "request must be provided" if request.nil?
3017
4270
 
3018
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest
4271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest
3019
4272
 
3020
4273
  # Converts hash and nil to an options object
3021
4274
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3022
4275
 
3023
4276
  # Customize the options with defaults
3024
- call_metadata = @config.rpcs.get_project_settings.metadata.to_h
4277
+ call_metadata = @config.rpcs.list_attachments.metadata.to_h
3025
4278
 
3026
4279
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3027
4280
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3032,49 +4285,48 @@ module Google
3032
4285
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3033
4286
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3034
4287
 
3035
- options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
4288
+ options.apply_defaults timeout: @config.rpcs.list_attachments.timeout,
3036
4289
  metadata: call_metadata,
3037
- retry_policy: @config.rpcs.get_project_settings.retry_policy
4290
+ retry_policy: @config.rpcs.list_attachments.retry_policy
3038
4291
 
3039
4292
  options.apply_defaults timeout: @config.timeout,
3040
4293
  metadata: @config.metadata,
3041
4294
  retry_policy: @config.retry_policy
3042
4295
 
3043
- @artifact_registry_stub.get_project_settings request, options do |result, operation|
4296
+ @artifact_registry_stub.list_attachments request, options do |result, operation|
4297
+ result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, options
3044
4298
  yield result, operation if block_given?
3045
- return result
4299
+ throw :response, result
3046
4300
  end
3047
4301
  rescue ::Gapic::Rest::Error => e
3048
4302
  raise ::Google::Cloud::Error.from_error(e)
3049
4303
  end
3050
4304
 
3051
4305
  ##
3052
- # Updates the Settings for the Project.
4306
+ # Gets an attachment.
3053
4307
  #
3054
- # @overload update_project_settings(request, options = nil)
3055
- # Pass arguments to `update_project_settings` via a request object, either of type
3056
- # {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash.
4308
+ # @overload get_attachment(request, options = nil)
4309
+ # Pass arguments to `get_attachment` via a request object, either of type
4310
+ # {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash.
3057
4311
  #
3058
- # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash]
4312
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash]
3059
4313
  # A request object representing the call parameters. Required. To specify no
3060
4314
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3061
4315
  # @param options [::Gapic::CallOptions, ::Hash]
3062
4316
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3063
4317
  #
3064
- # @overload update_project_settings(project_settings: nil, update_mask: nil)
3065
- # Pass arguments to `update_project_settings` via keyword arguments. Note that at
4318
+ # @overload get_attachment(name: nil)
4319
+ # Pass arguments to `get_attachment` via keyword arguments. Note that at
3066
4320
  # least one keyword argument is required. To specify no parameters, or to keep all
3067
4321
  # the default parameter values, pass an empty Hash as a request object (see above).
3068
4322
  #
3069
- # @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash]
3070
- # The project settings.
3071
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3072
- # Field mask to support partial updates.
4323
+ # @param name [::String]
4324
+ # Required. The name of the attachment to retrieve.
3073
4325
  # @yield [result, operation] Access the result along with the TransportOperation object
3074
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4326
+ # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::Attachment]
3075
4327
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3076
4328
  #
3077
- # @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
4329
+ # @return [::Google::Cloud::ArtifactRegistry::V1::Attachment]
3078
4330
  #
3079
4331
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3080
4332
  #
@@ -3085,24 +4337,24 @@ module Google
3085
4337
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3086
4338
  #
3087
4339
  # # Create a request. To set request fields, pass in keyword arguments.
3088
- # request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new
4340
+ # request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new
3089
4341
  #
3090
- # # Call the update_project_settings method.
3091
- # result = client.update_project_settings request
4342
+ # # Call the get_attachment method.
4343
+ # result = client.get_attachment request
3092
4344
  #
3093
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
4345
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment.
3094
4346
  # p result
3095
4347
  #
3096
- def update_project_settings request, options = nil
4348
+ def get_attachment request, options = nil
3097
4349
  raise ::ArgumentError, "request must be provided" if request.nil?
3098
4350
 
3099
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest
4351
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest
3100
4352
 
3101
4353
  # Converts hash and nil to an options object
3102
4354
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3103
4355
 
3104
4356
  # Customize the options with defaults
3105
- call_metadata = @config.rpcs.update_project_settings.metadata.to_h
4357
+ call_metadata = @config.rpcs.get_attachment.metadata.to_h
3106
4358
 
3107
4359
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3108
4360
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3113,47 +4365,52 @@ module Google
3113
4365
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3114
4366
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3115
4367
 
3116
- options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
4368
+ options.apply_defaults timeout: @config.rpcs.get_attachment.timeout,
3117
4369
  metadata: call_metadata,
3118
- retry_policy: @config.rpcs.update_project_settings.retry_policy
4370
+ retry_policy: @config.rpcs.get_attachment.retry_policy
3119
4371
 
3120
4372
  options.apply_defaults timeout: @config.timeout,
3121
4373
  metadata: @config.metadata,
3122
4374
  retry_policy: @config.retry_policy
3123
4375
 
3124
- @artifact_registry_stub.update_project_settings request, options do |result, operation|
4376
+ @artifact_registry_stub.get_attachment request, options do |result, operation|
3125
4377
  yield result, operation if block_given?
3126
- return result
3127
4378
  end
3128
4379
  rescue ::Gapic::Rest::Error => e
3129
4380
  raise ::Google::Cloud::Error.from_error(e)
3130
4381
  end
3131
4382
 
3132
4383
  ##
3133
- # Retrieves the VPCSC Config for the Project.
4384
+ # Creates an attachment. The returned Operation will finish once the
4385
+ # attachment has been created. Its response will be the created attachment.
3134
4386
  #
3135
- # @overload get_vpcsc_config(request, options = nil)
3136
- # Pass arguments to `get_vpcsc_config` via a request object, either of type
3137
- # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
4387
+ # @overload create_attachment(request, options = nil)
4388
+ # Pass arguments to `create_attachment` via a request object, either of type
4389
+ # {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash.
3138
4390
  #
3139
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
4391
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash]
3140
4392
  # A request object representing the call parameters. Required. To specify no
3141
4393
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3142
4394
  # @param options [::Gapic::CallOptions, ::Hash]
3143
4395
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3144
4396
  #
3145
- # @overload get_vpcsc_config(name: nil)
3146
- # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
4397
+ # @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil)
4398
+ # Pass arguments to `create_attachment` via keyword arguments. Note that at
3147
4399
  # least one keyword argument is required. To specify no parameters, or to keep all
3148
4400
  # the default parameter values, pass an empty Hash as a request object (see above).
3149
4401
  #
3150
- # @param name [::String]
3151
- # Required. The name of the VPCSCConfig resource.
4402
+ # @param parent [::String]
4403
+ # Required. The name of the parent resource where the attachment will be
4404
+ # created.
4405
+ # @param attachment_id [::String]
4406
+ # Required. The attachment id to use for this attachment.
4407
+ # @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash]
4408
+ # Required. The attachment to be created.
3152
4409
  # @yield [result, operation] Access the result along with the TransportOperation object
3153
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4410
+ # @yieldparam result [::Gapic::Operation]
3154
4411
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3155
4412
  #
3156
- # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4413
+ # @return [::Gapic::Operation]
3157
4414
  #
3158
4415
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3159
4416
  #
@@ -3164,24 +4421,31 @@ module Google
3164
4421
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3165
4422
  #
3166
4423
  # # Create a request. To set request fields, pass in keyword arguments.
3167
- # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
4424
+ # request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new
3168
4425
  #
3169
- # # Call the get_vpcsc_config method.
3170
- # result = client.get_vpcsc_config request
4426
+ # # Call the create_attachment method.
4427
+ # result = client.create_attachment request
3171
4428
  #
3172
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3173
- # p result
4429
+ # # The returned object is of type Gapic::Operation. You can use it to
4430
+ # # check the status of an operation, cancel it, or wait for results.
4431
+ # # Here is how to wait for a response.
4432
+ # result.wait_until_done! timeout: 60
4433
+ # if result.response?
4434
+ # p result.response
4435
+ # else
4436
+ # puts "No response received."
4437
+ # end
3174
4438
  #
3175
- def get_vpcsc_config request, options = nil
4439
+ def create_attachment request, options = nil
3176
4440
  raise ::ArgumentError, "request must be provided" if request.nil?
3177
4441
 
3178
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
4442
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest
3179
4443
 
3180
4444
  # Converts hash and nil to an options object
3181
4445
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3182
4446
 
3183
4447
  # Customize the options with defaults
3184
- call_metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
4448
+ call_metadata = @config.rpcs.create_attachment.metadata.to_h
3185
4449
 
3186
4450
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3187
4451
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3192,49 +4456,50 @@ module Google
3192
4456
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3193
4457
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3194
4458
 
3195
- options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
4459
+ options.apply_defaults timeout: @config.rpcs.create_attachment.timeout,
3196
4460
  metadata: call_metadata,
3197
- retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
4461
+ retry_policy: @config.rpcs.create_attachment.retry_policy
3198
4462
 
3199
4463
  options.apply_defaults timeout: @config.timeout,
3200
4464
  metadata: @config.metadata,
3201
4465
  retry_policy: @config.retry_policy
3202
4466
 
3203
- @artifact_registry_stub.get_vpcsc_config request, options do |result, operation|
4467
+ @artifact_registry_stub.create_attachment request, options do |result, operation|
4468
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3204
4469
  yield result, operation if block_given?
3205
- return result
4470
+ throw :response, result
3206
4471
  end
3207
4472
  rescue ::Gapic::Rest::Error => e
3208
4473
  raise ::Google::Cloud::Error.from_error(e)
3209
4474
  end
3210
4475
 
3211
4476
  ##
3212
- # Updates the VPCSC Config for the Project.
4477
+ # Deletes an attachment. The returned Operation will
4478
+ # finish once the attachments has been deleted. It will not have any
4479
+ # Operation metadata and will return a `google.protobuf.Empty` response.
3213
4480
  #
3214
- # @overload update_vpcsc_config(request, options = nil)
3215
- # Pass arguments to `update_vpcsc_config` via a request object, either of type
3216
- # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
4481
+ # @overload delete_attachment(request, options = nil)
4482
+ # Pass arguments to `delete_attachment` via a request object, either of type
4483
+ # {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash.
3217
4484
  #
3218
- # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
4485
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash]
3219
4486
  # A request object representing the call parameters. Required. To specify no
3220
4487
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3221
4488
  # @param options [::Gapic::CallOptions, ::Hash]
3222
4489
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3223
4490
  #
3224
- # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
3225
- # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
4491
+ # @overload delete_attachment(name: nil)
4492
+ # Pass arguments to `delete_attachment` via keyword arguments. Note that at
3226
4493
  # least one keyword argument is required. To specify no parameters, or to keep all
3227
4494
  # the default parameter values, pass an empty Hash as a request object (see above).
3228
4495
  #
3229
- # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
3230
- # The project config.
3231
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3232
- # Field mask to support partial updates.
4496
+ # @param name [::String]
4497
+ # Required. The name of the attachment to delete.
3233
4498
  # @yield [result, operation] Access the result along with the TransportOperation object
3234
- # @yieldparam result [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4499
+ # @yieldparam result [::Gapic::Operation]
3235
4500
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
3236
4501
  #
3237
- # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
4502
+ # @return [::Gapic::Operation]
3238
4503
  #
3239
4504
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3240
4505
  #
@@ -3245,24 +4510,31 @@ module Google
3245
4510
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Rest::Client.new
3246
4511
  #
3247
4512
  # # Create a request. To set request fields, pass in keyword arguments.
3248
- # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
4513
+ # request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new
3249
4514
  #
3250
- # # Call the update_vpcsc_config method.
3251
- # result = client.update_vpcsc_config request
4515
+ # # Call the delete_attachment method.
4516
+ # result = client.delete_attachment request
3252
4517
  #
3253
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3254
- # p result
4518
+ # # The returned object is of type Gapic::Operation. You can use it to
4519
+ # # check the status of an operation, cancel it, or wait for results.
4520
+ # # Here is how to wait for a response.
4521
+ # result.wait_until_done! timeout: 60
4522
+ # if result.response?
4523
+ # p result.response
4524
+ # else
4525
+ # puts "No response received."
4526
+ # end
3255
4527
  #
3256
- def update_vpcsc_config request, options = nil
4528
+ def delete_attachment request, options = nil
3257
4529
  raise ::ArgumentError, "request must be provided" if request.nil?
3258
4530
 
3259
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
4531
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest
3260
4532
 
3261
4533
  # Converts hash and nil to an options object
3262
4534
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3263
4535
 
3264
4536
  # Customize the options with defaults
3265
- call_metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
4537
+ call_metadata = @config.rpcs.delete_attachment.metadata.to_h
3266
4538
 
3267
4539
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3268
4540
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3273,17 +4545,18 @@ module Google
3273
4545
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3274
4546
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3275
4547
 
3276
- options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
4548
+ options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout,
3277
4549
  metadata: call_metadata,
3278
- retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
4550
+ retry_policy: @config.rpcs.delete_attachment.retry_policy
3279
4551
 
3280
4552
  options.apply_defaults timeout: @config.timeout,
3281
4553
  metadata: @config.metadata,
3282
4554
  retry_policy: @config.retry_policy
3283
4555
 
3284
- @artifact_registry_stub.update_vpcsc_config request, options do |result, operation|
4556
+ @artifact_registry_stub.delete_attachment request, options do |result, operation|
4557
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3285
4558
  yield result, operation if block_given?
3286
- return result
4559
+ throw :response, result
3287
4560
  end
3288
4561
  rescue ::Gapic::Rest::Error => e
3289
4562
  raise ::Google::Cloud::Error.from_error(e)
@@ -3363,6 +4636,11 @@ module Google
3363
4636
  # default endpoint URL. The default value of nil uses the environment
3364
4637
  # universe (usually the default "googleapis.com" universe).
3365
4638
  # @return [::String,nil]
4639
+ # @!attribute [rw] logger
4640
+ # A custom logger to use for request/response debug logging, or the value
4641
+ # `:default` (the default) to construct a default logger, or `nil` to
4642
+ # explicitly disable logging.
4643
+ # @return [::Logger,:default,nil]
3366
4644
  #
3367
4645
  class Configuration
3368
4646
  extend ::Gapic::Config
@@ -3391,6 +4669,7 @@ module Google
3391
4669
  # by the host service.
3392
4670
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3393
4671
  config_attr :bindings_override, {}, ::Hash, nil
4672
+ config_attr :logger, :default, ::Logger, nil, :default
3394
4673
 
3395
4674
  # @private
3396
4675
  def initialize parent_config = nil
@@ -3540,6 +4819,11 @@ module Google
3540
4819
  #
3541
4820
  attr_reader :batch_delete_versions
3542
4821
  ##
4822
+ # RPC-specific configuration for `update_version`
4823
+ # @return [::Gapic::Config::Method]
4824
+ #
4825
+ attr_reader :update_version
4826
+ ##
3543
4827
  # RPC-specific configuration for `list_files`
3544
4828
  # @return [::Gapic::Config::Method]
3545
4829
  #
@@ -3550,6 +4834,16 @@ module Google
3550
4834
  #
3551
4835
  attr_reader :get_file
3552
4836
  ##
4837
+ # RPC-specific configuration for `delete_file`
4838
+ # @return [::Gapic::Config::Method]
4839
+ #
4840
+ attr_reader :delete_file
4841
+ ##
4842
+ # RPC-specific configuration for `update_file`
4843
+ # @return [::Gapic::Config::Method]
4844
+ #
4845
+ attr_reader :update_file
4846
+ ##
3553
4847
  # RPC-specific configuration for `list_tags`
3554
4848
  # @return [::Gapic::Config::Method]
3555
4849
  #
@@ -3575,6 +4869,31 @@ module Google
3575
4869
  #
3576
4870
  attr_reader :delete_tag
3577
4871
  ##
4872
+ # RPC-specific configuration for `create_rule`
4873
+ # @return [::Gapic::Config::Method]
4874
+ #
4875
+ attr_reader :create_rule
4876
+ ##
4877
+ # RPC-specific configuration for `list_rules`
4878
+ # @return [::Gapic::Config::Method]
4879
+ #
4880
+ attr_reader :list_rules
4881
+ ##
4882
+ # RPC-specific configuration for `get_rule`
4883
+ # @return [::Gapic::Config::Method]
4884
+ #
4885
+ attr_reader :get_rule
4886
+ ##
4887
+ # RPC-specific configuration for `update_rule`
4888
+ # @return [::Gapic::Config::Method]
4889
+ #
4890
+ attr_reader :update_rule
4891
+ ##
4892
+ # RPC-specific configuration for `delete_rule`
4893
+ # @return [::Gapic::Config::Method]
4894
+ #
4895
+ attr_reader :delete_rule
4896
+ ##
3578
4897
  # RPC-specific configuration for `set_iam_policy`
3579
4898
  # @return [::Gapic::Config::Method]
3580
4899
  #
@@ -3609,6 +4928,31 @@ module Google
3609
4928
  # @return [::Gapic::Config::Method]
3610
4929
  #
3611
4930
  attr_reader :update_vpcsc_config
4931
+ ##
4932
+ # RPC-specific configuration for `update_package`
4933
+ # @return [::Gapic::Config::Method]
4934
+ #
4935
+ attr_reader :update_package
4936
+ ##
4937
+ # RPC-specific configuration for `list_attachments`
4938
+ # @return [::Gapic::Config::Method]
4939
+ #
4940
+ attr_reader :list_attachments
4941
+ ##
4942
+ # RPC-specific configuration for `get_attachment`
4943
+ # @return [::Gapic::Config::Method]
4944
+ #
4945
+ attr_reader :get_attachment
4946
+ ##
4947
+ # RPC-specific configuration for `create_attachment`
4948
+ # @return [::Gapic::Config::Method]
4949
+ #
4950
+ attr_reader :create_attachment
4951
+ ##
4952
+ # RPC-specific configuration for `delete_attachment`
4953
+ # @return [::Gapic::Config::Method]
4954
+ #
4955
+ attr_reader :delete_attachment
3612
4956
 
3613
4957
  # @private
3614
4958
  def initialize parent_rpcs = nil
@@ -3656,10 +5000,16 @@ module Google
3656
5000
  @delete_version = ::Gapic::Config::Method.new delete_version_config
3657
5001
  batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions
3658
5002
  @batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config
5003
+ update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version
5004
+ @update_version = ::Gapic::Config::Method.new update_version_config
3659
5005
  list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files
3660
5006
  @list_files = ::Gapic::Config::Method.new list_files_config
3661
5007
  get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file
3662
5008
  @get_file = ::Gapic::Config::Method.new get_file_config
5009
+ delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file
5010
+ @delete_file = ::Gapic::Config::Method.new delete_file_config
5011
+ update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file
5012
+ @update_file = ::Gapic::Config::Method.new update_file_config
3663
5013
  list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags
3664
5014
  @list_tags = ::Gapic::Config::Method.new list_tags_config
3665
5015
  get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag
@@ -3670,6 +5020,16 @@ module Google
3670
5020
  @update_tag = ::Gapic::Config::Method.new update_tag_config
3671
5021
  delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag
3672
5022
  @delete_tag = ::Gapic::Config::Method.new delete_tag_config
5023
+ create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule
5024
+ @create_rule = ::Gapic::Config::Method.new create_rule_config
5025
+ list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules
5026
+ @list_rules = ::Gapic::Config::Method.new list_rules_config
5027
+ get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule
5028
+ @get_rule = ::Gapic::Config::Method.new get_rule_config
5029
+ update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule
5030
+ @update_rule = ::Gapic::Config::Method.new update_rule_config
5031
+ delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule
5032
+ @delete_rule = ::Gapic::Config::Method.new delete_rule_config
3673
5033
  set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
3674
5034
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3675
5035
  get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
@@ -3684,6 +5044,16 @@ module Google
3684
5044
  @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config
3685
5045
  update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config
3686
5046
  @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config
5047
+ update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package
5048
+ @update_package = ::Gapic::Config::Method.new update_package_config
5049
+ list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments
5050
+ @list_attachments = ::Gapic::Config::Method.new list_attachments_config
5051
+ get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment
5052
+ @get_attachment = ::Gapic::Config::Method.new get_attachment_config
5053
+ create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment
5054
+ @create_attachment = ::Gapic::Config::Method.new create_attachment_config
5055
+ delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment
5056
+ @delete_attachment = ::Gapic::Config::Method.new delete_attachment_config
3687
5057
 
3688
5058
  yield self if block_given?
3689
5059
  end