google-cloud-artifact_registry-v1 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +857 -98
  4. data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +12 -14
  5. data/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +122 -0
  6. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +2888 -0
  7. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +793 -0
  8. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +2123 -0
  9. data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest.rb +66 -0
  10. data/lib/google/cloud/artifact_registry/v1/artifact_registry.rb +6 -0
  11. data/lib/google/cloud/artifact_registry/v1/bindings_override.rb +102 -0
  12. data/lib/google/cloud/artifact_registry/v1/rest.rb +38 -0
  13. data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
  14. data/lib/google/cloud/artifact_registry/v1.rb +5 -0
  15. data/lib/google/devtools/artifactregistry/v1/artifact_pb.rb +75 -0
  16. data/lib/google/devtools/artifactregistry/v1/file_pb.rb +2 -0
  17. data/lib/google/devtools/artifactregistry/v1/package_pb.rb +1 -0
  18. data/lib/google/devtools/artifactregistry/v1/service_pb.rb +1 -0
  19. data/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +16 -0
  20. data/lib/google/devtools/artifactregistry/v1/version_pb.rb +4 -0
  21. data/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb +42 -0
  22. data/proto_docs/google/devtools/artifactregistry/v1/artifact.rb +226 -3
  23. data/proto_docs/google/devtools/artifactregistry/v1/file.rb +11 -7
  24. data/proto_docs/google/devtools/artifactregistry/v1/version.rb +11 -1
  25. data/proto_docs/google/devtools/artifactregistry/v1/vpcsc_config.rb +82 -0
  26. metadata +19 -10
@@ -198,23 +198,476 @@ module Google
198
198
  # @param options [::Gapic::CallOptions, ::Hash]
199
199
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
200
200
  #
201
- # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil)
201
+ # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil)
202
202
  # Pass arguments to `list_docker_images` via keyword arguments. Note that at
203
203
  # least one keyword argument is required. To specify no parameters, or to keep all
204
204
  # the default parameter values, pass an empty Hash as a request object (see above).
205
205
  #
206
206
  # @param parent [::String]
207
- # Required. The name of the parent resource whose docker images will be listed.
207
+ # Required. The name of the parent resource whose docker images will be
208
+ # listed.
208
209
  # @param page_size [::Integer]
209
210
  # The maximum number of artifacts to return.
210
211
  # @param page_token [::String]
211
212
  # The next_page_token value returned from a previous list request, if any.
