google-cloud-artifact_registry-v1 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/devtools/artifactregistry/v1/service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -153,6 +154,12 @@ module Google
153
154
  config.endpoint = @config.endpoint
154
155
  end
155
156
 
157
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
158
+ config.credentials = credentials
159
+ config.quota_project = @quota_project_id
160
+ config.endpoint = @config.endpoint
161
+ end
162
+
156
163
  @artifact_registry_stub = ::Gapic::ServiceStub.new(
157
164
  ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Stub,
158
165
  credentials: credentials,
@@ -163,44 +170,600 @@ module Google
163
170
  end
164
171
 
165
172
  ##
166
- # Get the associated client for long-running operations.
173
+ # Get the associated client for long-running operations.
174
+ #
175
+ # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations]
176
+ #
177
+ attr_reader :operations_client
178
+
179
+ ##
180
+ # Get the associated client for mix-in of the Locations.
181
+ #
182
+ # @return [Google::Cloud::Location::Locations::Client]
183
+ #
184
+ attr_reader :location_client
185
+
186
+ # Service calls
187
+
188
+ ##
189
+ # Lists docker images.
190
+ #
191
+ # @overload list_docker_images(request, options = nil)
192
+ # Pass arguments to `list_docker_images` via a request object, either of type
193
+ # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash.
194
+ #
195
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash]
196
+ # A request object representing the call parameters. Required. To specify no
197
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
198
+ # @param options [::Gapic::CallOptions, ::Hash]
199
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
200
+ #
201
+ # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil, order_by: nil)
202
+ # Pass arguments to `list_docker_images` via keyword arguments. Note that at
203
+ # least one keyword argument is required. To specify no parameters, or to keep all
204
+ # the default parameter values, pass an empty Hash as a request object (see above).
205
+ #
206
+ # @param parent [::String]
207
+ # Required. The name of the parent resource whose docker images will be
208
+ # listed.
209
+ # @param page_size [::Integer]
210
+ # The maximum number of artifacts to return.
211
+ # @param page_token [::String]
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
237
+ # # iterate over all elements by calling #each, and the enumerable
238
+ # # will lazily make API calls to fetch subsequent pages. Other
239
+ # # methods are also available for managing paging directly.
240
+ # result.each do |response|
241
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage.
242
+ # p response
243
+ # end
244
+ #
245
+ def list_docker_images request, options = nil
246
+ raise ::ArgumentError, "request must be provided" if request.nil?
247
+
248
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest
249
+
250
+ # Converts hash and nil to an options object
251
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
252
+
253
+ # Customize the options with defaults
254
+ metadata = @config.rpcs.list_docker_images.metadata.to_h
255
+
256
+ # Set x-goog-api-client and x-goog-user-project headers
257
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
258
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
259
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
260
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
261
+
262
+ header_params = {}
263
+ if request.parent
264
+ header_params["parent"] = request.parent
265
+ end
266
+
267
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
268
+ metadata[:"x-goog-request-params"] ||= request_params_header
269
+
270
+ options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout,
271
+ metadata: metadata,
272
+ retry_policy: @config.rpcs.list_docker_images.retry_policy
273
+
274
+ options.apply_defaults timeout: @config.timeout,
275
+ metadata: @config.metadata,
276
+ retry_policy: @config.retry_policy
277
+
278
+ @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation|
279
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options
280
+ yield response, operation if block_given?
281
+ return response
282
+ end
283
+ rescue ::GRPC::BadStatus => e
284
+ raise ::Google::Cloud::Error.from_error(e)
285
+ end
286
+
287
+ ##
288
+ # Gets a docker image.
289
+ #
290
+ # @overload get_docker_image(request, options = nil)
291
+ # Pass arguments to `get_docker_image` via a request object, either of type
292
+ # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash.
293
+ #
294
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash]
295
+ # A request object representing the call parameters. Required. To specify no
296
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
297
+ # @param options [::Gapic::CallOptions, ::Hash]
298
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
299
+ #
300
+ # @overload get_docker_image(name: nil)
301
+ # Pass arguments to `get_docker_image` via keyword arguments. Note that at
302
+ # least one keyword argument is required. To specify no parameters, or to keep all
303
+ # the default parameter values, pass an empty Hash as a request object (see above).
304
+ #
305
+ # @param name [::String]
306
+ # Required. The name of the docker images.
307
+ #
308
+ # @yield [response, operation] Access the result along with the RPC operation
309
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
310
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
311
+ #
312
+ # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
313
+ #
314
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
315
+ #
316
+ # @example Basic example
317
+ # require "google/cloud/artifact_registry/v1"
318
+ #
319
+ # # Create a client object. The client can be reused for multiple calls.
320
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
321
+ #
322
+ # # Create a request. To set request fields, pass in keyword arguments.
323
+ # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new
324
+ #
325
+ # # Call the get_docker_image method.
326
+ # result = client.get_docker_image request
327
+ #
328
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage.
329
+ # p result
330
+ #
331
+ def get_docker_image request, options = nil
332
+ raise ::ArgumentError, "request must be provided" if request.nil?
333
+
334
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest
335
+
336
+ # Converts hash and nil to an options object
337
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
338
+
339
+ # Customize the options with defaults
340
+ metadata = @config.rpcs.get_docker_image.metadata.to_h
341
+
342
+ # Set x-goog-api-client and x-goog-user-project headers
343
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
344
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
345
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
346
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
347
+
348
+ header_params = {}
349
+ if request.name
350
+ header_params["name"] = request.name
351
+ end
352
+
353
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
354
+ metadata[:"x-goog-request-params"] ||= request_params_header
355
+
356
+ options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout,
357
+ metadata: metadata,
358
+ retry_policy: @config.rpcs.get_docker_image.retry_policy
359
+
360
+ options.apply_defaults timeout: @config.timeout,
361
+ metadata: @config.metadata,
362
+ retry_policy: @config.retry_policy
363
+
364
+ @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation|
365
+ yield response, operation if block_given?
366
+ return response
367
+ end
368
+ rescue ::GRPC::BadStatus => e
369
+ raise ::Google::Cloud::Error.from_error(e)
370
+ end
371
+
372
+ ##
373
+ # Lists maven artifacts.
374
+ #
375
+ # @overload list_maven_artifacts(request, options = nil)
376
+ # Pass arguments to `list_maven_artifacts` via a request object, either of type
377
+ # {::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest} or an equivalent Hash.
378
+ #
379
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest, ::Hash]
380
+ # A request object representing the call parameters. Required. To specify no
381
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
382
+ # @param options [::Gapic::CallOptions, ::Hash]
383
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
384
+ #
385
+ # @overload list_maven_artifacts(parent: nil, page_size: nil, page_token: nil)
386
+ # Pass arguments to `list_maven_artifacts` via keyword arguments. Note that at
387
+ # least one keyword argument is required. To specify no parameters, or to keep all
388
+ # the default parameter values, pass an empty Hash as a request object (see above).
389
+ #
390
+ # @param parent [::String]
391
+ # Required. The name of the parent resource whose maven artifacts will be
392
+ # listed.
393
+ # @param page_size [::Integer]
394
+ # The maximum number of artifacts to return.
395
+ # @param page_token [::String]
396
+ # The next_page_token value returned from a previous list request, if any.
397
+ #
398
+ # @yield [response, operation] Access the result along with the RPC operation
399
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>]
400
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
401
+ #
402
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::MavenArtifact>]
403
+ #
404
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
405
+ #
406
+ # @example Basic example
407
+ # require "google/cloud/artifact_registry/v1"
408
+ #
409
+ # # Create a client object. The client can be reused for multiple calls.
410
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
411
+ #
412
+ # # Create a request. To set request fields, pass in keyword arguments.
413
+ # request = Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest.new
414
+ #
415
+ # # Call the list_maven_artifacts method.
416
+ # result = client.list_maven_artifacts request
417
+ #
418
+ # # The returned object is of type Gapic::PagedEnumerable. You can
419
+ # # iterate over all elements by calling #each, and the enumerable
420
+ # # will lazily make API calls to fetch subsequent pages. Other
421
+ # # methods are also available for managing paging directly.
422
+ # result.each do |response|
423
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.
424
+ # p response
425
+ # end
426
+ #
427
+ def list_maven_artifacts request, options = nil
428
+ raise ::ArgumentError, "request must be provided" if request.nil?
429
+
430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsRequest
431
+
432
+ # Converts hash and nil to an options object
433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
434
+
435
+ # Customize the options with defaults
436
+ metadata = @config.rpcs.list_maven_artifacts.metadata.to_h
437
+
438
+ # Set x-goog-api-client and x-goog-user-project headers
439
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
441
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
442
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
443
+
444
+ header_params = {}
445
+ if request.parent
446
+ header_params["parent"] = request.parent
447
+ end
448
+
449
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
450
+ metadata[:"x-goog-request-params"] ||= request_params_header
451
+
452
+ options.apply_defaults timeout: @config.rpcs.list_maven_artifacts.timeout,
453
+ metadata: metadata,
454
+ retry_policy: @config.rpcs.list_maven_artifacts.retry_policy
455
+
456
+ options.apply_defaults timeout: @config.timeout,
457
+ metadata: @config.metadata,
458
+ retry_policy: @config.retry_policy
459
+
460
+ @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation|
461
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, operation, options
462
+ yield response, operation if block_given?
463
+ return response
464
+ end
465
+ rescue ::GRPC::BadStatus => e
466
+ raise ::Google::Cloud::Error.from_error(e)
467
+ end
468
+
469
+ ##
470
+ # Gets a maven artifact.
471
+ #
472
+ # @overload get_maven_artifact(request, options = nil)
473
+ # Pass arguments to `get_maven_artifact` via a request object, either of type
474
+ # {::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest} or an equivalent Hash.
475
+ #
476
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest, ::Hash]
477
+ # A request object representing the call parameters. Required. To specify no
478
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
479
+ # @param options [::Gapic::CallOptions, ::Hash]
480
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
481
+ #
482
+ # @overload get_maven_artifact(name: nil)
483
+ # Pass arguments to `get_maven_artifact` via keyword arguments. Note that at
484
+ # least one keyword argument is required. To specify no parameters, or to keep all
485
+ # the default parameter values, pass an empty Hash as a request object (see above).
486
+ #
487
+ # @param name [::String]
488
+ # Required. The name of the maven artifact.
489
+ #
490
+ # @yield [response, operation] Access the result along with the RPC operation
491
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact]
492
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
493
+ #
494
+ # @return [::Google::Cloud::ArtifactRegistry::V1::MavenArtifact]
495
+ #
496
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
497
+ #
498
+ # @example Basic example
499
+ # require "google/cloud/artifact_registry/v1"
500
+ #
501
+ # # Create a client object. The client can be reused for multiple calls.
502
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
503
+ #
504
+ # # Create a request. To set request fields, pass in keyword arguments.
505
+ # request = Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest.new
506
+ #
507
+ # # Call the get_maven_artifact method.
508
+ # result = client.get_maven_artifact request
509
+ #
510
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::MavenArtifact.
511
+ # p result
512
+ #
513
+ def get_maven_artifact request, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request.nil?
515
+
516
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetMavenArtifactRequest
517
+
518
+ # Converts hash and nil to an options object
519
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
520
+
521
+ # Customize the options with defaults
522
+ metadata = @config.rpcs.get_maven_artifact.metadata.to_h
523
+
524
+ # Set x-goog-api-client and x-goog-user-project headers
525
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
526
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
527
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
528
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
529
+
530
+ header_params = {}
531
+ if request.name
532
+ header_params["name"] = request.name
533
+ end
534
+
535
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
536
+ metadata[:"x-goog-request-params"] ||= request_params_header
537
+
538
+ options.apply_defaults timeout: @config.rpcs.get_maven_artifact.timeout,
539
+ metadata: metadata,
540
+ retry_policy: @config.rpcs.get_maven_artifact.retry_policy
541
+
542
+ options.apply_defaults timeout: @config.timeout,
543
+ metadata: @config.metadata,
544
+ retry_policy: @config.retry_policy
545
+
546
+ @artifact_registry_stub.call_rpc :get_maven_artifact, request, options: options do |response, operation|
547
+ yield response, operation if block_given?
548
+ return response
549
+ end
550
+ rescue ::GRPC::BadStatus => e
551
+ raise ::Google::Cloud::Error.from_error(e)
552
+ end
553
+
554
+ ##
555
+ # Lists npm packages.
556
+ #
557
+ # @overload list_npm_packages(request, options = nil)
558
+ # Pass arguments to `list_npm_packages` via a request object, either of type
559
+ # {::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest} or an equivalent Hash.
560
+ #
561
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest, ::Hash]
562
+ # A request object representing the call parameters. Required. To specify no
563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
564
+ # @param options [::Gapic::CallOptions, ::Hash]
565
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
566
+ #
567
+ # @overload list_npm_packages(parent: nil, page_size: nil, page_token: nil)
568
+ # Pass arguments to `list_npm_packages` via keyword arguments. Note that at
569
+ # least one keyword argument is required. To specify no parameters, or to keep all
570
+ # the default parameter values, pass an empty Hash as a request object (see above).
571
+ #
572
+ # @param parent [::String]
573
+ # Required. The name of the parent resource whose npm packages will be
574
+ # listed.
575
+ # @param page_size [::Integer]
576
+ # The maximum number of artifacts to return.
577
+ # @param page_token [::String]
578
+ # The next_page_token value returned from a previous list request, if any.
579
+ #
580
+ # @yield [response, operation] Access the result along with the RPC operation
581
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>]
582
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
583
+ #
584
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::NpmPackage>]
585
+ #
586
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
587
+ #
588
+ # @example Basic example
589
+ # require "google/cloud/artifact_registry/v1"
590
+ #
591
+ # # Create a client object. The client can be reused for multiple calls.
592
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
593
+ #
594
+ # # Create a request. To set request fields, pass in keyword arguments.
595
+ # request = Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest.new
596
+ #
597
+ # # Call the list_npm_packages method.
598
+ # result = client.list_npm_packages request
599
+ #
600
+ # # The returned object is of type Gapic::PagedEnumerable. You can
601
+ # # iterate over all elements by calling #each, and the enumerable
602
+ # # will lazily make API calls to fetch subsequent pages. Other
603
+ # # methods are also available for managing paging directly.
604
+ # result.each do |response|
605
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.
606
+ # p response
607
+ # end
608
+ #
609
+ def list_npm_packages request, options = nil
610
+ raise ::ArgumentError, "request must be provided" if request.nil?
611
+
612
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesRequest
613
+
614
+ # Converts hash and nil to an options object
615
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
616
+
617
+ # Customize the options with defaults
618
+ metadata = @config.rpcs.list_npm_packages.metadata.to_h
619
+
620
+ # Set x-goog-api-client and x-goog-user-project headers
621
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
622
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
623
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
624
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
625
+
626
+ header_params = {}
627
+ if request.parent
628
+ header_params["parent"] = request.parent
629
+ end
630
+
631
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
632
+ metadata[:"x-goog-request-params"] ||= request_params_header
633
+
634
+ options.apply_defaults timeout: @config.rpcs.list_npm_packages.timeout,
635
+ metadata: metadata,
636
+ retry_policy: @config.rpcs.list_npm_packages.retry_policy
637
+
638
+ options.apply_defaults timeout: @config.timeout,
639
+ metadata: @config.metadata,
640
+ retry_policy: @config.retry_policy
641
+
642
+ @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation|
643
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, operation, options
644
+ yield response, operation if block_given?
645
+ return response
646
+ end
647
+ rescue ::GRPC::BadStatus => e
648
+ raise ::Google::Cloud::Error.from_error(e)
649
+ end
650
+
651
+ ##
652
+ # Gets a npm package.
167
653
  #
