google-cloud-artifact_registry-v1beta2 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +2 -2
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +975 -129
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb +145 -33
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +54 -0
- data/lib/google/cloud/artifact_registry/v1beta2/version.rb +1 -1
- data/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb +65 -0
- data/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +4 -3
- data/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb +2 -2
- data/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +23 -3
- data/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +5 -2
- data/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +15 -1
- data/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +24 -3
- data/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +3 -2
- data/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +8 -3
- data/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb +63 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +118 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +5 -1
- data/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +53 -6
- data/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +80 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +6 -2
- data/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +12 -2
- data/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb +110 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- metadata +11 -5
@@ -53,13 +53,12 @@ module Google
|
|
53
53
|
# See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration}
|
54
54
|
# for a description of the configuration fields.
|
55
55
|
#
|
56
|
-
#
|
56
|
+
# @example
|
57
57
|
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
# end
|
58
|
+
# # Modify the configuration for all ArtifactRegistry clients
|
59
|
+
# ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
|
60
|
+
# config.timeout = 10.0
|
61
|
+
# end
|
63
62
|
#
|
64
63
|
# @yield [config] Configure the Client client.
|
65
64
|
# @yieldparam config [Client::Configuration]
|
@@ -191,19 +190,15 @@ module Google
|
|
191
190
|
##
|
192
191
|
# Create a new ArtifactRegistry client object.
|
193
192
|
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
# To create a new ArtifactRegistry client with the default
|
197
|
-
# configuration:
|
193
|
+
# @example
|
198
194
|
#
|
199
|
-
#
|
195
|
+
# # Create a client using the default configuration
|
196
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
200
197
|
#
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
# config.timeout = 10.0
|
206
|
-
# end
|
198
|
+
# # Create a client using a custom configuration
|
199
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
|
200
|
+
# config.timeout = 10.0
|
201
|
+
# end
|
207
202
|
#
|
208
203
|
# @yield [config] Configure the ArtifactRegistry client.
|
209
204
|
# @yieldparam config [Client::Configuration]
|
@@ -223,10 +218,9 @@ module Google
|
|
223
218
|
|
224
219
|
# Create credentials
|
225
220
|
credentials = @config.credentials
|
226
|
-
# Use self-signed JWT if the
|
221
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
227
222
|
# but only if the default endpoint does not have a region prefix.
|
228
|
-
enable_self_signed_jwt = @config.
|
229
|
-
@config.endpoint == Client.configure.endpoint &&
|
223
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
230
224
|
!@config.endpoint.split(".").first.include?("-")
|
231
225
|
credentials ||= Credentials.default scope: @config.scope,
|
232
226
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -238,6 +232,7 @@ module Google
|
|
238
232
|
|
239
233
|
@operations_client = Operations.new do |config|
|
240
234
|
config.credentials = credentials
|
235
|
+
config.quota_project = @quota_project_id
|
241
236
|
config.endpoint = @config.endpoint
|
242
237
|
end
|
243
238
|
|
@@ -259,6 +254,202 @@ module Google
|
|
259
254
|
|
260
255
|
# Service calls
|
261
256
|
|
257
|
+
##
|
258
|
+
# Imports Apt artifacts. The returned Operation will complete once the
|
259
|
+
# resources are imported. Package, Version, and File resources are created
|
260
|
+
# based on the imported artifacts. Imported artifacts that conflict with
|
261
|
+
# existing resources are ignored.
|
262
|
+
#
|
263
|
+
# @overload import_apt_artifacts(request, options = nil)
|
264
|
+
# Pass arguments to `import_apt_artifacts` via a request object, either of type
|
265
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash.
|
266
|
+
#
|
267
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash]
|
268
|
+
# A request object representing the call parameters. Required. To specify no
|
269
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
270
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
271
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
272
|
+
#
|
273
|
+
# @overload import_apt_artifacts(gcs_source: nil, parent: nil)
|
274
|
+
# Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at
|
275
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
276
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
277
|
+
#
|
278
|
+
# @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash]
|
279
|
+
# Google Cloud Storage location where input content is located.
|
280
|
+
# @param parent [::String]
|
281
|
+
# The name of the parent resource where the artifacts will be imported.
|
282
|
+
#
|
283
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
284
|
+
# @yieldparam response [::Gapic::Operation]
|
285
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
286
|
+
#
|
287
|
+
# @return [::Gapic::Operation]
|
288
|
+
#
|
289
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
290
|
+
#
|
291
|
+
# @example Basic example
|
292
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
293
|
+
#
|
294
|
+
# # Create a client object. The client can be reused for multiple calls.
|
295
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
296
|
+
#
|
297
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
298
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new
|
299
|
+
#
|
300
|
+
# # Call the import_apt_artifacts method.
|
301
|
+
# result = client.import_apt_artifacts request
|
302
|
+
#
|
303
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
304
|
+
# # object to check the status of an operation, cancel it, or wait
|
305
|
+
# # for results. Here is how to block until completion:
|
306
|
+
# result.wait_until_done! timeout: 60
|
307
|
+
# if result.response?
|
308
|
+
# p result.response
|
309
|
+
# else
|
310
|
+
# puts "Error!"
|
311
|
+
# end
|
312
|
+
#
|
313
|
+
def import_apt_artifacts request, options = nil
|
314
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
315
|
+
|
316
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest
|
317
|
+
|
318
|
+
# Converts hash and nil to an options object
|
319
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
320
|
+
|
321
|
+
# Customize the options with defaults
|
322
|
+
metadata = @config.rpcs.import_apt_artifacts.metadata.to_h
|
323
|
+
|
324
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
325
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
326
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
327
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
328
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
329
|
+
|
330
|
+
header_params = {}
|
331
|
+
if request.parent
|
332
|
+
header_params["parent"] = request.parent
|
333
|
+
end
|
334
|
+
|
335
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
336
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
337
|
+
|
338
|
+
options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout,
|
339
|
+
metadata: metadata,
|
340
|
+
retry_policy: @config.rpcs.import_apt_artifacts.retry_policy
|
341
|
+
|
342
|
+
options.apply_defaults timeout: @config.timeout,
|
343
|
+
metadata: @config.metadata,
|
344
|
+
retry_policy: @config.retry_policy
|
345
|
+
|
346
|
+
@artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation|
|
347
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
348
|
+
yield response, operation if block_given?
|
349
|
+
return response
|
350
|
+
end
|
351
|
+
rescue ::GRPC::BadStatus => e
|
352
|
+
raise ::Google::Cloud::Error.from_error(e)
|
353
|
+
end
|
354
|
+
|
355
|
+
##
|
356
|
+
# Imports Yum (RPM) artifacts. The returned Operation will complete once the
|
357
|
+
# resources are imported. Package, Version, and File resources are created
|
358
|
+
# based on the imported artifacts. Imported artifacts that conflict with
|
359
|
+
# existing resources are ignored.
|
360
|
+
#
|
361
|
+
# @overload import_yum_artifacts(request, options = nil)
|
362
|
+
# Pass arguments to `import_yum_artifacts` via a request object, either of type
|
363
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash.
|
364
|
+
#
|
365
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash]
|
366
|
+
# A request object representing the call parameters. Required. To specify no
|
367
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
368
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
369
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
370
|
+
#
|
371
|
+
# @overload import_yum_artifacts(gcs_source: nil, parent: nil)
|
372
|
+
# Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at
|
373
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
374
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
375
|
+
#
|
376
|
+
# @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash]
|
377
|
+
# Google Cloud Storage location where input content is located.
|
378
|
+
# @param parent [::String]
|
379
|
+
# The name of the parent resource where the artifacts will be imported.
|
380
|
+
#
|
381
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
382
|
+
# @yieldparam response [::Gapic::Operation]
|
383
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
384
|
+
#
|
385
|
+
# @return [::Gapic::Operation]
|
386
|
+
#
|
387
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
388
|
+
#
|
389
|
+
# @example Basic example
|
390
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
391
|
+
#
|
392
|
+
# # Create a client object. The client can be reused for multiple calls.
|
393
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
394
|
+
#
|
395
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
396
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new
|
397
|
+
#
|
398
|
+
# # Call the import_yum_artifacts method.
|
399
|
+
# result = client.import_yum_artifacts request
|
400
|
+
#
|
401
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
402
|
+
# # object to check the status of an operation, cancel it, or wait
|
403
|
+
# # for results. Here is how to block until completion:
|
404
|
+
# result.wait_until_done! timeout: 60
|
405
|
+
# if result.response?
|
406
|
+
# p result.response
|
407
|
+
# else
|
408
|
+
# puts "Error!"
|
409
|
+
# end
|
410
|
+
#
|
411
|
+
def import_yum_artifacts request, options = nil
|
412
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
413
|
+
|
414
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest
|
415
|
+
|
416
|
+
# Converts hash and nil to an options object
|
417
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
418
|
+
|
419
|
+
# Customize the options with defaults
|
420
|
+
metadata = @config.rpcs.import_yum_artifacts.metadata.to_h
|
421
|
+
|
422
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
423
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
424
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
425
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
426
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
427
|
+
|
428
|
+
header_params = {}
|
429
|
+
if request.parent
|
430
|
+
header_params["parent"] = request.parent
|
431
|
+
end
|
432
|
+
|
433
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
434
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
435
|
+
|
436
|
+
options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout,
|
437
|
+
metadata: metadata,
|
438
|
+
retry_policy: @config.rpcs.import_yum_artifacts.retry_policy
|
439
|
+
|
440
|
+
options.apply_defaults timeout: @config.timeout,
|
441
|
+
metadata: @config.metadata,
|
442
|
+
retry_policy: @config.retry_policy
|
443
|
+
|
444
|
+
@artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation|
|
445
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
446
|
+
yield response, operation if block_given?
|
447
|
+
return response
|
448
|
+
end
|
449
|
+
rescue ::GRPC::BadStatus => e
|
450
|
+
raise ::Google::Cloud::Error.from_error(e)
|
451
|
+
end
|
452
|
+
|
262
453
|
##
|
263
454
|
# Lists repositories.
|
264
455
|
#
|
@@ -278,10 +469,9 @@ module Google
|
|
278
469
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
279
470
|
#
|
280
471
|
# @param parent [::String]
|
281
|
-
# The name of the parent resource whose repositories will be listed.
|
472
|
+
# Required. The name of the parent resource whose repositories will be listed.
|
282
473
|
# @param page_size [::Integer]
|
283
|
-
# The maximum number of repositories to return.
|
284
|
-
# Maximum page size is 10,000.
|
474
|
+
# The maximum number of repositories to return. Maximum page size is 1,000.
|
285
475
|
# @param page_token [::String]
|
286
476
|
# The next_page_token value returned from a previous list request, if any.
|
287
477
|
#
|
@@ -293,6 +483,27 @@ module Google
|
|
293
483
|
#
|
294
484
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
295
485
|
#
|
486
|
+
# @example Basic example
|
487
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
488
|
+
#
|
489
|
+
# # Create a client object. The client can be reused for multiple calls.
|
490
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
491
|
+
#
|
492
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
493
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new
|
494
|
+
#
|
495
|
+
# # Call the list_repositories method.
|
496
|
+
# result = client.list_repositories request
|
497
|
+
#
|
498
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
499
|
+
# # iterate over all elements by calling #each, and the enumerable
|
500
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
501
|
+
# # methods are also available for managing paging directly.
|
502
|
+
# result.each do |response|
|
503
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Repository.
|
504
|
+
# p response
|
505
|
+
# end
|
506
|
+
#
|
296
507
|
def list_repositories request, options = nil
|
297
508
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
298
509
|
|
@@ -310,16 +521,20 @@ module Google
|
|
310
521
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
311
522
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
312
523
|
|
313
|
-
header_params = {
|
314
|
-
|
315
|
-
|
524
|
+
header_params = {}
|
525
|
+
if request.parent
|
526
|
+
header_params["parent"] = request.parent
|
527
|
+
end
|
528
|
+
|
316
529
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
317
530
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
318
531
|
|
319
532
|
options.apply_defaults timeout: @config.rpcs.list_repositories.timeout,
|
320
533
|
metadata: metadata,
|
321
534
|
retry_policy: @config.rpcs.list_repositories.retry_policy
|
322
|
-
|
535
|
+
|
536
|
+
options.apply_defaults timeout: @config.timeout,
|
537
|
+
metadata: @config.metadata,
|
323
538
|
retry_policy: @config.retry_policy
|
324
539
|
|
325
540
|
@artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation|
|
@@ -350,7 +565,7 @@ module Google
|
|
350
565
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
351
566
|
#
|
352
567
|
# @param name [::String]
|
353
|
-
# The name of the repository to retrieve.
|
568
|
+
# Required. The name of the repository to retrieve.
|
354
569
|
#
|
355
570
|
# @yield [response, operation] Access the result along with the RPC operation
|
356
571
|
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
|
@@ -360,6 +575,21 @@ module Google
|
|
360
575
|
#
|
361
576
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
362
577
|
#
|
578
|
+
# @example Basic example
|
579
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
580
|
+
#
|
581
|
+
# # Create a client object. The client can be reused for multiple calls.
|
582
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
583
|
+
#
|
584
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
585
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest.new
|
586
|
+
#
|
587
|
+
# # Call the get_repository method.
|
588
|
+
# result = client.get_repository request
|
589
|
+
#
|
590
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository.
|
591
|
+
# p result
|
592
|
+
#
|
363
593
|
def get_repository request, options = nil
|
364
594
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
365
595
|
|
@@ -377,16 +607,20 @@ module Google
|
|
377
607
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
378
608
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
379
609
|
|
380
|
-
header_params = {
|
381
|
-
|
382
|
-
|
610
|
+
header_params = {}
|
611
|
+
if request.name
|
612
|
+
header_params["name"] = request.name
|
613
|
+
end
|
614
|
+
|
383
615
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
384
616
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
385
617
|
|
386
618
|
options.apply_defaults timeout: @config.rpcs.get_repository.timeout,
|
387
619
|
metadata: metadata,
|
388
620
|
retry_policy: @config.rpcs.get_repository.retry_policy
|
389
|
-
|
621
|
+
|
622
|
+
options.apply_defaults timeout: @config.timeout,
|
623
|
+
metadata: @config.metadata,
|
390
624
|
retry_policy: @config.retry_policy
|
391
625
|
|
392
626
|
@artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation|
|
@@ -417,7 +651,7 @@ module Google
|
|
417
651
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
418
652
|
#
|
419
653
|
# @param parent [::String]
|
420
|
-
# The name of the parent resource where the repository will be created.
|
654
|
+
# Required. The name of the parent resource where the repository will be created.
|
421
655
|
# @param repository_id [::String]
|
422
656
|
# The repository id to use for this repository.
|
423
657
|
# @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash]
|
@@ -431,6 +665,28 @@ module Google
|
|
431
665
|
#
|
432
666
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
433
667
|
#
|
668
|
+
# @example Basic example
|
669
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
670
|
+
#
|
671
|
+
# # Create a client object. The client can be reused for multiple calls.
|
672
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
673
|
+
#
|
674
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
675
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest.new
|
676
|
+
#
|
677
|
+
# # Call the create_repository method.
|
678
|
+
# result = client.create_repository request
|
679
|
+
#
|
680
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
681
|
+
# # object to check the status of an operation, cancel it, or wait
|
682
|
+
# # for results. Here is how to block until completion:
|
683
|
+
# result.wait_until_done! timeout: 60
|
684
|
+
# if result.response?
|
685
|
+
# p result.response
|
686
|
+
# else
|
687
|
+
# puts "Error!"
|
688
|
+
# end
|
689
|
+
#
|
434
690
|
def create_repository request, options = nil
|
435
691
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
436
692
|
|
@@ -448,16 +704,20 @@ module Google
|
|
448
704
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
449
705
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
450
706
|
|
451
|
-
header_params = {
|
452
|
-
|
453
|
-
|
707
|
+
header_params = {}
|
708
|
+
if request.parent
|
709
|
+
header_params["parent"] = request.parent
|
710
|
+
end
|
711
|
+
|
454
712
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
455
713
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
456
714
|
|
457
715
|
options.apply_defaults timeout: @config.rpcs.create_repository.timeout,
|
458
716
|
metadata: metadata,
|
459
717
|
retry_policy: @config.rpcs.create_repository.retry_policy
|
460
|
-
|
718
|
+
|
719
|
+
options.apply_defaults timeout: @config.timeout,
|
720
|
+
metadata: @config.metadata,
|
461
721
|
retry_policy: @config.retry_policy
|
462
722
|
|
463
723
|
@artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation|
|
@@ -502,6 +762,21 @@ module Google
|
|
502
762
|
#
|
503
763
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
504
764
|
#
|
765
|
+
# @example Basic example
|
766
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
767
|
+
#
|
768
|
+
# # Create a client object. The client can be reused for multiple calls.
|
769
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
770
|
+
#
|
771
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
772
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest.new
|
773
|
+
#
|
774
|
+
# # Call the update_repository method.
|
775
|
+
# result = client.update_repository request
|
776
|
+
#
|
777
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Repository.
|
778
|
+
# p result
|
779
|
+
#
|
505
780
|
def update_repository request, options = nil
|
506
781
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
507
782
|
|
@@ -519,16 +794,20 @@ module Google
|
|
519
794
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
520
795
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
521
796
|
|
522
|
-
header_params = {
|
523
|
-
|
524
|
-
|
797
|
+
header_params = {}
|
798
|
+
if request.repository&.name
|
799
|
+
header_params["repository.name"] = request.repository.name
|
800
|
+
end
|
801
|
+
|
525
802
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
526
803
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
527
804
|
|
528
805
|
options.apply_defaults timeout: @config.rpcs.update_repository.timeout,
|
529
806
|
metadata: metadata,
|
530
807
|
retry_policy: @config.rpcs.update_repository.retry_policy
|
531
|
-
|
808
|
+
|
809
|
+
options.apply_defaults timeout: @config.timeout,
|
810
|
+
metadata: @config.metadata,
|
532
811
|
retry_policy: @config.retry_policy
|
533
812
|
|
534
813
|
@artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation|
|
@@ -560,7 +839,7 @@ module Google
|
|
560
839
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
561
840
|
#
|
562
841
|
# @param name [::String]
|
563
|
-
# The name of the repository to delete.
|
842
|
+
# Required. The name of the repository to delete.
|
564
843
|
#
|
565
844
|
# @yield [response, operation] Access the result along with the RPC operation
|
566
845
|
# @yieldparam response [::Gapic::Operation]
|
@@ -570,6 +849,28 @@ module Google
|
|
570
849
|
#
|
571
850
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
572
851
|
#
|
852
|
+
# @example Basic example
|
853
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
854
|
+
#
|
855
|
+
# # Create a client object. The client can be reused for multiple calls.
|
856
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
857
|
+
#
|
858
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
859
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest.new
|
860
|
+
#
|
861
|
+
# # Call the delete_repository method.
|
862
|
+
# result = client.delete_repository request
|
863
|
+
#
|
864
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
865
|
+
# # object to check the status of an operation, cancel it, or wait
|
866
|
+
# # for results. Here is how to block until completion:
|
867
|
+
# result.wait_until_done! timeout: 60
|
868
|
+
# if result.response?
|
869
|
+
# p result.response
|
870
|
+
# else
|
871
|
+
# puts "Error!"
|
872
|
+
# end
|
873
|
+
#
|
573
874
|
def delete_repository request, options = nil
|
574
875
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
575
876
|
|
@@ -587,16 +888,20 @@ module Google
|
|
587
888
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
588
889
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
589
890
|
|
590
|
-
header_params = {
|
591
|
-
|
592
|
-
|
891
|
+
header_params = {}
|
892
|
+
if request.name
|
893
|
+
header_params["name"] = request.name
|
894
|
+
end
|
895
|
+
|
593
896
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
594
897
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
595
898
|
|
596
899
|
options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
|
597
900
|
metadata: metadata,
|
598
901
|
retry_policy: @config.rpcs.delete_repository.retry_policy
|
599
|
-
|
902
|
+
|
903
|
+
options.apply_defaults timeout: @config.timeout,
|
904
|
+
metadata: @config.metadata,
|
600
905
|
retry_policy: @config.retry_policy
|
601
906
|
|
602
907
|
@artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation|
|
@@ -642,6 +947,27 @@ module Google
|
|
642
947
|
#
|
643
948
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
644
949
|
#
|
950
|
+
# @example Basic example
|
951
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
952
|
+
#
|
953
|
+
# # Create a client object. The client can be reused for multiple calls.
|
954
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
955
|
+
#
|
956
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
957
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest.new
|
958
|
+
#
|
959
|
+
# # Call the list_packages method.
|
960
|
+
# result = client.list_packages request
|
961
|
+
#
|
962
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
963
|
+
# # iterate over all elements by calling #each, and the enumerable
|
964
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
965
|
+
# # methods are also available for managing paging directly.
|
966
|
+
# result.each do |response|
|
967
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Package.
|
968
|
+
# p response
|
969
|
+
# end
|
970
|
+
#
|
645
971
|
def list_packages request, options = nil
|
646
972
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
647
973
|
|
@@ -659,16 +985,20 @@ module Google
|
|
659
985
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
660
986
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
661
987
|
|
662
|
-
header_params = {
|
663
|
-
|
664
|
-
|
988
|
+
header_params = {}
|
989
|
+
if request.parent
|
990
|
+
header_params["parent"] = request.parent
|
991
|
+
end
|
992
|
+
|
665
993
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
666
994
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
667
995
|
|
668
996
|
options.apply_defaults timeout: @config.rpcs.list_packages.timeout,
|
669
997
|
metadata: metadata,
|
670
998
|
retry_policy: @config.rpcs.list_packages.retry_policy
|
671
|
-
|
999
|
+
|
1000
|
+
options.apply_defaults timeout: @config.timeout,
|
1001
|
+
metadata: @config.metadata,
|
672
1002
|
retry_policy: @config.retry_policy
|
673
1003
|
|
674
1004
|
@artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation|
|
@@ -709,6 +1039,21 @@ module Google
|
|
709
1039
|
#
|
710
1040
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
711
1041
|
#
|
1042
|
+
# @example Basic example
|
1043
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1044
|
+
#
|
1045
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1046
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1047
|
+
#
|
1048
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1049
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest.new
|
1050
|
+
#
|
1051
|
+
# # Call the get_package method.
|
1052
|
+
# result = client.get_package request
|
1053
|
+
#
|
1054
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Package.
|
1055
|
+
# p result
|
1056
|
+
#
|
712
1057
|
def get_package request, options = nil
|
713
1058
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
714
1059
|
|
@@ -726,16 +1071,20 @@ module Google
|
|
726
1071
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
727
1072
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
728
1073
|
|
729
|
-
header_params = {
|
730
|
-
|
731
|
-
|
1074
|
+
header_params = {}
|
1075
|
+
if request.name
|
1076
|
+
header_params["name"] = request.name
|
1077
|
+
end
|
1078
|
+
|
732
1079
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
733
1080
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
734
1081
|
|
735
1082
|
options.apply_defaults timeout: @config.rpcs.get_package.timeout,
|
736
1083
|
metadata: metadata,
|
737
1084
|
retry_policy: @config.rpcs.get_package.retry_policy
|
738
|
-
|
1085
|
+
|
1086
|
+
options.apply_defaults timeout: @config.timeout,
|
1087
|
+
metadata: @config.metadata,
|
739
1088
|
retry_policy: @config.retry_policy
|
740
1089
|
|
741
1090
|
@artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation|
|
@@ -776,6 +1125,28 @@ module Google
|
|
776
1125
|
#
|
777
1126
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
778
1127
|
#
|
1128
|
+
# @example Basic example
|
1129
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1130
|
+
#
|
1131
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1132
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1133
|
+
#
|
1134
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1135
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest.new
|
1136
|
+
#
|
1137
|
+
# # Call the delete_package method.
|
1138
|
+
# result = client.delete_package request
|
1139
|
+
#
|
1140
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1141
|
+
# # object to check the status of an operation, cancel it, or wait
|
1142
|
+
# # for results. Here is how to block until completion:
|
1143
|
+
# result.wait_until_done! timeout: 60
|
1144
|
+
# if result.response?
|
1145
|
+
# p result.response
|
1146
|
+
# else
|
1147
|
+
# puts "Error!"
|
1148
|
+
# end
|
1149
|
+
#
|
779
1150
|
def delete_package request, options = nil
|
780
1151
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
781
1152
|
|
@@ -793,16 +1164,20 @@ module Google
|
|
793
1164
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
794
1165
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
795
1166
|
|
796
|
-
header_params = {
|
797
|
-
|
798
|
-
|
1167
|
+
header_params = {}
|
1168
|
+
if request.name
|
1169
|
+
header_params["name"] = request.name
|
1170
|
+
end
|
1171
|
+
|
799
1172
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
800
1173
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
801
1174
|
|
802
1175
|
options.apply_defaults timeout: @config.rpcs.delete_package.timeout,
|
803
1176
|
metadata: metadata,
|
804
1177
|
retry_policy: @config.rpcs.delete_package.retry_policy
|
805
|
-
|
1178
|
+
|
1179
|
+
options.apply_defaults timeout: @config.timeout,
|
1180
|
+
metadata: @config.metadata,
|
806
1181
|
retry_policy: @config.retry_policy
|
807
1182
|
|
808
1183
|
@artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation|
|
@@ -827,7 +1202,7 @@ module Google
|
|
827
1202
|
# @param options [::Gapic::CallOptions, ::Hash]
|
828
1203
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
829
1204
|
#
|
830
|
-
# @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil)
|
1205
|
+
# @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil)
|
831
1206
|
# Pass arguments to `list_versions` via keyword arguments. Note that at
|
832
1207
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
833
1208
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -835,12 +1210,13 @@ module Google
|
|
835
1210
|
# @param parent [::String]
|
836
1211
|
# The name of the parent resource whose versions will be listed.
|
837
1212
|
# @param page_size [::Integer]
|
838
|
-
# The maximum number of versions to return.
|
839
|
-
# Maximum page size is 10,000.
|
1213
|
+
# The maximum number of versions to return. Maximum page size is 1,000.
|
840
1214
|
# @param page_token [::String]
|
841
1215
|
# The next_page_token value returned from a previous list request, if any.
|
842
1216
|
# @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView]
|
843
1217
|
# The view that should be returned in the response.
|
1218
|
+
# @param order_by [::String]
|
1219
|
+
# Optional. The field to order the results by.
|
844
1220
|
#
|
845
1221
|
# @yield [response, operation] Access the result along with the RPC operation
|
846
1222
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>]
|
@@ -850,6 +1226,27 @@ module Google
|
|
850
1226
|
#
|
851
1227
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
852
1228
|
#
|
1229
|
+
# @example Basic example
|
1230
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1231
|
+
#
|
1232
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1233
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1234
|
+
#
|
1235
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1236
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest.new
|
1237
|
+
#
|
1238
|
+
# # Call the list_versions method.
|
1239
|
+
# result = client.list_versions request
|
1240
|
+
#
|
1241
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1242
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1243
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1244
|
+
# # methods are also available for managing paging directly.
|
1245
|
+
# result.each do |response|
|
1246
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Version.
|
1247
|
+
# p response
|
1248
|
+
# end
|
1249
|
+
#
|
853
1250
|
def list_versions request, options = nil
|
854
1251
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
855
1252
|
|
@@ -867,16 +1264,20 @@ module Google
|
|
867
1264
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
868
1265
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
869
1266
|
|
870
|
-
header_params = {
|
871
|
-
|
872
|
-
|
1267
|
+
header_params = {}
|
1268
|
+
if request.parent
|
1269
|
+
header_params["parent"] = request.parent
|
1270
|
+
end
|
1271
|
+
|
873
1272
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
874
1273
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
875
1274
|
|
876
1275
|
options.apply_defaults timeout: @config.rpcs.list_versions.timeout,
|
877
1276
|
metadata: metadata,
|
878
1277
|
retry_policy: @config.rpcs.list_versions.retry_policy
|
879
|
-
|
1278
|
+
|
1279
|
+
options.apply_defaults timeout: @config.timeout,
|
1280
|
+
metadata: @config.metadata,
|
880
1281
|
retry_policy: @config.retry_policy
|
881
1282
|
|
882
1283
|
@artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation|
|
@@ -919,6 +1320,21 @@ module Google
|
|
919
1320
|
#
|
920
1321
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
921
1322
|
#
|
1323
|
+
# @example Basic example
|
1324
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1325
|
+
#
|
1326
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1327
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1328
|
+
#
|
1329
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1330
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest.new
|
1331
|
+
#
|
1332
|
+
# # Call the get_version method.
|
1333
|
+
# result = client.get_version request
|
1334
|
+
#
|
1335
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Version.
|
1336
|
+
# p result
|
1337
|
+
#
|
922
1338
|
def get_version request, options = nil
|
923
1339
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
924
1340
|
|
@@ -936,16 +1352,20 @@ module Google
|
|
936
1352
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
937
1353
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
938
1354
|
|
939
|
-
header_params = {
|
940
|
-
|
941
|
-
|
1355
|
+
header_params = {}
|
1356
|
+
if request.name
|
1357
|
+
header_params["name"] = request.name
|
1358
|
+
end
|
1359
|
+
|
942
1360
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
943
1361
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
944
1362
|
|
945
1363
|
options.apply_defaults timeout: @config.rpcs.get_version.timeout,
|
946
1364
|
metadata: metadata,
|
947
1365
|
retry_policy: @config.rpcs.get_version.retry_policy
|
948
|
-
|
1366
|
+
|
1367
|
+
options.apply_defaults timeout: @config.timeout,
|
1368
|
+
metadata: @config.metadata,
|
949
1369
|
retry_policy: @config.retry_policy
|
950
1370
|
|
951
1371
|
@artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation|
|
@@ -989,6 +1409,28 @@ module Google
|
|
989
1409
|
#
|
990
1410
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
991
1411
|
#
|
1412
|
+
# @example Basic example
|
1413
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1414
|
+
#
|
1415
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1416
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1417
|
+
#
|
1418
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1419
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest.new
|
1420
|
+
#
|
1421
|
+
# # Call the delete_version method.
|
1422
|
+
# result = client.delete_version request
|
1423
|
+
#
|
1424
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1425
|
+
# # object to check the status of an operation, cancel it, or wait
|
1426
|
+
# # for results. Here is how to block until completion:
|
1427
|
+
# result.wait_until_done! timeout: 60
|
1428
|
+
# if result.response?
|
1429
|
+
# p result.response
|
1430
|
+
# else
|
1431
|
+
# puts "Error!"
|
1432
|
+
# end
|
1433
|
+
#
|
992
1434
|
def delete_version request, options = nil
|
993
1435
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
994
1436
|
|
@@ -1006,16 +1448,20 @@ module Google
|
|
1006
1448
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1007
1449
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1008
1450
|
|
1009
|
-
header_params = {
|
1010
|
-
|
1011
|
-
|
1451
|
+
header_params = {}
|
1452
|
+
if request.name
|
1453
|
+
header_params["name"] = request.name
|
1454
|
+
end
|
1455
|
+
|
1012
1456
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1013
1457
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1014
1458
|
|
1015
1459
|
options.apply_defaults timeout: @config.rpcs.delete_version.timeout,
|
1016
1460
|
metadata: metadata,
|
1017
1461
|
retry_policy: @config.rpcs.delete_version.retry_policy
|
1018
|
-
|
1462
|
+
|
1463
|
+
options.apply_defaults timeout: @config.timeout,
|
1464
|
+
metadata: @config.metadata,
|
1019
1465
|
retry_policy: @config.retry_policy
|
1020
1466
|
|
1021
1467
|
@artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation|
|
@@ -1073,6 +1519,27 @@ module Google
|
|
1073
1519
|
#
|
1074
1520
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1075
1521
|
#
|
1522
|
+
# @example Basic example
|
1523
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1524
|
+
#
|
1525
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1526
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1527
|
+
#
|
1528
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1529
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest.new
|
1530
|
+
#
|
1531
|
+
# # Call the list_files method.
|
1532
|
+
# result = client.list_files request
|
1533
|
+
#
|
1534
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1535
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1536
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1537
|
+
# # methods are also available for managing paging directly.
|
1538
|
+
# result.each do |response|
|
1539
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::File.
|
1540
|
+
# p response
|
1541
|
+
# end
|
1542
|
+
#
|
1076
1543
|
def list_files request, options = nil
|
1077
1544
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1078
1545
|
|
@@ -1090,16 +1557,20 @@ module Google
|
|
1090
1557
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1091
1558
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1092
1559
|
|
1093
|
-
header_params = {
|
1094
|
-
|
1095
|
-
|
1560
|
+
header_params = {}
|
1561
|
+
if request.parent
|
1562
|
+
header_params["parent"] = request.parent
|
1563
|
+
end
|
1564
|
+
|
1096
1565
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1097
1566
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1098
1567
|
|
1099
1568
|
options.apply_defaults timeout: @config.rpcs.list_files.timeout,
|
1100
1569
|
metadata: metadata,
|
1101
1570
|
retry_policy: @config.rpcs.list_files.retry_policy
|
1102
|
-
|
1571
|
+
|
1572
|
+
options.apply_defaults timeout: @config.timeout,
|
1573
|
+
metadata: @config.metadata,
|
1103
1574
|
retry_policy: @config.retry_policy
|
1104
1575
|
|
1105
1576
|
@artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation|
|
@@ -1140,6 +1611,21 @@ module Google
|
|
1140
1611
|
#
|
1141
1612
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1142
1613
|
#
|
1614
|
+
# @example Basic example
|
1615
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1616
|
+
#
|
1617
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1618
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1619
|
+
#
|
1620
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1621
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest.new
|
1622
|
+
#
|
1623
|
+
# # Call the get_file method.
|
1624
|
+
# result = client.get_file request
|
1625
|
+
#
|
1626
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::File.
|
1627
|
+
# p result
|
1628
|
+
#
|
1143
1629
|
def get_file request, options = nil
|
1144
1630
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1145
1631
|
|
@@ -1157,16 +1643,20 @@ module Google
|
|
1157
1643
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1158
1644
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1159
1645
|
|
1160
|
-
header_params = {
|
1161
|
-
|
1162
|
-
|
1646
|
+
header_params = {}
|
1647
|
+
if request.name
|
1648
|
+
header_params["name"] = request.name
|
1649
|
+
end
|
1650
|
+
|
1163
1651
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1164
1652
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1165
1653
|
|
1166
1654
|
options.apply_defaults timeout: @config.rpcs.get_file.timeout,
|
1167
1655
|
metadata: metadata,
|
1168
1656
|
retry_policy: @config.rpcs.get_file.retry_policy
|
1169
|
-
|
1657
|
+
|
1658
|
+
options.apply_defaults timeout: @config.timeout,
|
1659
|
+
metadata: @config.metadata,
|
1170
1660
|
retry_policy: @config.retry_policy
|
1171
1661
|
|
1172
1662
|
@artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation|
|
@@ -1208,8 +1698,7 @@ module Google
|
|
1208
1698
|
# * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
|
1209
1699
|
# --> Tags that are applied to the version `1.0` in package `pkg1`.
|
1210
1700
|
# @param page_size [::Integer]
|
1211
|
-
# The maximum number of tags to return.
|
1212
|
-
# Maximum page size is 10,000.
|
1701
|
+
# The maximum number of tags to return. Maximum page size is 10,000.
|
1213
1702
|
# @param page_token [::String]
|
1214
1703
|
# The next_page_token value returned from a previous list request, if any.
|
1215
1704
|
#
|
@@ -1221,6 +1710,27 @@ module Google
|
|
1221
1710
|
#
|
1222
1711
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1223
1712
|
#
|
1713
|
+
# @example Basic example
|
1714
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1715
|
+
#
|
1716
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1717
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1718
|
+
#
|
1719
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1720
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest.new
|
1721
|
+
#
|
1722
|
+
# # Call the list_tags method.
|
1723
|
+
# result = client.list_tags request
|
1724
|
+
#
|
1725
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1726
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1727
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1728
|
+
# # methods are also available for managing paging directly.
|
1729
|
+
# result.each do |response|
|
1730
|
+
# # Each element is of type ::Google::Cloud::ArtifactRegistry::V1beta2::Tag.
|
1731
|
+
# p response
|
1732
|
+
# end
|
1733
|
+
#
|
1224
1734
|
def list_tags request, options = nil
|
1225
1735
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1226
1736
|
|
@@ -1238,16 +1748,20 @@ module Google
|
|
1238
1748
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1239
1749
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1240
1750
|
|
1241
|
-
header_params = {
|
1242
|
-
|
1243
|
-
|
1751
|
+
header_params = {}
|
1752
|
+
if request.parent
|
1753
|
+
header_params["parent"] = request.parent
|
1754
|
+
end
|
1755
|
+
|
1244
1756
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1245
1757
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1246
1758
|
|
1247
1759
|
options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
|
1248
1760
|
metadata: metadata,
|
1249
1761
|
retry_policy: @config.rpcs.list_tags.retry_policy
|
1250
|
-
|
1762
|
+
|
1763
|
+
options.apply_defaults timeout: @config.timeout,
|
1764
|
+
metadata: @config.metadata,
|
1251
1765
|
retry_policy: @config.retry_policy
|
1252
1766
|
|
1253
1767
|
@artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation|
|
@@ -1288,6 +1802,21 @@ module Google
|
|
1288
1802
|
#
|
1289
1803
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1290
1804
|
#
|
1805
|
+
# @example Basic example
|
1806
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1807
|
+
#
|
1808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1809
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1810
|
+
#
|
1811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1812
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest.new
|
1813
|
+
#
|
1814
|
+
# # Call the get_tag method.
|
1815
|
+
# result = client.get_tag request
|
1816
|
+
#
|
1817
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag.
|
1818
|
+
# p result
|
1819
|
+
#
|
1291
1820
|
def get_tag request, options = nil
|
1292
1821
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1293
1822
|
|
@@ -1305,16 +1834,20 @@ module Google
|
|
1305
1834
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1306
1835
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1307
1836
|
|
1308
|
-
header_params = {
|
1309
|
-
|
1310
|
-
|
1837
|
+
header_params = {}
|
1838
|
+
if request.name
|
1839
|
+
header_params["name"] = request.name
|
1840
|
+
end
|
1841
|
+
|
1311
1842
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1312
1843
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1313
1844
|
|
1314
1845
|
options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
|
1315
1846
|
metadata: metadata,
|
1316
1847
|
retry_policy: @config.rpcs.get_tag.retry_policy
|
1317
|
-
|
1848
|
+
|
1849
|
+
options.apply_defaults timeout: @config.timeout,
|
1850
|
+
metadata: @config.metadata,
|
1318
1851
|
retry_policy: @config.retry_policy
|
1319
1852
|
|
1320
1853
|
@artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation|
|
@@ -1358,6 +1891,21 @@ module Google
|
|
1358
1891
|
#
|
1359
1892
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1360
1893
|
#
|
1894
|
+
# @example Basic example
|
1895
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1896
|
+
#
|
1897
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1898
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1899
|
+
#
|
1900
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1901
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest.new
|
1902
|
+
#
|
1903
|
+
# # Call the create_tag method.
|
1904
|
+
# result = client.create_tag request
|
1905
|
+
#
|
1906
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag.
|
1907
|
+
# p result
|
1908
|
+
#
|
1361
1909
|
def create_tag request, options = nil
|
1362
1910
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1363
1911
|
|
@@ -1375,16 +1923,20 @@ module Google
|
|
1375
1923
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1376
1924
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1377
1925
|
|
1378
|
-
header_params = {
|
1379
|
-
|
1380
|
-
|
1926
|
+
header_params = {}
|
1927
|
+
if request.parent
|
1928
|
+
header_params["parent"] = request.parent
|
1929
|
+
end
|
1930
|
+
|
1381
1931
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1382
1932
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1383
1933
|
|
1384
1934
|
options.apply_defaults timeout: @config.rpcs.create_tag.timeout,
|
1385
1935
|
metadata: metadata,
|
1386
1936
|
retry_policy: @config.rpcs.create_tag.retry_policy
|
1387
|
-
|
1937
|
+
|
1938
|
+
options.apply_defaults timeout: @config.timeout,
|
1939
|
+
metadata: @config.metadata,
|
1388
1940
|
retry_policy: @config.retry_policy
|
1389
1941
|
|
1390
1942
|
@artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation|
|
@@ -1428,6 +1980,21 @@ module Google
|
|
1428
1980
|
#
|
1429
1981
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1430
1982
|
#
|
1983
|
+
# @example Basic example
|
1984
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
1985
|
+
#
|
1986
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1987
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
1988
|
+
#
|
1989
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1990
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest.new
|
1991
|
+
#
|
1992
|
+
# # Call the update_tag method.
|
1993
|
+
# result = client.update_tag request
|
1994
|
+
#
|
1995
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::Tag.
|
1996
|
+
# p result
|
1997
|
+
#
|
1431
1998
|
def update_tag request, options = nil
|
1432
1999
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1433
2000
|
|
@@ -1445,16 +2012,20 @@ module Google
|
|
1445
2012
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1446
2013
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1447
2014
|
|
1448
|
-
header_params = {
|
1449
|
-
|
1450
|
-
|
2015
|
+
header_params = {}
|
2016
|
+
if request.tag&.name
|
2017
|
+
header_params["tag.name"] = request.tag.name
|
2018
|
+
end
|
2019
|
+
|
1451
2020
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1452
2021
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1453
2022
|
|
1454
2023
|
options.apply_defaults timeout: @config.rpcs.update_tag.timeout,
|
1455
2024
|
metadata: metadata,
|
1456
2025
|
retry_policy: @config.rpcs.update_tag.retry_policy
|
1457
|
-
|
2026
|
+
|
2027
|
+
options.apply_defaults timeout: @config.timeout,
|
2028
|
+
metadata: @config.metadata,
|
1458
2029
|
retry_policy: @config.retry_policy
|
1459
2030
|
|
1460
2031
|
@artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation|
|
@@ -1494,6 +2065,21 @@ module Google
|
|
1494
2065
|
#
|
1495
2066
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1496
2067
|
#
|
2068
|
+
# @example Basic example
|
2069
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
2070
|
+
#
|
2071
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2072
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
2073
|
+
#
|
2074
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2075
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest.new
|
2076
|
+
#
|
2077
|
+
# # Call the delete_tag method.
|
2078
|
+
# result = client.delete_tag request
|
2079
|
+
#
|
2080
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2081
|
+
# p result
|
2082
|
+
#
|
1497
2083
|
def delete_tag request, options = nil
|
1498
2084
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1499
2085
|
|
@@ -1511,16 +2097,20 @@ module Google
|
|
1511
2097
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1512
2098
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1513
2099
|
|
1514
|
-
header_params = {
|
1515
|
-
|
1516
|
-
|
2100
|
+
header_params = {}
|
2101
|
+
if request.name
|
2102
|
+
header_params["name"] = request.name
|
2103
|
+
end
|
2104
|
+
|
1517
2105
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1518
2106
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1519
2107
|
|
1520
2108
|
options.apply_defaults timeout: @config.rpcs.delete_tag.timeout,
|
1521
2109
|
metadata: metadata,
|
1522
2110
|
retry_policy: @config.rpcs.delete_tag.retry_policy
|
1523
|
-
|
2111
|
+
|
2112
|
+
options.apply_defaults timeout: @config.timeout,
|
2113
|
+
metadata: @config.metadata,
|
1524
2114
|
retry_policy: @config.retry_policy
|
1525
2115
|
|
1526
2116
|
@artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation|
|
@@ -1566,6 +2156,21 @@ module Google
|
|
1566
2156
|
#
|
1567
2157
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1568
2158
|
#
|
2159
|
+
# @example Basic example
|
2160
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
2161
|
+
#
|
2162
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2163
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
2164
|
+
#
|
2165
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2166
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
2167
|
+
#
|
2168
|
+
# # Call the set_iam_policy method.
|
2169
|
+
# result = client.set_iam_policy request
|
2170
|
+
#
|
2171
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
2172
|
+
# p result
|
2173
|
+
#
|
1569
2174
|
def set_iam_policy request, options = nil
|
1570
2175
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1571
2176
|
|
@@ -1583,16 +2188,20 @@ module Google
|
|
1583
2188
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1584
2189
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1585
2190
|
|
1586
|
-
header_params = {
|
1587
|
-
|
1588
|
-
|
2191
|
+
header_params = {}
|
2192
|
+
if request.resource
|
2193
|
+
header_params["resource"] = request.resource
|
2194
|
+
end
|
2195
|
+
|
1589
2196
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1590
2197
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1591
2198
|
|
1592
2199
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1593
2200
|
metadata: metadata,
|
1594
2201
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1595
|
-
|
2202
|
+
|
2203
|
+
options.apply_defaults timeout: @config.timeout,
|
2204
|
+
metadata: @config.metadata,
|
1596
2205
|
retry_policy: @config.retry_policy
|
1597
2206
|
|
1598
2207
|
@artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -1636,6 +2245,21 @@ module Google
|
|
1636
2245
|
#
|
1637
2246
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1638
2247
|
#
|
2248
|
+
# @example Basic example
|
2249
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
2250
|
+
#
|
2251
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2252
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
2253
|
+
#
|
2254
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2255
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
2256
|
+
#
|
2257
|
+
# # Call the get_iam_policy method.
|
2258
|
+
# result = client.get_iam_policy request
|
2259
|
+
#
|
2260
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
2261
|
+
# p result
|
2262
|
+
#
|
1639
2263
|
def get_iam_policy request, options = nil
|
1640
2264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1641
2265
|
|
@@ -1653,16 +2277,20 @@ module Google
|
|
1653
2277
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1654
2278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1655
2279
|
|
1656
|
-
header_params = {
|
1657
|
-
|
1658
|
-
|
2280
|
+
header_params = {}
|
2281
|
+
if request.resource
|
2282
|
+
header_params["resource"] = request.resource
|
2283
|
+
end
|
2284
|
+
|
1659
2285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1660
2286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1661
2287
|
|
1662
2288
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
1663
2289
|
metadata: metadata,
|
1664
2290
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
1665
|
-
|
2291
|
+
|
2292
|
+
options.apply_defaults timeout: @config.timeout,
|
2293
|
+
metadata: @config.metadata,
|
1666
2294
|
retry_policy: @config.retry_policy
|
1667
2295
|
|
1668
2296
|
@artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1708,6 +2336,21 @@ module Google
|
|
1708
2336
|
#
|
1709
2337
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1710
2338
|
#
|
2339
|
+
# @example Basic example
|
2340
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
2341
|
+
#
|
2342
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2343
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
2344
|
+
#
|
2345
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2346
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
2347
|
+
#
|
2348
|
+
# # Call the test_iam_permissions method.
|
2349
|
+
# result = client.test_iam_permissions request
|
2350
|
+
#
|
2351
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
2352
|
+
# p result
|
2353
|
+
#
|
1711
2354
|
def test_iam_permissions request, options = nil
|
1712
2355
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1713
2356
|
|
@@ -1725,16 +2368,20 @@ module Google
|
|
1725
2368
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1726
2369
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1727
2370
|
|
1728
|
-
header_params = {
|
1729
|
-
|
1730
|
-
|
2371
|
+
header_params = {}
|
2372
|
+
if request.resource
|
2373
|
+
header_params["resource"] = request.resource
|
2374
|
+
end
|
2375
|
+
|
1731
2376
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1732
2377
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1733
2378
|
|
1734
2379
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1735
2380
|
metadata: metadata,
|
1736
2381
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1737
|
-
|
2382
|
+
|
2383
|
+
options.apply_defaults timeout: @config.timeout,
|
2384
|
+
metadata: @config.metadata,
|
1738
2385
|
retry_policy: @config.retry_policy
|
1739
2386
|
|
1740
2387
|
@artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1745,6 +2392,178 @@ module Google
|
|
1745
2392
|
raise ::Google::Cloud::Error.from_error(e)
|
1746
2393
|
end
|
1747
2394
|
|
2395
|
+
##
|
2396
|
+
# Retrieves the Settings for the Project.
|
2397
|
+
#
|
2398
|
+
# @overload get_project_settings(request, options = nil)
|
2399
|
+
# Pass arguments to `get_project_settings` via a request object, either of type
|
2400
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash.
|
2401
|
+
#
|
2402
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::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 get_project_settings(name: nil)
|
2409
|
+
# Pass arguments to `get_project_settings` 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 name [::String]
|
2414
|
+
# Required. The name of the projectSettings resource.
|
2415
|
+
#
|
2416
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2417
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
|
2418
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2419
|
+
#
|
2420
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
|
2421
|
+
#
|
2422
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2423
|
+
#
|
2424
|
+
# @example Basic example
|
2425
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
2426
|
+
#
|
2427
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2428
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
2429
|
+
#
|
2430
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2431
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new
|
2432
|
+
#
|
2433
|
+
# # Call the get_project_settings method.
|
2434
|
+
# result = client.get_project_settings request
|
2435
|
+
#
|
2436
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
|
2437
|
+
# p result
|
2438
|
+
#
|
2439
|
+
def get_project_settings request, options = nil
|
2440
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2441
|
+
|
2442
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest
|
2443
|
+
|
2444
|
+
# Converts hash and nil to an options object
|
2445
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2446
|
+
|
2447
|
+
# Customize the options with defaults
|
2448
|
+
metadata = @config.rpcs.get_project_settings.metadata.to_h
|
2449
|
+
|
2450
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2451
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2452
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2453
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
2454
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2455
|
+
|
2456
|
+
header_params = {}
|
2457
|
+
if request.name
|
2458
|
+
header_params["name"] = request.name
|
2459
|
+
end
|
2460
|
+
|
2461
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2462
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2463
|
+
|
2464
|
+
options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
|
2465
|
+
metadata: metadata,
|
2466
|
+
retry_policy: @config.rpcs.get_project_settings.retry_policy
|
2467
|
+
|
2468
|
+
options.apply_defaults timeout: @config.timeout,
|
2469
|
+
metadata: @config.metadata,
|
2470
|
+
retry_policy: @config.retry_policy
|
2471
|
+
|
2472
|
+
@artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation|
|
2473
|
+
yield response, operation if block_given?
|
2474
|
+
return response
|
2475
|
+
end
|
2476
|
+
rescue ::GRPC::BadStatus => e
|
2477
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2478
|
+
end
|
2479
|
+
|
2480
|
+
##
|
2481
|
+
# Updates the Settings for the Project.
|
2482
|
+
#
|
2483
|
+
# @overload update_project_settings(request, options = nil)
|
2484
|
+
# Pass arguments to `update_project_settings` via a request object, either of type
|
2485
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash.
|
2486
|
+
#
|
2487
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash]
|
2488
|
+
# A request object representing the call parameters. Required. To specify no
|
2489
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2490
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2491
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2492
|
+
#
|
2493
|
+
# @overload update_project_settings(project_settings: nil, update_mask: nil)
|
2494
|
+
# Pass arguments to `update_project_settings` via keyword arguments. Note that at
|
2495
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2496
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2497
|
+
#
|
2498
|
+
# @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash]
|
2499
|
+
# The project settings.
|
2500
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2501
|
+
# Field mask to support partial updates.
|
2502
|
+
#
|
2503
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2504
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
|
2505
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2506
|
+
#
|
2507
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
|
2508
|
+
#
|
2509
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2510
|
+
#
|
2511
|
+
# @example Basic example
|
2512
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
2513
|
+
#
|
2514
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2515
|
+
# client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
2516
|
+
#
|
2517
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2518
|
+
# request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new
|
2519
|
+
#
|
2520
|
+
# # Call the update_project_settings method.
|
2521
|
+
# result = client.update_project_settings request
|
2522
|
+
#
|
2523
|
+
# # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
|
2524
|
+
# p result
|
2525
|
+
#
|
2526
|
+
def update_project_settings request, options = nil
|
2527
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2528
|
+
|
2529
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest
|
2530
|
+
|
2531
|
+
# Converts hash and nil to an options object
|
2532
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2533
|
+
|
2534
|
+
# Customize the options with defaults
|
2535
|
+
metadata = @config.rpcs.update_project_settings.metadata.to_h
|
2536
|
+
|
2537
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2538
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2539
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2540
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
2541
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2542
|
+
|
2543
|
+
header_params = {}
|
2544
|
+
if request.project_settings&.name
|
2545
|
+
header_params["project_settings.name"] = request.project_settings.name
|
2546
|
+
end
|
2547
|
+
|
2548
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2549
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2550
|
+
|
2551
|
+
options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
|
2552
|
+
metadata: metadata,
|
2553
|
+
retry_policy: @config.rpcs.update_project_settings.retry_policy
|
2554
|
+
|
2555
|
+
options.apply_defaults timeout: @config.timeout,
|
2556
|
+
metadata: @config.metadata,
|
2557
|
+
retry_policy: @config.retry_policy
|
2558
|
+
|
2559
|
+
@artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation|
|
2560
|
+
yield response, operation if block_given?
|
2561
|
+
return response
|
2562
|
+
end
|
2563
|
+
rescue ::GRPC::BadStatus => e
|
2564
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2565
|
+
end
|
2566
|
+
|
1748
2567
|
##
|
1749
2568
|
# Configuration class for the ArtifactRegistry API.
|
1750
2569
|
#
|
@@ -1758,22 +2577,21 @@ module Google
|
|
1758
2577
|
# Configuration can be applied globally to all clients, or to a single client
|
1759
2578
|
# on construction.
|
1760
2579
|
#
|
1761
|
-
#
|
1762
|
-
#
|
1763
|
-
# To modify the global config, setting the timeout for list_repositories
|
1764
|
-
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1765
|
-
#
|
1766
|
-
# ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
|
1767
|
-
# config.timeout = 10.0
|
1768
|
-
# config.rpcs.list_repositories.timeout = 20.0
|
1769
|
-
# end
|
2580
|
+
# @example
|
1770
2581
|
#
|
1771
|
-
#
|
2582
|
+
# # Modify the global config, setting the timeout for
|
2583
|
+
# # import_apt_artifacts to 20 seconds,
|
2584
|
+
# # and all remaining timeouts to 10 seconds.
|
2585
|
+
# ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
|
2586
|
+
# config.timeout = 10.0
|
2587
|
+
# config.rpcs.import_apt_artifacts.timeout = 20.0
|
2588
|
+
# end
|
1772
2589
|
#
|
1773
|
-
#
|
1774
|
-
#
|
1775
|
-
#
|
1776
|
-
#
|
2590
|
+
# # Apply the above configuration only to a new client.
|
2591
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
|
2592
|
+
# config.timeout = 10.0
|
2593
|
+
# config.rpcs.import_apt_artifacts.timeout = 20.0
|
2594
|
+
# end
|
1777
2595
|
#
|
1778
2596
|
# @!attribute [rw] endpoint
|
1779
2597
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1881,6 +2699,16 @@ module Google
|
|
1881
2699
|
# trigger a retry.
|
1882
2700
|
#
|
1883
2701
|
class Rpcs
|
2702
|
+
##
|
2703
|
+
# RPC-specific configuration for `import_apt_artifacts`
|
2704
|
+
# @return [::Gapic::Config::Method]
|
2705
|
+
#
|
2706
|
+
attr_reader :import_apt_artifacts
|
2707
|
+
##
|
2708
|
+
# RPC-specific configuration for `import_yum_artifacts`
|
2709
|
+
# @return [::Gapic::Config::Method]
|
2710
|
+
#
|
2711
|
+
attr_reader :import_yum_artifacts
|
1884
2712
|
##
|
1885
2713
|
# RPC-specific configuration for `list_repositories`
|
1886
2714
|
# @return [::Gapic::Config::Method]
|
@@ -1986,9 +2814,23 @@ module Google
|
|
1986
2814
|
# @return [::Gapic::Config::Method]
|
1987
2815
|
#
|
1988
2816
|
attr_reader :test_iam_permissions
|
2817
|
+
##
|
2818
|
+
# RPC-specific configuration for `get_project_settings`
|
2819
|
+
# @return [::Gapic::Config::Method]
|
2820
|
+
#
|
2821
|
+
attr_reader :get_project_settings
|
2822
|
+
##
|
2823
|
+
# RPC-specific configuration for `update_project_settings`
|
2824
|
+
# @return [::Gapic::Config::Method]
|
2825
|
+
#
|
2826
|
+
attr_reader :update_project_settings
|
1989
2827
|
|
1990
2828
|
# @private
|
1991
2829
|
def initialize parent_rpcs = nil
|
2830
|
+
import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts
|
2831
|
+
@import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config
|
2832
|
+
import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts
|
2833
|
+
@import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config
|
1992
2834
|
list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
|
1993
2835
|
@list_repositories = ::Gapic::Config::Method.new list_repositories_config
|
1994
2836
|
get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
|
@@ -2031,6 +2873,10 @@ module Google
|
|
2031
2873
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2032
2874
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
2033
2875
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
2876
|
+
get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings
|
2877
|
+
@get_project_settings = ::Gapic::Config::Method.new get_project_settings_config
|
2878
|
+
update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings
|
2879
|
+
@update_project_settings = ::Gapic::Config::Method.new update_project_settings_config
|
2034
2880
|
|
2035
2881
|
yield self if block_given?
|
2036
2882
|
end
|