google-cloud-artifact_registry-v1 0.9.1 → 0.11.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +125 -6
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +10 -1
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb +42 -0
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +746 -5
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +75 -0
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +60 -0
- data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
- data/lib/google/devtools/artifactregistry/v1/repository_pb.rb +29 -1
- data/lib/google/devtools/artifactregistry/v1/service_pb.rb +1 -1
- data/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +3 -0
- data/lib/google/devtools/artifactregistry/v1/version_pb.rb +2 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/devtools/artifactregistry/v1/package.rb +1 -1
- data/proto_docs/google/devtools/artifactregistry/v1/repository.rb +411 -10
- data/proto_docs/google/devtools/artifactregistry/v1/tag.rb +3 -1
- data/proto_docs/google/devtools/artifactregistry/v1/version.rb +16 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb800f53536dfd55e83f34d89637cb938d1642e3caf63677e65eb246fdcf3397
|
4
|
+
data.tar.gz: 2cbe7ee3f0815b68337f6e4176a99529b84d9e1238f99da70ed215f9ec3f5ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d91a19f3fbe139423e2641aa9a86257e42873f4acaec961c08d0c1926a347988a64d0cd01d73f549f6c434d7b87f1624fe1f39ea5aca6b60292c465e5206caa9
|
7
|
+
data.tar.gz: c511ca2ae1dc9202e96a55528eeafc7c124a6ad95727739cfca5d778e1d86f3c66bc0568059077f2cdfa23cc3596457d3cee19fc9d52caf94eb5d2b151117956
|
@@ -165,7 +165,8 @@ module Google
|
|
165
165
|
credentials: credentials,
|
166
166
|
endpoint: @config.endpoint,
|
167
167
|
channel_args: @config.channel_args,
|
168
|
-
interceptors: @config.interceptors
|
168
|
+
interceptors: @config.interceptors,
|
169
|
+
channel_pool_config: @config.channel_pool
|
169
170
|
)
|
170
171
|
end
|
171
172
|
|
@@ -1122,7 +1123,8 @@ module Google
|
|
1122
1123
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1123
1124
|
#
|
1124
1125
|
# @param parent [::String]
|
1125
|
-
# Required. The name of the parent resource whose repositories will be
|
1126
|
+
# Required. The name of the parent resource whose repositories will be
|
1127
|
+
# listed.
|
1126
1128
|
# @param page_size [::Integer]
|
1127
1129
|
# The maximum number of repositories to return. Maximum page size is 1,000.
|
1128
1130
|
# @param page_token [::String]
|
@@ -1302,11 +1304,12 @@ module Google
|
|
1302
1304
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1303
1305
|
#
|
1304
1306
|
# @param parent [::String]
|
1305
|
-
# Required. The name of the parent resource where the repository will be
|
1307
|
+
# Required. The name of the parent resource where the repository will be
|
1308
|
+
# created.
|
1306
1309
|
# @param repository_id [::String]
|
1307
|
-
# The repository id to use for this repository.
|
1310
|
+
# Required. The repository id to use for this repository.
|
1308
1311
|
# @param repository [::Google::Cloud::ArtifactRegistry::V1::Repository, ::Hash]
|
1309
|
-
# The repository to be created.
|
1312
|
+
# Required. The repository to be created.
|
1310
1313
|
#
|
1311
1314
|
# @yield [response, operation] Access the result along with the RPC operation
|
1312
1315
|
# @yieldparam response [::Gapic::Operation]
|
@@ -2119,6 +2122,105 @@ module Google
|
|
2119
2122
|
raise ::Google::Cloud::Error.from_error(e)
|
2120
2123
|
end
|
2121
2124
|
|
2125
|
+
##
|
2126
|
+
# Deletes multiple versions across a repository. The returned operation will
|
2127
|
+
# complete once the versions have been deleted.
|
2128
|
+
#
|
2129
|
+
# @overload batch_delete_versions(request, options = nil)
|
2130
|
+
# Pass arguments to `batch_delete_versions` via a request object, either of type
|
2131
|
+
# {::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest} or an equivalent Hash.
|
2132
|
+
#
|
2133
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest, ::Hash]
|
2134
|
+
# A request object representing the call parameters. Required. To specify no
|
2135
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2136
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2137
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2138
|
+
#
|
2139
|
+
# @overload batch_delete_versions(parent: nil, names: nil, validate_only: nil)
|
2140
|
+
# Pass arguments to `batch_delete_versions` via keyword arguments. Note that at
|
2141
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2142
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2143
|
+
#
|
2144
|
+
# @param parent [::String]
|
2145
|
+
# The name of the repository holding all requested versions.
|
2146
|
+
# @param names [::Array<::String>]
|
2147
|
+
# Required. The names of the versions to delete.
|
2148
|
+
# A maximum of 10000 versions can be deleted in a batch.
|
2149
|
+
# @param validate_only [::Boolean]
|
2150
|
+
# If true, the request is performed without deleting data, following AIP-163.
|
2151
|
+
#
|
2152
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2153
|
+
# @yieldparam response [::Gapic::Operation]
|
2154
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2155
|
+
#
|
2156
|
+
# @return [::Gapic::Operation]
|
2157
|
+
#
|
2158
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2159
|
+
#
|
2160
|
+
# @example Basic example
|
2161
|
+
# require "google/cloud/artifact_registry/v1"
|
2162
|
+
#
|
2163
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2164
|
+
# client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new
|
2165
|
+
#
|
2166
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2167
|
+
# request = Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest.new
|
2168
|
+
#
|
2169
|
+
# # Call the batch_delete_versions method.
|
2170
|
+
# result = client.batch_delete_versions request
|
2171
|
+
#
|
2172
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2173
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2174
|
+
# # Here is how to wait for a response.
|
2175
|
+
# result.wait_until_done! timeout: 60
|
2176
|
+
# if result.response?
|
2177
|
+
# p result.response
|
2178
|
+
# else
|
2179
|
+
# puts "No response received."
|
2180
|
+
# end
|
2181
|
+
#
|
2182
|
+
def batch_delete_versions request, options = nil
|
2183
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2184
|
+
|
2185
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1::BatchDeleteVersionsRequest
|
2186
|
+
|
2187
|
+
# Converts hash and nil to an options object
|
2188
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2189
|
+
|
2190
|
+
# Customize the options with defaults
|
2191
|
+
metadata = @config.rpcs.batch_delete_versions.metadata.to_h
|
2192
|
+
|
2193
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2194
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2195
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2196
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1::VERSION
|
2197
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2198
|
+
|
2199
|
+
header_params = {}
|
2200
|
+
if request.parent
|
2201
|
+
header_params["parent"] = request.parent
|
2202
|
+
end
|
2203
|
+
|
2204
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2205
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2206
|
+
|
2207
|
+
options.apply_defaults timeout: @config.rpcs.batch_delete_versions.timeout,
|
2208
|
+
metadata: metadata,
|
2209
|
+
retry_policy: @config.rpcs.batch_delete_versions.retry_policy
|
2210
|
+
|
2211
|
+
options.apply_defaults timeout: @config.timeout,
|
2212
|
+
metadata: @config.metadata,
|
2213
|
+
retry_policy: @config.retry_policy
|
2214
|
+
|
2215
|
+
@artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation|
|
2216
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2217
|
+
yield response, operation if block_given?
|
2218
|
+
return response
|
2219
|
+
end
|
2220
|
+
rescue ::GRPC::BadStatus => e
|
2221
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2222
|
+
end
|
2223
|
+
|
2122
2224
|
##
|
2123
2225
|
# Lists files.
|
2124
2226
|
#
|
@@ -2333,7 +2435,9 @@ module Google
|
|
2333
2435
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2334
2436
|
#
|
2335
2437
|
# @param parent [::String]
|
2336
|
-
# The name of the parent
|
2438
|
+
# The name of the parent package whose tags will be listed.
|
2439
|
+
# For example:
|
2440
|
+
# `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
|
2337
2441
|
# @param filter [::String]
|
2338
2442
|
# An expression for filtering the results of the request. Filter rules are
|
2339
2443
|
# case insensitive. The fields eligible for filtering are:
|
@@ -3506,6 +3610,14 @@ module Google
|
|
3506
3610
|
end
|
3507
3611
|
end
|
3508
3612
|
|
3613
|
+
##
|
3614
|
+
# Configuration for the channel pool
|
3615
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
3616
|
+
#
|
3617
|
+
def channel_pool
|
3618
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
3619
|
+
end
|
3620
|
+
|
3509
3621
|
##
|
3510
3622
|
# Configuration RPC class for the ArtifactRegistry API.
|
3511
3623
|
#
|
@@ -3630,6 +3742,11 @@ module Google
|
|
3630
3742
|
#
|
3631
3743
|
attr_reader :delete_version
|
3632
3744
|
##
|
3745
|
+
# RPC-specific configuration for `batch_delete_versions`
|
3746
|
+
# @return [::Gapic::Config::Method]
|
3747
|
+
#
|
3748
|
+
attr_reader :batch_delete_versions
|
3749
|
+
##
|
3633
3750
|
# RPC-specific configuration for `list_files`
|
3634
3751
|
# @return [::Gapic::Config::Method]
|
3635
3752
|
#
|
@@ -3744,6 +3861,8 @@ module Google
|
|
3744
3861
|
@get_version = ::Gapic::Config::Method.new get_version_config
|
3745
3862
|
delete_version_config = parent_rpcs.delete_version if parent_rpcs.respond_to? :delete_version
|
3746
3863
|
@delete_version = ::Gapic::Config::Method.new delete_version_config
|
3864
|
+
batch_delete_versions_config = parent_rpcs.batch_delete_versions if parent_rpcs.respond_to? :batch_delete_versions
|
3865
|
+
@batch_delete_versions = ::Gapic::Config::Method.new batch_delete_versions_config
|
3747
3866
|
list_files_config = parent_rpcs.list_files if parent_rpcs.respond_to? :list_files
|
3748
3867
|
@list_files = ::Gapic::Config::Method.new list_files_config
|
3749
3868
|
get_file_config = parent_rpcs.get_file if parent_rpcs.respond_to? :get_file
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -701,6 +702,14 @@ module Google
|
|
701
702
|
end
|
702
703
|
end
|
703
704
|
|
705
|
+
##
|
706
|
+
# Configuration for the channel pool
|
707
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
708
|
+
#
|
709
|
+
def channel_pool
|
710
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
711
|
+
end
|
712
|
+
|
704
713
|
##
|
705
714
|
# Configuration RPC class for the Operations API.
|
706
715
|
#
|
@@ -200,6 +200,25 @@ module Google
|
|
200
200
|
"projects/#{project}/locations/#{location}/repositories/#{repository}"
|
201
201
|
end
|
202
202
|
|
203
|
+
##
|
204
|
+
# Create a fully-qualified SecretVersion resource string.
|
205
|
+
#
|
206
|
+
# The resource will be in the following format:
|
207
|
+
#
|
208
|
+
# `projects/{project}/secrets/{secret}/versions/{secret_version}`
|
209
|
+
#
|
210
|
+
# @param project [String]
|
211
|
+
# @param secret [String]
|
212
|
+
# @param secret_version [String]
|
213
|
+
#
|
214
|
+
# @return [::String]
|
215
|
+
def secret_version_path project:, secret:, secret_version:
|
216
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
217
|
+
raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
|
218
|
+
|
219
|
+
"projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
|
220
|
+
end
|
221
|
+
|
203
222
|
##
|
204
223
|
# Create a fully-qualified Tag resource string.
|
205
224
|
#
|
@@ -223,6 +242,29 @@ module Google
|
|
223
242
|
"projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}"
|
224
243
|
end
|
225
244
|
|
245
|
+
##
|
246
|
+
# Create a fully-qualified Version resource string.
|
247
|
+
#
|
248
|
+
# The resource will be in the following format:
|
249
|
+
#
|
250
|
+
# `projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}`
|
251
|
+
#
|
252
|
+
# @param project [String]
|
253
|
+
# @param location [String]
|
254
|
+
# @param repository [String]
|
255
|
+
# @param package [String]
|
256
|
+
# @param version [String]
|
257
|
+
#
|
258
|
+
# @return [::String]
|
259
|
+
def version_path project:, location:, repository:, package:, version:
|
260
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
261
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
262
|
+
raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
|
263
|
+
raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/"
|
264
|
+
|
265
|
+
"projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/versions/#{version}"
|
266
|
+
end
|
267
|
+
|
226
268
|
##
|
227
269
|
# Create a fully-qualified VpcscConfig resource string.
|
228
270
|
#
|