213
+ # @param order_by [::String]
214
+ # The field to order the results by.
215
+ #
216
+ # @yield [response, operation] Access the result along with the RPC operation
217
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>]
218
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
+ #
220
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/cloud/artifact_registry/v1"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new
232
+ #
233
+ # # Call the list_docker_images method.
234
+ # result = client.list_docker_images request
235
+ #
236
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
237
+ # # over elements, and API calls will be issued to fetch pages as needed.
238
+ # result.each do |item|
239
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage.
240
+ # p item
241
+ # end
242
+ #
243
+ def list_docker_images request, options = nil
244
+ raise ::ArgumentError, "request must be provided" if request.nil?
245
+
246
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest
247
+
248
+ # Converts hash and nil to an options object
249
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
250
+
251
+ # Customize the options with defaults
252
+ metadata = @config.rpcs.list_docker_images.metadata.to_h
253
+
254
+ # Set x-goog-api-client and x-goog-user-project headers
255
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
257
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
258
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
259
+
260
+ header_params = {}
261
+ if request.parent
262
+ header_params["parent"] = request.parent
263
+ end
264
+
265
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
266
+ metadata[:"x-goog-request-params"] ||= request_params_header
267
+
268
+ options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout,
269
+ metadata: metadata,
270
+ retry_policy: @config.rpcs.list_docker_images.retry_policy
271
+
272
+ options.apply_defaults timeout: @config.timeout,
273
+ metadata: @config.metadata,
274
+ retry_policy: @config.retry_policy
275
+
276
+ @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation|
277
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options
278
+ yield response, operation if block_given?
279
+ return response
280
+ end
281
+ rescue ::GRPC::BadStatus => e
282
+ raise ::Google::Cloud::Error.from_error(e)
283
+ end
284
+
285
+ ##
286
+ # Gets a docker image.
287
+ #
288
+ # @overload get_docker_image(request, options = nil)
289
+ # Pass arguments to `get_docker_image` via a request object, either of type
290
+ # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash.
291
+ #
292
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash]
293
+ # A request object representing the call parameters. Required. To specify no
294
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
295
+ # @param options [::Gapic::CallOptions, ::Hash]
296
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
297
+ #
298
+ # @overload get_docker_image(name: nil)
299
+ # Pass arguments to `get_docker_image` via keyword arguments. Note that at
300
+ # least one keyword argument is required. To specify no parameters, or to keep all
301
+ # the default parameter values, pass an empty Hash as a request object (see above).
302
+ #
303
+ # @param name [::String]
304
+ # Required. The name of the docker images.
305
+ #
306
+ # @yield [response, operation] Access the result along with the RPC operation
307
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
308
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
309
+ #
310
+ # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
311
+ #
312
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/cloud/artifact_registry/v1"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new
322
+ #
323
+ # # Call the get_docker_image method.
324
+ # result = client.get_docker_image request
325
+ #
326
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage.
327
+ # p result
328
+ #
329
+ def get_docker_image request, options = nil
330
+ raise ::ArgumentError, "request must be provided" if request.nil?
331
+
332
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest
333
+
334
+ # Converts hash and nil to an options object
335
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
336
+
337
+ # Customize the options with defaults
338
+ metadata = @config.rpcs.get_docker_image.metadata.to_h
339
+
340
+ # Set x-goog-api-client and x-goog-user-project headers
341
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
342
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
343
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
344
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
345
+
346
+ header_params = {}
347
+ if request.name
348
+ header_params["name"] = request.name
349
+ end
350
+
351
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
352
+ metadata[:"x-goog-request-params"] ||= request_params_header
353
+
354
+ options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout,
355
+ metadata: metadata,
356
+ retry_policy: @config.rpcs.get_docker_image.retry_policy
357
+
358
+ options.apply_defaults timeout: @config.timeout,
359
+ metadata: @config.metadata,
360
+ retry_policy: @config.retry_policy
361
+
362
+ @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation|
363
+ yield response, operation if block_given?
364
+ return response
365
+ end
366
+ rescue ::GRPC::BadStatus => e
367
+ raise ::Google::Cloud::Error.from_error(e)
368
+ end
369
+
370
+ ##
371
+ # Lists maven artifacts.
372
+ #
373
+ # @overload list_maven_artifacts(request, options = nil)
374
+ # Pass arguments to `list_maven_artifacts` via a request object, either of type
375
+ # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash.
376
+ #
377
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash]
378
+ # A request object representing the call parameters. Required. To specify no
379
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
380
+ # @param options [::Gapic::CallOptions, ::Hash]
381
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
382
+ #
383
+ # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil)
384
+ # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at
385
+ # least one keyword argument is required. To specify no parameters, or to keep all
386
+ # the default parameter values, pass an empty Hash as a request object (see above).
387
+ #
388
+ # @param parent [::String]
389
+ # Required. The name of the parent resource whose maven artifacts will be
390
+ # listed.
391
+ # @param page_size [::Integer]
392
+ # The maximum number of artifacts to return.
393
+ # @param page_token [::String]
394
+ # The next_page_token value returned from a previous list request, if any.
395
+ #
396
+ # @yield [response, operation] Access the result along with the RPC operation
397
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>]
398
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
399
+ #
400
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>]
401
+ #
402
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
403
+ #
404
+ # @example Basic example
405
+ # require "google/cloud/artifact_registry/v1"
406
+ #
407
+ # # Create a client object. The client can be reused for multiple calls.
408
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
409
+ #
410
+ # # Create a request. To set request fields, pass in keyword arguments.
411
+ # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new
412
+ #
413
+ # # Call the list_maven_artifacts method.
414
+ # result = client.list_maven_artifacts request
415
+ #
416
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
417
+ # # over elements, and API calls will be issued to fetch pages as needed.
418
+ # result.each do |item|
419
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.
420
+ # p item
421
+ # end
422
+ #
423
+ def list_maven_artifacts request, options = nil
424
+ raise ::ArgumentError, "request must be provided" if request.nil?
425
+
426
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest
427
+
428
+ # Converts hash and nil to an options object
429
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
430
+
431
+ # Customize the options with defaults
432
+ metadata = @config.rpcs.list_maven_artifacts.metadata.to_h
433
+
434
+ # Set x-goog-api-client and x-goog-user-project headers
435
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
436
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
437
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
438
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
439
+
440
+ header_params = {}
441
+ if request.parent
442
+ header_params["parent"] = request.parent
443
+ end
444
+
445
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
446
+ metadata[:"x-goog-request-params"] ||= request_params_header
447
+
448
+ options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout,
449
+ metadata: metadata,
450
+ retry_policy: @config.rpcs.list_maven_artifacts.retry_policy
451
+
452
+ options.apply_defaults timeout: @config.timeout,
453
+ metadata: @config.metadata,
454
+ retry_policy: @config.retry_policy
455
+
456
+ @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation|
457
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, operation, options
458
+ yield response, operation if block_given?
459
+ return response
460
+ end
461
+ rescue ::GRPC::BadStatus => e
462
+ raise ::Google::Cloud::Error.from_error(e)
463
+ end
464
+
465
+ ##
466
+ # Gets a maven artifact.
467
+ #
468
+ # @overload get_maven_artifact(request, options = nil)
469
+ # Pass arguments to `get_maven_artifact` via a request object, either of type
470
+ # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash.
471
+ #
472
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash]
473
+ # A request object representing the call parameters. Required. To specify no
474
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
475
+ # @param options [::Gapic::CallOptions, ::Hash]
476
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
477
+ #
478
+ # @overload get_maven_artifact(name: nil)
479
+ # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at
480
+ # least one keyword argument is required. To specify no parameters, or to keep all
481
+ # the default parameter values, pass an empty Hash as a request object (see above).
482
+ #
483
+ # @param name [::String]
484
+ # Required. The name of the maven artifact.
485
+ #
486
+ # @yield [response, operation] Access the result along with the RPC operation
487
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact]
488
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
489
+ #
490
+ # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact]
491
+ #
492
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
493
+ #
494
+ # @example Basic example
495
+ # require "google/cloud/artifact_registry/v1"
496
+ #
497
+ # # Create a client object. The client can be reused for multiple calls.
498
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
499
+ #
500
+ # # Create a request. To set request fields, pass in keyword arguments.
501
+ # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new
502
+ #
503
+ # # Call the get_maven_artifact method.
504
+ # result = client.get_maven_artifact request
505
+ #
506
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact.
507
+ # p result
508
+ #
509
+ def get_maven_artifact request, options = nil
510
+ raise ::ArgumentError, "request must be provided" if request.nil?
511
+
512
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest
513
+
514
+ # Converts hash and nil to an options object
515
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
516
+
517
+ # Customize the options with defaults
518
+ metadata = @config.rpcs.get_maven_artifact.metadata.to_h
519
+
520
+ # Set x-goog-api-client and x-goog-user-project headers
521
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
522
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
523
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
524
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
525
+
526
+ header_params = {}
527
+ if request.name
528
+ header_params["name"] = request.name
529
+ end
530
+
531
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
532
+ metadata[:"x-goog-request-params"] ||= request_params_header
533
+
534
+ options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout,
535
+ metadata: metadata,
536
+ retry_policy: @config.rpcs.get_maven_artifact.retry_policy
537
+
538
+ options.apply_defaults timeout: @config.timeout,
539
+ metadata: @config.metadata,
540
+ retry_policy: @config.retry_policy
541
+
542
+ @artifact_registry_stub.call_rpc :get_maven_artifact, request, options: options do |response, operation|
543
+ yield response, operation if block_given?
544
+ return response
545
+ end
546
+ rescue ::GRPC::BadStatus => e
547
+ raise ::Google::Cloud::Error.from_error(e)
548
+ end
549
+
550
+ ##
551
+ # Lists npm packages.
552
+ #
553
+ # @overload list_npm_packages(request, options = nil)
554
+ # Pass arguments to `list_npm_packages` via a request object, either of type
555
+ # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash.
556
+ #
557
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash]
558
+ # A request object representing the call parameters. Required. To specify no
559
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
560
+ # @param options [::Gapic::CallOptions, ::Hash]
561
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
562
+ #
563
+ # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil)
564
+ # Pass arguments to `list_npm_packages` via keyword arguments. Note that at
565
+ # least one keyword argument is required. To specify no parameters, or to keep all
566
+ # the default parameter values, pass an empty Hash as a request object (see above).
567
+ #
568
+ # @param parent [::String]
569
+ # Required. The name of the parent resource whose npm packages will be
570
+ # listed.
571
+ # @param page_size [::Integer]
572
+ # The maximum number of artifacts to return.
573
+ # @param page_token [::String]
574
+ # The next_page_token value returned from a previous list request, if any.
575
+ #
576
+ # @yield [response, operation] Access the result along with the RPC operation
577
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>]
578
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
579
+ #
580
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>]
581
+ #
582
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
583
+ #
584
+ # @example Basic example
585
+ # require "google/cloud/artifact_registry/v1"
586
+ #
587
+ # # Create a client object. The client can be reused for multiple calls.
588
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
589
+ #
590
+ # # Create a request. To set request fields, pass in keyword arguments.
591
+ # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new
592
+ #
593
+ # # Call the list_npm_packages method.
594
+ # result = client.list_npm_packages request
595
+ #
596
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
597
+ # # over elements, and API calls will be issued to fetch pages as needed.
598
+ # result.each do |item|
599
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.
600
+ # p item
601
+ # end
602
+ #
603
+ def list_npm_packages request, options = nil
604
+ raise ::ArgumentError, "request must be provided" if request.nil?
605
+
606
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest
607
+
608
+ # Converts hash and nil to an options object
609
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
610
+
611
+ # Customize the options with defaults
612
+ metadata = @config.rpcs.list_npm_packages.metadata.to_h
613
+
614
+ # Set x-goog-api-client and x-goog-user-project headers
615
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
616
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
617
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
618
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
619
+
620
+ header_params = {}
621
+ if request.parent
622
+ header_params["parent"] = request.parent
623
+ end
624
+
625
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
626
+ metadata[:"x-goog-request-params"] ||= request_params_header
627
+
628
+ options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout,
629
+ metadata: metadata,
630
+ retry_policy: @config.rpcs.list_npm_packages.retry_policy
631
+
632
+ options.apply_defaults timeout: @config.timeout,
633
+ metadata: @config.metadata,
634
+ retry_policy: @config.retry_policy
635
+
636
+ @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation|
637
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, operation, options
638
+ yield response, operation if block_given?
639
+ return response
640
+ end
641
+ rescue ::GRPC::BadStatus => e
642
+ raise ::Google::Cloud::Error.from_error(e)
643
+ end
644
+
645
+ ##
646
+ # Gets a npm package.
647
+ #
648
+ # @overload get_npm_package(request, options = nil)
649
+ # Pass arguments to `get_npm_package` via a request object, either of type
650
+ # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash.
651
+ #
652
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash]
653
+ # A request object representing the call parameters. Required. To specify no
654
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
655
+ # @param options [::Gapic::CallOptions, ::Hash]
656
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
657
+ #
658
+ # @overload get_npm_package(name: nil)
659
+ # Pass arguments to `get_npm_package` via keyword arguments. Note that at
660
+ # least one keyword argument is required. To specify no parameters, or to keep all
661
+ # the default parameter values, pass an empty Hash as a request object (see above).
662
+ #
663
+ # @param name [::String]
664
+ # Required. The name of the npm package.
212
665
  #
