google-cloud-artifact_registry-v1beta2 0.3.6 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +409 -14
  4. data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +54 -0
  5. data/lib/google/cloud/artifact_registry/v1beta2/version.rb +1 -1
  6. data/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb +65 -0
  7. data/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +2 -1
  8. data/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +21 -1
  9. data/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +3 -0
  10. data/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +14 -0
  11. data/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +22 -1
  12. data/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +2 -1
  13. data/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +6 -1
  14. data/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb +63 -0
  15. data/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +118 -0
  16. data/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +5 -1
  17. data/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +53 -6
  18. data/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +80 -0
  19. data/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +6 -2
  20. data/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +12 -2
  21. data/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb +110 -0
  22. data/proto_docs/google/protobuf/struct.rb +96 -0
  23. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9aa72342dd004416646824df98514f24185f743fda14e42d15a81fa3f15650c
4
- data.tar.gz: d9e27368e63438829ac0d2ccdbac2bb8c7cd101f9154df74d6508a6d345d0fdd
3
+ metadata.gz: 5895211d97548c0d1a387586e37b2bdf6d8e57a08aa691483335869744c086dc
4
+ data.tar.gz: 9c65f7d35ea23193653a467130141df90fe1682f481455fe972c2b2e8eb4b2ec
5
5
  SHA512:
6
- metadata.gz: a61275696b40780120f70322cf6602d51e016d234f6b4f2fe4c3259964991aa6a2c067e2792e4223e3f9c4fc76e53bcb8745596a560f541a766da3e5cf1daaf5
7
- data.tar.gz: d0d519de3bb51791ba355c2496bd5ccc1cd9e169663b455e283bea5914f9043b8ecade55803676a2f61dfb9a72db74107ffaeacc49dd7b1168bfd7d7d0ad5e32
6
+ metadata.gz: 34a6c7fa09fdbb93dbb1a78630341bcdff0b9756eab8cf41388ce5c9b9902d5e81fc0c2cb46a5996cbc18bf70bc7a1d8d208d809d1c157df4a73f7d7dc3f97ac
7
+ data.tar.gz: 07030c7b47dbbc046375c0efb79077b8c65940eaec039cf97db6da0d8ada74a508b7ad6cd08639d9e5273b7d77d5b11760b5ffb01bcf38957a42ce5ce890a709
data/README.md CHANGED
@@ -33,8 +33,8 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/artifact_registry/v1beta2"
34
34
 
35
35
  client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
