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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +1794 -333
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +12 -15
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +42 -0
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +1680 -310
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +43 -38
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +1106 -223
- data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
- data/lib/google/devtools/artifactregistry/v1/attachment_pb.rb +52 -0
- data/lib/google/devtools/artifactregistry/v1/file_pb.rb +5 -1
- data/lib/google/devtools/artifactregistry/v1/generic_pb.rb +47 -0
- data/lib/google/devtools/artifactregistry/v1/package_pb.rb +4 -1
- data/lib/google/devtools/artifactregistry/v1/repository_pb.rb +11 -1
- data/lib/google/devtools/artifactregistry/v1/rule_pb.rb +57 -0
- data/lib/google/devtools/artifactregistry/v1/service_pb.rb +3 -1
- data/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +31 -0
- data/lib/google/devtools/artifactregistry/v1/settings_pb.rb +1 -1
- data/lib/google/devtools/artifactregistry/v1/version_pb.rb +4 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +4 -4
- data/proto_docs/google/devtools/artifactregistry/v1/attachment.rb +152 -0
- data/proto_docs/google/devtools/artifactregistry/v1/file.rb +80 -7
- data/proto_docs/google/devtools/artifactregistry/v1/generic.rb +48 -0
- data/proto_docs/google/devtools/artifactregistry/v1/package.rb +76 -0
- data/proto_docs/google/devtools/artifactregistry/v1/repository.rb +188 -1
- data/proto_docs/google/devtools/artifactregistry/v1/rule.rb +149 -0
- data/proto_docs/google/devtools/artifactregistry/v1/settings.rb +10 -0
- data/proto_docs/google/devtools/artifactregistry/v1/tag.rb +23 -5
- data/proto_docs/google/devtools/artifactregistry/v1/version.rb +74 -1
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +11 -5
@@ -179,14 +179,26 @@ module Google
|
|
179
179
|
universe_domain: @config.universe_domain,
|
180
180
|
channel_args: @config.channel_args,
|
181
181
|
interceptors: @config.interceptors,
|
182
|
-
channel_pool_config: @config.channel_pool
|
182
|
+
channel_pool_config: @config.channel_pool,
|
183
|
+
logger: @config.logger
|
183
184
|
)
|
184
185
|
|
186
|
+
@artifact_registry_stub.stub_logger&.info do |entry|
|
187
|
+
entry.set_system_name
|
188
|
+
entry.set_service
|
189
|
+
entry.message = "Created client for #{entry.service}"
|
190
|
+
entry.set_credentials_fields credentials
|
191
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
192
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
193
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
194
|
+
end
|
195
|
+
|
185
196
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
186
197
|
config.credentials = credentials
|
187
198
|
config.quota_project = @quota_project_id
|
188
199
|
config.endpoint = @artifact_registry_stub.endpoint
|
189
200
|
config.universe_domain = @artifact_registry_stub.universe_domain
|
201
|
+
config.logger = @artifact_registry_stub.logger if config.respond_to? :logger=
|
190
202
|
end
|
191
203
|
end
|
192
204
|
|
@@ -204,6 +216,15 @@ module Google
|
|
204
216
|
#
|
205
217
|
attr_reader :location_client
|
206
218
|
|
219
|
+
##
|
220
|
+
# The logger used for request/response debug logging.
|
221
|
+
#
|
222
|
+
# @return [Logger]
|
223
|
+
#
|
224
|
+
def logger
|
225
|
+
@artifact_registry_stub.logger
|
226
|
+
end
|
227
|
+
|
207
228
|
# Service calls
|
208
229
|
|
209
230
|
##
|
@@ -228,7 +249,7 @@ module Google
|
|
228
249
|
# Required. The name of the parent resource whose docker images will be
|
229
250
|
# listed.
|
230
251
|
# @param page_size [::Integer]
|
231
|
-
# The maximum number of artifacts to return.
|
252
|
+
# The maximum number of artifacts to return. Maximum page size is 1,000.
|
232
253
|
# @param page_token [::String]
|
233
254
|
# The next_page_token value returned from a previous list request, if any.
|
234
255
|
# @param order_by [::String]
|
@@ -298,7 +319,7 @@ module Google
|
|
298
319
|
@artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation|
|
299
320
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options
|
300
321
|
yield response, operation if block_given?
|
301
|
-
|
322
|
+
throw :response, response
|
302
323
|
end
|
303
324
|
rescue ::GRPC::BadStatus => e
|
304
325
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -384,7 +405,6 @@ module Google
|
|
384
405
|
|
385
406
|
@artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation|
|
386
407
|
yield response, operation if block_given?
|
387
|
-
return response
|
388
408
|
end
|
389
409
|
rescue ::GRPC::BadStatus => e
|
390
410
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -412,7 +432,7 @@ module Google
|
|
412
432
|
# Required. The name of the parent resource whose maven artifacts will be
|
413
433
|
# listed.
|
414
434
|
# @param page_size [::Integer]
|
415
|
-
# The maximum number of artifacts to return.
|
435
|
+
# The maximum number of artifacts to return. Maximum page size is 1,000.
|
416
436
|
# @param page_token [::String]
|
417
437
|
# The next_page_token value returned from a previous list request, if any.
|
418
438
|
#
|
@@ -480,7 +500,7 @@ module Google
|
|
480
500
|
@artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation|
|
481
501
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, operation, options
|
482
502
|
yield response, operation if block_given?
|
483
|
-
|
503
|
+
throw :response, response
|
484
504
|
end
|
485
505
|
rescue ::GRPC::BadStatus => e
|
486
506
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -566,7 +586,6 @@ module Google
|
|
566
586
|
|
567
587
|
@artifact_registry_stub.call_rpc :get_maven_artifact, request, options: options do |response, operation|
|
568
588
|
yield response, operation if block_given?
|
569
|
-
return response
|
570
589
|
end
|
571
590
|
rescue ::GRPC::BadStatus => e
|
572
591
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -594,7 +613,7 @@ module Google
|
|
594
613
|
# Required. The name of the parent resource whose npm packages will be
|
595
614
|
# listed.
|
596
615
|
# @param page_size [::Integer]
|
597
|
-
# The maximum number of artifacts to return.
|
616
|
+
# The maximum number of artifacts to return. Maximum page size is 1,000.
|
598
617
|
# @param page_token [::String]
|
599
618
|
# The next_page_token value returned from a previous list request, if any.
|
600
619
|
#
|
@@ -662,7 +681,7 @@ module Google
|
|
662
681
|
@artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation|
|
663
682
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, operation, options
|
664
683
|
yield response, operation if block_given?
|
665
|
-
|
684
|
+
throw :response, response
|
666
685
|
end
|
667
686
|
rescue ::GRPC::BadStatus => e
|
668
687
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -748,7 +767,6 @@ module Google
|
|
748
767
|
|
749
768
|
@artifact_registry_stub.call_rpc :get_npm_package, request, options: options do |response, operation|
|
750
769
|
yield response, operation if block_given?
|
751
|
-
return response
|
752
770
|
end
|
753
771
|
rescue ::GRPC::BadStatus => e
|
754
772
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -776,7 +794,7 @@ module Google
|
|
776
794
|
# Required. The name of the parent resource whose python packages will be
|
777
795
|
# listed.
|
778
796
|
# @param page_size [::Integer]
|
779
|
-
# The maximum number of artifacts to return.
|
797
|
+
# The maximum number of artifacts to return. Maximum page size is 1,000.
|
780
798
|
# @param page_token [::String]
|
781
799
|
# The next_page_token value returned from a previous list request, if any.
|
782
800
|
#
|
@@ -844,7 +862,7 @@ module Google
|
|
844
862
|
@artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation|
|
845
863
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, operation, options
|
846
864
|
yield response, operation if block_given?
|
847
|
-
|
865
|
+
throw :response, response
|
848
866
|
end
|
849
867
|
rescue ::GRPC::BadStatus => e
|
850
868
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -930,7 +948,6 @@ module Google
|
|
930
948
|
|
931
949
|
@artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation|
|
932
950
|
yield response, operation if block_given?
|
933
|
-
return response
|
934
951
|
end
|
935
952
|
rescue ::GRPC::BadStatus => e
|
936
953
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1029,7 +1046,7 @@ module Google
|
|
1029
1046
|
@artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation|
|
1030
1047
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1031
1048
|
yield response, operation if block_given?
|
1032
|
-
|
1049
|
+
throw :response, response
|
1033
1050
|
end
|
1034
1051
|
rescue ::GRPC::BadStatus => e
|
1035
1052
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1128,7 +1145,7 @@ module Google
|
|
1128
1145
|
@artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation|
|
1129
1146
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1130
1147
|
yield response, operation if block_given?
|
1131
|
-
|
1148
|
+
throw :response, response
|
1132
1149
|
end
|
1133
1150
|
rescue ::GRPC::BadStatus => e
|
1134
1151
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1147,7 +1164,7 @@ module Google
|
|
1147
1164
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1148
1165
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1149
1166
|
#
|
1150
|
-
# @overload list_repositories(parent: nil, page_size: nil, page_token: nil)
|
1167
|
+
# @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1151
1168
|
# Pass arguments to `list_repositories` via keyword arguments. Note that at
|
1152
1169
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1153
1170
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1159,6 +1176,28 @@ module Google
|
|
1159
1176
|
# The maximum number of repositories to return. Maximum page size is 1,000.
|
1160
1177
|
# @param page_token [::String]
|
1161
1178
|
# The next_page_token value returned from a previous list request, if any.
|
1179
|
+
# @param filter [::String]
|
1180
|
+
# Optional. An expression for filtering the results of the request. Filter
|
1181
|
+
# rules are case insensitive. The fields eligible for filtering are:
|
1182
|
+
#
|
1183
|
+
# * `name`
|
1184
|
+
#
|
1185
|
+
# Examples of using a filter:
|
1186
|
+
#
|
1187
|
+
# To filter the results of your request to repositories with the name
|
1188
|
+
# `my-repo` in project `my-project` in the `us-central` region, append the
|
1189
|
+
# following filter expression to your request:
|
1190
|
+
#
|
1191
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo"`
|
1192
|
+
#
|
1193
|
+
# You can also use wildcards to match any number of characters before or
|
1194
|
+
# after the value:
|
1195
|
+
#
|
1196
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-*"`
|
1197
|
+
# * `name="projects/my-project/locations/us-central1/repositories/*repo"`
|
1198
|
+
# * `name="projects/my-project/locations/us-central1/repositories/*repo*"`
|
1199
|
+
# @param order_by [::String]
|
1200
|
+
# Optional. The field to order the results by.
|
1162
1201
|
#
|
1163
1202
|
# @yield [response, operation] Access the result along with the RPC operation
|
1164
1203
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>]
|
@@ -1224,7 +1263,7 @@ module Google
|
|
1224
1263
|
@artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation|
|
1225
1264
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options
|
1226
1265
|
yield response, operation if block_given?
|
1227
|
-
|
1266
|
+
throw :response, response
|
1228
1267
|
end
|
1229
1268
|
rescue ::GRPC::BadStatus => e
|
1230
1269
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1310,7 +1349,6 @@ module Google
|
|
1310
1349
|
|
1311
1350
|
@artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation|
|
1312
1351
|
yield response, operation if block_given?
|
1313
|
-
return response
|
1314
1352
|
end
|
1315
1353
|
rescue ::GRPC::BadStatus => e
|
1316
1354
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1410,7 +1448,7 @@ module Google
|
|
1410
1448
|
@artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation|
|
1411
1449
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1412
1450
|
yield response, operation if block_given?
|
1413
|
-
|
1451
|
+
throw :response, response
|
1414
1452
|
end
|
1415
1453
|
rescue ::GRPC::BadStatus => e
|
1416
1454
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1500,7 +1538,6 @@ module Google
|
|
1500
1538
|
|
1501
1539
|
@artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation|
|
1502
1540
|
yield response, operation if block_given?
|
1503
|
-
return response
|
1504
1541
|
end
|
1505
1542
|
rescue ::GRPC::BadStatus => e
|
1506
1543
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1596,7 +1633,7 @@ module Google
|
|
1596
1633
|
@artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation|
|
1597
1634
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1598
1635
|
yield response, operation if block_given?
|
1599
|
-
|
1636
|
+
throw :response, response
|
1600
1637
|
end
|
1601
1638
|
rescue ::GRPC::BadStatus => e
|
1602
1639
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1615,7 +1652,7 @@ module Google
|
|
1615
1652
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1616
1653
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1617
1654
|
#
|
1618
|
-
# @overload list_packages(parent: nil, page_size: nil, page_token: nil)
|
1655
|
+
# @overload list_packages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1619
1656
|
# Pass arguments to `list_packages` via keyword arguments. Note that at
|
1620
1657
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1621
1658
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1626,6 +1663,54 @@ module Google
|
|
1626
1663
|
# The maximum number of packages to return. Maximum page size is 1,000.
|
1627
1664
|
# @param page_token [::String]
|
1628
1665
|
# The next_page_token value returned from a previous list request, if any.
|
1666
|
+
# @param filter [::String]
|
1667
|
+
# Optional. An expression for filtering the results of the request. Filter
|
1668
|
+
# rules are case insensitive. The fields eligible for filtering are:
|
1669
|
+
#
|
1670
|
+
# * `name`
|
1671
|
+
# * `annotations`
|
1672
|
+
#
|
1673
|
+
# Examples of using a filter:
|
1674
|
+
#
|
1675
|
+
# To filter the results of your request to packages with the name
|
1676
|
+
# `my-package` in project `my-project` in the `us-central` region, in
|
1677
|
+
# repository `my-repo`, append the following filter expression to your
|
1678
|
+
# request:
|
1679
|
+
#
|
1680
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package"`
|
1681
|
+
#
|
1682
|
+
# You can also use wildcards to match any number of characters before or
|
1683
|
+
# after the value:
|
1684
|
+
#
|
1685
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*"`
|
1686
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*package"`
|
1687
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*"`
|
1688
|
+
#
|
1689
|
+
# To filter the results of your request to packages with the annotation
|
1690
|
+
# key-value pair [`external_link`: `external_link_value`], append the
|
1691
|
+
# following filter expression to your request":
|
1692
|
+
#
|
1693
|
+
# * `"annotations.external_link:external_link_value"`
|
1694
|
+
#
|
1695
|
+
# To filter the results just for a specific annotation key `external_link`,
|
1696
|
+
# append the following filter expression to your request:
|
1697
|
+
#
|
1698
|
+
# * `"annotations.external_link"`
|
1699
|
+
#
|
1700
|
+
# If the annotation key or value contains special characters, you can escape
|
1701
|
+
# them by surrounding the value with backticks. For example, to filter the
|
1702
|
+
# results of your request to packages with the annotation key-value pair
|
1703
|
+
# [`external.link`:`https://example.com/my-package`], append the following
|
1704
|
+
# filter expression to your request:
|
1705
|
+
#
|
1706
|
+
# * `` "annotations.`external.link`:`https://example.com/my-package`" ``
|
1707
|
+
#
|
1708
|
+
# You can also filter with annotations with a wildcard to
|
1709
|
+
# match any number of characters before or after the value:
|
1710
|
+
#
|
1711
|
+
# * `` "annotations.*_link:`*example.com*`" ``
|
1712
|
+
# @param order_by [::String]
|
1713
|
+
# Optional. The field to order the results by.
|
1629
1714
|
#
|
1630
1715
|
# @yield [response, operation] Access the result along with the RPC operation
|
1631
1716
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Package>]
|
@@ -1691,7 +1776,7 @@ module Google
|
|
1691
1776
|
@artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation|
|
1692
1777
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options
|
1693
1778
|
yield response, operation if block_given?
|
1694
|
-
|
1779
|
+
throw :response, response
|
1695
1780
|
end
|
1696
1781
|
rescue ::GRPC::BadStatus => e
|
1697
1782
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1777,7 +1862,6 @@ module Google
|
|
1777
1862
|
|
1778
1863
|
@artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation|
|
1779
1864
|
yield response, operation if block_given?
|
1780
|
-
return response
|
1781
1865
|
end
|
1782
1866
|
rescue ::GRPC::BadStatus => e
|
1783
1867
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1872,7 +1956,7 @@ module Google
|
|
1872
1956
|
@artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation|
|
1873
1957
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1874
1958
|
yield response, operation if block_given?
|
1875
|
-
|
1959
|
+
throw :response, response
|
1876
1960
|
end
|
1877
1961
|
rescue ::GRPC::BadStatus => e
|
1878
1962
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1891,7 +1975,7 @@ module Google
|
|
1891
1975
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1892
1976
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1893
1977
|
#
|
1894
|
-
# @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil)
|
1978
|
+
# @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil, filter: nil)
|
1895
1979
|
# Pass arguments to `list_versions` via keyword arguments. Note that at
|
1896
1980
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1897
1981
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1906,6 +1990,52 @@ module Google
|
|
1906
1990
|
# The view that should be returned in the response.
|
1907
1991
|
# @param order_by [::String]
|
1908
1992
|
# Optional. The field to order the results by.
|
1993
|
+
# @param filter [::String]
|
1994
|
+
# Optional. An expression for filtering the results of the request. Filter
|
1995
|
+
# rules are case insensitive. The fields eligible for filtering are:
|
1996
|
+
#
|
1997
|
+
# * `name`
|
1998
|
+
# * `annotations`
|
1999
|
+
#
|
2000
|
+
# Examples of using a filter:
|
2001
|
+
#
|
2002
|
+
# To filter the results of your request to versions with the name
|
2003
|
+
# `my-version` in project `my-project` in the `us-central` region, in
|
2004
|
+
# repository `my-repo`, append the following filter expression to your
|
2005
|
+
# request:
|
2006
|
+
#
|
2007
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version"`
|
2008
|
+
#
|
2009
|
+
# You can also use wildcards to match any number of characters before or
|
2010
|
+
# after the value:
|
2011
|
+
#
|
2012
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version"`
|
2013
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*"`
|
2014
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*"`
|
2015
|
+
#
|
2016
|
+
# To filter the results of your request to versions with the annotation
|
2017
|
+
# key-value pair [`external_link`: `external_link_value`], append the
|
2018
|
+
# following filter expression to your request:
|
2019
|
+
#
|
2020
|
+
# * `"annotations.external_link:external_link_value"`
|
2021
|
+
#
|
2022
|
+
# To filter just for a specific annotation key `external_link`, append the
|
2023
|
+
# following filter expression to your request:
|
2024
|
+
#
|
2025
|
+
# * `"annotations.external_link"`
|
2026
|
+
#
|
2027
|
+
# If the annotation key or value contains special characters, you can escape
|
2028
|
+
# them by surrounding the value with backticks. For example, to filter the
|
2029
|
+
# results of your request to versions with the annotation key-value pair
|
2030
|
+
# [`external.link`:`https://example.com/my-version`], append the following
|
2031
|
+
# filter expression to your request:
|
2032
|
+
#
|
2033
|
+
# * `` "annotations.`external.link`:`https://example.com/my-version`" ``
|
2034
|
+
#
|
2035
|
+
# You can also filter with annotations with a wildcard to
|
2036
|
+
# match any number of characters before or after the value:
|
2037
|
+
#
|
2038
|
+
# * `` "annotations.*_link:`*example.com*`" ``
|
1909
2039
|
#
|
1910
2040
|
# @yield [response, operation] Access the result along with the RPC operation
|
1911
2041
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Version>]
|
@@ -1971,7 +2101,7 @@ module Google
|
|
1971
2101
|
@artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation|
|
1972
2102
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options
|
1973
2103
|
yield response, operation if block_given?
|
1974
|
-
|
2104
|
+
throw :response, response
|
1975
2105
|
end
|
1976
2106
|
rescue ::GRPC::BadStatus => e
|
1977
2107
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2059,7 +2189,6 @@ module Google
|
|
2059
2189
|
|
2060
2190
|
@artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation|
|
2061
2191
|
yield response, operation if block_given?
|
2062
|
-
return response
|
2063
2192
|
end
|
2064
2193
|
rescue ::GRPC::BadStatus => e
|
2065
2194
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2157,7 +2286,7 @@ module Google
|
|
2157
2286
|
@artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation|
|
2158
2287
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2159
2288
|
yield response, operation if block_given?
|
2160
|
-
|
2289
|
+
throw :response, response
|
2161
2290
|
end
|
2162
2291
|
rescue ::GRPC::BadStatus => e
|
2163
2292
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2257,7 +2386,96 @@ module Google
|
|
2257
2386
|
@artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation|
|
2258
2387
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2259
2388
|
yield response, operation if block_given?
|
2260
|
-
|
2389
|
+
throw :response, response
|
2390
|
+
end
|
2391
|
+
rescue ::GRPC::BadStatus => e
|
2392
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2393
|
+
end
|
2394
|
+
|
2395
|
+
##
|
2396
|
+
# Updates a version.
|
2397
|
+
#
|
2398
|
+
# @overload update_version(request, options = nil)
|
2399
|
+
# Pass arguments to `update_version` via a request object, either of type
|
2400
|
+
# {::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest} or an equivalent Hash.
|
2401
|
+
#
|
2402
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest, ::Hash]
|
2403
|
+
# A request object representing the call parameters. Required. To specify no
|
2404
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2405
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2406
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2407
|
+
#
|
2408
|
+
# @overload update_version(version: nil, update_mask: nil)
|
2409
|
+
# Pass arguments to `update_version` via keyword arguments. Note that at
|
2410
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2411
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2412
|
+
#
|
2413
|
+
# @param version [::Google::Cloud::ArtifactRegistry::V1::Version, ::Hash]
|
2414
|
+
# Required. The Version that replaces the resource on the server.
|
2415
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2416
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
2417
|
+
# see
|
2418
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
2419
|
+
#
|
2420
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2421
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Version]
|
2422
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2423
|
+
#
|
2424
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Version]
|
2425
|
+
#
|
2426
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2427
|
+
#
|
2428
|
+
# @example Basic example
|
2429
|
+
# require "google/cloud/artifact_registry/v1"
|
2430
|
+
#
|
2431
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2432
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
2433
|
+
#
|
2434
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2435
|
+
# request = Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest.new
|
2436
|
+
#
|
2437
|
+
# # Call the update_version method.
|
2438
|
+
# result = client.update_version request
|
2439
|
+
#
|
2440
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Version.
|
2441
|
+
# p result
|
2442
|
+
#
|
2443
|
+
def update_version request, options = nil
|
2444
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2445
|
+
|
2446
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVersionRequest
|
2447
|
+
|
2448
|
+
# Converts hash and nil to an options object
|
2449
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2450
|
+
|
2451
|
+
# Customize the options with defaults
|
2452
|
+
metadata = @config.rpcs.update_version.metadata.to_h
|
2453
|
+
|
2454
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2455
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2456
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2457
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
2458
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2459
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2460
|
+
|
2461
|
+
header_params = {}
|
2462
|
+
if request.version&.name
|
2463
|
+
header_params["version.name"] = request.version.name
|
2464
|
+
end
|
2465
|
+
|
2466
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2467
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2468
|
+
|
2469
|
+
options.apply_defaults timeout: @config.rpcs.update_version.timeout,
|
2470
|
+
metadata: metadata,
|
2471
|
+
retry_policy: @config.rpcs.update_version.retry_policy
|
2472
|
+
|
2473
|
+
options.apply_defaults timeout: @config.timeout,
|
2474
|
+
metadata: @config.metadata,
|
2475
|
+
retry_policy: @config.retry_policy
|
2476
|
+
|
2477
|
+
@artifact_registry_stub.call_rpc :update_version, request, options: options do |response, operation|
|
2478
|
+
yield response, operation if block_given?
|
2261
2479
|
end
|
2262
2480
|
rescue ::GRPC::BadStatus => e
|
2263
2481
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2290,15 +2508,53 @@ module Google
|
|
2290
2508
|
#
|
2291
2509
|
# * `name`
|
2292
2510
|
# * `owner`
|
2511
|
+
# * `annotations`
|
2512
|
+
#
|
2513
|
+
# Examples of using a filter:
|
2514
|
+
#
|
2515
|
+
# To filter the results of your request to files with the name `my_file.txt`
|
2516
|
+
# in project `my-project` in the `us-central` region, in repository
|
2517
|
+
# `my-repo`, append the following filter expression to your request:
|
2518
|
+
#
|
2519
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt"`
|
2520
|
+
#
|
2521
|
+
# You can also use wildcards to match any number of characters before or
|
2522
|
+
# after the value:
|
2523
|
+
#
|
2524
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/my-*"`
|
2525
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt"`
|
2526
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/files/*file*"`
|
2527
|
+
#
|
2528
|
+
# To filter the results of your request to files owned by the version `1.0`
|
2529
|
+
# in package `pkg1`, append the following filter expression to your request:
|
2530
|
+
#
|
2531
|
+
# * `owner="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"`
|
2532
|
+
#
|
2533
|
+
# To filter the results of your request to files with the annotation
|
2534
|
+
# key-value pair [`external_link`: `external_link_value`], append the
|
2535
|
+
# following filter expression to your request:
|
2293
2536
|
#
|
2294
|
-
#
|
2537
|
+
# * `"annotations.external_link:external_link_value"`
|
2295
2538
|
#
|
2296
|
-
#
|
2297
|
-
#
|
2298
|
-
#
|
2299
|
-
#
|
2539
|
+
# To filter just for a specific annotation key `external_link`, append the
|
2540
|
+
# following filter expression to your request:
|
2541
|
+
#
|
2542
|
+
# * `"annotations.external_link"`
|
2543
|
+
#
|
2544
|
+
# If the annotation key or value contains special characters, you can escape
|
2545
|
+
# them by surrounding the value with backticks. For example, to filter the
|
2546
|
+
# results of your request to files with the annotation key-value pair
|
2547
|
+
# [`external.link`:`https://example.com/my-file`], append the following
|
2548
|
+
# filter expression to your request:
|
2549
|
+
#
|
2550
|
+
# * `` "annotations.`external.link`:`https://example.com/my-file`" ``
|
2551
|
+
#
|
2552
|
+
# You can also filter with annotations with a wildcard to
|
2553
|
+
# match any number of characters before or after the value:
|
2554
|
+
#
|
2555
|
+
# * `` "annotations.*_link:`*example.com*`" ``
|
2300
2556
|
# @param page_size [::Integer]
|
2301
|
-
# The maximum number of files to return.
|
2557
|
+
# The maximum number of files to return. Maximum page size is 1,000.
|
2302
2558
|
# @param page_token [::String]
|
2303
2559
|
# The next_page_token value returned from a previous list request, if any.
|
2304
2560
|
# @param order_by [::String]
|
@@ -2368,7 +2624,7 @@ module Google
|
|
2368
2624
|
@artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation|
|
2369
2625
|
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options
|
2370
2626
|
yield response, operation if block_given?
|
2371
|
-
|
2627
|
+
throw :response, response
|
2372
2628
|
end
|
2373
2629
|
rescue ::GRPC::BadStatus => e
|
2374
2630
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2454,54 +2710,39 @@ module Google
|
|
2454
2710
|
|
2455
2711
|
@artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation|
|
2456
2712
|
yield response, operation if block_given?
|
2457
|
-
return response
|
2458
2713
|
end
|
2459
2714
|
rescue ::GRPC::BadStatus => e
|
2460
2715
|
raise ::Google::Cloud::Error.from_error(e)
|
2461
2716
|
end
|
2462
2717
|
|
2463
2718
|
##
|
2464
|
-
#
|
2719
|
+
# Deletes a file and all of its content. It is only allowed on generic
|
2720
|
+
# repositories. The returned operation will complete once the file has been
|
2721
|
+
# deleted.
|
2465
2722
|
#
|
2466
|
-
# @overload
|
2467
|
-
# Pass arguments to `
|
2468
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
2723
|
+
# @overload delete_file(request, options = nil)
|
2724
|
+
# Pass arguments to `delete_file` via a request object, either of type
|
2725
|
+
# {::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest} or an equivalent Hash.
|
2469
2726
|
#
|
2470
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
2727
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest, ::Hash]
|
2471
2728
|
# A request object representing the call parameters. Required. To specify no
|
2472
2729
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2473
2730
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2474
2731
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2475
2732
|
#
|
2476
|
-
# @overload
|
2477
|
-
# Pass arguments to `
|
2733
|
+
# @overload delete_file(name: nil)
|
2734
|
+
# Pass arguments to `delete_file` via keyword arguments. Note that at
|
2478
2735
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2479
2736
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2480
2737
|
#
|
2481
|
-
# @param
|
2482
|
-
# The name of the
|
2483
|
-
# For example:
|
2484
|
-
# `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
|
2485
|
-
# @param filter [::String]
|
2486
|
-
# An expression for filtering the results of the request. Filter rules are
|
2487
|
-
# case insensitive. The fields eligible for filtering are:
|
2488
|
-
#
|
2489
|
-
# * `version`
|
2490
|
-
#
|
2491
|
-
# An example of using a filter:
|
2492
|
-
#
|
2493
|
-
# * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
|
2494
|
-
# --> Tags that are applied to the version `1.0` in package `pkg1`.
|
2495
|
-
# @param page_size [::Integer]
|
2496
|
-
# The maximum number of tags to return. Maximum page size is 10,000.
|
2497
|
-
# @param page_token [::String]
|
2498
|
-
# The next_page_token value returned from a previous list request, if any.
|
2738
|
+
# @param name [::String]
|
2739
|
+
# Required. The name of the file to delete.
|
2499
2740
|
#
|
2500
2741
|
# @yield [response, operation] Access the result along with the RPC operation
|
2501
|
-
# @yieldparam response [::Gapic::
|
2742
|
+
# @yieldparam response [::Gapic::Operation]
|
2502
2743
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2503
2744
|
#
|
2504
|
-
# @return [::Gapic::
|
2745
|
+
# @return [::Gapic::Operation]
|
2505
2746
|
#
|
2506
2747
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2507
2748
|
#
|
@@ -2512,28 +2753,31 @@ module Google
|
|
2512
2753
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
2513
2754
|
#
|
2514
2755
|
# # Create a request. To set request fields, pass in keyword arguments.
|
2515
|
-
# request = Google::Cloud::ArtifactRegistry::V1::
|
2756
|
+
# request = Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest.new
|
2516
2757
|
#
|
2517
|
-
# # Call the
|
2518
|
-
# result = client.
|
2758
|
+
# # Call the delete_file method.
|
2759
|
+
# result = client.delete_file request
|
2519
2760
|
#
|
2520
|
-
# # The returned object is of type Gapic::
|
2521
|
-
# #
|
2522
|
-
#
|
2523
|
-
#
|
2524
|
-
#
|
2761
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2762
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2763
|
+
# # Here is how to wait for a response.
|
2764
|
+
# result.wait_until_done! timeout: 60
|
2765
|
+
# if result.response?
|
2766
|
+
# p result.response
|
2767
|
+
# else
|
2768
|
+
# puts "No response received."
|
2525
2769
|
# end
|
2526
2770
|
#
|
2527
|
-
def
|
2771
|
+
def delete_file request, options = nil
|
2528
2772
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2529
2773
|
|
2530
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::
|
2774
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteFileRequest
|
2531
2775
|
|
2532
2776
|
# Converts hash and nil to an options object
|
2533
2777
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2534
2778
|
|
2535
2779
|
# Customize the options with defaults
|
2536
|
-
metadata = @config.rpcs.
|
2780
|
+
metadata = @config.rpcs.delete_file.metadata.to_h
|
2537
2781
|
|
2538
2782
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2539
2783
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -2543,56 +2787,60 @@ module Google
|
|
2543
2787
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2544
2788
|
|
2545
2789
|
header_params = {}
|
2546
|
-
if request.
|
2547
|
-
header_params["
|
2790
|
+
if request.name
|
2791
|
+
header_params["name"] = request.name
|
2548
2792
|
end
|
2549
2793
|
|
2550
2794
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2551
2795
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2552
2796
|
|
2553
|
-
options.apply_defaults timeout: @config.rpcs.
|
2797
|
+
options.apply_defaults timeout: @config.rpcs.delete_file.timeout,
|
2554
2798
|
metadata: metadata,
|
2555
|
-
retry_policy: @config.rpcs.
|
2799
|
+
retry_policy: @config.rpcs.delete_file.retry_policy
|
2556
2800
|
|
2557
2801
|
options.apply_defaults timeout: @config.timeout,
|
2558
2802
|
metadata: @config.metadata,
|
2559
2803
|
retry_policy: @config.retry_policy
|
2560
2804
|
|
2561
|
-
@artifact_registry_stub.call_rpc :
|
2562
|
-
response = ::Gapic::
|
2805
|
+
@artifact_registry_stub.call_rpc :delete_file, request, options: options do |response, operation|
|
2806
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2563
2807
|
yield response, operation if block_given?
|
2564
|
-
|
2808
|
+
throw :response, response
|
2565
2809
|
end
|
2566
2810
|
rescue ::GRPC::BadStatus => e
|
2567
2811
|
raise ::Google::Cloud::Error.from_error(e)
|
2568
2812
|
end
|
2569
2813
|
|
2570
2814
|
##
|
2571
|
-
#
|
2815
|
+
# Updates a file.
|
2572
2816
|
#
|
2573
|
-
# @overload
|
2574
|
-
# Pass arguments to `
|
2575
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
2817
|
+
# @overload update_file(request, options = nil)
|
2818
|
+
# Pass arguments to `update_file` via a request object, either of type
|
2819
|
+
# {::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest} or an equivalent Hash.
|
2576
2820
|
#
|
2577
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
2821
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest, ::Hash]
|
2578
2822
|
# A request object representing the call parameters. Required. To specify no
|
2579
2823
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2580
2824
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2581
2825
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2582
2826
|
#
|
2583
|
-
# @overload
|
2584
|
-
# Pass arguments to `
|
2827
|
+
# @overload update_file(file: nil, update_mask: nil)
|
2828
|
+
# Pass arguments to `update_file` via keyword arguments. Note that at
|
2585
2829
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2586
2830
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2587
2831
|
#
|
2588
|
-
# @param
|
2589
|
-
# The
|
2832
|
+
# @param file [::Google::Cloud::ArtifactRegistry::V1::File, ::Hash]
|
2833
|
+
# Required. The File that replaces the resource on the server.
|
2834
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2835
|
+
# Required. The update mask applies to the resource. For the `FieldMask`
|
2836
|
+
# definition, see
|
2837
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
2590
2838
|
#
|
2591
2839
|
# @yield [response, operation] Access the result along with the RPC operation
|
2592
|
-
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::
|
2840
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File]
|
2593
2841
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2594
2842
|
#
|
2595
|
-
# @return [::Google::Cloud::ArtifactRegistry::V1::
|
2843
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::File]
|
2596
2844
|
#
|
2597
2845
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2598
2846
|
#
|
@@ -2603,24 +2851,24 @@ module Google
|
|
2603
2851
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
2604
2852
|
#
|
2605
2853
|
# # Create a request. To set request fields, pass in keyword arguments.
|
2606
|
-
# request = Google::Cloud::ArtifactRegistry::V1::
|
2854
|
+
# request = Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest.new
|
2607
2855
|
#
|
2608
|
-
# # Call the
|
2609
|
-
# result = client.
|
2856
|
+
# # Call the update_file method.
|
2857
|
+
# result = client.update_file request
|
2610
2858
|
#
|
2611
|
-
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::
|
2859
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::File.
|
2612
2860
|
# p result
|
2613
2861
|
#
|
2614
|
-
def
|
2862
|
+
def update_file request, options = nil
|
2615
2863
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2616
2864
|
|
2617
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::
|
2865
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateFileRequest
|
2618
2866
|
|
2619
2867
|
# Converts hash and nil to an options object
|
2620
2868
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2621
2869
|
|
2622
2870
|
# Customize the options with defaults
|
2623
|
-
metadata = @config.rpcs.
|
2871
|
+
metadata = @config.rpcs.update_file.metadata.to_h
|
2624
2872
|
|
2625
2873
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2626
2874
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -2630,75 +2878,284 @@ module Google
|
|
2630
2878
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2631
2879
|
|
2632
2880
|
header_params = {}
|
2633
|
-
if request.name
|
2634
|
-
header_params["name"] = request.name
|
2881
|
+
if request.file&.name
|
2882
|
+
header_params["file.name"] = request.file.name
|
2635
2883
|
end
|
2636
2884
|
|
2637
2885
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2638
2886
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2639
2887
|
|
2640
|
-
options.apply_defaults timeout: @config.rpcs.
|
2888
|
+
options.apply_defaults timeout: @config.rpcs.update_file.timeout,
|
2641
2889
|
metadata: metadata,
|
2642
|
-
retry_policy: @config.rpcs.
|
2890
|
+
retry_policy: @config.rpcs.update_file.retry_policy
|
2643
2891
|
|
2644
2892
|
options.apply_defaults timeout: @config.timeout,
|
2645
2893
|
metadata: @config.metadata,
|
2646
2894
|
retry_policy: @config.retry_policy
|
2647
2895
|
|
2648
|
-
@artifact_registry_stub.call_rpc :
|
2896
|
+
@artifact_registry_stub.call_rpc :update_file, request, options: options do |response, operation|
|
2649
2897
|
yield response, operation if block_given?
|
2650
|
-
return response
|
2651
2898
|
end
|
2652
2899
|
rescue ::GRPC::BadStatus => e
|
2653
2900
|
raise ::Google::Cloud::Error.from_error(e)
|
2654
2901
|
end
|
2655
2902
|
|
2656
2903
|
##
|
2657
|
-
#
|
2904
|
+
# Lists tags.
|
2658
2905
|
#
|
2659
|
-
# @overload
|
2660
|
-
# Pass arguments to `
|
2661
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
2906
|
+
# @overload list_tags(request, options = nil)
|
2907
|
+
# Pass arguments to `list_tags` via a request object, either of type
|
2908
|
+
# {::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest} or an equivalent Hash.
|
2662
2909
|
#
|
2663
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
2910
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest, ::Hash]
|
2664
2911
|
# A request object representing the call parameters. Required. To specify no
|
2665
2912
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2666
2913
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2667
2914
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2668
2915
|
#
|
2669
|
-
# @overload
|
2670
|
-
# Pass arguments to `
|
2916
|
+
# @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
2917
|
+
# Pass arguments to `list_tags` via keyword arguments. Note that at
|
2671
2918
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2672
2919
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2673
2920
|
#
|
2674
2921
|
# @param parent [::String]
|
2675
|
-
# The name of the parent
|
2676
|
-
#
|
2677
|
-
#
|
2678
|
-
# @param
|
2679
|
-
#
|
2922
|
+
# The name of the parent package whose tags will be listed.
|
2923
|
+
# For example:
|
2924
|
+
# `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
|
2925
|
+
# @param filter [::String]
|
2926
|
+
# An expression for filtering the results of the request. Filter rules are
|
2927
|
+
# case insensitive. The fields eligible for filtering are:
|
2680
2928
|
#
|
2681
|
-
#
|
2682
|
-
#
|
2683
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2929
|
+
# * `name`
|
2930
|
+
# * `version`
|
2684
2931
|
#
|
2685
|
-
#
|
2932
|
+
# Examples of using a filter:
|
2686
2933
|
#
|
2687
|
-
#
|
2934
|
+
# To filter the results of your request to tags with the name `my-tag` in
|
2935
|
+
# package `my-package` in repository `my-repo` in project "`y-project` in
|
2936
|
+
# the us-central region, append the following filter expression to your
|
2937
|
+
# request:
|
2688
2938
|
#
|
2689
|
-
#
|
2690
|
-
# require "google/cloud/artifact_registry/v1"
|
2939
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag"`
|
2691
2940
|
#
|
2692
|
-
#
|
2693
|
-
#
|
2941
|
+
# You can also use wildcards to match any number of characters before or
|
2942
|
+
# after the value:
|
2694
2943
|
#
|
2695
|
-
#
|
2696
|
-
#
|
2944
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*"`
|
2945
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag"`
|
2946
|
+
# * `name="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*"`
|
2697
2947
|
#
|
2698
|
-
#
|
2699
|
-
#
|
2948
|
+
# To filter the results of your request to tags applied to the version
|
2949
|
+
# `1.0` in package `my-package`, append the following filter expression to
|
2950
|
+
# your request:
|
2700
2951
|
#
|
2701
|
-
#
|
2952
|
+
# * `version="projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0"`
|
2953
|
+
# @param page_size [::Integer]
|
2954
|
+
# The maximum number of tags to return. Maximum page size is 1,000.
|
2955
|
+
# @param page_token [::String]
|
2956
|
+
# The next_page_token value returned from a previous list request, if any.
|
2957
|
+
#
|
2958
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2959
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
|
2960
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2961
|
+
#
|
2962
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Tag>]
|
2963
|
+
#
|
2964
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2965
|
+
#
|
2966
|
+
# @example Basic example
|
2967
|
+
# require "google/cloud/artifact_registry/v1"
|
2968
|
+
#
|
2969
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2970
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
2971
|
+
#
|
2972
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2973
|
+
# request = Google::Cloud::ArtifactRegistry::V1::ListTagsRequest.new
|
2974
|
+
#
|
2975
|
+
# # Call the list_tags method.
|
2976
|
+
# result = client.list_tags request
|
2977
|
+
#
|
2978
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2979
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2980
|
+
# result.each do |item|
|
2981
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag.
|
2982
|
+
# p item
|
2983
|
+
# end
|
2984
|
+
#
|
2985
|
+
def list_tags request, options = nil
|
2986
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2987
|
+
|
2988
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListTagsRequest
|
2989
|
+
|
2990
|
+
# Converts hash and nil to an options object
|
2991
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2992
|
+
|
2993
|
+
# Customize the options with defaults
|
2994
|
+
metadata = @config.rpcs.list_tags.metadata.to_h
|
2995
|
+
|
2996
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2997
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2998
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2999
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3000
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3001
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3002
|
+
|
3003
|
+
header_params = {}
|
3004
|
+
if request.parent
|
3005
|
+
header_params["parent"] = request.parent
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3009
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3010
|
+
|
3011
|
+
options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
|
3012
|
+
metadata: metadata,
|
3013
|
+
retry_policy: @config.rpcs.list_tags.retry_policy
|
3014
|
+
|
3015
|
+
options.apply_defaults timeout: @config.timeout,
|
3016
|
+
metadata: @config.metadata,
|
3017
|
+
retry_policy: @config.retry_policy
|
3018
|
+
|
3019
|
+
@artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation|
|
3020
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options
|
3021
|
+
yield response, operation if block_given?
|
3022
|
+
throw :response, response
|
3023
|
+
end
|
3024
|
+
rescue ::GRPC::BadStatus => e
|
3025
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3026
|
+
end
|
3027
|
+
|
3028
|
+
##
|
3029
|
+
# Gets a tag.
|
3030
|
+
#
|
3031
|
+
# @overload get_tag(request, options = nil)
|
3032
|
+
# Pass arguments to `get_tag` via a request object, either of type
|
3033
|
+
# {::Google::Cloud::ArtifactRegistry::V1::GetTagRequest} or an equivalent Hash.
|
3034
|
+
#
|
3035
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::GetTagRequest, ::Hash]
|
3036
|
+
# A request object representing the call parameters. Required. To specify no
|
3037
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3038
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3039
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3040
|
+
#
|
3041
|
+
# @overload get_tag(name: nil)
|
3042
|
+
# Pass arguments to `get_tag` via keyword arguments. Note that at
|
3043
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3044
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3045
|
+
#
|
3046
|
+
# @param name [::String]
|
3047
|
+
# The name of the tag to retrieve.
|
3048
|
+
#
|
3049
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3050
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag]
|
3051
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3052
|
+
#
|
3053
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
|
3054
|
+
#
|
3055
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3056
|
+
#
|
3057
|
+
# @example Basic example
|
3058
|
+
# require "google/cloud/artifact_registry/v1"
|
3059
|
+
#
|
3060
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3061
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3062
|
+
#
|
3063
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3064
|
+
# request = Google::Cloud::ArtifactRegistry::V1::GetTagRequest.new
|
3065
|
+
#
|
3066
|
+
# # Call the get_tag method.
|
3067
|
+
# result = client.get_tag request
|
3068
|
+
#
|
3069
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
|
3070
|
+
# p result
|
3071
|
+
#
|
3072
|
+
def get_tag request, options = nil
|
3073
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3074
|
+
|
3075
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetTagRequest
|
3076
|
+
|
3077
|
+
# Converts hash and nil to an options object
|
3078
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3079
|
+
|
3080
|
+
# Customize the options with defaults
|
3081
|
+
metadata = @config.rpcs.get_tag.metadata.to_h
|
3082
|
+
|
3083
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3084
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3085
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3086
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3087
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3088
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3089
|
+
|
3090
|
+
header_params = {}
|
3091
|
+
if request.name
|
3092
|
+
header_params["name"] = request.name
|
3093
|
+
end
|
3094
|
+
|
3095
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3096
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3097
|
+
|
3098
|
+
options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
|
3099
|
+
metadata: metadata,
|
3100
|
+
retry_policy: @config.rpcs.get_tag.retry_policy
|
3101
|
+
|
3102
|
+
options.apply_defaults timeout: @config.timeout,
|
3103
|
+
metadata: @config.metadata,
|
3104
|
+
retry_policy: @config.retry_policy
|
3105
|
+
|
3106
|
+
@artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation|
|
3107
|
+
yield response, operation if block_given?
|
3108
|
+
end
|
3109
|
+
rescue ::GRPC::BadStatus => e
|
3110
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3111
|
+
end
|
3112
|
+
|
3113
|
+
##
|
3114
|
+
# Creates a tag.
|
3115
|
+
#
|
3116
|
+
# @overload create_tag(request, options = nil)
|
3117
|
+
# Pass arguments to `create_tag` via a request object, either of type
|
3118
|
+
# {::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest} or an equivalent Hash.
|
3119
|
+
#
|
3120
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::CreateTagRequest, ::Hash]
|
3121
|
+
# A request object representing the call parameters. Required. To specify no
|
3122
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3123
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3124
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3125
|
+
#
|
3126
|
+
# @overload create_tag(parent: nil, tag_id: nil, tag: nil)
|
3127
|
+
# Pass arguments to `create_tag` via keyword arguments. Note that at
|
3128
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3129
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3130
|
+
#
|
3131
|
+
# @param parent [::String]
|
3132
|
+
# The name of the parent resource where the tag will be created.
|
3133
|
+
# @param tag_id [::String]
|
3134
|
+
# The tag id to use for this repository.
|
3135
|
+
# @param tag [::Google::Cloud::ArtifactRegistry::V1::Tag, ::Hash]
|
3136
|
+
# The tag to be created.
|
3137
|
+
#
|
3138
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3139
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Tag]
|
3140
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3141
|
+
#
|
3142
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Tag]
|
3143
|
+
#
|
3144
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3145
|
+
#
|
3146
|
+
# @example Basic example
|
3147
|
+
# require "google/cloud/artifact_registry/v1"
|
3148
|
+
#
|
3149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3150
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3151
|
+
#
|
3152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3153
|
+
# request = Google::Cloud::ArtifactRegistry::V1::CreateTagRequest.new
|
3154
|
+
#
|
3155
|
+
# # Call the create_tag method.
|
3156
|
+
# result = client.create_tag request
|
3157
|
+
#
|
3158
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Tag.
|
2702
3159
|
# p result
|
2703
3160
|
#
|
2704
3161
|
def create_tag request, options = nil
|
@@ -2737,7 +3194,6 @@ module Google
|
|
2737
3194
|
|
2738
3195
|
@artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation|
|
2739
3196
|
yield response, operation if block_given?
|
2740
|
-
return response
|
2741
3197
|
end
|
2742
3198
|
rescue ::GRPC::BadStatus => e
|
2743
3199
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2827,7 +3283,6 @@ module Google
|
|
2827
3283
|
|
2828
3284
|
@artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation|
|
2829
3285
|
yield response, operation if block_given?
|
2830
|
-
return response
|
2831
3286
|
end
|
2832
3287
|
rescue ::GRPC::BadStatus => e
|
2833
3288
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2913,50 +3368,41 @@ module Google
|
|
2913
3368
|
|
2914
3369
|
@artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation|
|
2915
3370
|
yield response, operation if block_given?
|
2916
|
-
return response
|
2917
3371
|
end
|
2918
3372
|
rescue ::GRPC::BadStatus => e
|
2919
3373
|
raise ::Google::Cloud::Error.from_error(e)
|
2920
3374
|
end
|
2921
3375
|
|
2922
3376
|
##
|
2923
|
-
#
|
3377
|
+
# Creates a rule.
|
2924
3378
|
#
|
2925
|
-
# @overload
|
2926
|
-
# Pass arguments to `
|
2927
|
-
# {::Google::
|
3379
|
+
# @overload create_rule(request, options = nil)
|
3380
|
+
# Pass arguments to `create_rule` via a request object, either of type
|
3381
|
+
# {::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest} or an equivalent Hash.
|
2928
3382
|
#
|
2929
|
-
# @param request [::Google::
|
3383
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest, ::Hash]
|
2930
3384
|
# A request object representing the call parameters. Required. To specify no
|
2931
3385
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2932
3386
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2933
3387
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2934
3388
|
#
|
2935
|
-
# @overload
|
2936
|
-
# Pass arguments to `
|
3389
|
+
# @overload create_rule(parent: nil, rule_id: nil, rule: nil)
|
3390
|
+
# Pass arguments to `create_rule` via keyword arguments. Note that at
|
2937
3391
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2938
3392
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2939
3393
|
#
|
2940
|
-
# @param
|
2941
|
-
#
|
2942
|
-
#
|
2943
|
-
#
|
2944
|
-
#
|
2945
|
-
#
|
2946
|
-
# valid policy but certain Cloud Platform services (such as Projects)
|
2947
|
-
# might reject them.
|
2948
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2949
|
-
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
2950
|
-
# the fields in the mask will be modified. If no mask is provided, the
|
2951
|
-
# following default mask is used:
|
2952
|
-
#
|
2953
|
-
# `paths: "bindings, etag"`
|
3394
|
+
# @param parent [::String]
|
3395
|
+
# Required. The name of the parent resource where the rule will be created.
|
3396
|
+
# @param rule_id [::String]
|
3397
|
+
# The rule id to use for this repository.
|
3398
|
+
# @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash]
|
3399
|
+
# The rule to be created.
|
2954
3400
|
#
|
2955
3401
|
# @yield [response, operation] Access the result along with the RPC operation
|
2956
|
-
# @yieldparam response [::Google::
|
3402
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule]
|
2957
3403
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2958
3404
|
#
|
2959
|
-
# @return [::Google::
|
3405
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
|
2960
3406
|
#
|
2961
3407
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2962
3408
|
#
|
@@ -2967,24 +3413,24 @@ module Google
|
|
2967
3413
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
2968
3414
|
#
|
2969
3415
|
# # Create a request. To set request fields, pass in keyword arguments.
|
2970
|
-
# request = Google::
|
3416
|
+
# request = Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest.new
|
2971
3417
|
#
|
2972
|
-
# # Call the
|
2973
|
-
# result = client.
|
3418
|
+
# # Call the create_rule method.
|
3419
|
+
# result = client.create_rule request
|
2974
3420
|
#
|
2975
|
-
# # The returned object is of type Google::
|
3421
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
|
2976
3422
|
# p result
|
2977
3423
|
#
|
2978
|
-
def
|
3424
|
+
def create_rule request, options = nil
|
2979
3425
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2980
3426
|
|
2981
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::
|
3427
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateRuleRequest
|
2982
3428
|
|
2983
3429
|
# Converts hash and nil to an options object
|
2984
3430
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2985
3431
|
|
2986
3432
|
# Customize the options with defaults
|
2987
|
-
metadata = @config.rpcs.
|
3433
|
+
metadata = @config.rpcs.create_rule.metadata.to_h
|
2988
3434
|
|
2989
3435
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2990
3436
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -2994,59 +3440,946 @@ module Google
|
|
2994
3440
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2995
3441
|
|
2996
3442
|
header_params = {}
|
2997
|
-
if request.
|
2998
|
-
header_params["
|
3443
|
+
if request.parent
|
3444
|
+
header_params["parent"] = request.parent
|
2999
3445
|
end
|
3000
3446
|
|
3001
3447
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3002
3448
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3003
3449
|
|
3004
|
-
options.apply_defaults timeout: @config.rpcs.
|
3450
|
+
options.apply_defaults timeout: @config.rpcs.create_rule.timeout,
|
3005
3451
|
metadata: metadata,
|
3006
|
-
retry_policy: @config.rpcs.
|
3452
|
+
retry_policy: @config.rpcs.create_rule.retry_policy
|
3007
3453
|
|
3008
3454
|
options.apply_defaults timeout: @config.timeout,
|
3009
3455
|
metadata: @config.metadata,
|
3010
3456
|
retry_policy: @config.retry_policy
|
3011
3457
|
|
3012
|
-
@artifact_registry_stub.call_rpc :
|
3458
|
+
@artifact_registry_stub.call_rpc :create_rule, request, options: options do |response, operation|
|
3013
3459
|
yield response, operation if block_given?
|
3014
|
-
return response
|
3015
3460
|
end
|
3016
3461
|
rescue ::GRPC::BadStatus => e
|
3017
3462
|
raise ::Google::Cloud::Error.from_error(e)
|
3018
3463
|
end
|
3019
3464
|
|
3020
3465
|
##
|
3021
|
-
#
|
3466
|
+
# Lists rules.
|
3022
3467
|
#
|
3023
|
-
# @overload
|
3024
|
-
# Pass arguments to `
|
3025
|
-
# {::Google::
|
3468
|
+
# @overload list_rules(request, options = nil)
|
3469
|
+
# Pass arguments to `list_rules` via a request object, either of type
|
3470
|
+
# {::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest} or an equivalent Hash.
|
3026
3471
|
#
|
3027
|
-
# @param request [::Google::
|
3472
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest, ::Hash]
|
3028
3473
|
# A request object representing the call parameters. Required. To specify no
|
3029
3474
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3030
3475
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3031
3476
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3032
3477
|
#
|
3033
|
-
# @overload
|
3034
|
-
# Pass arguments to `
|
3478
|
+
# @overload list_rules(parent: nil, page_size: nil, page_token: nil)
|
3479
|
+
# Pass arguments to `list_rules` via keyword arguments. Note that at
|
3035
3480
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3036
3481
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3037
3482
|
#
|
3038
|
-
# @param
|
3039
|
-
#
|
3040
|
-
#
|
3041
|
-
#
|
3042
|
-
#
|
3043
|
-
#
|
3483
|
+
# @param parent [::String]
|
3484
|
+
# Required. The name of the parent repository whose rules will be listed.
|
3485
|
+
# For example:
|
3486
|
+
# `projects/p1/locations/us-central1/repositories/repo1`.
|
3487
|
+
# @param page_size [::Integer]
|
3488
|
+
# The maximum number of rules to return. Maximum page size is 1,000.
|
3489
|
+
# @param page_token [::String]
|
3490
|
+
# The next_page_token value returned from a previous list request, if any.
|
3491
|
+
#
|
3492
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3493
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>]
|
3494
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3495
|
+
#
|
3496
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Rule>]
|
3497
|
+
#
|
3498
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3499
|
+
#
|
3500
|
+
# @example Basic example
|
3501
|
+
# require "google/cloud/artifact_registry/v1"
|
3502
|
+
#
|
3503
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3504
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3505
|
+
#
|
3506
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3507
|
+
# request = Google::Cloud::ArtifactRegistry::V1::ListRulesRequest.new
|
3508
|
+
#
|
3509
|
+
# # Call the list_rules method.
|
3510
|
+
# result = client.list_rules request
|
3511
|
+
#
|
3512
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3513
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3514
|
+
# result.each do |item|
|
3515
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Rule.
|
3516
|
+
# p item
|
3517
|
+
# end
|
3518
|
+
#
|
3519
|
+
def list_rules request, options = nil
|
3520
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3521
|
+
|
3522
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListRulesRequest
|
3523
|
+
|
3524
|
+
# Converts hash and nil to an options object
|
3525
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3526
|
+
|
3527
|
+
# Customize the options with defaults
|
3528
|
+
metadata = @config.rpcs.list_rules.metadata.to_h
|
3529
|
+
|
3530
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3531
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3532
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3533
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3534
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3535
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3536
|
+
|
3537
|
+
header_params = {}
|
3538
|
+
if request.parent
|
3539
|
+
header_params["parent"] = request.parent
|
3540
|
+
end
|
3541
|
+
|
3542
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3543
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3544
|
+
|
3545
|
+
options.apply_defaults timeout: @config.rpcs.list_rules.timeout,
|
3546
|
+
metadata: metadata,
|
3547
|
+
retry_policy: @config.rpcs.list_rules.retry_policy
|
3548
|
+
|
3549
|
+
options.apply_defaults timeout: @config.timeout,
|
3550
|
+
metadata: @config.metadata,
|
3551
|
+
retry_policy: @config.retry_policy
|
3552
|
+
|
3553
|
+
@artifact_registry_stub.call_rpc :list_rules, request, options: options do |response, operation|
|
3554
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_rules, request, response, operation, options
|
3555
|
+
yield response, operation if block_given?
|
3556
|
+
throw :response, response
|
3557
|
+
end
|
3558
|
+
rescue ::GRPC::BadStatus => e
|
3559
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3560
|
+
end
|
3561
|
+
|
3562
|
+
##
|
3563
|
+
# Gets a rule.
|
3564
|
+
#
|
3565
|
+
# @overload get_rule(request, options = nil)
|
3566
|
+
# Pass arguments to `get_rule` via a request object, either of type
|
3567
|
+
# {::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest} or an equivalent Hash.
|
3568
|
+
#
|
3569
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest, ::Hash]
|
3570
|
+
# A request object representing the call parameters. Required. To specify no
|
3571
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3572
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3573
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3574
|
+
#
|
3575
|
+
# @overload get_rule(name: nil)
|
3576
|
+
# Pass arguments to `get_rule` via keyword arguments. Note that at
|
3577
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3578
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3579
|
+
#
|
3580
|
+
# @param name [::String]
|
3581
|
+
# Required. The name of the rule to retrieve.
|
3582
|
+
#
|
3583
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3584
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule]
|
3585
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3586
|
+
#
|
3587
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
|
3588
|
+
#
|
3589
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3590
|
+
#
|
3591
|
+
# @example Basic example
|
3592
|
+
# require "google/cloud/artifact_registry/v1"
|
3593
|
+
#
|
3594
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3595
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3596
|
+
#
|
3597
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3598
|
+
# request = Google::Cloud::ArtifactRegistry::V1::GetRuleRequest.new
|
3599
|
+
#
|
3600
|
+
# # Call the get_rule method.
|
3601
|
+
# result = client.get_rule request
|
3602
|
+
#
|
3603
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
|
3604
|
+
# p result
|
3605
|
+
#
|
3606
|
+
def get_rule request, options = nil
|
3607
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3608
|
+
|
3609
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetRuleRequest
|
3610
|
+
|
3611
|
+
# Converts hash and nil to an options object
|
3612
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3613
|
+
|
3614
|
+
# Customize the options with defaults
|
3615
|
+
metadata = @config.rpcs.get_rule.metadata.to_h
|
3616
|
+
|
3617
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3618
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3619
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3620
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3621
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3622
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3623
|
+
|
3624
|
+
header_params = {}
|
3625
|
+
if request.name
|
3626
|
+
header_params["name"] = request.name
|
3627
|
+
end
|
3628
|
+
|
3629
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3630
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3631
|
+
|
3632
|
+
options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
|
3633
|
+
metadata: metadata,
|
3634
|
+
retry_policy: @config.rpcs.get_rule.retry_policy
|
3635
|
+
|
3636
|
+
options.apply_defaults timeout: @config.timeout,
|
3637
|
+
metadata: @config.metadata,
|
3638
|
+
retry_policy: @config.retry_policy
|
3639
|
+
|
3640
|
+
@artifact_registry_stub.call_rpc :get_rule, request, options: options do |response, operation|
|
3641
|
+
yield response, operation if block_given?
|
3642
|
+
end
|
3643
|
+
rescue ::GRPC::BadStatus => e
|
3644
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3645
|
+
end
|
3646
|
+
|
3647
|
+
##
|
3648
|
+
# Updates a rule.
|
3649
|
+
#
|
3650
|
+
# @overload update_rule(request, options = nil)
|
3651
|
+
# Pass arguments to `update_rule` via a request object, either of type
|
3652
|
+
# {::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest} or an equivalent Hash.
|
3653
|
+
#
|
3654
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest, ::Hash]
|
3655
|
+
# A request object representing the call parameters. Required. To specify no
|
3656
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3657
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3658
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3659
|
+
#
|
3660
|
+
# @overload update_rule(rule: nil, update_mask: nil)
|
3661
|
+
# Pass arguments to `update_rule` via keyword arguments. Note that at
|
3662
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3663
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3664
|
+
#
|
3665
|
+
# @param rule [::Google::Cloud::ArtifactRegistry::V1::Rule, ::Hash]
|
3666
|
+
# The rule that replaces the resource on the server.
|
3667
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3668
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
3669
|
+
# see
|
3670
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
3671
|
+
#
|
3672
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3673
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Rule]
|
3674
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3675
|
+
#
|
3676
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Rule]
|
3677
|
+
#
|
3678
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3679
|
+
#
|
3680
|
+
# @example Basic example
|
3681
|
+
# require "google/cloud/artifact_registry/v1"
|
3682
|
+
#
|
3683
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3684
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3685
|
+
#
|
3686
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3687
|
+
# request = Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest.new
|
3688
|
+
#
|
3689
|
+
# # Call the update_rule method.
|
3690
|
+
# result = client.update_rule request
|
3691
|
+
#
|
3692
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Rule.
|
3693
|
+
# p result
|
3694
|
+
#
|
3695
|
+
def update_rule request, options = nil
|
3696
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3697
|
+
|
3698
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateRuleRequest
|
3699
|
+
|
3700
|
+
# Converts hash and nil to an options object
|
3701
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3702
|
+
|
3703
|
+
# Customize the options with defaults
|
3704
|
+
metadata = @config.rpcs.update_rule.metadata.to_h
|
3705
|
+
|
3706
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3707
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3708
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3709
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3710
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3711
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3712
|
+
|
3713
|
+
header_params = {}
|
3714
|
+
if request.rule&.name
|
3715
|
+
header_params["rule.name"] = request.rule.name
|
3716
|
+
end
|
3717
|
+
|
3718
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3719
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3720
|
+
|
3721
|
+
options.apply_defaults timeout: @config.rpcs.update_rule.timeout,
|
3722
|
+
metadata: metadata,
|
3723
|
+
retry_policy: @config.rpcs.update_rule.retry_policy
|
3724
|
+
|
3725
|
+
options.apply_defaults timeout: @config.timeout,
|
3726
|
+
metadata: @config.metadata,
|
3727
|
+
retry_policy: @config.retry_policy
|
3728
|
+
|
3729
|
+
@artifact_registry_stub.call_rpc :update_rule, request, options: options do |response, operation|
|
3730
|
+
yield response, operation if block_given?
|
3731
|
+
end
|
3732
|
+
rescue ::GRPC::BadStatus => e
|
3733
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3734
|
+
end
|
3735
|
+
|
3736
|
+
##
|
3737
|
+
# Deletes a rule.
|
3738
|
+
#
|
3739
|
+
# @overload delete_rule(request, options = nil)
|
3740
|
+
# Pass arguments to `delete_rule` via a request object, either of type
|
3741
|
+
# {::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest} or an equivalent Hash.
|
3742
|
+
#
|
3743
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest, ::Hash]
|
3744
|
+
# A request object representing the call parameters. Required. To specify no
|
3745
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3746
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3747
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3748
|
+
#
|
3749
|
+
# @overload delete_rule(name: nil)
|
3750
|
+
# Pass arguments to `delete_rule` via keyword arguments. Note that at
|
3751
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3752
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3753
|
+
#
|
3754
|
+
# @param name [::String]
|
3755
|
+
# Required. The name of the rule to delete.
|
3756
|
+
#
|
3757
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3758
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3759
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3760
|
+
#
|
3761
|
+
# @return [::Google::Protobuf::Empty]
|
3762
|
+
#
|
3763
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3764
|
+
#
|
3765
|
+
# @example Basic example
|
3766
|
+
# require "google/cloud/artifact_registry/v1"
|
3767
|
+
#
|
3768
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3769
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3770
|
+
#
|
3771
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3772
|
+
# request = Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest.new
|
3773
|
+
#
|
3774
|
+
# # Call the delete_rule method.
|
3775
|
+
# result = client.delete_rule request
|
3776
|
+
#
|
3777
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3778
|
+
# p result
|
3779
|
+
#
|
3780
|
+
def delete_rule request, options = nil
|
3781
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3782
|
+
|
3783
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteRuleRequest
|
3784
|
+
|
3785
|
+
# Converts hash and nil to an options object
|
3786
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3787
|
+
|
3788
|
+
# Customize the options with defaults
|
3789
|
+
metadata = @config.rpcs.delete_rule.metadata.to_h
|
3790
|
+
|
3791
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3792
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3793
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3794
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3795
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3796
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3797
|
+
|
3798
|
+
header_params = {}
|
3799
|
+
if request.name
|
3800
|
+
header_params["name"] = request.name
|
3801
|
+
end
|
3802
|
+
|
3803
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3804
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3805
|
+
|
3806
|
+
options.apply_defaults timeout: @config.rpcs.delete_rule.timeout,
|
3807
|
+
metadata: metadata,
|
3808
|
+
retry_policy: @config.rpcs.delete_rule.retry_policy
|
3809
|
+
|
3810
|
+
options.apply_defaults timeout: @config.timeout,
|
3811
|
+
metadata: @config.metadata,
|
3812
|
+
retry_policy: @config.retry_policy
|
3813
|
+
|
3814
|
+
@artifact_registry_stub.call_rpc :delete_rule, request, options: options do |response, operation|
|
3815
|
+
yield response, operation if block_given?
|
3816
|
+
end
|
3817
|
+
rescue ::GRPC::BadStatus => e
|
3818
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3819
|
+
end
|
3820
|
+
|
3821
|
+
##
|
3822
|
+
# Updates the IAM policy for a given resource.
|
3823
|
+
#
|
3824
|
+
# @overload set_iam_policy(request, options = nil)
|
3825
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
3826
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
3827
|
+
#
|
3828
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
3829
|
+
# A request object representing the call parameters. Required. To specify no
|
3830
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3831
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3832
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3833
|
+
#
|
3834
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
3835
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
3836
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3837
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3838
|
+
#
|
3839
|
+
# @param resource [::String]
|
3840
|
+
# REQUIRED: The resource for which the policy is being specified.
|
3841
|
+
# See the operation documentation for the appropriate value for this field.
|
3842
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
3843
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
3844
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
3845
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
3846
|
+
# might reject them.
|
3847
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3848
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
3849
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
3850
|
+
# following default mask is used:
|
3851
|
+
#
|
3852
|
+
# `paths: "bindings, etag"`
|
3853
|
+
#
|
3854
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3855
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
3856
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3857
|
+
#
|
3858
|
+
# @return [::Google::Iam::V1::Policy]
|
3859
|
+
#
|
3860
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3861
|
+
#
|
3862
|
+
# @example Basic example
|
3863
|
+
# require "google/cloud/artifact_registry/v1"
|
3864
|
+
#
|
3865
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3866
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3867
|
+
#
|
3868
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3869
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
3870
|
+
#
|
3871
|
+
# # Call the set_iam_policy method.
|
3872
|
+
# result = client.set_iam_policy request
|
3873
|
+
#
|
3874
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
3875
|
+
# p result
|
3876
|
+
#
|
3877
|
+
def set_iam_policy request, options = nil
|
3878
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3879
|
+
|
3880
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
3881
|
+
|
3882
|
+
# Converts hash and nil to an options object
|
3883
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3884
|
+
|
3885
|
+
# Customize the options with defaults
|
3886
|
+
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
3887
|
+
|
3888
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3889
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3890
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3891
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3892
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3893
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3894
|
+
|
3895
|
+
header_params = {}
|
3896
|
+
if request.resource
|
3897
|
+
header_params["resource"] = request.resource
|
3898
|
+
end
|
3899
|
+
|
3900
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3901
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3902
|
+
|
3903
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
3904
|
+
metadata: metadata,
|
3905
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
3906
|
+
|
3907
|
+
options.apply_defaults timeout: @config.timeout,
|
3908
|
+
metadata: @config.metadata,
|
3909
|
+
retry_policy: @config.retry_policy
|
3910
|
+
|
3911
|
+
@artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
3912
|
+
yield response, operation if block_given?
|
3913
|
+
end
|
3914
|
+
rescue ::GRPC::BadStatus => e
|
3915
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3916
|
+
end
|
3917
|
+
|
3918
|
+
##
|
3919
|
+
# Gets the IAM policy for a given resource.
|
3920
|
+
#
|
3921
|
+
# @overload get_iam_policy(request, options = nil)
|
3922
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
3923
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
3924
|
+
#
|
3925
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
3926
|
+
# A request object representing the call parameters. Required. To specify no
|
3927
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3928
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3929
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3930
|
+
#
|
3931
|
+
# @overload get_iam_policy(resource: nil, options: nil)
|
3932
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
3933
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3934
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3935
|
+
#
|
3936
|
+
# @param resource [::String]
|
3937
|
+
# REQUIRED: The resource for which the policy is being requested.
|
3938
|
+
# See the operation documentation for the appropriate value for this field.
|
3939
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
3940
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
3941
|
+
# `GetIamPolicy`.
|
3942
|
+
#
|
3943
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3944
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
3945
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3946
|
+
#
|
3947
|
+
# @return [::Google::Iam::V1::Policy]
|
3948
|
+
#
|
3949
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3950
|
+
#
|
3951
|
+
# @example Basic example
|
3952
|
+
# require "google/cloud/artifact_registry/v1"
|
3953
|
+
#
|
3954
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3955
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3956
|
+
#
|
3957
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3958
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
3959
|
+
#
|
3960
|
+
# # Call the get_iam_policy method.
|
3961
|
+
# result = client.get_iam_policy request
|
3962
|
+
#
|
3963
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
3964
|
+
# p result
|
3965
|
+
#
|
3966
|
+
def get_iam_policy request, options = nil
|
3967
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3968
|
+
|
3969
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
3970
|
+
|
3971
|
+
# Converts hash and nil to an options object
|
3972
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3973
|
+
|
3974
|
+
# Customize the options with defaults
|
3975
|
+
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
3976
|
+
|
3977
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3978
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3979
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3980
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
3981
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3982
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3983
|
+
|
3984
|
+
header_params = {}
|
3985
|
+
if request.resource
|
3986
|
+
header_params["resource"] = request.resource
|
3987
|
+
end
|
3988
|
+
|
3989
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3990
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3991
|
+
|
3992
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
3993
|
+
metadata: metadata,
|
3994
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
3995
|
+
|
3996
|
+
options.apply_defaults timeout: @config.timeout,
|
3997
|
+
metadata: @config.metadata,
|
3998
|
+
retry_policy: @config.retry_policy
|
3999
|
+
|
4000
|
+
@artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
4001
|
+
yield response, operation if block_given?
|
4002
|
+
end
|
4003
|
+
rescue ::GRPC::BadStatus => e
|
4004
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4005
|
+
end
|
4006
|
+
|
4007
|
+
##
|
4008
|
+
# Tests if the caller has a list of permissions on a resource.
|
4009
|
+
#
|
4010
|
+
# @overload test_iam_permissions(request, options = nil)
|
4011
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
4012
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
4013
|
+
#
|
4014
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
4015
|
+
# A request object representing the call parameters. Required. To specify no
|
4016
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4017
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4018
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4019
|
+
#
|
4020
|
+
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
4021
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
4022
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4023
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4024
|
+
#
|
4025
|
+
# @param resource [::String]
|
4026
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
4027
|
+
# See the operation documentation for the appropriate value for this field.
|
4028
|
+
# @param permissions [::Array<::String>]
|
4029
|
+
# The set of permissions to check for the `resource`. Permissions with
|
4030
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
4031
|
+
# information see
|
4032
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
4033
|
+
#
|
4034
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4035
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
4036
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4037
|
+
#
|
4038
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
4039
|
+
#
|
4040
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4041
|
+
#
|
4042
|
+
# @example Basic example
|
4043
|
+
# require "google/cloud/artifact_registry/v1"
|
4044
|
+
#
|
4045
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4046
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
4047
|
+
#
|
4048
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4049
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
4050
|
+
#
|
4051
|
+
# # Call the test_iam_permissions method.
|
4052
|
+
# result = client.test_iam_permissions request
|
4053
|
+
#
|
4054
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
4055
|
+
# p result
|
4056
|
+
#
|
4057
|
+
def test_iam_permissions request, options = nil
|
4058
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4059
|
+
|
4060
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
4061
|
+
|
4062
|
+
# Converts hash and nil to an options object
|
4063
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4064
|
+
|
4065
|
+
# Customize the options with defaults
|
4066
|
+
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
4067
|
+
|
4068
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4069
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4070
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4071
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
4072
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4073
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4074
|
+
|
4075
|
+
header_params = {}
|
4076
|
+
if request.resource
|
4077
|
+
header_params["resource"] = request.resource
|
4078
|
+
end
|
4079
|
+
|
4080
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4081
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4082
|
+
|
4083
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
4084
|
+
metadata: metadata,
|
4085
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
4086
|
+
|
4087
|
+
options.apply_defaults timeout: @config.timeout,
|
4088
|
+
metadata: @config.metadata,
|
4089
|
+
retry_policy: @config.retry_policy
|
4090
|
+
|
4091
|
+
@artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
4092
|
+
yield response, operation if block_given?
|
4093
|
+
end
|
4094
|
+
rescue ::GRPC::BadStatus => e
|
4095
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4096
|
+
end
|
4097
|
+
|
4098
|
+
##
|
4099
|
+
# Retrieves the Settings for the Project.
|
4100
|
+
#
|
4101
|
+
# @overload get_project_settings(request, options = nil)
|
4102
|
+
# Pass arguments to `get_project_settings` via a request object, either of type
|
4103
|
+
# {::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest} or an equivalent Hash.
|
4104
|
+
#
|
4105
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest, ::Hash]
|
4106
|
+
# A request object representing the call parameters. Required. To specify no
|
4107
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4108
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4109
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4110
|
+
#
|
4111
|
+
# @overload get_project_settings(name: nil)
|
4112
|
+
# Pass arguments to `get_project_settings` via keyword arguments. Note that at
|
4113
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4114
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4115
|
+
#
|
4116
|
+
# @param name [::String]
|
4117
|
+
# Required. The name of the projectSettings resource.
|
4118
|
+
#
|
4119
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4120
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
|
4121
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4122
|
+
#
|
4123
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
|
4124
|
+
#
|
4125
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4126
|
+
#
|
4127
|
+
# @example Basic example
|
4128
|
+
# require "google/cloud/artifact_registry/v1"
|
4129
|
+
#
|
4130
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4131
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
4132
|
+
#
|
4133
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4134
|
+
# request = Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest.new
|
4135
|
+
#
|
4136
|
+
# # Call the get_project_settings method.
|
4137
|
+
# result = client.get_project_settings request
|
4138
|
+
#
|
4139
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
|
4140
|
+
# p result
|
4141
|
+
#
|
4142
|
+
def get_project_settings request, options = nil
|
4143
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4144
|
+
|
4145
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetProjectSettingsRequest
|
4146
|
+
|
4147
|
+
# Converts hash and nil to an options object
|
4148
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4149
|
+
|
4150
|
+
# Customize the options with defaults
|
4151
|
+
metadata = @config.rpcs.get_project_settings.metadata.to_h
|
4152
|
+
|
4153
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4154
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4155
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4156
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
4157
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4158
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4159
|
+
|
4160
|
+
header_params = {}
|
4161
|
+
if request.name
|
4162
|
+
header_params["name"] = request.name
|
4163
|
+
end
|
4164
|
+
|
4165
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4166
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4167
|
+
|
4168
|
+
options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
|
4169
|
+
metadata: metadata,
|
4170
|
+
retry_policy: @config.rpcs.get_project_settings.retry_policy
|
4171
|
+
|
4172
|
+
options.apply_defaults timeout: @config.timeout,
|
4173
|
+
metadata: @config.metadata,
|
4174
|
+
retry_policy: @config.retry_policy
|
4175
|
+
|
4176
|
+
@artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation|
|
4177
|
+
yield response, operation if block_given?
|
4178
|
+
end
|
4179
|
+
rescue ::GRPC::BadStatus => e
|
4180
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4181
|
+
end
|
4182
|
+
|
4183
|
+
##
|
4184
|
+
# Updates the Settings for the Project.
|
4185
|
+
#
|
4186
|
+
# @overload update_project_settings(request, options = nil)
|
4187
|
+
# Pass arguments to `update_project_settings` via a request object, either of type
|
4188
|
+
# {::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest} or an equivalent Hash.
|
4189
|
+
#
|
4190
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest, ::Hash]
|
4191
|
+
# A request object representing the call parameters. Required. To specify no
|
4192
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4193
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4194
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4195
|
+
#
|
4196
|
+
# @overload update_project_settings(project_settings: nil, update_mask: nil)
|
4197
|
+
# Pass arguments to `update_project_settings` via keyword arguments. Note that at
|
4198
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4199
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4200
|
+
#
|
4201
|
+
# @param project_settings [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings, ::Hash]
|
4202
|
+
# The project settings.
|
4203
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4204
|
+
# Field mask to support partial updates.
|
4205
|
+
#
|
4206
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4207
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
|
4208
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4209
|
+
#
|
4210
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::ProjectSettings]
|
4211
|
+
#
|
4212
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4213
|
+
#
|
4214
|
+
# @example Basic example
|
4215
|
+
# require "google/cloud/artifact_registry/v1"
|
4216
|
+
#
|
4217
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4218
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
4219
|
+
#
|
4220
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4221
|
+
# request = Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest.new
|
4222
|
+
#
|
4223
|
+
# # Call the update_project_settings method.
|
4224
|
+
# result = client.update_project_settings request
|
4225
|
+
#
|
4226
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::ProjectSettings.
|
4227
|
+
# p result
|
4228
|
+
#
|
4229
|
+
def update_project_settings request, options = nil
|
4230
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4231
|
+
|
4232
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateProjectSettingsRequest
|
4233
|
+
|
4234
|
+
# Converts hash and nil to an options object
|
4235
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4236
|
+
|
4237
|
+
# Customize the options with defaults
|
4238
|
+
metadata = @config.rpcs.update_project_settings.metadata.to_h
|
4239
|
+
|
4240
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4241
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4242
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4243
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
4244
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4245
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4246
|
+
|
4247
|
+
header_params = {}
|
4248
|
+
if request.project_settings&.name
|
4249
|
+
header_params["project_settings.name"] = request.project_settings.name
|
4250
|
+
end
|
4251
|
+
|
4252
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4253
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4254
|
+
|
4255
|
+
options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
|
4256
|
+
metadata: metadata,
|
4257
|
+
retry_policy: @config.rpcs.update_project_settings.retry_policy
|
4258
|
+
|
4259
|
+
options.apply_defaults timeout: @config.timeout,
|
4260
|
+
metadata: @config.metadata,
|
4261
|
+
retry_policy: @config.retry_policy
|
4262
|
+
|
4263
|
+
@artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation|
|
4264
|
+
yield response, operation if block_given?
|
4265
|
+
end
|
4266
|
+
rescue ::GRPC::BadStatus => e
|
4267
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4268
|
+
end
|
4269
|
+
|
4270
|
+
##
|
4271
|
+
# Retrieves the VPCSC Config for the Project.
|
4272
|
+
#
|
4273
|
+
# @overload get_vpcsc_config(request, options = nil)
|
4274
|
+
# Pass arguments to `get_vpcsc_config` via a request object, either of type
|
4275
|
+
# {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
|
4276
|
+
#
|
4277
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
|
4278
|
+
# A request object representing the call parameters. Required. To specify no
|
4279
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4280
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4281
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4282
|
+
#
|
4283
|
+
# @overload get_vpcsc_config(name: nil)
|
4284
|
+
# Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
|
4285
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4286
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4287
|
+
#
|
4288
|
+
# @param name [::String]
|
4289
|
+
# Required. The name of the VPCSCConfig resource.
|
4290
|
+
#
|
4291
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4292
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
|
4293
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4294
|
+
#
|
4295
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
|
4296
|
+
#
|
4297
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4298
|
+
#
|
4299
|
+
# @example Basic example
|
4300
|
+
# require "google/cloud/artifact_registry/v1"
|
4301
|
+
#
|
4302
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4303
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
4304
|
+
#
|
4305
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4306
|
+
# request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
|
4307
|
+
#
|
4308
|
+
# # Call the get_vpcsc_config method.
|
4309
|
+
# result = client.get_vpcsc_config request
|
4310
|
+
#
|
4311
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
|
4312
|
+
# p result
|
4313
|
+
#
|
4314
|
+
def get_vpcsc_config request, options = nil
|
4315
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4316
|
+
|
4317
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
|
4318
|
+
|
4319
|
+
# Converts hash and nil to an options object
|
4320
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4321
|
+
|
4322
|
+
# Customize the options with defaults
|
4323
|
+
metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
|
4324
|
+
|
4325
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4326
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4327
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4328
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
4329
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4330
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4331
|
+
|
4332
|
+
header_params = {}
|
4333
|
+
if request.name
|
4334
|
+
header_params["name"] = request.name
|
4335
|
+
end
|
4336
|
+
|
4337
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4338
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4339
|
+
|
4340
|
+
options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
|
4341
|
+
metadata: metadata,
|
4342
|
+
retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
|
4343
|
+
|
4344
|
+
options.apply_defaults timeout: @config.timeout,
|
4345
|
+
metadata: @config.metadata,
|
4346
|
+
retry_policy: @config.retry_policy
|
4347
|
+
|
4348
|
+
@artifact_registry_stub.call_rpc :get_vpcsc_config, request, options: options do |response, operation|
|
4349
|
+
yield response, operation if block_given?
|
4350
|
+
end
|
4351
|
+
rescue ::GRPC::BadStatus => e
|
4352
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4353
|
+
end
|
4354
|
+
|
4355
|
+
##
|
4356
|
+
# Updates the VPCSC Config for the Project.
|
4357
|
+
#
|
4358
|
+
# @overload update_vpcsc_config(request, options = nil)
|
4359
|
+
# Pass arguments to `update_vpcsc_config` via a request object, either of type
|
4360
|
+
# {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
|
4361
|
+
#
|
4362
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
|
4363
|
+
# A request object representing the call parameters. Required. To specify no
|
4364
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4365
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4366
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4367
|
+
#
|
4368
|
+
# @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
|
4369
|
+
# Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
|
4370
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4371
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4372
|
+
#
|
4373
|
+
# @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
|
4374
|
+
# The project config.
|
4375
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4376
|
+
# Field mask to support partial updates.
|
3044
4377
|
#
|
3045
4378
|
# @yield [response, operation] Access the result along with the RPC operation
|
3046
|
-
# @yieldparam response [::Google::
|
4379
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
|
3047
4380
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3048
4381
|
#
|
3049
|
-
# @return [::Google::
|
4382
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
|
3050
4383
|
#
|
3051
4384
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3052
4385
|
#
|
@@ -3057,24 +4390,24 @@ module Google
|
|
3057
4390
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3058
4391
|
#
|
3059
4392
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3060
|
-
# request = Google::
|
4393
|
+
# request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
|
3061
4394
|
#
|
3062
|
-
# # Call the
|
3063
|
-
# result = client.
|
4395
|
+
# # Call the update_vpcsc_config method.
|
4396
|
+
# result = client.update_vpcsc_config request
|
3064
4397
|
#
|
3065
|
-
# # The returned object is of type Google::
|
4398
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
|
3066
4399
|
# p result
|
3067
4400
|
#
|
3068
|
-
def
|
4401
|
+
def update_vpcsc_config request, options = nil
|
3069
4402
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3070
4403
|
|
3071
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::
|
4404
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
|
3072
4405
|
|
3073
4406
|
# Converts hash and nil to an options object
|
3074
4407
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3075
4408
|
|
3076
4409
|
# Customize the options with defaults
|
3077
|
-
metadata = @config.rpcs.
|
4410
|
+
metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
|
3078
4411
|
|
3079
4412
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3080
4413
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3084,61 +4417,58 @@ module Google
|
|
3084
4417
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3085
4418
|
|
3086
4419
|
header_params = {}
|
3087
|
-
if request.
|
3088
|
-
header_params["
|
4420
|
+
if request.vpcsc_config&.name
|
4421
|
+
header_params["vpcsc_config.name"] = request.vpcsc_config.name
|
3089
4422
|
end
|
3090
4423
|
|
3091
4424
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3092
4425
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3093
4426
|
|
3094
|
-
options.apply_defaults timeout: @config.rpcs.
|
4427
|
+
options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
|
3095
4428
|
metadata: metadata,
|
3096
|
-
retry_policy: @config.rpcs.
|
4429
|
+
retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
|
3097
4430
|
|
3098
4431
|
options.apply_defaults timeout: @config.timeout,
|
3099
4432
|
metadata: @config.metadata,
|
3100
4433
|
retry_policy: @config.retry_policy
|
3101
4434
|
|
3102
|
-
@artifact_registry_stub.call_rpc :
|
4435
|
+
@artifact_registry_stub.call_rpc :update_vpcsc_config, request, options: options do |response, operation|
|
3103
4436
|
yield response, operation if block_given?
|
3104
|
-
return response
|
3105
4437
|
end
|
3106
4438
|
rescue ::GRPC::BadStatus => e
|
3107
4439
|
raise ::Google::Cloud::Error.from_error(e)
|
3108
4440
|
end
|
3109
4441
|
|
3110
4442
|
##
|
3111
|
-
#
|
4443
|
+
# Updates a package.
|
3112
4444
|
#
|
3113
|
-
# @overload
|
3114
|
-
# Pass arguments to `
|
3115
|
-
# {::Google::
|
4445
|
+
# @overload update_package(request, options = nil)
|
4446
|
+
# Pass arguments to `update_package` via a request object, either of type
|
4447
|
+
# {::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest} or an equivalent Hash.
|
3116
4448
|
#
|
3117
|
-
# @param request [::Google::
|
4449
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest, ::Hash]
|
3118
4450
|
# A request object representing the call parameters. Required. To specify no
|
3119
4451
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3120
4452
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3121
4453
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3122
4454
|
#
|
3123
|
-
# @overload
|
3124
|
-
# Pass arguments to `
|
4455
|
+
# @overload update_package(package: nil, update_mask: nil)
|
4456
|
+
# Pass arguments to `update_package` via keyword arguments. Note that at
|
3125
4457
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3126
4458
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3127
4459
|
#
|
3128
|
-
# @param
|
3129
|
-
#
|
3130
|
-
#
|
3131
|
-
#
|
3132
|
-
#
|
3133
|
-
#
|
3134
|
-
# information see
|
3135
|
-
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
4460
|
+
# @param package [::Google::Cloud::ArtifactRegistry::V1::Package, ::Hash]
|
4461
|
+
# The package that replaces the resource on the server.
|
4462
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4463
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
4464
|
+
# see
|
4465
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
3136
4466
|
#
|
3137
4467
|
# @yield [response, operation] Access the result along with the RPC operation
|
3138
|
-
# @yieldparam response [::Google::
|
4468
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Package]
|
3139
4469
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3140
4470
|
#
|
3141
|
-
# @return [::Google::
|
4471
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Package]
|
3142
4472
|
#
|
3143
4473
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3144
4474
|
#
|
@@ -3149,24 +4479,24 @@ module Google
|
|
3149
4479
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3150
4480
|
#
|
3151
4481
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3152
|
-
# request = Google::
|
4482
|
+
# request = Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest.new
|
3153
4483
|
#
|
3154
|
-
# # Call the
|
3155
|
-
# result = client.
|
4484
|
+
# # Call the update_package method.
|
4485
|
+
# result = client.update_package request
|
3156
4486
|
#
|
3157
|
-
# # The returned object is of type Google::
|
4487
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Package.
|
3158
4488
|
# p result
|
3159
4489
|
#
|
3160
|
-
def
|
4490
|
+
def update_package request, options = nil
|
3161
4491
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3162
4492
|
|
3163
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::
|
4493
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdatePackageRequest
|
3164
4494
|
|
3165
4495
|
# Converts hash and nil to an options object
|
3166
4496
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3167
4497
|
|
3168
4498
|
# Customize the options with defaults
|
3169
|
-
metadata = @config.rpcs.
|
4499
|
+
metadata = @config.rpcs.update_package.metadata.to_h
|
3170
4500
|
|
3171
4501
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3172
4502
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3176,55 +4506,65 @@ module Google
|
|
3176
4506
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3177
4507
|
|
3178
4508
|
header_params = {}
|
3179
|
-
if request.
|
3180
|
-
header_params["
|
4509
|
+
if request.package&.name
|
4510
|
+
header_params["package.name"] = request.package.name
|
3181
4511
|
end
|
3182
4512
|
|
3183
4513
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3184
4514
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3185
4515
|
|
3186
|
-
options.apply_defaults timeout: @config.rpcs.
|
4516
|
+
options.apply_defaults timeout: @config.rpcs.update_package.timeout,
|
3187
4517
|
metadata: metadata,
|
3188
|
-
retry_policy: @config.rpcs.
|
4518
|
+
retry_policy: @config.rpcs.update_package.retry_policy
|
3189
4519
|
|
3190
4520
|
options.apply_defaults timeout: @config.timeout,
|
3191
4521
|
metadata: @config.metadata,
|
3192
4522
|
retry_policy: @config.retry_policy
|
3193
4523
|
|
3194
|
-
@artifact_registry_stub.call_rpc :
|
4524
|
+
@artifact_registry_stub.call_rpc :update_package, request, options: options do |response, operation|
|
3195
4525
|
yield response, operation if block_given?
|
3196
|
-
return response
|
3197
4526
|
end
|
3198
4527
|
rescue ::GRPC::BadStatus => e
|
3199
4528
|
raise ::Google::Cloud::Error.from_error(e)
|
3200
4529
|
end
|
3201
4530
|
|
3202
4531
|
##
|
3203
|
-
#
|
4532
|
+
# Lists attachments.
|
3204
4533
|
#
|
3205
|
-
# @overload
|
3206
|
-
# Pass arguments to `
|
3207
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
4534
|
+
# @overload list_attachments(request, options = nil)
|
4535
|
+
# Pass arguments to `list_attachments` via a request object, either of type
|
4536
|
+
# {::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest} or an equivalent Hash.
|
3208
4537
|
#
|
3209
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
4538
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest, ::Hash]
|
3210
4539
|
# A request object representing the call parameters. Required. To specify no
|
3211
4540
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3212
4541
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3213
4542
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3214
4543
|
#
|
3215
|
-
# @overload
|
3216
|
-
# Pass arguments to `
|
4544
|
+
# @overload list_attachments(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
4545
|
+
# Pass arguments to `list_attachments` via keyword arguments. Note that at
|
3217
4546
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3218
4547
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3219
4548
|
#
|
3220
|
-
# @param
|
3221
|
-
# Required. The name of the
|
4549
|
+
# @param parent [::String]
|
4550
|
+
# Required. The name of the parent resource whose attachments will be listed.
|
4551
|
+
# @param filter [::String]
|
4552
|
+
# Optional. An expression for filtering the results of the request. Filter
|
4553
|
+
# rules are case insensitive. The fields eligible for filtering are:
|
4554
|
+
#
|
4555
|
+
# * `target`
|
4556
|
+
# * `type`
|
4557
|
+
# * `attachment_namespace`
|
4558
|
+
# @param page_size [::Integer]
|
4559
|
+
# The maximum number of attachments to return. Maximum page size is 1,000.
|
4560
|
+
# @param page_token [::String]
|
4561
|
+
# The next_page_token value returned from a previous list request, if any.
|
3222
4562
|
#
|
3223
4563
|
# @yield [response, operation] Access the result along with the RPC operation
|
3224
|
-
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::
|
4564
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>]
|
3225
4565
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3226
4566
|
#
|
3227
|
-
# @return [::Google::Cloud::ArtifactRegistry::V1::
|
4567
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Attachment>]
|
3228
4568
|
#
|
3229
4569
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3230
4570
|
#
|
@@ -3235,24 +4575,28 @@ module Google
|
|
3235
4575
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3236
4576
|
#
|
3237
4577
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3238
|
-
# request = Google::Cloud::ArtifactRegistry::V1::
|
4578
|
+
# request = Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest.new
|
3239
4579
|
#
|
3240
|
-
# # Call the
|
3241
|
-
# result = client.
|
4580
|
+
# # Call the list_attachments method.
|
4581
|
+
# result = client.list_attachments request
|
3242
4582
|
#
|
3243
|
-
# # The returned object is of type
|
3244
|
-
#
|
4583
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4584
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4585
|
+
# result.each do |item|
|
4586
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Attachment.
|
4587
|
+
# p item
|
4588
|
+
# end
|
3245
4589
|
#
|
3246
|
-
def
|
4590
|
+
def list_attachments request, options = nil
|
3247
4591
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3248
4592
|
|
3249
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::
|
4593
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListAttachmentsRequest
|
3250
4594
|
|
3251
4595
|
# Converts hash and nil to an options object
|
3252
4596
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3253
4597
|
|
3254
4598
|
# Customize the options with defaults
|
3255
|
-
metadata = @config.rpcs.
|
4599
|
+
metadata = @config.rpcs.list_attachments.metadata.to_h
|
3256
4600
|
|
3257
4601
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3258
4602
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3262,57 +4606,56 @@ module Google
|
|
3262
4606
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3263
4607
|
|
3264
4608
|
header_params = {}
|
3265
|
-
if request.
|
3266
|
-
header_params["
|
4609
|
+
if request.parent
|
4610
|
+
header_params["parent"] = request.parent
|
3267
4611
|
end
|
3268
4612
|
|
3269
4613
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3270
4614
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3271
4615
|
|
3272
|
-
options.apply_defaults timeout: @config.rpcs.
|
4616
|
+
options.apply_defaults timeout: @config.rpcs.list_attachments.timeout,
|
3273
4617
|
metadata: metadata,
|
3274
|
-
retry_policy: @config.rpcs.
|
4618
|
+
retry_policy: @config.rpcs.list_attachments.retry_policy
|
3275
4619
|
|
3276
4620
|
options.apply_defaults timeout: @config.timeout,
|
3277
4621
|
metadata: @config.metadata,
|
3278
4622
|
retry_policy: @config.retry_policy
|
3279
4623
|
|
3280
|
-
@artifact_registry_stub.call_rpc :
|
4624
|
+
@artifact_registry_stub.call_rpc :list_attachments, request, options: options do |response, operation|
|
4625
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_attachments, request, response, operation, options
|
3281
4626
|
yield response, operation if block_given?
|
3282
|
-
|
4627
|
+
throw :response, response
|
3283
4628
|
end
|
3284
4629
|
rescue ::GRPC::BadStatus => e
|
3285
4630
|
raise ::Google::Cloud::Error.from_error(e)
|
3286
4631
|
end
|
3287
4632
|
|
3288
4633
|
##
|
3289
|
-
#
|
4634
|
+
# Gets an attachment.
|
3290
4635
|
#
|
3291
|
-
# @overload
|
3292
|
-
# Pass arguments to `
|
3293
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
4636
|
+
# @overload get_attachment(request, options = nil)
|
4637
|
+
# Pass arguments to `get_attachment` via a request object, either of type
|
4638
|
+
# {::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest} or an equivalent Hash.
|
3294
4639
|
#
|
3295
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
4640
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest, ::Hash]
|
3296
4641
|
# A request object representing the call parameters. Required. To specify no
|
3297
4642
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3298
4643
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3299
4644
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3300
4645
|
#
|
3301
|
-
# @overload
|
3302
|
-
# Pass arguments to `
|
4646
|
+
# @overload get_attachment(name: nil)
|
4647
|
+
# Pass arguments to `get_attachment` via keyword arguments. Note that at
|
3303
4648
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3304
4649
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3305
4650
|
#
|
3306
|
-
# @param
|
3307
|
-
# The
|
3308
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3309
|
-
# Field mask to support partial updates.
|
4651
|
+
# @param name [::String]
|
4652
|
+
# Required. The name of the attachment to retrieve.
|
3310
4653
|
#
|
3311
4654
|
# @yield [response, operation] Access the result along with the RPC operation
|
3312
|
-
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::
|
4655
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::Attachment]
|
3313
4656
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3314
4657
|
#
|
3315
|
-
# @return [::Google::Cloud::ArtifactRegistry::V1::
|
4658
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1::Attachment]
|
3316
4659
|
#
|
3317
4660
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3318
4661
|
#
|
@@ -3323,24 +4666,24 @@ module Google
|
|
3323
4666
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3324
4667
|
#
|
3325
4668
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3326
|
-
# request = Google::Cloud::ArtifactRegistry::V1::
|
4669
|
+
# request = Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest.new
|
3327
4670
|
#
|
3328
|
-
# # Call the
|
3329
|
-
# result = client.
|
4671
|
+
# # Call the get_attachment method.
|
4672
|
+
# result = client.get_attachment request
|
3330
4673
|
#
|
3331
|
-
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::
|
4674
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Attachment.
|
3332
4675
|
# p result
|
3333
4676
|
#
|
3334
|
-
def
|
4677
|
+
def get_attachment request, options = nil
|
3335
4678
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3336
4679
|
|
3337
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::
|
4680
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetAttachmentRequest
|
3338
4681
|
|
3339
4682
|
# Converts hash and nil to an options object
|
3340
4683
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3341
4684
|
|
3342
4685
|
# Customize the options with defaults
|
3343
|
-
metadata = @config.rpcs.
|
4686
|
+
metadata = @config.rpcs.get_attachment.metadata.to_h
|
3344
4687
|
|
3345
4688
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3346
4689
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3350,55 +4693,60 @@ module Google
|
|
3350
4693
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3351
4694
|
|
3352
4695
|
header_params = {}
|
3353
|
-
if request.
|
3354
|
-
header_params["
|
4696
|
+
if request.name
|
4697
|
+
header_params["name"] = request.name
|
3355
4698
|
end
|
3356
4699
|
|
3357
4700
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3358
4701
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3359
4702
|
|
3360
|
-
options.apply_defaults timeout: @config.rpcs.
|
4703
|
+
options.apply_defaults timeout: @config.rpcs.get_attachment.timeout,
|
3361
4704
|
metadata: metadata,
|
3362
|
-
retry_policy: @config.rpcs.
|
4705
|
+
retry_policy: @config.rpcs.get_attachment.retry_policy
|
3363
4706
|
|
3364
4707
|
options.apply_defaults timeout: @config.timeout,
|
3365
4708
|
metadata: @config.metadata,
|
3366
4709
|
retry_policy: @config.retry_policy
|
3367
4710
|
|
3368
|
-
@artifact_registry_stub.call_rpc :
|
4711
|
+
@artifact_registry_stub.call_rpc :get_attachment, request, options: options do |response, operation|
|
3369
4712
|
yield response, operation if block_given?
|
3370
|
-
return response
|
3371
4713
|
end
|
3372
4714
|
rescue ::GRPC::BadStatus => e
|
3373
4715
|
raise ::Google::Cloud::Error.from_error(e)
|
3374
4716
|
end
|
3375
4717
|
|
3376
4718
|
##
|
3377
|
-
#
|
4719
|
+
# Creates an attachment. The returned Operation will finish once the
|
4720
|
+
# attachment has been created. Its response will be the created attachment.
|
3378
4721
|
#
|
3379
|
-
# @overload
|
3380
|
-
# Pass arguments to `
|
3381
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
4722
|
+
# @overload create_attachment(request, options = nil)
|
4723
|
+
# Pass arguments to `create_attachment` via a request object, either of type
|
4724
|
+
# {::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest} or an equivalent Hash.
|
3382
4725
|
#
|
3383
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
4726
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest, ::Hash]
|
3384
4727
|
# A request object representing the call parameters. Required. To specify no
|
3385
4728
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3386
4729
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3387
4730
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3388
4731
|
#
|
3389
|
-
# @overload
|
3390
|
-
# Pass arguments to `
|
4732
|
+
# @overload create_attachment(parent: nil, attachment_id: nil, attachment: nil)
|
4733
|
+
# Pass arguments to `create_attachment` via keyword arguments. Note that at
|
3391
4734
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3392
4735
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3393
4736
|
#
|
3394
|
-
# @param
|
3395
|
-
# Required. The name of the
|
4737
|
+
# @param parent [::String]
|
4738
|
+
# Required. The name of the parent resource where the attachment will be
|
4739
|
+
# created.
|
4740
|
+
# @param attachment_id [::String]
|
4741
|
+
# Required. The attachment id to use for this attachment.
|
4742
|
+
# @param attachment [::Google::Cloud::ArtifactRegistry::V1::Attachment, ::Hash]
|
4743
|
+
# Required. The attachment to be created.
|
3396
4744
|
#
|
3397
4745
|
# @yield [response, operation] Access the result along with the RPC operation
|
3398
|
-
# @yieldparam response [::
|
4746
|
+
# @yieldparam response [::Gapic::Operation]
|
3399
4747
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3400
4748
|
#
|
3401
|
-
# @return [::
|
4749
|
+
# @return [::Gapic::Operation]
|
3402
4750
|
#
|
3403
4751
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3404
4752
|
#
|
@@ -3409,24 +4757,31 @@ module Google
|
|
3409
4757
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3410
4758
|
#
|
3411
4759
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3412
|
-
# request = Google::Cloud::ArtifactRegistry::V1::
|
4760
|
+
# request = Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest.new
|
3413
4761
|
#
|
3414
|
-
# # Call the
|
3415
|
-
# result = client.
|
4762
|
+
# # Call the create_attachment method.
|
4763
|
+
# result = client.create_attachment request
|
3416
4764
|
#
|
3417
|
-
# # The returned object is of type
|
3418
|
-
#
|
4765
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4766
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4767
|
+
# # Here is how to wait for a response.
|
4768
|
+
# result.wait_until_done! timeout: 60
|
4769
|
+
# if result.response?
|
4770
|
+
# p result.response
|
4771
|
+
# else
|
4772
|
+
# puts "No response received."
|
4773
|
+
# end
|
3419
4774
|
#
|
3420
|
-
def
|
4775
|
+
def create_attachment request, options = nil
|
3421
4776
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3422
4777
|
|
3423
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::
|
4778
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::CreateAttachmentRequest
|
3424
4779
|
|
3425
4780
|
# Converts hash and nil to an options object
|
3426
4781
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3427
4782
|
|
3428
4783
|
# Customize the options with defaults
|
3429
|
-
metadata = @config.rpcs.
|
4784
|
+
metadata = @config.rpcs.create_attachment.metadata.to_h
|
3430
4785
|
|
3431
4786
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3432
4787
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3436,57 +4791,58 @@ module Google
|
|
3436
4791
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3437
4792
|
|
3438
4793
|
header_params = {}
|
3439
|
-
if request.
|
3440
|
-
header_params["
|
4794
|
+
if request.parent
|
4795
|
+
header_params["parent"] = request.parent
|
3441
4796
|
end
|
3442
4797
|
|
3443
4798
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3444
4799
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3445
4800
|
|
3446
|
-
options.apply_defaults timeout: @config.rpcs.
|
4801
|
+
options.apply_defaults timeout: @config.rpcs.create_attachment.timeout,
|
3447
4802
|
metadata: metadata,
|
3448
|
-
retry_policy: @config.rpcs.
|
4803
|
+
retry_policy: @config.rpcs.create_attachment.retry_policy
|
3449
4804
|
|
3450
4805
|
options.apply_defaults timeout: @config.timeout,
|
3451
4806
|
metadata: @config.metadata,
|
3452
4807
|
retry_policy: @config.retry_policy
|
3453
4808
|
|
3454
|
-
@artifact_registry_stub.call_rpc :
|
4809
|
+
@artifact_registry_stub.call_rpc :create_attachment, request, options: options do |response, operation|
|
4810
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3455
4811
|
yield response, operation if block_given?
|
3456
|
-
|
4812
|
+
throw :response, response
|
3457
4813
|
end
|
3458
4814
|
rescue ::GRPC::BadStatus => e
|
3459
4815
|
raise ::Google::Cloud::Error.from_error(e)
|
3460
4816
|
end
|
3461
4817
|
|
3462
4818
|
##
|
3463
|
-
#
|
4819
|
+
# Deletes an attachment. The returned Operation will
|
4820
|
+
# finish once the attachments has been deleted. It will not have any
|
4821
|
+
# Operation metadata and will return a `google.protobuf.Empty` response.
|
3464
4822
|
#
|
3465
|
-
# @overload
|
3466
|
-
# Pass arguments to `
|
3467
|
-
# {::Google::Cloud::ArtifactRegistry::V1::
|
4823
|
+
# @overload delete_attachment(request, options = nil)
|
4824
|
+
# Pass arguments to `delete_attachment` via a request object, either of type
|
4825
|
+
# {::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest} or an equivalent Hash.
|
3468
4826
|
#
|
3469
|
-
# @param request [::Google::Cloud::ArtifactRegistry::V1::
|
4827
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest, ::Hash]
|
3470
4828
|
# A request object representing the call parameters. Required. To specify no
|
3471
4829
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3472
4830
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3473
4831
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3474
4832
|
#
|
3475
|
-
# @overload
|
3476
|
-
# Pass arguments to `
|
4833
|
+
# @overload delete_attachment(name: nil)
|
4834
|
+
# Pass arguments to `delete_attachment` via keyword arguments. Note that at
|
3477
4835
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3478
4836
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3479
4837
|
#
|
3480
|
-
# @param
|
3481
|
-
# The
|
3482
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3483
|
-
# Field mask to support partial updates.
|
4838
|
+
# @param name [::String]
|
4839
|
+
# Required. The name of the attachment to delete.
|
3484
4840
|
#
|
3485
4841
|
# @yield [response, operation] Access the result along with the RPC operation
|
3486
|
-
# @yieldparam response [::
|
4842
|
+
# @yieldparam response [::Gapic::Operation]
|
3487
4843
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3488
4844
|
#
|
3489
|
-
# @return [::
|
4845
|
+
# @return [::Gapic::Operation]
|
3490
4846
|
#
|
3491
4847
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3492
4848
|
#
|
@@ -3497,24 +4853,31 @@ module Google
|
|
3497
4853
|
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
3498
4854
|
#
|
3499
4855
|
# # Create a request. To set request fields, pass in keyword arguments.
|
3500
|
-
# request = Google::Cloud::ArtifactRegistry::V1::
|
4856
|
+
# request = Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest.new
|
3501
4857
|
#
|
3502
|
-
# # Call the
|
3503
|
-
# result = client.
|
4858
|
+
# # Call the delete_attachment method.
|
4859
|
+
# result = client.delete_attachment request
|
3504
4860
|
#
|
3505
|
-
# # The returned object is of type
|
3506
|
-
#
|
4861
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4862
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4863
|
+
# # Here is how to wait for a response.
|
4864
|
+
# result.wait_until_done! timeout: 60
|
4865
|
+
# if result.response?
|
4866
|
+
# p result.response
|
4867
|
+
# else
|
4868
|
+
# puts "No response received."
|
4869
|
+
# end
|
3507
4870
|
#
|
3508
|
-
def
|
4871
|
+
def delete_attachment request, options = nil
|
3509
4872
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
3510
4873
|
|
3511
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::
|
4874
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::DeleteAttachmentRequest
|
3512
4875
|
|
3513
4876
|
# Converts hash and nil to an options object
|
3514
4877
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3515
4878
|
|
3516
4879
|
# Customize the options with defaults
|
3517
|
-
metadata = @config.rpcs.
|
4880
|
+
metadata = @config.rpcs.delete_attachment.metadata.to_h
|
3518
4881
|
|
3519
4882
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3520
4883
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -3524,24 +4887,25 @@ module Google
|
|
3524
4887
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3525
4888
|
|
3526
4889
|
header_params = {}
|
3527
|
-
if request.
|
3528
|
-
header_params["
|
4890
|
+
if request.name
|
4891
|
+
header_params["name"] = request.name
|
3529
4892
|
end
|
3530
4893
|
|
3531
4894
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3532
4895
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
3533
4896
|
|
3534
|
-
options.apply_defaults timeout: @config.rpcs.
|
4897
|
+
options.apply_defaults timeout: @config.rpcs.delete_attachment.timeout,
|
3535
4898
|
metadata: metadata,
|
3536
|
-
retry_policy: @config.rpcs.
|
4899
|
+
retry_policy: @config.rpcs.delete_attachment.retry_policy
|
3537
4900
|
|
3538
4901
|
options.apply_defaults timeout: @config.timeout,
|
3539
4902
|
metadata: @config.metadata,
|
3540
4903
|
retry_policy: @config.retry_policy
|
3541
4904
|
|
3542
|
-
@artifact_registry_stub.call_rpc :
|
4905
|
+
@artifact_registry_stub.call_rpc :delete_attachment, request, options: options do |response, operation|
|
4906
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3543
4907
|
yield response, operation if block_given?
|
3544
|
-
|
4908
|
+
throw :response, response
|
3545
4909
|
end
|
3546
4910
|
rescue ::GRPC::BadStatus => e
|
3547
4911
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3630,6 +4994,11 @@ module Google
|
|
3630
4994
|
# default endpoint URL. The default value of nil uses the environment
|
3631
4995
|
# universe (usually the default "googleapis.com" universe).
|
3632
4996
|
# @return [::String,nil]
|
4997
|
+
# @!attribute [rw] logger
|
4998
|
+
# A custom logger to use for request/response debug logging, or the value
|
4999
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
5000
|
+
# explicitly disable logging.
|
5001
|
+
# @return [::Logger,:default,nil]
|
3633
5002
|
#
|
3634
5003
|
class Configuration
|
3635
5004
|
extend ::Gapic::Config
|
@@ -3654,6 +5023,7 @@ module Google
|
|
3654
5023
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3655
5024
|
config_attr :quota_project, nil, ::String, nil
|
3656
5025
|
config_attr :universe_domain, nil, ::String, nil
|
5026
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3657
5027
|
|
3658
5028
|
# @private
|
3659
5029
|
def initialize parent_config = nil
|
@@ -3811,6 +5181,11 @@ module Google
|
|
3811
5181
|
#
|
3812
5182
|
attr_reader :batch_delete_versions
|
3813
5183
|
##
|
5184
|
+
# RPC-specific configuration for `update_version`
|
5185
|
+
# @return [::Gapic::Config::Method]
|
5186
|
+
#
|
5187
|
+
attr_reader :update_version
|
5188
|
+
##
|
3814
5189
|
# RPC-specific configuration for `list_files`
|
3815
5190
|
# @return [::Gapic::Config::Method]
|
3816
5191
|
#
|
@@ -3821,6 +5196,16 @@ module Google
|
|
3821
5196
|
#
|
3822
5197
|
attr_reader :get_file
|
3823
5198
|
##
|
5199
|
+
# RPC-specific configuration for `delete_file`
|
5200
|
+
# @return [::Gapic::Config::Method]
|
5201
|
+
#
|
5202
|
+
attr_reader :delete_file
|
5203
|
+
##
|
5204
|
+
# RPC-specific configuration for `update_file`
|
5205
|
+
# @return [::Gapic::Config::Method]
|
5206
|
+
#
|
5207
|
+
attr_reader :update_file
|
5208
|
+
##
|
3824
5209
|
# RPC-specific configuration for `list_tags`
|
3825
5210
|
# @return [::Gapic::Config::Method]
|
3826
5211
|
#
|
@@ -3846,6 +5231,31 @@ module Google
|
|
3846
5231
|
#
|
3847
5232
|
attr_reader :delete_tag
|
3848
5233
|
##
|
5234
|
+
# RPC-specific configuration for `create_rule`
|
5235
|
+
# @return [::Gapic::Config::Method]
|
5236
|
+
#
|
5237
|
+
attr_reader :create_rule
|
5238
|
+
##
|
5239
|
+
# RPC-specific configuration for `list_rules`
|
5240
|
+
# @return [::Gapic::Config::Method]
|
5241
|
+
#
|
5242
|
+
attr_reader :list_rules
|
5243
|
+
##
|
5244
|
+
# RPC-specific configuration for `get_rule`
|
5245
|
+
# @return [::Gapic::Config::Method]
|
5246
|
+
#
|
5247
|
+
attr_reader :get_rule
|
5248
|
+
##
|
5249
|
+
# RPC-specific configuration for `update_rule`
|
5250
|
+
# @return [::Gapic::Config::Method]
|
5251
|
+
#
|
5252
|
+
attr_reader :update_rule
|
5253
|
+
##
|
5254
|
+
# RPC-specific configuration for `delete_rule`
|
5255
|
+
# @return [::Gapic::Config::Method]
|
5256
|
+
#
|
5257
|
+
attr_reader :delete_rule
|
5258
|
+
##
|
3849
5259
|
# RPC-specific configuration for `set_iam_policy`
|
3850
5260
|
# @return [::Gapic::Config::Method]
|
3851
5261
|
#
|
@@ -3880,6 +5290,31 @@ module Google
|
|
3880
5290
|
# @return [::Gapic::Config::Method]
|
3881
5291
|
#
|
3882
5292
|
attr_reader :update_vpcsc_config
|
5293
|
+
##
|
5294
|
+
# RPC-specific configuration for `update_package`
|
5295
|
+
# @return [::Gapic::Config::Method]
|
5296
|
+
#
|
5297
|
+
attr_reader :update_package
|
5298
|
+
##
|
5299
|
+
# RPC-specific configuration for `list_attachments`
|
5300
|
+
# @return [::Gapic::Config::Method]
|
5301
|
+
#
|
5302
|
+
attr_reader :list_attachments
|
5303
|
+
##
|
5304
|
+
# RPC-specific configuration for `get_attachment`
|
5305
|
+
# @return [::Gapic::Config::Method]
|
5306
|
+
#
|
5307
|
+
attr_reader :get_attachment
|
5308
|
+
##
|
5309
|
+
# RPC-specific configuration for `create_attachment`
|
5310
|
+
# @return [::Gapic::Config::Method]
|
5311
|
+
#
|
5312
|
+
attr_reader :create_attachment
|
5313
|
+
##
|
5314
|
+
# RPC-specific configuration for `delete_attachment`
|
5315
|
+
# @return [::Gapic::Config::Method]
|
5316
|
+
#
|
5317
|
+
attr_reader :delete_attachment
|
3883
5318
|
|
3884
5319
|
# @private
|
3885
5320
|
def initialize parent_rpcs = nil
|
@@ -3927,10 +5362,16 @@ module Google
|
|
3927
5362
|
@delete_version = ::Gapic::Config::Method.new delete_version_config
|
3928
5363
|
batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions
|
3929
5364
|
@batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config
|
5365
|
+
update_version_config = parent_rpcs.update_version if parent_rpcs.respond_to? :update_version
|
5366
|
+
@update_version = ::Gapic::Config::Method.new update_version_config
|
3930
5367
|
list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files
|
3931
5368
|
@list_files = ::Gapic::Config::Method.new list_files_config
|
3932
5369
|
get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file
|
3933
5370
|
@get_file = ::Gapic::Config::Method.new get_file_config
|
5371
|
+
delete_file_config = parent_rpcs.delete_file if parent_rpcs.respond_to? :delete_file
|
5372
|
+
@delete_file = ::Gapic::Config::Method.new delete_file_config
|
5373
|
+
update_file_config = parent_rpcs.update_file if parent_rpcs.respond_to? :update_file
|
5374
|
+
@update_file = ::Gapic::Config::Method.new update_file_config
|
3934
5375
|
list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags
|
3935
5376
|
@list_tags = ::Gapic::Config::Method.new list_tags_config
|
3936
5377
|
get_tag_config = parent_rpcs.get_tag if parent_rpcs.respond_to? :get_tag
|
@@ -3941,6 +5382,16 @@ module Google
|
|
3941
5382
|
@update_tag = ::Gapic::Config::Method.new update_tag_config
|
3942
5383
|
delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag
|
3943
5384
|
@delete_tag = ::Gapic::Config::Method.new delete_tag_config
|
5385
|
+
create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule
|
5386
|
+
@create_rule = ::Gapic::Config::Method.new create_rule_config
|
5387
|
+
list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules
|
5388
|
+
@list_rules = ::Gapic::Config::Method.new list_rules_config
|
5389
|
+
get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule
|
5390
|
+
@get_rule = ::Gapic::Config::Method.new get_rule_config
|
5391
|
+
update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule
|
5392
|
+
@update_rule = ::Gapic::Config::Method.new update_rule_config
|
5393
|
+
delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule
|
5394
|
+
@delete_rule = ::Gapic::Config::Method.new delete_rule_config
|
3944
5395
|
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
3945
5396
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
3946
5397
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
@@ -3955,6 +5406,16 @@ module Google
|
|
3955
5406
|
@get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config
|
3956
5407
|
update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config
|
3957
5408
|
@update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config
|
5409
|
+
update_package_config = parent_rpcs.update_package if parent_rpcs.respond_to? :update_package
|
5410
|
+
@update_package = ::Gapic::Config::Method.new update_package_config
|
5411
|
+
list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments
|
5412
|
+
@list_attachments = ::Gapic::Config::Method.new list_attachments_config
|
5413
|
+
get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment
|
5414
|
+
@get_attachment = ::Gapic::Config::Method.new get_attachment_config
|
5415
|
+
create_attachment_config = parent_rpcs.create_attachment if parent_rpcs.respond_to? :create_attachment
|
5416
|
+
@create_attachment = ::Gapic::Config::Method.new create_attachment_config
|
5417
|
+
delete_attachment_config = parent_rpcs.delete_attachment if parent_rpcs.respond_to? :delete_attachment
|
5418
|
+
@delete_attachment = ::Gapic::Config::Method.new delete_attachment_config
|
3958
5419
|
|
3959
5420
|
yield self if block_given?
|
3960
5421
|
end
|