213
666
  # @yield [response, operation] Access the result along with the RPC operation
214
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>]
667
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::NpmPackage]
215
668
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
216
669
  #
217
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>]
670
+ # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage]
218
671
  #
219
672
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
220
673
  #
@@ -225,30 +678,118 @@ module Google
225
678
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
226
679
  #
227
680
  # # Create a request. To set request fields, pass in keyword arguments.
228
- # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new
681
+ # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new
229
682
  #
230
- # # Call the list_docker_images method.
231
- # result = client.list_docker_images request
683
+ # # Call the get_npm_package method.
684
+ # result = client.get_npm_package request
232
685
  #
233
- # # The returned object is of type Gapic::PagedEnumerable. You can
234
- # # iterate over all elements by calling #each, and the enumerable
235
- # # will lazily make API calls to fetch subsequent pages. Other
236
- # # methods are also available for managing paging directly.
237
- # result.each do |response|
238
- # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage.
239
- # p response
686
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage.
687
+ # p result
688
+ #
689
+ def get_npm_package request, options = nil
690
+ raise ::ArgumentError, "request must be provided" if request.nil?
691
+
692
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest
693
+
694
+ # Converts hash and nil to an options object
695
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
696
+
697
+ # Customize the options with defaults
698
+ metadata = @config.rpcs.get_npm_package.metadata.to_h
699
+
700
+ # Set x-goog-api-client and x-goog-user-project headers
701
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
702
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
703
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
704
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
705
+
706
+ header_params = {}
707
+ if request.name
708
+ header_params["name"] = request.name
709
+ end
710
+
711
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
712
+ metadata[:"x-goog-request-params"] ||= request_params_header
713
+
714
+ options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout,
715
+ metadata: metadata,
716
+ retry_policy: @config.rpcs.get_npm_package.retry_policy
717
+
718
+ options.apply_defaults timeout: @config.timeout,
719
+ metadata: @config.metadata,
720
+ retry_policy: @config.retry_policy
721
+
722
+ @artifact_registry_stub.call_rpc :get_npm_package, request, options: options do |response, operation|
723
+ yield response, operation if block_given?
724
+ return response
725
+ end
726
+ rescue ::GRPC::BadStatus => e
727
+ raise ::Google::Cloud::Error.from_error(e)
728
+ end
729
+
730
+ ##
731
+ # Lists python packages.
732
+ #
733
+ # @overload list_python_packages(request, options = nil)
734
+ # Pass arguments to `list_python_packages` via a request object, either of type
735
+ # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash.
736
+ #
737
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash]
738
+ # A request object representing the call parameters. Required. To specify no
739
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
740
+ # @param options [::Gapic::CallOptions, ::Hash]
741
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
742
+ #
743
+ # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil)
744
+ # Pass arguments to `list_python_packages` via keyword arguments. Note that at
745
+ # least one keyword argument is required. To specify no parameters, or to keep all
746
+ # the default parameter values, pass an empty Hash as a request object (see above).
747
+ #
748
+ # @param parent [::String]
749
+ # Required. The name of the parent resource whose python packages will be
750
+ # listed.
751
+ # @param page_size [::Integer]
752
+ # The maximum number of artifacts to return.
753
+ # @param page_token [::String]
754
+ # The next_page_token value returned from a previous list request, if any.
755
+ #
756
+ # @yield [response, operation] Access the result along with the RPC operation
757
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>]
758
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
759
+ #
760
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>]
761
+ #
762
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
763
+ #
764
+ # @example Basic example
765
+ # require "google/cloud/artifact_registry/v1"
766
+ #
767
+ # # Create a client object. The client can be reused for multiple calls.
768
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
769
+ #
770
+ # # Create a request. To set request fields, pass in keyword arguments.
771
+ # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new
772
+ #
773
+ # # Call the list_python_packages method.
774
+ # result = client.list_python_packages request
775
+ #
776
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
777
+ # # over elements, and API calls will be issued to fetch pages as needed.
778
+ # result.each do |item|
779
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.
780
+ # p item
240
781
  # end