36
- request = ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest.new # (request fields as keyword arguments...)
37
- response = client.list_repositories request
36
+ request = ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new # (request fields as keyword arguments...)
37
+ response = client.import_apt_artifacts request
38
38
  ```
39
39
 
40
40
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-artifact_registry-v1beta2/latest)
@@ -254,6 +254,202 @@ module Google
254
254
 
255
255
  # Service calls
256
256
 
257
+ ##
258
+ # Imports Apt artifacts. The returned Operation will complete once the
259
+ # resources are imported. Package, Version, and File resources are created
260
+ # based on the imported artifacts. Imported artifacts that conflict with
261
+ # existing resources are ignored.
262
+ #
263
+ # @overload import_apt_artifacts(request, options = nil)
264
+ # Pass arguments to `import_apt_artifacts` via a request object, either of type
265
+ # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest} or an equivalent Hash.
266
+ #
267
+ # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest, ::Hash]
268
+ # A request object representing the call parameters. Required. To specify no
269
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
270
+ # @param options [::Gapic::CallOptions, ::Hash]
271
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
272
+ #
273
+ # @overload import_apt_artifacts(gcs_source: nil, parent: nil)
274
+ # Pass arguments to `import_apt_artifacts` via keyword arguments. Note that at
275
+ # least one keyword argument is required. To specify no parameters, or to keep all
276
+ # the default parameter values, pass an empty Hash as a request object (see above).
277
+ #
278
+ # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsGcsSource, ::Hash]
279
+ # Google Cloud Storage location where input content is located.
280
+ # @param parent [::String]
281
+ # The name of the parent resource where the artifacts will be imported.
282
+ #
283
+ # @yield [response, operation] Access the result along with the RPC operation
284
+ # @yieldparam response [::Gapic::Operation]
285
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
286
+ #
287
+ # @return [::Gapic::Operation]
288
+ #
289
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
+ #
291
+ # @example Basic example
292
+ # require "google/cloud/artifact_registry/v1beta2"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest.new
299
+ #
300
+ # # Call the import_apt_artifacts method.
301
+ # result = client.import_apt_artifacts request
302
+ #
303
+ # # The returned object is of type Gapic::Operation. You can use this
304
+ # # object to check the status of an operation, cancel it, or wait
305
+ # # for results. Here is how to block until completion:
306
+ # result.wait_until_done! timeout: 60
307
+ # if result.response?
308
+ # p result.response
309
+ # else
310
+ # puts "Error!"
311
+ # end
312
+ #
313
+ def import_apt_artifacts request, options = nil
314
+ raise ::ArgumentError, "request must be provided" if request.nil?
315
+
316
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportAptArtifactsRequest
317
+
318
+ # Converts hash and nil to an options object
319
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
320
+
321
+ # Customize the options with defaults
322
+ metadata = @config.rpcs.import_apt_artifacts.metadata.to_h
323
+
324
+ # Set x-goog-api-client and x-goog-user-project headers
325
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
326
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
327
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
328
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
329
+
330
+ header_params = {}
331
+ if request.parent
332
+ header_params["parent"] = request.parent
333
+ end
334
+
335
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
336
+ metadata[:"x-goog-request-params"] ||= request_params_header
337
+
338
+ options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout,
339
+ metadata: metadata,
340
+ retry_policy: @config.rpcs.import_apt_artifacts.retry_policy
341
+
342
+ options.apply_defaults timeout: @config.timeout,
343
+ metadata: @config.metadata,
344
+ retry_policy: @config.retry_policy
345
+
346
+ @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation|
347
+ response = ::Gapic::Operation.new response, @operations_client, options: options
348
+ yield response, operation if block_given?
349
+ return response
350
+ end
351
+ rescue ::GRPC::BadStatus => e
352
+ raise ::Google::Cloud::Error.from_error(e)
353
+ end
354
+
355
+ ##
356
+ # Imports Yum (RPM) artifacts. The returned Operation will complete once the
357
+ # resources are imported. Package, Version, and File resources are created
358
+ # based on the imported artifacts. Imported artifacts that conflict with
359
+ # existing resources are ignored.
360
+ #
361
+ # @overload import_yum_artifacts(request, options = nil)
362
+ # Pass arguments to `import_yum_artifacts` via a request object, either of type
363
+ # {::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest} or an equivalent Hash.
364
+ #
365
+ # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest, ::Hash]
366
+ # A request object representing the call parameters. Required. To specify no
367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
368
+ # @param options [::Gapic::CallOptions, ::Hash]
369
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
370
+ #
371
+ # @overload import_yum_artifacts(gcs_source: nil, parent: nil)
372
+ # Pass arguments to `import_yum_artifacts` via keyword arguments. Note that at
373
+ # least one keyword argument is required. To specify no parameters, or to keep all
374
+ # the default parameter values, pass an empty Hash as a request object (see above).
375
+ #
376
+ # @param gcs_source [::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsGcsSource, ::Hash]
377
+ # Google Cloud Storage location where input content is located.
378
+ # @param parent [::String]
379
+ # The name of the parent resource where the artifacts will be imported.
380
+ #
381
+ # @yield [response, operation] Access the result along with the RPC operation
382
+ # @yieldparam response [::Gapic::Operation]
383
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
384
+ #
385
+ # @return [::Gapic::Operation]
386
+ #
387
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
388
+ #
389
+ # @example Basic example
390
+ # require "google/cloud/artifact_registry/v1beta2"
391
+ #
392
+ # # Create a client object. The client can be reused for multiple calls.
393
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
394
+ #
395
+ # # Create a request. To set request fields, pass in keyword arguments.
396
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest.new
397
+ #
398
+ # # Call the import_yum_artifacts method.
399
+ # result = client.import_yum_artifacts request
400
+ #
401
+ # # The returned object is of type Gapic::Operation. You can use this
402
+ # # object to check the status of an operation, cancel it, or wait
403
+ # # for results. Here is how to block until completion:
404
+ # result.wait_until_done! timeout: 60
405
+ # if result.response?
406
+ # p result.response
407
+ # else
408
+ # puts "Error!"
409
+ # end
410
+ #
411
+ def import_yum_artifacts request, options = nil
412
+ raise ::ArgumentError, "request must be provided" if request.nil?
413
+
414
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ImportYumArtifactsRequest
415
+
416
+ # Converts hash and nil to an options object
417
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
418
+
419
+ # Customize the options with defaults
420
+ metadata = @config.rpcs.import_yum_artifacts.metadata.to_h
421
+
422
+ # Set x-goog-api-client and x-goog-user-project headers
423
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
424
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
425
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
426
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
427
+
428
+ header_params = {}
429
+ if request.parent
430
+ header_params["parent"] = request.parent
431
+ end
432
+
433
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
434
+ metadata[:"x-goog-request-params"] ||= request_params_header
435
+
436
+ options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout,
437
+ metadata: metadata,
438
+ retry_policy: @config.rpcs.import_yum_artifacts.retry_policy
439
+
440
+ options.apply_defaults timeout: @config.timeout,
441
+ metadata: @config.metadata,
442
+ retry_policy: @config.retry_policy
443
+
444
+ @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation|
445
+ response = ::Gapic::Operation.new response, @operations_client, options: options
446
+ yield response, operation if block_given?
447
+ return response
448
+ end
449
+ rescue ::GRPC::BadStatus => e
450
+ raise ::Google::Cloud::Error.from_error(e)
451
+ end
452
+
257
453
  ##
258
454
  # Lists repositories.
259
455
  #
@@ -273,10 +469,9 @@ module Google
273
469
  # the default parameter values, pass an empty Hash as a request object (see above).
274
470
  #
275
471
  # @param parent [::String]
276
- # The name of the parent resource whose repositories will be listed.
472
+ # Required. The name of the parent resource whose repositories will be listed.
277
473
  # @param page_size [::Integer]
278
- # The maximum number of repositories to return.
279
- # Maximum page size is 10,000.
474
+ # The maximum number of repositories to return. Maximum page size is 1,000.
280
475
  # @param page_token [::String]
281
476
  # The next_page_token value returned from a previous list request, if any.
282
477
  #
@@ -370,7 +565,7 @@ module Google
370
565
  # the default parameter values, pass an empty Hash as a request object (see above).
371
566
  #
372
567
  # @param name [::String]
373
- # The name of the repository to retrieve.
568
+ # Required. The name of the repository to retrieve.
374
569
  #
375
570
  # @yield [response, operation] Access the result along with the RPC operation
376
571
  # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
@@ -456,7 +651,7 @@ module Google
456
651
  # the default parameter values, pass an empty Hash as a request object (see above).
457
652
  #
458
653
  # @param parent [::String]
459
- # The name of the parent resource where the repository will be created.
654
+ # Required. The name of the parent resource where the repository will be created.
460
655
  # @param repository_id [::String]
461
656
  # The repository id to use for this repository.
462
657
  # @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash]
@@ -644,7 +839,7 @@ module Google
644
839
  # the default parameter values, pass an empty Hash as a request object (see above).
645
840
  #
646
841
  # @param name [::String]
647
- # The name of the repository to delete.
842
+ # Required. The name of the repository to delete.
648
843
  #
649
844
  # @yield [response, operation] Access the result along with the RPC operation
650
845
  # @yieldparam response [::Gapic::Operation]
@@ -1007,7 +1202,7 @@ module Google
1007
1202
  # @param options [::Gapic::CallOptions, ::Hash]
1008
1203
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1009
1204
  #
1010
- # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil)
1205
+ # @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil, order_by: nil)
1011
1206
  # Pass arguments to `list_versions` via keyword arguments. Note that at
1012
1207
  # least one keyword argument is required. To specify no parameters, or to keep all
1013
1208
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1015,12 +1210,13 @@ module Google
1015
1210
  # @param parent [::String]
1016
1211
  # The name of the parent resource whose versions will be listed.
1017
1212
  # @param page_size [::Integer]
1018
- # The maximum number of versions to return.
1019
- # Maximum page size is 10,000.
1213
+ # The maximum number of versions to return. Maximum page size is 1,000.
1020
1214
  # @param page_token [::String]
1021
1215
  # The next_page_token value returned from a previous list request, if any.
1022
1216
  # @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView]
1023
1217
  # The view that should be returned in the response.
1218
+ # @param order_by [::String]
1219
+ # Optional. The field to order the results by.
1024
1220
  #
1025
1221
  # @yield [response, operation] Access the result along with the RPC operation
1026
1222
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>]
@@ -1502,8 +1698,7 @@ module Google
1502
1698
  # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
1503
1699
  # --> Tags that are applied to the version `1.0` in package `pkg1`.
1504
1700
  # @param page_size [::Integer]
1505
- # The maximum number of tags to return.
1506
- # Maximum page size is 10,000.
1701
+ # The maximum number of tags to return. Maximum page size is 10,000.
1507
1702
  # @param page_token [::String]
1508
1703
  # The next_page_token value returned from a previous list request, if any.
1509
1704
  #
@@ -2197,6 +2392,178 @@ module Google
2197
2392
  raise ::Google::Cloud::Error.from_error(e)
2198
2393
  end
2199
2394
 
2395
+ ##
2396
+ # Retrieves the Settings for the Project.
2397
+ #
2398
+ # @overload get_project_settings(request, options = nil)
2399
+ # Pass arguments to `get_project_settings` via a request object, either of type
2400
+ # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash.
2401
+ #
2402
+ # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash]
2403
+ # A request object representing the call parameters. Required. To specify no
2404
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2405
+ # @param options [::Gapic::CallOptions, ::Hash]
2406
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2407
+ #
2408
+ # @overload get_project_settings(name: nil)
2409
+ # Pass arguments to `get_project_settings` via keyword arguments. Note that at
2410
+ # least one keyword argument is required. To specify no parameters, or to keep all
2411
+ # the default parameter values, pass an empty Hash as a request object (see above).
2412
+ #
2413
+ # @param name [::String]
2414
+ # Required. The name of the projectSettings resource.
2415
+ #
2416
+ # @yield [response, operation] Access the result along with the RPC operation
2417
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2418
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2419
+ #
2420
+ # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2421
+ #
2422
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2423
+ #
2424
+ # @example Basic example
2425
+ # require "google/cloud/artifact_registry/v1beta2"
2426
+ #
2427
+ # # Create a client object. The client can be reused for multiple calls.
2428
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
2429
+ #
2430
+ # # Create a request. To set request fields, pass in keyword arguments.
2431
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new
2432
+ #
2433
+ # # Call the get_project_settings method.
2434
+ # result = client.get_project_settings request
2435
+ #
2436
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
2437
+ # p result
2438
+ #
2439
+ def get_project_settings request, options = nil
2440
+ raise ::ArgumentError, "request must be provided" if request.nil?
2441
+
2442
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest
2443
+
2444
+ # Converts hash and nil to an options object
2445
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2446
+
2447
+ # Customize the options with defaults
2448
+ metadata = @config.rpcs.get_project_settings.metadata.to_h
2449
+
2450
+ # Set x-goog-api-client and x-goog-user-project headers
2451
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2452
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2453
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
2454
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2455
+
2456
+ header_params = {}
2457
+ if request.name
2458
+ header_params["name"] = request.name
2459
+ end
2460
+
2461
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2462
+ metadata[:"x-goog-request-params"] ||= request_params_header
2463
+
2464
+ options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
2465
+ metadata: metadata,
2466
+ retry_policy: @config.rpcs.get_project_settings.retry_policy
2467
+
2468
+ options.apply_defaults timeout: @config.timeout,
2469
+ metadata: @config.metadata,
2470
+ retry_policy: @config.retry_policy
2471
+
2472
+ @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation|
2473
+ yield response, operation if block_given?
2474
+ return response
2475
+ end
2476
+ rescue ::GRPC::BadStatus => e
2477
+ raise ::Google::Cloud::Error.from_error(e)
2478
+ end
2479
+
2480
+ ##
2481
+ # Updates the Settings for the Project.
2482
+ #
2483
+ # @overload update_project_settings(request, options = nil)
2484
+ # Pass arguments to `update_project_settings` via a request object, either of type
2485
+ # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash.
2486
+ #
2487
+ # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash]
2488
+ # A request object representing the call parameters. Required. To specify no
2489
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2490
+ # @param options [::Gapic::CallOptions, ::Hash]
2491
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2492
+ #
2493
+ # @overload update_project_settings(project_settings: nil, update_mask: nil)
2494
+ # Pass arguments to `update_project_settings` via keyword arguments. Note that at
2495
+ # least one keyword argument is required. To specify no parameters, or to keep all
2496
+ # the default parameter values, pass an empty Hash as a request object (see above).
2497
+ #
2498
+ # @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash]
2499
+ # The project settings.
2500
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2501
+ # Field mask to support partial updates.
2502
+ #
2503
+ # @yield [response, operation] Access the result along with the RPC operation
2504
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2505
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2506
+ #
2507
+ # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2508
+ #
2509
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2510
+ #
2511
+ # @example Basic example
2512
+ # require "google/cloud/artifact_registry/v1beta2"
2513
+ #
2514
+ # # Create a client object. The client can be reused for multiple calls.
2515
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
2516
+ #
2517
+ # # Create a request. To set request fields, pass in keyword arguments.
2518
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new
2519
+ #
2520
+ # # Call the update_project_settings method.
2521
+ # result = client.update_project_settings request
2522
+ #
2523
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
2524
+ # p result
2525
+ #
2526
+ def update_project_settings request, options = nil
2527
+ raise ::ArgumentError, "request must be provided" if request.nil?
2528
+
2529
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest
2530
+
2531
+ # Converts hash and nil to an options object
2532
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2533
+
2534
+ # Customize the options with defaults
2535
+ metadata = @config.rpcs.update_project_settings.metadata.to_h
2536
+
2537
+ # Set x-goog-api-client and x-goog-user-project headers
2538
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2539
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2540
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
2541
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2542
+
2543
+ header_params = {}
2544
+ if request.project_settings&.name
2545
+ header_params["project_settings.name"] = request.project_settings.name
2546
+ end
2547
+
2548
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2549
+ metadata[:"x-goog-request-params"] ||= request_params_header
2550
+
2551
+ options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
2552
+ metadata: metadata,
2553
+ retry_policy: @config.rpcs.update_project_settings.retry_policy
2554
+
2555
+ options.apply_defaults timeout: @config.timeout,
2556
+ metadata: @config.metadata,
2557
+ retry_policy: @config.retry_policy
2558
+
2559
+ @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation|
2560
+ yield response, operation if block_given?
2561
+ return response
2562
+ end
2563
+ rescue ::GRPC::BadStatus => e
2564
+ raise ::Google::Cloud::Error.from_error(e)
2565
+ end
2566
+
2200
2567
  ##
2201
2568
  # Configuration class for the ArtifactRegistry API.
2202
2569
  #
@@ -2213,17 +2580,17 @@ module Google
2213
2580
  # @example
2214
2581
  #
2215
2582
  # # Modify the global config, setting the timeout for
2216
- # # list_repositories to 20 seconds,
2583
+ # # import_apt_artifacts to 20 seconds,
2217
2584
  # # and all remaining timeouts to 10 seconds.
2218
2585
  # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
2219
2586
  # config.timeout = 10.0
2220
- # config.rpcs.list_repositories.timeout = 20.0
2587
+ # config.rpcs.import_apt_artifacts.timeout = 20.0
2221
2588
  # end
2222
2589
  #
2223
2590
  # # Apply the above configuration only to a new client.
2224
2591
  # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
2225
2592
  # config.timeout = 10.0
2226
- # config.rpcs.list_repositories.timeout = 20.0
2593
+ # config.rpcs.import_apt_artifacts.timeout = 20.0
2227
2594
  # end
2228
2595
  #
2229
2596
  # @!attribute [rw] endpoint
@@ -2332,6 +2699,16 @@ module Google
2332
2699
  # trigger a retry.
2333
2700
  #
2334
2701
  class Rpcs
2702
+ ##
2703
+ # RPC-specific configuration for `import_apt_artifacts`
2704
+ # @return [::Gapic::Config::Method]
2705
+ #
2706
+ attr_reader :import_apt_artifacts
2707
+ ##
2708
+ # RPC-specific configuration for `import_yum_artifacts`
2709
+ # @return [::Gapic::Config::Method]
2710
+ #
2711
+ attr_reader :import_yum_artifacts
2335
2712
  ##
2336
2713
  # RPC-specific configuration for `list_repositories`
2337
2714
  # @return [::Gapic::Config::Method]
@@ -2437,9 +2814,23 @@ module Google
2437
2814
  # @return [::Gapic::Config::Method]
2438
2815
  #
2439
2816
  attr_reader :test_iam_permissions
2817
+ ##
2818
+ # RPC-specific configuration for `get_project_settings`
2819
+ # @return [::Gapic::Config::Method]
2820
+ #
2821
+ attr_reader :get_project_settings
2822
+ ##
2823
+ # RPC-specific configuration for `update_project_settings`
2824
+ # @return [::Gapic::Config::Method]
2825
+ #
2826
+ attr_reader :update_project_settings
2440
2827
 
2441
2828
  # @private
2442
2829
  def initialize parent_rpcs = nil
2830
+ import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts
2831
+ @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config
2832
+ import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts
2833
+ @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config
2443
2834
  list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
2444
2835
  @list_repositories = ::Gapic::Config::Method.new list_repositories_config
2445
2836
  get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
@@ -2482,6 +2873,10 @@ module Google
2482
2873
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
2483
2874
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2484
2875
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2876
+ get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings
2877
+ @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config
2878
+ update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings
2879
+ @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config
2485
2880
 
2486
2881
  yield self if block_given?
2487
2882
  end
@@ -24,6 +24,37 @@ module Google
24
24
  module ArtifactRegistry
25
25
  # Path helper methods for the ArtifactRegistry API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}"
42
+ end
43
+
44
+ ##
45
+ # Create a fully-qualified ProjectSettings resource string.
46
+ #
47
+ # The resource will be in the following format:
48
+ #
49
+ # `projects/{project}/projectSettings`
50
+ #
51
+ # @param project [String]
52
+ #
53
+ # @return [::String]
54
+ def project_settings_path project:
55
+ "projects/#{project}/projectSettings"
56
+ end
57
+
27
58
  ##
28
59
  # Create a fully-qualified Repository resource string.
29
60
  #
@@ -43,6 +74,29 @@ module Google
43
74
  "projects/#{project}/locations/#{location}/repositories/#{repository}"
44
75
  end
45
76
 
77
+ ##
78
+ # Create a fully-qualified Tag resource string.
79
+ #
80
+ # The resource will be in the following format:
81
+ #
82
+ # `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}`
83
+ #
84
+ # @param project [String]
85
+ # @param location [String]
86
+ # @param repository [String]
87
+ # @param package [String]
88
+ # @param tag [String]
89
+ #
90
+ # @return [::String]
91
+ def tag_path project:, location:, repository:, package:, tag:
92
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
93
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
94
+ raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
95
+ raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/"
96
+
97
+ "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}"
98
+ end
99
+
46
100
  extend self
47
101
  end
48
102
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ArtifactRegistry
23
23
  module V1beta2
24
- VERSION = "0.3.6"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end