168
- # @return [::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Operations]
654
+ # @overload get_npm_package(request, options = nil)
655
+ # Pass arguments to `get_npm_package` via a request object, either of type
656
+ # {::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest} or an equivalent Hash.
169
657
  #
170
- attr_reader :operations_client
658
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest, ::Hash]
659
+ # A request object representing the call parameters. Required. To specify no
660
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
661
+ # @param options [::Gapic::CallOptions, ::Hash]
662
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
663
+ #
664
+ # @overload get_npm_package(name: nil)
665
+ # Pass arguments to `get_npm_package` via keyword arguments. Note that at
666
+ # least one keyword argument is required. To specify no parameters, or to keep all
667
+ # the default parameter values, pass an empty Hash as a request object (see above).
668
+ #
669
+ # @param name [::String]
670
+ # Required. The name of the npm package.
671
+ #
672
+ # @yield [response, operation] Access the result along with the RPC operation
673
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::NpmPackage]
674
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
675
+ #
676
+ # @return [::Google::Cloud::ArtifactRegistry::V1::NpmPackage]
677
+ #
678
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
679
+ #
680
+ # @example Basic example
681
+ # require "google/cloud/artifact_registry/v1"
682
+ #
683
+ # # Create a client object. The client can be reused for multiple calls.
684
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
685
+ #
686
+ # # Create a request. To set request fields, pass in keyword arguments.
687
+ # request = Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest.new
688
+ #
689
+ # # Call the get_npm_package method.
690
+ # result = client.get_npm_package request
691
+ #
692
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::NpmPackage.
693
+ # p result
694
+ #
695
+ def get_npm_package request, options = nil
696
+ raise ::ArgumentError, "request must be provided" if request.nil?
171
697
 
