google-cloud-artifact_registry-v1beta2 0.3.6 → 0.6.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.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -8
  3. data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +419 -17
  4. data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb +3 -0
  5. data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +54 -0
  6. data/lib/google/cloud/artifact_registry/v1beta2/version.rb +1 -1
  7. data/lib/google/cloud/artifact_registry/v1beta2.rb +2 -0
  8. data/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb +66 -0
  9. data/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +4 -2
  10. data/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb +2 -1
  11. data/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +23 -2
  12. data/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +5 -1
  13. data/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +14 -0
  14. data/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +24 -2
  15. data/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +4 -2
  16. data/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +8 -2
  17. data/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb +64 -0
  18. data/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +118 -0
  19. data/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +7 -2
  20. data/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +53 -6
  21. data/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +80 -0
  22. data/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +6 -2
  23. data/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +12 -2
  24. data/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb +110 -0
  25. data/proto_docs/google/iam/v1/iam_policy.rb +8 -1
  26. data/proto_docs/google/iam/v1/options.rb +14 -4
  27. data/proto_docs/google/iam/v1/policy.rb +208 -38
  28. data/proto_docs/google/protobuf/any.rb +3 -3
  29. data/proto_docs/google/protobuf/struct.rb +96 -0
  30. metadata +22 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9aa72342dd004416646824df98514f24185f743fda14e42d15a81fa3f15650c
4
- data.tar.gz: d9e27368e63438829ac0d2ccdbac2bb8c7cd101f9154df74d6508a6d345d0fdd
3
+ metadata.gz: e0c3011434e70f9d1d6f3dfc9ecd626f4703eba0ae19349fc2d8927a3938e1d2
4
+ data.tar.gz: 3e436b784235eced9e0449dacc2d19d34b8cb1e4cf703415dcfa17c926418867
5
5
  SHA512:
6
- metadata.gz: a61275696b40780120f70322cf6602d51e016d234f6b4f2fe4c3259964991aa6a2c067e2792e4223e3f9c4fc76e53bcb8745596a560f541a766da3e5cf1daaf5
7
- data.tar.gz: d0d519de3bb51791ba355c2496bd5ccc1cd9e169663b455e283bea5914f9043b8ecade55803676a2f61dfb9a72db74107ffaeacc49dd7b1168bfd7d7d0ad5e32
6
+ metadata.gz: f4f0b4942fb7ed94eb4f2d17d78b165791fe7e707828e771142f4696a25bb25fd6fe0f542b8ebcd324ce332713e7ffcf7e0562af9a380457532b95c43ef994b7
7
+ data.tar.gz: 987540057e4ed8a15a92401b06fdef55e1ec479b64528397458a7f2f25acd47fd1a370fecb3bd6a7aa2b9b1e9f70aa109dbb5dbbde562fbb8939c647fb60c5e6
data/README.md CHANGED
@@ -33,11 +33,11 @@ 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
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-artifact_registry-v1beta2/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/artifact-registry/)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -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>]
@@ -1296,7 +1492,8 @@ module Google
1296
1492
  # the default parameter values, pass an empty Hash as a request object (see above).
1297
1493
  #
1298
1494
  # @param parent [::String]
1299
- # The name of the parent resource whose files will be listed.
1495
+ # The name of the repository whose files will be listed. For example:
1496
+ # "projects/p1/locations/us-central1/repositories/repo1
1300
1497
  # @param filter [::String]
1301
1498
  # An expression for filtering the results of the request. Filter rules are
1302
1499
  # case insensitive. The fields eligible for filtering are:
@@ -1502,8 +1699,7 @@ module Google
1502
1699
  # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
1503
1700
  # --> Tags that are applied to the version `1.0` in package `pkg1`.
1504
1701
  # @param page_size [::Integer]
1505
- # The maximum number of tags to return.
1506
- # Maximum page size is 10,000.
1702
+ # The maximum number of tags to return. Maximum page size is 10,000.
1507
1703
  # @param page_token [::String]