241
782
  #
242
- def list_docker_images request, options = nil
783
+ def list_python_packages request, options = nil
243
784
  raise ::ArgumentError, "request must be provided" if request.nil?
244
785
 
245
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest
786
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest
246
787
 
247
788
  # Converts hash and nil to an options object
248
789
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
249
790
 
250
791
  # Customize the options with defaults
251
- metadata = @config.rpcs.list_docker_images.metadata.to_h
792
+ metadata = @config.rpcs.list_python_packages.metadata.to_h
252
793
 
253
794
  # Set x-goog-api-client and x-goog-user-project headers
254
795
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -264,16 +805,16 @@ module Google
264
805
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
265
806
  metadata[:"x-goog-request-params"] ||= request_params_header
266
807
 
267
- options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout,
808
+ options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout,
268
809
  metadata: metadata,
269
- retry_policy: @config.rpcs.list_docker_images.retry_policy
810
+ retry_policy: @config.rpcs.list_python_packages.retry_policy
270
811
 
271
812
  options.apply_defaults timeout: @config.timeout,
272
813
  metadata: @config.metadata,
273
814
  retry_policy: @config.retry_policy
274
815
 
275
- @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation|
276
- response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options
816
+ @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation|
817
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, operation, options
277
818
  yield response, operation if block_given?
278
819
  return response
279
820
  end
@@ -282,31 +823,31 @@ module Google
282
823
  end
283
824
 
284
825
  ##
285
- # Gets a docker image.
826
+ # Gets a python package.
286
827
  #
287
- # @overload get_docker_image(request, options = nil)
288
- # Pass arguments to `get_docker_image` via a request object, either of type
289
- # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash.
828
+ # @overload get_python_package(request, options = nil)
829
+ # Pass arguments to `get_python_package` via a request object, either of type
830
+ # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash.
290
831
  #