172
- # Service calls
698
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetNpmPackageRequest
699
+
700
+ # Converts hash and nil to an options object
701
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
702
+
703
+ # Customize the options with defaults
704
+ metadata = @config.rpcs.get_npm_package.metadata.to_h
705
+
706
+ # Set x-goog-api-client and x-goog-user-project headers
707
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
708
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
709
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
710
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
711
+
712
+ header_params = {}
713
+ if request.name
714
+ header_params["name"] = request.name
715
+ end
716
+
717
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
718
+ metadata[:"x-goog-request-params"] ||= request_params_header
719
+
720
+ options.apply_defaults timeout: @config.rpcs.get_npm_package.timeout,
721
+ metadata: metadata,
722
+ retry_policy: @config.rpcs.get_npm_package.retry_policy
723
+
724
+ options.apply_defaults timeout: @config.timeout,
725
+ metadata: @config.metadata,
726
+ retry_policy: @config.retry_policy
727
+
728
+ @artifact_registry_stub.call_rpc :get_npm_package, request, options: options do |response, operation|
729
+ yield response, operation if block_given?
730
+ return response
731
+ end
732
+ rescue ::GRPC::BadStatus => e
733
+ raise ::Google::Cloud::Error.from_error(e)
734
+ end
173
735
 
174
736
  ##