1508
1704
  # The next_page_token value returned from a previous list request, if any.
1509
1705
  #
@@ -1939,7 +2135,7 @@ module Google
1939
2135
  # @param options [::Gapic::CallOptions, ::Hash]
1940
2136
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1941
2137
  #
1942
- # @overload set_iam_policy(resource: nil, policy: nil)
2138
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
1943
2139
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1944
2140
  # least one keyword argument is required. To specify no parameters, or to keep all
1945
2141
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1952,6 +2148,12 @@ module Google
1952
2148
  # the policy is limited to a few 10s of KB. An empty policy is a
1953
2149
  # valid policy but certain Cloud Platform services (such as Projects)
1954
2150
  # might reject them.
2151
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2152
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2153
+ # the fields in the mask will be modified. If no mask is provided, the
2154
+ # following default mask is used:
2155
+ #
2156
+ # `paths: "bindings, etag"`
1955
2157
  #
1956
2158
  # @yield [response, operation] Access the result along with the RPC operation
1957
2159
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -2040,7 +2242,7 @@ module Google
2040
2242
  # See the operation documentation for the appropriate value for this field.
2041
2243
  # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
2042
2244
  # OPTIONAL: A `GetPolicyOptions` object for specifying options to
2043
- # `GetIamPolicy`. This field is only used by Cloud IAM.
2245
+ # `GetIamPolicy`.
2044
2246
  #
2045
2247
  # @yield [response, operation] Access the result along with the RPC operation
2046
2248
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -2197,6 +2399,178 @@ module Google
2197
2399
  raise ::Google::Cloud::Error.from_error(e)
2198
2400
  end
2199
2401
 