291
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash]
832
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash]
292
833
  # A request object representing the call parameters. Required. To specify no
293
834
  # parameters, or to keep all the default parameter values, pass an empty Hash.
294
835
  # @param options [::Gapic::CallOptions, ::Hash]
295
836
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
296
837
  #
297
- # @overload get_docker_image(name: nil)
298
- # Pass arguments to `get_docker_image` via keyword arguments. Note that at
838
+ # @overload get_python_package(name: nil)
839
+ # Pass arguments to `get_python_package` via keyword arguments. Note that at
299
840
  # least one keyword argument is required. To specify no parameters, or to keep all
300
841
  # the default parameter values, pass an empty Hash as a request object (see above).
301
842
  #
302
843
  # @param name [::String]
303
- # Required. The name of the docker images.
844
+ # Required. The name of the python package.
304
845
  #
305
846
  # @yield [response, operation] Access the result along with the RPC operation
306
- # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
847
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::PythonPackage]
307
848
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
308
849
  #
309
- # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
850
+ # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage]
310
851
  #
311
852
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
312
853
  #
@@ -317,24 +858,24 @@ module Google
317
858
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
318
859
  #
319
860
  # # Create a request. To set request fields, pass in keyword arguments.
320
- # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new
861
+ # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new
321
862
  #
322
- # # Call the get_docker_image method.
323
- # result = client.get_docker_image request
863
+ # # Call the get_python_package method.
864
+ # result = client.get_python_package request
324
865
  #
325
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage.
866
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage.
326
867
  # p result
327
868
  #
328
- def get_docker_image request, options = nil
869
+ def get_python_package request, options = nil
329
870
  raise ::ArgumentError, "request must be provided" if request.nil?
330
871
 
331
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest
872
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest
332
873
 
333
874
  # Converts hash and nil to an options object
334
875
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
335
876
 
336
877
  # Customize the options with defaults
337
- metadata = @config.rpcs.get_docker_image.metadata.to_h
878
+ metadata = @config.rpcs.get_python_package.metadata.to_h
338
879
 
339
880
  # Set x-goog-api-client and x-goog-user-project headers
340
881
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -350,15 +891,15 @@ module Google
350
891
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
351
892
  metadata[:"x-goog-request-params"] ||= request_params_header
352
893
 
353
- options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout,
894
+ options.apply_defaults timeout: @config.rpcs.get_python_package.timeout,
354
895
  metadata: metadata,
355
- retry_policy: @config.rpcs.get_docker_image.retry_policy
896
+ retry_policy: @config.rpcs.get_python_package.retry_policy
356
897
 
357
898
  options.apply_defaults timeout: @config.timeout,
358
899
  metadata: @config.metadata,
359
900
  retry_policy: @config.retry_policy
360
901
 
361
- @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation|
902
+ @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation|
362
903
  yield response, operation if block_given?
363
904
  return response
364
905
  end
@@ -412,14 +953,14 @@ module Google
412
953
  # # Call the import_apt_artifacts method.
413
954
  # result = client.import_apt_artifacts request
414
955
  #
415
- # # The returned object is of type Gapic::Operation. You can use this
416
- # # object to check the status of an operation, cancel it, or wait
417
- # # for results. Here is how to block until completion:
956
+ # # The returned object is of type Gapic::Operation. You can use it to
957
+ # # check the status of an operation, cancel it, or wait for results.
958
+ # # Here is how to wait for a response.
418
959
  # result.wait_until_done! timeout: 60
419
960
  # if result.response?
420
961
  # p result.response
421
962
  # else
422
- # puts "Error!"
963
+ # puts "No response received."
423
964
  # end
424
965
  #
425
966
  def import_apt_artifacts request, options = nil
@@ -510,14 +1051,14 @@ module Google
510
1051
  # # Call the import_yum_artifacts method.
511
1052
  # result = client.import_yum_artifacts request
512
1053
  #
513
- # # The returned object is of type Gapic::Operation. You can use this
514
- # # object to check the status of an operation, cancel it, or wait
515
- # # for results. Here is how to block until completion:
1054
+ # # The returned object is of type Gapic::Operation. You can use it to
1055
+ # # check the status of an operation, cancel it, or wait for results.
1056
+ # # Here is how to wait for a response.
516
1057
  # result.wait_until_done! timeout: 60
517
1058
  # if result.response?
518
1059
  # p result.response
519
1060
  # else
520
- # puts "Error!"
1061
+ # puts "No response received."
521
1062
  # end
522
1063
  #
523
1064
  def import_yum_artifacts request, options = nil
@@ -607,13 +1148,11 @@ module Google
607
1148
  # # Call the list_repositories method.
608
1149
  # result = client.list_repositories request
609
1150
  #
610
- # # The returned object is of type Gapic::PagedEnumerable. You can
611
- # # iterate over all elements by calling #each, and the enumerable
612
- # # will lazily make API calls to fetch subsequent pages. Other
613
- # # methods are also available for managing paging directly.
614
- # result.each do |response|
1151
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1152
+ # # over elements, and API calls will be issued to fetch pages as needed.
1153
+ # result.each do |item|
615
1154
  # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository.
616
- # p response
1155
+ # p item
617
1156
  # end
618
1157
  #
619
1158
  def list_repositories request, options = nil