175
- # Lists docker images.
737
+ # Lists python packages.
176
738
  #
177
- # @overload list_docker_images(request, options = nil)
178
- # Pass arguments to `list_docker_images` via a request object, either of type
179
- # {::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest} or an equivalent Hash.
739
+ # @overload list_python_packages(request, options = nil)
740
+ # Pass arguments to `list_python_packages` via a request object, either of type
741
+ # {::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest} or an equivalent Hash.
180
742
  #
181
- # @param request [::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::Hash]
743
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest, ::Hash]
182
744
  # A request object representing the call parameters. Required. To specify no
183
745
  # parameters, or to keep all the default parameter values, pass an empty Hash.
184
746
  # @param options [::Gapic::CallOptions, ::Hash]
185
747
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
186
748
  #
187
- # @overload list_docker_images(parent: nil, page_size: nil, page_token: nil)
188
- # Pass arguments to `list_docker_images` via keyword arguments. Note that at
749
+ # @overload list_python_packages(parent: nil, page_size: nil, page_token: nil)
750
+ # Pass arguments to `list_python_packages` via keyword arguments. Note that at
189
751
  # least one keyword argument is required. To specify no parameters, or to keep all
190
752
  # the default parameter values, pass an empty Hash as a request object (see above).
191
753
  #