2402
+ ##
2403
+ # Retrieves the Settings for the Project.
2404
+ #
2405
+ # @overload get_project_settings(request, options = nil)
2406
+ # Pass arguments to `get_project_settings` via a request object, either of type
2407
+ # {::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest} or an equivalent Hash.
2408
+ #
2409
+ # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest, ::Hash]
2410
+ # A request object representing the call parameters. Required. To specify no
2411
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2412
+ # @param options [::Gapic::CallOptions, ::Hash]
2413
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2414
+ #
2415
+ # @overload get_project_settings(name: nil)
2416
+ # Pass arguments to `get_project_settings` via keyword arguments. Note that at
2417
+ # least one keyword argument is required. To specify no parameters, or to keep all
2418
+ # the default parameter values, pass an empty Hash as a request object (see above).
2419
+ #
2420
+ # @param name [::String]
2421
+ # Required. The name of the projectSettings resource.
2422
+ #
2423
+ # @yield [response, operation] Access the result along with the RPC operation
2424
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2425
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2426
+ #
2427
+ # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2428
+ #
2429
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2430
+ #
2431
+ # @example Basic example
2432
+ # require "google/cloud/artifact_registry/v1beta2"
2433
+ #
2434
+ # # Create a client object. The client can be reused for multiple calls.
2435
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
2436
+ #
2437
+ # # Create a request. To set request fields, pass in keyword arguments.
2438
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest.new
2439
+ #
2440
+ # # Call the get_project_settings method.
2441
+ # result = client.get_project_settings request
2442
+ #
2443
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
2444
+ # p result
2445
+ #
2446
+ def get_project_settings request, options = nil
2447
+ raise ::ArgumentError, "request must be provided" if request.nil?
2448
+
2449
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetProjectSettingsRequest
2450
+
2451
+ # Converts hash and nil to an options object
2452
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2453
+
2454
+ # Customize the options with defaults
2455
+ metadata = @config.rpcs.get_project_settings.metadata.to_h
2456
+
2457
+ # Set x-goog-api-client and x-goog-user-project headers
2458
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2459
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2460
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
2461
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2462
+
2463
+ header_params = {}
2464
+ if request.name
2465
+ header_params["name"] = request.name
2466
+ end
2467
+
2468
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2469
+ metadata[:"x-goog-request-params"] ||= request_params_header
2470
+
2471
+ options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
2472
+ metadata: metadata,
2473
+ retry_policy: @config.rpcs.get_project_settings.retry_policy
2474
+
2475
+ options.apply_defaults timeout: @config.timeout,
2476
+ metadata: @config.metadata,
2477
+ retry_policy: @config.retry_policy
2478
+
2479
+ @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation|
2480
+ yield response, operation if block_given?
2481
+ return response
2482
+ end
2483
+ rescue ::GRPC::BadStatus => e
2484
+ raise ::Google::Cloud::Error.from_error(e)
2485
+ end
2486
+
2487
+ ##
2488
+ # Updates the Settings for the Project.
2489
+ #
2490
+ # @overload update_project_settings(request, options = nil)
2491
+ # Pass arguments to `update_project_settings` via a request object, either of type
2492
+ # {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest} or an equivalent Hash.
2493
+ #
2494
+ # @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest, ::Hash]
2495
+ # A request object representing the call parameters. Required. To specify no
2496
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2497
+ # @param options [::Gapic::CallOptions, ::Hash]
2498
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2499
+ #
2500
+ # @overload update_project_settings(project_settings: nil, update_mask: nil)
2501
+ # Pass arguments to `update_project_settings` via keyword arguments. Note that at
2502
+ # least one keyword argument is required. To specify no parameters, or to keep all
2503
+ # the default parameter values, pass an empty Hash as a request object (see above).
2504
+ #
2505
+ # @param project_settings [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings, ::Hash]
2506
+ # The project settings.
2507
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2508
+ # Field mask to support partial updates.
2509
+ #
2510
+ # @yield [response, operation] Access the result along with the RPC operation
2511
+ # @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2512
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2513
+ #
2514
+ # @return [::Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings]
2515
+ #
2516
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2517
+ #
2518
+ # @example Basic example
2519
+ # require "google/cloud/artifact_registry/v1beta2"
2520
+ #
2521
+ # # Create a client object. The client can be reused for multiple calls.
2522
+ # client = Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
2523
+ #
2524
+ # # Create a request. To set request fields, pass in keyword arguments.
2525
+ # request = Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest.new
2526
+ #
2527
+ # # Call the update_project_settings method.
2528
+ # result = client.update_project_settings request
2529
+ #
2530
+ # # The returned object is of type Google::Cloud::ArtifactRegistry::V1beta2::ProjectSettings.
2531
+ # p result
2532
+ #
2533
+ def update_project_settings request, options = nil
2534
+ raise ::ArgumentError, "request must be provided" if request.nil?
2535
+
2536
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateProjectSettingsRequest
2537
+
2538
+ # Converts hash and nil to an options object
2539
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2540
+
2541
+ # Customize the options with defaults
2542
+ metadata = @config.rpcs.update_project_settings.metadata.to_h
2543
+
2544
+ # Set x-goog-api-client and x-goog-user-project headers
2545
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2546
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2547
+ gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
2548
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2549
+
2550
+ header_params = {}
2551
+ if request.project_settings&.name
2552
+ header_params["project_settings.name"] = request.project_settings.name
2553
+ end
2554
+
2555
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2556
+ metadata[:"x-goog-request-params"] ||= request_params_header
2557
+
2558
+ options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
2559
+ metadata: metadata,
2560
+ retry_policy: @config.rpcs.update_project_settings.retry_policy
2561
+
2562
+ options.apply_defaults timeout: @config.timeout,
2563
+ metadata: @config.metadata,
2564
+ retry_policy: @config.retry_policy
2565
+
2566
+ @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation|
2567
+ yield response, operation if block_given?
2568
+ return response
2569
+ end
2570
+ rescue ::GRPC::BadStatus => e
2571
+ raise ::Google::Cloud::Error.from_error(e)
2572
+ end
2573
+
2200
2574
  ##