@@ -789,14 +1328,14 @@ module Google
789
1328
  # # Call the create_repository method.
790
1329
  # result = client.create_repository request
791
1330
  #
792
- # # The returned object is of type Gapic::Operation. You can use this
793
- # # object to check the status of an operation, cancel it, or wait
794
- # # for results. Here is how to block until completion:
1331
+ # # The returned object is of type Gapic::Operation. You can use it to
1332
+ # # check the status of an operation, cancel it, or wait for results.
1333
+ # # Here is how to wait for a response.
795
1334
  # result.wait_until_done! timeout: 60
796
1335
  # if result.response?
797
1336
  # p result.response
798
1337
  # else
799
- # puts "Error!"
1338
+ # puts "No response received."
800
1339
  # end
801
1340
  #
802
1341
  def create_repository request, options = nil
@@ -973,14 +1512,14 @@ module Google
973
1512
  # # Call the delete_repository method.
974
1513
  # result = client.delete_repository request
975
1514
  #
976
- # # The returned object is of type Gapic::Operation. You can use this
977
- # # object to check the status of an operation, cancel it, or wait
978
- # # for results. Here is how to block until completion:
1515
+ # # The returned object is of type Gapic::Operation. You can use it to
1516
+ # # check the status of an operation, cancel it, or wait for results.
1517
+ # # Here is how to wait for a response.
979
1518
  # result.wait_until_done! timeout: 60
980
1519
  # if result.response?
981
1520
  # p result.response
982
1521
  # else
983
- # puts "Error!"
1522
+ # puts "No response received."
984
1523
  # end
985
1524
  #
986
1525
  def delete_repository request, options = nil
@@ -1070,13 +1609,11 @@ module Google
1070
1609
  # # Call the list_packages method.
1071
1610
  # result = client.list_packages request
1072
1611
  #
1073
- # # The returned object is of type Gapic::PagedEnumerable. You can
1074
- # # iterate over all elements by calling #each, and the enumerable
1075
- # # will lazily make API calls to fetch subsequent pages. Other
1076
- # # methods are also available for managing paging directly.
1077
- # result.each do |response|
1612
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1613
+ # # over elements, and API calls will be issued to fetch pages as needed.
1614
+ # result.each do |item|
1078
1615
  # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Package.
1079
- # p response
1616
+ # p item
1080
1617
  # end
1081
1618
  #
1082
1619
  def list_packages request, options = nil
@@ -1248,14 +1785,14 @@ module Google
1248
1785
  # # Call the delete_package method.
1249
1786
  # result = client.delete_package request
1250
1787
  #
1251
- # # The returned object is of type Gapic::Operation. You can use this
1252
- # # object to check the status of an operation, cancel it, or wait
1253
- # # for results. Here is how to block until completion:
1788
+ # # The returned object is of type Gapic::Operation. You can use it to
1789
+ # # check the status of an operation, cancel it, or wait for results.
1790
+ # # Here is how to wait for a response.
1254
1791
  # result.wait_until_done! timeout: 60
1255
1792
  # if result.response?
1256
1793
  # p result.response
1257
1794
  # else
1258
- # puts "Error!"
1795
+ # puts "No response received."
1259
1796
  # end
1260
1797
  #
1261
1798
  def delete_package request, options = nil
@@ -1349,13 +1886,11 @@ module Google
1349
1886
  # # Call the list_versions method.
1350
1887
  # result = client.list_versions request
1351
1888
  #
1352
- # # The returned object is of type Gapic::PagedEnumerable. You can
1353
- # # iterate over all elements by calling #each, and the enumerable
1354
- # # will lazily make API calls to fetch subsequent pages. Other
1355
- # # methods are also available for managing paging directly.
1356
- # result.each do |response|
1889
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1890
+ # # over elements, and API calls will be issued to fetch pages as needed.
1891
+ # result.each do |item|
1357
1892
  # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Version.
1358
- # p response
1893
+ # p item
1359
1894
  # end
1360
1895
  #
1361
1896
  def list_versions request, options = nil
@@ -1532,14 +2067,14 @@ module Google
1532
2067
  # # Call the delete_version method.
1533
2068
  # result = client.delete_version request
1534
2069
  #
1535
- # # The returned object is of type Gapic::Operation. You can use this
1536
- # # object to check the status of an operation, cancel it, or wait
1537
- # # for results. Here is how to block until completion:
2070
+ # # The returned object is of type Gapic::Operation. You can use it to
2071
+ # # check the status of an operation, cancel it, or wait for results.
2072
+ # # Here is how to wait for a response.
1538
2073
  # result.wait_until_done! timeout: 60
1539
2074
  # if result.response?
1540
2075
  # p result.response
1541
2076
  # else
1542
- # puts "Error!"
2077
+ # puts "No response received."
1543
2078
  # end
1544
2079
  #
1545
2080
  def delete_version request, options = nil
@@ -1603,8 +2138,8 @@ module Google
1603
2138
  # the default parameter values, pass an empty Hash as a request object (see above).
1604
2139
  #
1605
2140
  # @param parent [::String]
1606
- # The name of the repository whose files will be listed. For example:
1607
- # "projects/p1/locations/us-central1/repositories/repo1
2141
+ # Required. The name of the repository whose files will be listed. For
2142
+ # example: "projects/p1/locations/us-central1/repositories/repo1
1608
2143
  # @param filter [::String]
1609
2144
  # An expression for filtering the results of the request. Filter rules are
1610
2145
  # case insensitive. The fields eligible for filtering are:
@@ -1645,13 +2180,11 @@ module Google
1645
2180
  # # Call the list_files method.
1646
2181
  # result = client.list_files request
1647
2182
  #
1648
- # # The returned object is of type Gapic::PagedEnumerable. You can
1649
- # # iterate over all elements by calling #each, and the enumerable
1650
- # # will lazily make API calls to fetch subsequent pages. Other
1651
- # # methods are also available for managing paging directly.
1652
- # result.each do |response|
2183
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2184
+ # # over elements, and API calls will be issued to fetch pages as needed.
2185
+ # result.each do |item|
1653
2186
  # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::File.
1654
- # p response
2187
+ # p item
1655
2188
  # end
1656
2189
  #
1657
2190
  def list_files request, options = nil
@@ -1715,7 +2248,7 @@ module Google
1715
2248
  # the default parameter values, pass an empty Hash as a request object (see above).
1716
2249
  #
1717
2250
  # @param name [::String]
1718
- # The name of the file to retrieve.
2251
+ # Required. The name of the file to retrieve.
1719
2252
  #
1720
2253
  # @yield [response, operation] Access the result along with the RPC operation
1721
2254
  # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File]
@@ -1836,13 +2369,11 @@ module Google
1836
2369
  # # Call the list_tags method.
1837
2370
  # result = client.list_tags request
1838
2371
  #
1839
- # # The returned object is of type Gapic::PagedEnumerable. You can
1840
- # # iterate over all elements by calling #each, and the enumerable
1841
- # # will lazily make API calls to fetch subsequent pages. Other
1842
- # # methods are also available for managing paging directly.
1843
- # result.each do |response|
2372
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2373
+ # # over elements, and API calls will be issued to fetch pages as needed.
2374
+ # result.each do |item|
1844
2375
  # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Tag.
1845
- # p response
2376
+ # p item
1846
2377
  # end
1847
2378
  #
1848
2379
  def list_tags request, options = nil
@@ -2684,6 +3215,178 @@ module Google
2684
3215
  raise ::Google::Cloud::Error.from_error(e)
2685
3216
  end
2686
3217
 
3218
+ ##
3219
+ # Retrieves the VPCSC Config for the Project.
3220
+ #
3221
+ # @overload get_vpcsc_config(request, options = nil)
3222
+ # Pass arguments to `get_vpcsc_config` via a request object, either of type
3223
+ # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
3224
+ #
3225
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
3226
+ # A request object representing the call parameters. Required. To specify no
3227
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3228
+ # @param options [::Gapic::CallOptions, ::Hash]
3229
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3230
+ #
3231
+ # @overload get_vpcsc_config(name: nil)
3232
+ # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
3233
+ # least one keyword argument is required. To specify no parameters, or to keep all
3234
+ # the default parameter values, pass an empty Hash as a request object (see above).
3235
+ #
3236
+ # @param name [::String]
3237
+ # Required. The name of the VPCSCConfig resource.
3238
+ #
3239
+ # @yield [response, operation] Access the result along with the RPC operation
3240
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3241
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3242
+ #
3243
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3244
+ #
3245
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3246
+ #
3247
+ # @example Basic example
3248
+ # require "google/cloud/artifact_registry/v1"
3249
+ #
3250
+ # # Create a client object. The client can be reused for multiple calls.
3251
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
3252
+ #
3253
+ # # Create a request. To set request fields, pass in keyword arguments.
3254
+ # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
3255
+ #
3256
+ # # Call the get_vpcsc_config method.
3257
+ # result = client.get_vpcsc_config request
3258
+ #
3259
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3260
+ # p result
3261
+ #
3262
+ def get_vpcsc_config request, options = nil
3263
+ raise ::ArgumentError, "request must be provided" if request.nil?
3264
+
3265
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
3266
+
3267
+ # Converts hash and nil to an options object
3268
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3269
+
3270
+ # Customize the options with defaults
3271
+ metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
3272
+
3273
+ # Set x-goog-api-client and x-goog-user-project headers
3274
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3275
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3276
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
3277
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3278
+
3279
+ header_params = {}
3280
+ if request.name
3281
+ header_params["name"] = request.name
3282
+ end
3283
+
3284
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3285
+ metadata[:"x-goog-request-params"] ||= request_params_header
3286
+
3287
+ options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
3288
+ metadata: metadata,
3289
+ retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
3290
+
3291
+ options.apply_defaults timeout: @config.timeout,
3292
+ metadata: @config.metadata,
3293
+ retry_policy: @config.retry_policy
3294
+
3295
+ @artifact_registry_stub.call_rpc :get_vpcsc_config, request, options: options do |response, operation|
3296
+ yield response, operation if block_given?
3297
+ return response
3298
+ end
3299
+ rescue ::GRPC::BadStatus => e
3300
+ raise ::Google::Cloud::Error.from_error(e)
3301
+ end
3302
+
3303
+ ##
3304
+ # Updates the VPCSC Config for the Project.
3305
+ #
3306
+ # @overload update_vpcsc_config(request, options = nil)
3307
+ # Pass arguments to `update_vpcsc_config` via a request object, either of type
3308
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
3309
+ #
3310
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
3311
+ # A request object representing the call parameters. Required. To specify no
3312
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3313
+ # @param options [::Gapic::CallOptions, ::Hash]
3314
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3315
+ #
3316
+ # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
3317
+ # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
3318
+ # least one keyword argument is required. To specify no parameters, or to keep all
3319
+ # the default parameter values, pass an empty Hash as a request object (see above).
3320
+ #
3321
+ # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
3322
+ # The project config.
3323
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3324
+ # Field mask to support partial updates.
3325
+ #
3326
+ # @yield [response, operation] Access the result along with the RPC operation
3327
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3328
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3329
+ #
3330
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3331
+ #
3332
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3333
+ #
3334
+ # @example Basic example
3335
+ # require "google/cloud/artifact_registry/v1"
3336
+ #
3337
+ # # Create a client object. The client can be reused for multiple calls.
3338
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
3339
+ #
3340
+ # # Create a request. To set request fields, pass in keyword arguments.
3341
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
3342
+ #
3343
+ # # Call the update_vpcsc_config method.
3344
+ # result = client.update_vpcsc_config request
3345
+ #
3346
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3347
+ # p result
3348
+ #
3349
+ def update_vpcsc_config request, options = nil
3350
+ raise ::ArgumentError, "request must be provided" if request.nil?
3351
+
3352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
3353
+
3354
+ # Converts hash and nil to an options object
3355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3356
+
3357
+ # Customize the options with defaults
3358
+ metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
3359
+
3360
+ # Set x-goog-api-client and x-goog-user-project headers
3361
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3363
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
3364
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3365
+
3366
+ header_params = {}
3367
+ if request.vpcsc_config&.name
3368
+ header_params["vpcsc_config.name"] = request.vpcsc_config.name
3369
+ end
3370
+
3371
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3372
+ metadata[:"x-goog-request-params"] ||= request_params_header
3373
+
3374
+ options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
3375
+ metadata: metadata,
3376
+ retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
3377
+
3378
+ options.apply_defaults timeout: @config.timeout,
3379
+ metadata: @config.metadata,
3380
+ retry_policy: @config.retry_policy
3381
+
3382
+ @artifact_registry_stub.call_rpc :update_vpcsc_config, request, options: options do |response, operation|
3383
+ yield response, operation if block_given?
3384
+ return response
3385
+ end
3386
+ rescue ::GRPC::BadStatus => e
3387
+ raise ::Google::Cloud::Error.from_error(e)
3388
+ end
3389
+
2687
3390
  ##
2688
3391
  # Configuration class for the ArtifactRegistry API.
2689
3392
  #
@@ -2830,6 +3533,36 @@ module Google
2830
3533
  #
2831
3534
  attr_reader :get_docker_image
2832
3535
  ##
3536
+ # RPC-specific configuration for `list_maven_artifacts`
3537
+ # @return [::Gapic::Config::Method]
3538
+ #
3539
+ attr_reader :list_maven_artifacts
3540
+ ##
3541
+ # RPC-specific configuration for `get_maven_artifact`
3542
+ # @return [::Gapic::Config::Method]
3543
+ #
3544
+ attr_reader :get_maven_artifact
3545
+ ##
3546
+ # RPC-specific configuration for `list_npm_packages`
3547
+ # @return [::Gapic::Config::Method]
3548
+ #
3549
+ attr_reader :list_npm_packages
3550
+ ##
3551
+ # RPC-specific configuration for `get_npm_package`
3552
+ # @return [::Gapic::Config::Method]
3553
+ #
3554
+ attr_reader :get_npm_package
3555
+ ##
3556
+ # RPC-specific configuration for `list_python_packages`
3557
+ # @return [::Gapic::Config::Method]
3558
+ #
3559
+ attr_reader :list_python_packages
3560
+ ##
3561
+ # RPC-specific configuration for `get_python_package`
3562
+ # @return [::Gapic::Config::Method]
3563
+ #
3564
+ attr_reader :get_python_package
3565
+ ##
2833
3566
  # RPC-specific configuration for `import_apt_artifacts`
2834
3567
  # @return [::Gapic::Config::Method]
2835
3568
  #
@@ -2954,6 +3687,16 @@ module Google
2954
3687
  # @return [::Gapic::Config::Method]
2955
3688
  #
2956
3689
  attr_reader :update_project_settings
3690
+ ##
3691
+ # RPC-specific configuration for `get_vpcsc_config`
3692
+ # @return [::Gapic::Config::Method]
3693
+ #
3694
+ attr_reader :get_vpcsc_config
3695
+ ##
3696
+ # RPC-specific configuration for `update_vpcsc_config`
3697
+ # @return [::Gapic::Config::Method]
3698
+ #
3699
+ attr_reader :update_vpcsc_config
2957
3700
 
2958
3701
  # @private
2959
3702
  def initialize parent_rpcs = nil
@@ -2961,6 +3704,18 @@ module Google
2961
3704
  @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config
2962
3705
  get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image
2963
3706
  @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config
3707
+ list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts
3708
+ @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config
3709
+ get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact
3710
+ @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config
3711
+ list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages
3712
+ @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config
3713
+ get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package
3714
+ @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config
3715
+ list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages
3716
+ @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config
3717
+ get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package
3718
+ @get_python_package = ::Gapic::Config::Method.new get_python_package_config
2964
3719
  import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts
2965
3720
  @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config
2966
3721
  import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts
@@ -3011,6 +3766,10 @@ module Google
3011
3766
  @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config
3012
3767
  update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings
3013
3768
  @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config
3769
+ get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config
3770
+ @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config
3771
+ update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config
3772
+ @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config
3014
3773
 
3015
3774
  yield self if block_given?
3016
3775
  end