192
754
  # @param parent [::String]
193
- # Required. The name of the parent resource whose docker images will be listed.
755
+ # Required. The name of the parent resource whose python packages will be
756
+ # listed.
194
757
  # @param page_size [::Integer]
195
758
  # The maximum number of artifacts to return.
196
759
  # @param page_token [::String]
197
760
  # The next_page_token value returned from a previous list request, if any.
198
761
  #
199
762
  # @yield [response, operation] Access the result along with the RPC operation
200
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>]
763
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>]
201
764
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
202
765
  #
203
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>]
766
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::PythonPackage>]
204
767
  #
205
768
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
206
769
  #
@@ -211,30 +774,30 @@ module Google
211
774
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
212
775
  #
213
776
  # # Create a request. To set request fields, pass in keyword arguments.
214
- # request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new
777
+ # request = Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest.new
215
778
  #
216
- # # Call the list_docker_images method.
217
- # result = client.list_docker_images request
779
+ # # Call the list_python_packages method.
780
+ # result = client.list_python_packages request
218
781
  #
219
782
  # # The returned object is of type Gapic::PagedEnumerable. You can
220
783
  # # iterate over all elements by calling #each, and the enumerable
221
784
  # # will lazily make API calls to fetch subsequent pages. Other
222
785
  # # methods are also available for managing paging directly.
223
786
  # result.each do |response|
224
- # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage.
787
+ # # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.
225
788
  # p response
226
789
  # end
227
790
  #
228
- def list_docker_images request, options = nil
791
+ def list_python_packages request, options = nil
229
792
  raise ::ArgumentError, "request must be provided" if request.nil?
230
793
 
231
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest
794
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesRequest
232
795
 
233
796
  # Converts hash and nil to an options object
234
797
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
235
798
 
236
799
  # Customize the options with defaults
237
- metadata = @config.rpcs.list_docker_images.metadata.to_h
800
+ metadata = @config.rpcs.list_python_packages.metadata.to_h
238
801
 
239
802
  # Set x-goog-api-client and x-goog-user-project headers
240
803
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -250,16 +813,16 @@ module Google
250
813
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
251
814
  metadata[:"x-goog-request-params"] ||= request_params_header
252
815
 
253
- options.apply_defaults timeout: @config.rpcs.list_docker_images.timeout,
816
+ options.apply_defaults timeout: @config.rpcs.list_python_packages.timeout,
254
817
  metadata: metadata,
255
- retry_policy: @config.rpcs.list_docker_images.retry_policy
818
+ retry_policy: @config.rpcs.list_python_packages.retry_policy
256
819
 
257
820
  options.apply_defaults timeout: @config.timeout,
258
821
  metadata: @config.metadata,
259
822
  retry_policy: @config.retry_policy
260
823
 
261
- @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation|
262
- response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options
824
+ @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation|
825
+ response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, operation, options
263
826
  yield response, operation if block_given?
264
827
  return response
265
828
  end
@@ -268,31 +831,31 @@ module Google
268
831
  end
269
832
 
270
833
  ##
271
- # Gets a docker image.
834
+ # Gets a python package.
272
835
  #
273
- # @overload get_docker_image(request, options = nil)
274
- # Pass arguments to `get_docker_image` via a request object, either of type
275
- # {::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest} or an equivalent Hash.
836
+ # @overload get_python_package(request, options = nil)
837
+ # Pass arguments to `get_python_package` via a request object, either of type
838
+ # {::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest} or an equivalent Hash.
276
839
  #
277
- # @param request [::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest, ::Hash]
840
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest, ::Hash]
278
841
  # A request object representing the call parameters. Required. To specify no
279
842
  # parameters, or to keep all the default parameter values, pass an empty Hash.
280
843
  # @param options [::Gapic::CallOptions, ::Hash]
281
844
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
282
845
  #
283
- # @overload get_docker_image(name: nil)
284
- # Pass arguments to `get_docker_image` via keyword arguments. Note that at
846
+ # @overload get_python_package(name: nil)
847
+ # Pass arguments to `get_python_package` via keyword arguments. Note that at
285
848
  # least one keyword argument is required. To specify no parameters, or to keep all
286
849
  # the default parameter values, pass an empty Hash as a request object (see above).
287
850
  #
288
851
  # @param name [::String]
289
- # Required. The name of the docker images.
852
+ # Required. The name of the python package.
290
853
  #
291
854
  # @yield [response, operation] Access the result along with the RPC operation
292
- # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
855
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::PythonPackage]
293
856
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
294
857
  #