2201
2575
  # Configuration class for the ArtifactRegistry API.
2202
2576
  #
@@ -2213,17 +2587,17 @@ module Google
2213
2587
  # @example
2214
2588
  #
2215
2589
  # # Modify the global config, setting the timeout for
2216
- # # list_repositories to 20 seconds,
2590
+ # # import_apt_artifacts to 20 seconds,
2217
2591
  # # and all remaining timeouts to 10 seconds.
2218
2592
  # ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
2219
2593
  # config.timeout = 10.0
2220
- # config.rpcs.list_repositories.timeout = 20.0
2594
+ # config.rpcs.import_apt_artifacts.timeout = 20.0
2221
2595
  # end
2222
2596
  #
2223
2597
  # # Apply the above configuration only to a new client.
2224
2598
  # client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
2225
2599
  # config.timeout = 10.0
2226
- # config.rpcs.list_repositories.timeout = 20.0
2600
+ # config.rpcs.import_apt_artifacts.timeout = 20.0
2227
2601
  # end
2228
2602
  #
2229
2603
  # @!attribute [rw] endpoint
@@ -2332,6 +2706,16 @@ module Google
2332
2706
  # trigger a retry.
2333
2707
  #
2334
2708
  class Rpcs
2709
+ ##
2710
+ # RPC-specific configuration for `import_apt_artifacts`
2711
+ # @return [::Gapic::Config::Method]
2712
+ #
2713
+ attr_reader :import_apt_artifacts
2714
+ ##
2715
+ # RPC-specific configuration for `import_yum_artifacts`
2716
+ # @return [::Gapic::Config::Method]
2717
+ #
2718
+ attr_reader :import_yum_artifacts
2335
2719
  ##
2336
2720
  # RPC-specific configuration for `list_repositories`
2337
2721
  # @return [::Gapic::Config::Method]
@@ -2437,9 +2821,23 @@ module Google
2437
2821
  # @return [::Gapic::Config::Method]
2438
2822
  #
2439
2823
  attr_reader :test_iam_permissions
2824
+ ##
2825
+ # RPC-specific configuration for `get_project_settings`
2826
+ # @return [::Gapic::Config::Method]
2827
+ #
2828
+ attr_reader :get_project_settings
2829
+ ##
2830
+ # RPC-specific configuration for `update_project_settings`
2831
+ # @return [::Gapic::Config::Method]
2832
+ #
2833
+ attr_reader :update_project_settings
2440
2834
 
2441
2835
  # @private
2442
2836
  def initialize parent_rpcs = nil
2837
+ import_apt_artifacts_config = parent_rpcs.import_apt_artifacts if parent_rpcs.respond_to? :import_apt_artifacts
2838
+ @import_apt_artifacts = ::Gapic::Config::Method.new import_apt_artifacts_config
2839
+ import_yum_artifacts_config = parent_rpcs.import_yum_artifacts if parent_rpcs.respond_to? :import_yum_artifacts
2840
+ @import_yum_artifacts = ::Gapic::Config::Method.new import_yum_artifacts_config
2443
2841
  list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
2444
2842
  @list_repositories = ::Gapic::Config::Method.new list_repositories_config
2445
2843
  get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
@@ -2482,6 +2880,10 @@ module Google
2482
2880
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
2483
2881
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2484
2882
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2883
+ get_project_settings_config = parent_rpcs.get_project_settings if parent_rpcs.respond_to? :get_project_settings
2884
+ @get_project_settings = ::Gapic::Config::Method.new get_project_settings_config
2885
+ update_project_settings_config = parent_rpcs.update_project_settings if parent_rpcs.respond_to? :update_project_settings
2886
+ @update_project_settings = ::Gapic::Config::Method.new update_project_settings_config
2485
2887
 
2486
2888
  yield self if block_given?
2487
2889
  end
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls