google-cloud-artifact_registry-v1beta2 0.3.5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +3 -3
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +420 -17
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +54 -0
- data/lib/google/cloud/artifact_registry/v1beta2/version.rb +1 -1
- data/lib/google/cloud/artifact_registry/v1beta2.rb +2 -0
- data/lib/google/devtools/artifactregistry/v1beta2/apt_artifact_pb.rb +65 -0
- data/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +2 -1
- data/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +21 -1
- data/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +3 -0
- data/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +14 -0
- data/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +22 -1
- data/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +2 -1
- data/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +6 -1
- data/lib/google/devtools/artifactregistry/v1beta2/yum_artifact_pb.rb +63 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/devtools/artifactregistry/v1beta2/apt_artifact.rb +118 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +7 -2
- data/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +53 -6
- data/proto_docs/google/devtools/artifactregistry/v1beta2/settings.rb +80 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +6 -2
- data/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +12 -2
- data/proto_docs/google/devtools/artifactregistry/v1beta2/yum_artifact.rb +110 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +8 -1
- data/proto_docs/google/iam/v1/options.rb +14 -4
- data/proto_docs/google/iam/v1/policy.rb +208 -38
- data/proto_docs/google/protobuf/struct.rb +96 -0
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eb5ee516a42747a792c28c63391be536d99cf5c959703f3bdefbcd9c06bc348
|
4
|
+
data.tar.gz: 2d64ac0e7527edf270db2029b2df70b4d1df717b842d6285f5d78961ce6d958d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e111a59a7e4e73554582e0ab80f23433ab508e94c3c2456e0e006f01e76ae318f93e7e08a3ed704e63671b1288100a89d733a77d47ac67fdcd7190b906be7d57
|
7
|
+
data.tar.gz: 582c73f9e897b6047d53d7b7192dc481a6e5a65efcea1e6b2db0e33c0697f7f254d83571e6c747485e65430b5252722e62a92a0e0c8b094ea2c3c6fa8e46715c
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
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::
|
37
|
-
response = client.
|
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://
|
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/)
|
@@ -232,6 +232,7 @@ module Google
|
|
232
232
|
|
233
233
|
@operations_client = Operations.new do |config|
|
234
234
|
config.credentials = credentials
|
235
|
+
config.quota_project = @quota_project_id
|
235
236
|
config.endpoint = @config.endpoint
|
236
237
|
end
|
237
238
|
|
@@ -253,6 +254,202 @@ module Google
|
|
253
254
|
|
254
255
|
# Service calls
|
255
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
|
+
|
256
453
|
##
|
257
454
|
# Lists repositories.
|
258
455
|
#
|
@@ -272,10 +469,9 @@ module Google
|
|
272
469
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
273
470
|
#
|
274
471
|
# @param parent [::String]
|
275
|
-
# The name of the parent resource whose repositories will be listed.
|
472
|
+
# Required. The name of the parent resource whose repositories will be listed.
|
276
473
|
# @param page_size [::Integer]
|
277
|
-
# The maximum number of repositories to return.
|
278
|
-
# Maximum page size is 10,000.
|
474
|
+
# The maximum number of repositories to return. Maximum page size is 1,000.
|
279
475
|
# @param page_token [::String]
|
280
476
|
# The next_page_token value returned from a previous list request, if any.
|
281
477
|
#
|
@@ -369,7 +565,7 @@ module Google
|
|
369
565
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
370
566
|
#
|
371
567
|
# @param name [::String]
|
372
|
-
# The name of the repository to retrieve.
|
568
|
+
# Required. The name of the repository to retrieve.
|
373
569
|
#
|
374
570
|
# @yield [response, operation] Access the result along with the RPC operation
|
375
571
|
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
|
@@ -455,7 +651,7 @@ module Google
|
|
455
651
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
456
652
|
#
|
457
653
|
# @param parent [::String]
|
458
|
-
# 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.
|
459
655
|
# @param repository_id [::String]
|
460
656
|
# The repository id to use for this repository.
|
461
657
|
# @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash]
|
@@ -643,7 +839,7 @@ module Google
|
|
643
839
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
644
840
|
#
|
645
841
|
# @param name [::String]
|
646
|
-
# The name of the repository to delete.
|
842
|
+
# Required. The name of the repository to delete.
|
647
843
|
#
|
648
844
|
# @yield [response, operation] Access the result along with the RPC operation
|
649
845
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1006,7 +1202,7 @@ module Google
|
|
1006
1202
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1007
1203
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1008
1204
|
#
|
1009
|
-
# @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)
|
1010
1206
|
# Pass arguments to `list_versions` via keyword arguments. Note that at
|
1011
1207
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1012
1208
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1014,12 +1210,13 @@ module Google
|
|
1014
1210
|
# @param parent [::String]
|
1015
1211
|
# The name of the parent resource whose versions will be listed.
|
1016
1212
|
# @param page_size [::Integer]
|
1017
|
-
# The maximum number of versions to return.
|
1018
|
-
# Maximum page size is 10,000.
|
1213
|
+
# The maximum number of versions to return. Maximum page size is 1,000.
|
1019
1214
|
# @param page_token [::String]
|
1020
1215
|
# The next_page_token value returned from a previous list request, if any.
|
1021
1216
|
# @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView]
|
1022
1217
|
# The view that should be returned in the response.
|
1218
|
+
# @param order_by [::String]
|
1219
|
+
# Optional. The field to order the results by.
|
1023
1220
|
#
|
1024
1221
|
# @yield [response, operation] Access the result along with the RPC operation
|
1025
1222
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>]
|
@@ -1295,7 +1492,8 @@ module Google
|
|
1295
1492
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1296
1493
|
#
|
1297
1494
|
# @param parent [::String]
|
1298
|
-
# The name of the
|
1495
|
+
# The name of the repository whose files will be listed. For example:
|
1496
|
+
# "projects/p1/locations/us-central1/repositories/repo1
|
1299
1497
|
# @param filter [::String]
|
1300
1498
|
# An expression for filtering the results of the request. Filter rules are
|
1301
1499
|
# case insensitive. The fields eligible for filtering are:
|
@@ -1501,8 +1699,7 @@ module Google
|
|
1501
1699
|
# * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
|
1502
1700
|
# --> Tags that are applied to the version `1.0` in package `pkg1`.
|
1503
1701
|
# @param page_size [::Integer]
|
1504
|
-
# The maximum number of tags to return.
|
1505
|
-
# Maximum page size is 10,000.
|
1702
|
+
# The maximum number of tags to return. Maximum page size is 10,000.
|
1506
1703
|
# @param page_token [::String]
|
1507
1704
|
# The next_page_token value returned from a previous list request, if any.
|
1508
1705
|
#
|
@@ -1938,7 +2135,7 @@ module Google
|
|
1938
2135
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1939
2136
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1940
2137
|
#
|
1941
|
-
# @overload set_iam_policy(resource: nil, policy: nil)
|
2138
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
1942
2139
|
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
1943
2140
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1944
2141
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1951,6 +2148,12 @@ module Google
|
|
1951
2148
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
1952
2149
|
# valid policy but certain Cloud Platform services (such as Projects)
|
1953
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"`
|
1954
2157
|
#
|
1955
2158
|
# @yield [response, operation] Access the result along with the RPC operation
|
1956
2159
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -2039,7 +2242,7 @@ module Google
|
|
2039
2242
|
# See the operation documentation for the appropriate value for this field.
|
2040
2243
|
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
2041
2244
|
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
2042
|
-
# `GetIamPolicy`.
|
2245
|
+
# `GetIamPolicy`.
|
2043
2246
|
#
|
2044
2247
|
# @yield [response, operation] Access the result along with the RPC operation
|
2045
2248
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -2196,6 +2399,178 @@ module Google
|
|
2196
2399
|
raise ::Google::Cloud::Error.from_error(e)
|
2197
2400
|
end
|
2198
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
|
+
|
2199
2574
|
##
|
2200
2575
|
# Configuration class for the ArtifactRegistry API.
|
2201
2576
|
#
|
@@ -2212,17 +2587,17 @@ module Google
|
|
2212
2587
|
# @example
|
2213
2588
|
#
|
2214
2589
|
# # Modify the global config, setting the timeout for
|
2215
|
-
# #
|
2590
|
+
# # import_apt_artifacts to 20 seconds,
|
2216
2591
|
# # and all remaining timeouts to 10 seconds.
|
2217
2592
|
# ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
|
2218
2593
|
# config.timeout = 10.0
|
2219
|
-
# config.rpcs.
|
2594
|
+
# config.rpcs.import_apt_artifacts.timeout = 20.0
|
2220
2595
|
# end
|
2221
2596
|
#
|
2222
2597
|
# # Apply the above configuration only to a new client.
|
2223
2598
|
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
|
2224
2599
|
# config.timeout = 10.0
|
2225
|
-
# config.rpcs.
|
2600
|
+
# config.rpcs.import_apt_artifacts.timeout = 20.0
|
2226
2601
|
# end
|
2227
2602
|
#
|
2228
2603
|
# @!attribute [rw] endpoint
|
@@ -2331,6 +2706,16 @@ module Google
|
|
2331
2706
|
# trigger a retry.
|
2332
2707
|
#
|
2333
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
|
2334
2719
|
##
|
2335
2720
|
# RPC-specific configuration for `list_repositories`
|
2336
2721
|
# @return [::Gapic::Config::Method]
|
@@ -2436,9 +2821,23 @@ module Google
|
|
2436
2821
|
# @return [::Gapic::Config::Method]
|
2437
2822
|
#
|
2438
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
|
2439
2834
|
|
2440
2835
|
# @private
|
2441
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
|
2442
2841
|
list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories
|
2443
2842
|
@list_repositories = ::Gapic::Config::Method.new list_repositories_config
|
2444
2843
|
get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository
|
@@ -2481,6 +2880,10 @@ module Google
|
|
2481
2880
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2482
2881
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
2483
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
|
2484
2887
|
|
2485
2888
|
yield self if block_given?
|
2486
2889
|
end
|