295
- # @return [::Google::Cloud::ArtifactRegistry::V1::DockerImage]
858
+ # @return [::Google::Cloud::ArtifactRegistry::V1::PythonPackage]
296
859
  #
297
860
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
298
861
  #
@@ -303,24 +866,24 @@ module Google
303
866
  # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
304
867
  #
305
868
  # # Create a request. To set request fields, pass in keyword arguments.
306
- # request = Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest.new
869
+ # request = Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest.new
307
870
  #
308
- # # Call the get_docker_image method.
309
- # result = client.get_docker_image request
871
+ # # Call the get_python_package method.
872
+ # result = client.get_python_package request
310
873
  #
311
- # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::DockerImage.
874
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::PythonPackage.
312
875
  # p result
313
876
  #
314
- def get_docker_image request, options = nil
877
+ def get_python_package request, options = nil
315
878
  raise ::ArgumentError, "request must be provided" if request.nil?
316
879
 
317
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetDockerImageRequest
880
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetPythonPackageRequest
318
881
 
319
882
  # Converts hash and nil to an options object
320
883
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
321
884
 
322
885
  # Customize the options with defaults
323
- metadata = @config.rpcs.get_docker_image.metadata.to_h
886
+ metadata = @config.rpcs.get_python_package.metadata.to_h
324
887
 
325
888
  # Set x-goog-api-client and x-goog-user-project headers
326
889
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -336,15 +899,15 @@ module Google
336
899
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
337
900
  metadata[:"x-goog-request-params"] ||= request_params_header
338
901
 
339
- options.apply_defaults timeout: @config.rpcs.get_docker_image.timeout,
902
+ options.apply_defaults timeout: @config.rpcs.get_python_package.timeout,
340
903
  metadata: metadata,
341
- retry_policy: @config.rpcs.get_docker_image.retry_policy
904
+ retry_policy: @config.rpcs.get_python_package.retry_policy
342
905
 
343
906
  options.apply_defaults timeout: @config.timeout,
344
907
  metadata: @config.metadata,
345
908
  retry_policy: @config.retry_policy
346
909
 
347
- @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation|
910
+ @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation|
348
911
  yield response, operation if block_given?
349
912
  return response
350
913
  end
@@ -1589,8 +2152,8 @@ module Google
1589
2152
  # the default parameter values, pass an empty Hash as a request object (see above).
1590
2153
  #
1591
2154
  # @param parent [::String]
1592
- # The name of the repository whose files will be listed. For example:
1593
- # "projects/p1/locations/us-central1/repositories/repo1
2155
+ # Required. The name of the repository whose files will be listed. For
2156
+ # example: "projects/p1/locations/us-central1/repositories/repo1
1594
2157
  # @param filter [::String]
1595
2158
  # An expression for filtering the results of the request. Filter rules are
1596
2159
  # case insensitive. The fields eligible for filtering are:
@@ -1701,7 +2264,7 @@ module Google
1701
2264
  # the default parameter values, pass an empty Hash as a request object (see above).
1702
2265
  #
1703
2266
  # @param name [::String]
1704
- # The name of the file to retrieve.
2267
+ # Required. The name of the file to retrieve.
1705
2268
  #
1706
2269
  # @yield [response, operation] Access the result along with the RPC operation
1707
2270
  # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::File]
@@ -2670,6 +3233,178 @@ module Google
2670
3233
  raise ::Google::Cloud::Error.from_error(e)
2671
3234
  end
2672
3235
 
3236
+ ##
3237
+ # Retrieves the VPCSC Config for the Project.
3238
+ #
3239
+ # @overload get_vpcsc_config(request, options = nil)
3240
+ # Pass arguments to `get_vpcsc_config` via a request object, either of type
3241
+ # {::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest} or an equivalent Hash.
3242
+ #
3243
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest, ::Hash]
3244
+ # A request object representing the call parameters. Required. To specify no
3245
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3246
+ # @param options [::Gapic::CallOptions, ::Hash]
3247
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3248
+ #
3249
+ # @overload get_vpcsc_config(name: nil)
3250
+ # Pass arguments to `get_vpcsc_config` via keyword arguments. Note that at
3251
+ # least one keyword argument is required. To specify no parameters, or to keep all
3252
+ # the default parameter values, pass an empty Hash as a request object (see above).
3253
+ #
3254
+ # @param name [::String]
3255
+ # Required. The name of the VPCSCConfig resource.
3256
+ #
3257
+ # @yield [response, operation] Access the result along with the RPC operation
3258
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3259
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3260
+ #
3261
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3262
+ #
3263
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3264
+ #
3265
+ # @example Basic example
3266
+ # require "google/cloud/artifact_registry/v1"
3267
+ #
3268
+ # # Create a client object. The client can be reused for multiple calls.
3269
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
3270
+ #
3271
+ # # Create a request. To set request fields, pass in keyword arguments.
3272
+ # request = Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest.new
3273
+ #
3274
+ # # Call the get_vpcsc_config method.
3275
+ # result = client.get_vpcsc_config request
3276
+ #
3277
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3278
+ # p result
3279
+ #
3280
+ def get_vpcsc_config request, options = nil
3281
+ raise ::ArgumentError, "request must be provided" if request.nil?
3282
+
3283
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::GetVPCSCConfigRequest
3284
+
3285
+ # Converts hash and nil to an options object
3286
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3287
+
3288
+ # Customize the options with defaults
3289
+ metadata = @config.rpcs.get_vpcsc_config.metadata.to_h
3290
+
3291
+ # Set x-goog-api-client and x-goog-user-project headers
3292
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3293
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3294
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
3295
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3296
+
3297
+ header_params = {}
3298
+ if request.name
3299
+ header_params["name"] = request.name
3300
+ end
3301
+
3302
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3303
+ metadata[:"x-goog-request-params"] ||= request_params_header
3304
+
3305
+ options.apply_defaults timeout: @config.rpcs.get_vpcsc_config.timeout,
3306
+ metadata: metadata,
3307
+ retry_policy: @config.rpcs.get_vpcsc_config.retry_policy
3308
+
3309
+ options.apply_defaults timeout: @config.timeout,
3310
+ metadata: @config.metadata,
3311
+ retry_policy: @config.retry_policy
3312
+
3313
+ @artifact_registry_stub.call_rpc :get_vpcsc_config, request, options: options do |response, operation|
3314
+ yield response, operation if block_given?
3315
+ return response
3316
+ end
3317
+ rescue ::GRPC::BadStatus => e
3318
+ raise ::Google::Cloud::Error.from_error(e)
3319
+ end
3320
+
3321
+ ##
3322
+ # Updates the VPCSC Config for the Project.
3323
+ #
3324
+ # @overload update_vpcsc_config(request, options = nil)
3325
+ # Pass arguments to `update_vpcsc_config` via a request object, either of type
3326
+ # {::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest} or an equivalent Hash.
3327
+ #
3328
+ # @param request [::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest, ::Hash]
3329
+ # A request object representing the call parameters. Required. To specify no
3330
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3331
+ # @param options [::Gapic::CallOptions, ::Hash]
3332
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3333
+ #
3334
+ # @overload update_vpcsc_config(vpcsc_config: nil, update_mask: nil)
3335
+ # Pass arguments to `update_vpcsc_config` via keyword arguments. Note that at
3336
+ # least one keyword argument is required. To specify no parameters, or to keep all
3337
+ # the default parameter values, pass an empty Hash as a request object (see above).
3338
+ #
3339
+ # @param vpcsc_config [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig, ::Hash]
3340
+ # The project config.
3341
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3342
+ # Field mask to support partial updates.
3343
+ #
3344
+ # @yield [response, operation] Access the result along with the RPC operation
3345
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3346
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3347
+ #
3348
+ # @return [::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig]
3349
+ #
3350
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3351
+ #
3352
+ # @example Basic example
3353
+ # require "google/cloud/artifact_registry/v1"
3354
+ #
3355
+ # # Create a client object. The client can be reused for multiple calls.
3356
+ # client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
3357
+ #
3358
+ # # Create a request. To set request fields, pass in keyword arguments.
3359
+ # request = Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest.new
3360
+ #
3361
+ # # Call the update_vpcsc_config method.
3362
+ # result = client.update_vpcsc_config request
3363
+ #
3364
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.
3365
+ # p result
3366
+ #
3367
+ def update_vpcsc_config request, options = nil
3368
+ raise ::ArgumentError, "request must be provided" if request.nil?
3369
+
3370
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::UpdateVPCSCConfigRequest
3371
+
3372
+ # Converts hash and nil to an options object
3373
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3374
+
3375
+ # Customize the options with defaults
3376
+ metadata = @config.rpcs.update_vpcsc_config.metadata.to_h
3377
+
3378
+ # Set x-goog-api-client and x-goog-user-project headers
3379
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3380
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3381
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
3382
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3383
+
3384
+ header_params = {}
3385
+ if request.vpcsc_config&.name
3386
+ header_params["vpcsc_config.name"] = request.vpcsc_config.name
3387
+ end
3388
+
3389
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3390
+ metadata[:"x-goog-request-params"] ||= request_params_header
3391
+
3392
+ options.apply_defaults timeout: @config.rpcs.update_vpcsc_config.timeout,
3393
+ metadata: metadata,
3394
+ retry_policy: @config.rpcs.update_vpcsc_config.retry_policy
3395
+
3396
+ options.apply_defaults timeout: @config.timeout,
3397
+ metadata: @config.metadata,
3398
+ retry_policy: @config.retry_policy
3399
+
3400
+ @artifact_registry_stub.call_rpc :update_vpcsc_config, request, options: options do |response, operation|
3401
+ yield response, operation if block_given?
3402
+ return response
3403
+ end
3404
+ rescue ::GRPC::BadStatus => e
3405
+ raise ::Google::Cloud::Error.from_error(e)
3406
+ end
3407
+
2673
3408
  ##
2674
3409
  # Configuration class for the ArtifactRegistry API.
2675
3410
  #
@@ -2816,6 +3551,36 @@ module Google
2816
3551
  #
2817
3552
  attr_reader :get_docker_image
2818
3553
  ##
3554
+ # RPC-specific configuration for `list_maven_artifacts`
3555
+ # @return [::Gapic::Config::Method]
3556
+ #
3557
+ attr_reader :list_maven_artifacts
3558
+ ##
3559
+ # RPC-specific configuration for `get_maven_artifact`
3560
+ # @return [::Gapic::Config::Method]
3561
+ #
3562
+ attr_reader :get_maven_artifact
3563
+ ##
3564
+ # RPC-specific configuration for `list_npm_packages`
3565
+ # @return [::Gapic::Config::Method]
3566
+ #
3567
+ attr_reader :list_npm_packages
3568
+ ##
3569
+ # RPC-specific configuration for `get_npm_package`
3570
+ # @return [::Gapic::Config::Method]
3571
+ #
3572
+ attr_reader :get_npm_package
3573
+ ##
3574
+ # RPC-specific configuration for `list_python_packages`
3575
+ # @return [::Gapic::Config::Method]
3576
+ #
3577
+ attr_reader :list_python_packages
3578
+ ##
3579
+ # RPC-specific configuration for `get_python_package`
3580
+ # @return [::Gapic::Config::Method]
3581
+ #
3582
+ attr_reader :get_python_package
3583
+ ##
2819
3584
  # RPC-specific configuration for `import_apt_artifacts`
2820
3585
  # @return [::Gapic::Config::Method]
2821
3586
  #
@@ -2940,6 +3705,16 @@ module Google
2940
3705
  # @return [::Gapic::Config::Method]
2941
3706
  #
2942
3707
  attr_reader :update_project_settings
3708
+ ##
3709
+ # RPC-specific configuration for `get_vpcsc_config`
3710
+ # @return [::Gapic::Config::Method]
3711
+ #
3712
+ attr_reader :get_vpcsc_config
3713
+ ##
3714
+ # RPC-specific configuration for `update_vpcsc_config`
3715
+ # @return [::Gapic::Config::Method]
3716
+ #
3717
+ attr_reader :update_vpcsc_config
2943
3718
 
2944
3719
  # @private
2945
3720
  def initialize parent_rpcs = nil
@@ -2947,6 +3722,18 @@ module Google
2947
3722
  @list_docker_images = ::Gapic::Config::Method.new list_docker_images_config
2948
3723
  get_docker_image_config = parent_rpcs.get_docker_image if parent_rpcs.respond_to? :get_docker_image
2949
3724
  @get_docker_image = ::Gapic::Config::Method.new get_docker_image_config
3725
+ list_maven_artifacts_config = parent_rpcs.list_maven_artifacts if parent_rpcs.respond_to? :list_maven_artifacts
3726
+ @list_maven_artifacts = ::Gapic::Config::Method.new list_maven_artifacts_config
3727
+ get_maven_artifact_config = parent_rpcs.get_maven_artifact if parent_rpcs.respond_to? :get_maven_artifact
3728
+ @get_maven_artifact = ::Gapic::Config::Method.new get_maven_artifact_config
3729
+ list_npm_packages_config = parent_rpcs.list_npm_packages if parent_rpcs.respond_to? :list_npm_packages
3730
+ @list_npm_packages = ::Gapic::Config::Method.new list_npm_packages_config
3731
+ get_npm_package_config = parent_rpcs.get_npm_package if parent_rpcs.respond_to? :get_npm_package
3732
+ @get_npm_package = ::Gapic::Config::Method.new get_npm_package_config
3733
+ list_python_packages_config = parent_rpcs.list_python_packages if parent_rpcs.respond_to? :list_python_packages
3734
+ @list_python_packages = ::Gapic::Config::Method.new list_python_packages_config
3735
+ get_python_package_config = parent_rpcs.get_python_package if parent_rpcs.respond_to? :get_python_package
3736
+ @get_python_package = ::Gapic::Config::Method.new get_python_package_config
2950
3737
  import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts
2951
3738
  @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config
2952
3739
  import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts
@@ -2997,6 +3784,10 @@ module Google
2997
3784
  @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config
2998
3785
  update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings
2999
3786
  @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config
3787
+ get_vpcsc_config_config = parent_rpcs.get_vpcsc_config if parent_rpcs.respond_to? :get_vpcsc_config
3788
+ @get_vpcsc_config = ::Gapic::Config::Method.new get_vpcsc_config_config
3789
+ update_vpcsc_config_config = parent_rpcs.update_vpcsc_config if parent_rpcs.respond_to? :update_vpcsc_config
3790
+ @update_vpcsc_config = ::Gapic::Config::Method.new update_vpcsc_config_config
3000
3791
 
3001
3792
  yield self if block_given?
3002
3793
  end