google-cloud-artifact_registry-v1beta2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-artifact_registry-v1beta2.rb +21 -0
- data/lib/google/cloud/artifact_registry/v1beta2.rb +35 -0
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry.rb +62 -0
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/client.rb +2083 -0
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/credentials.rb +52 -0
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb +570 -0
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/paths.rb +52 -0
- data/lib/google/cloud/artifact_registry/v1beta2/version.rb +28 -0
- data/lib/google/devtools/artifactregistry/v1beta2/file_pb.rb +56 -0
- data/lib/google/devtools/artifactregistry/v1beta2/package_pb.rb +46 -0
- data/lib/google/devtools/artifactregistry/v1beta2/repository_pb.rb +67 -0
- data/lib/google/devtools/artifactregistry/v1beta2/service_pb.rb +32 -0
- data/lib/google/devtools/artifactregistry/v1beta2/service_services_pb.rb +102 -0
- data/lib/google/devtools/artifactregistry/v1beta2/settings_pb.rb +22 -0
- data/lib/google/devtools/artifactregistry/v1beta2/tag_pb.rb +56 -0
- data/lib/google/devtools/artifactregistry/v1beta2/version_pb.rb +57 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/file.rb +123 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/package.rb +93 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/repository.rb +155 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/service.rb +32 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/tag.rb +128 -0
- data/proto_docs/google/devtools/artifactregistry/v1beta2/version.rb +122 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +242 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/artifact_registry/v1beta2/artifact_registry"
|
20
|
+
require "google/cloud/artifact_registry/v1beta2/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module ArtifactRegistry
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/artifact_registry/v1beta2"
|
29
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
30
|
+
#
|
31
|
+
module V1beta2
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/artifact_registry/v1beta2/version"
|
24
|
+
|
25
|
+
require "google/cloud/artifact_registry/v1beta2/artifact_registry/credentials"
|
26
|
+
require "google/cloud/artifact_registry/v1beta2/artifact_registry/paths"
|
27
|
+
require "google/cloud/artifact_registry/v1beta2/artifact_registry/operations"
|
28
|
+
require "google/cloud/artifact_registry/v1beta2/artifact_registry/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module ArtifactRegistry
|
33
|
+
module V1beta2
|
34
|
+
##
|
35
|
+
# The Artifact Registry API service.
|
36
|
+
#
|
37
|
+
# Artifact Registry is an artifact management system for storing artifacts
|
38
|
+
# from different package management systems.
|
39
|
+
#
|
40
|
+
# The resources managed by this API are:
|
41
|
+
#
|
42
|
+
# * Repositories, which group packages and their data.
|
43
|
+
# * Packages, which group versions and their tags.
|
44
|
+
# * Versions, which are specific forms of a package.
|
45
|
+
# * Tags, which represent alternative names for versions.
|
46
|
+
# * Files, which contain content and are optionally associated with a Package
|
47
|
+
# or Version.
|
48
|
+
#
|
49
|
+
# To load this service and instantiate a client:
|
50
|
+
#
|
51
|
+
# require "google/cloud/artifact_registry/v1beta2/artifact_registry"
|
52
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
53
|
+
#
|
54
|
+
module ArtifactRegistry
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
helper_path = ::File.join __dir__, "artifact_registry", "helpers.rb"
|
62
|
+
require "google/cloud/artifact_registry/v1beta2/artifact_registry/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,2083 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/devtools/artifactregistry/v1beta2/service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module ArtifactRegistry
|
25
|
+
module V1beta2
|
26
|
+
module ArtifactRegistry
|
27
|
+
##
|
28
|
+
# Client for the ArtifactRegistry service.
|
29
|
+
#
|
30
|
+
# The Artifact Registry API service.
|
31
|
+
#
|
32
|
+
# Artifact Registry is an artifact management system for storing artifacts
|
33
|
+
# from different package management systems.
|
34
|
+
#
|
35
|
+
# The resources managed by this API are:
|
36
|
+
#
|
37
|
+
# * Repositories, which group packages and their data.
|
38
|
+
# * Packages, which group versions and their tags.
|
39
|
+
# * Versions, which are specific forms of a package.
|
40
|
+
# * Tags, which represent alternative names for versions.
|
41
|
+
# * Files, which contain content and are optionally associated with a Package
|
42
|
+
# or Version.
|
43
|
+
#
|
44
|
+
class Client
|
45
|
+
include Paths
|
46
|
+
|
47
|
+
# @private
|
48
|
+
attr_reader :artifact_registry_stub
|
49
|
+
|
50
|
+
##
|
51
|
+
# Configure the ArtifactRegistry Client class.
|
52
|
+
#
|
53
|
+
# See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration}
|
54
|
+
# for a description of the configuration fields.
|
55
|
+
#
|
56
|
+
# ## Example
|
57
|
+
#
|
58
|
+
# To modify the configuration for all ArtifactRegistry clients:
|
59
|
+
#
|
60
|
+
# ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
|
61
|
+
# config.timeout = 10.0
|
62
|
+
# end
|
63
|
+
#
|
64
|
+
# @yield [config] Configure the Client client.
|
65
|
+
# @yieldparam config [Client::Configuration]
|
66
|
+
#
|
67
|
+
# @return [Client::Configuration]
|
68
|
+
#
|
69
|
+
def self.configure
|
70
|
+
@configure ||= begin
|
71
|
+
namespace = ["Google", "Cloud", "ArtifactRegistry", "V1beta2"]
|
72
|
+
parent_config = while namespace.any?
|
73
|
+
parent_name = namespace.join "::"
|
74
|
+
parent_const = const_get parent_name
|
75
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
76
|
+
namespace.pop
|
77
|
+
end
|
78
|
+
default_config = Client::Configuration.new parent_config
|
79
|
+
|
80
|
+
default_config.rpcs.list_repositories.timeout = 30.0
|
81
|
+
default_config.rpcs.list_repositories.retry_policy = {
|
82
|
+
initial_delay: 0.1,
|
83
|
+
max_delay: 60.0,
|
84
|
+
multiplier: 1.3,
|
85
|
+
retry_codes: [14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.get_repository.timeout = 30.0
|
89
|
+
default_config.rpcs.get_repository.retry_policy = {
|
90
|
+
initial_delay: 0.1,
|
91
|
+
max_delay: 60.0,
|
92
|
+
multiplier: 1.3,
|
93
|
+
retry_codes: [14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.create_repository.timeout = 30.0
|
97
|
+
|
98
|
+
default_config.rpcs.update_repository.timeout = 30.0
|
99
|
+
|
100
|
+
default_config.rpcs.delete_repository.timeout = 30.0
|
101
|
+
default_config.rpcs.delete_repository.retry_policy = {
|
102
|
+
initial_delay: 0.1,
|
103
|
+
max_delay: 60.0,
|
104
|
+
multiplier: 1.3,
|
105
|
+
retry_codes: [14]
|
106
|
+
}
|
107
|
+
|
108
|
+
default_config.rpcs.list_packages.timeout = 30.0
|
109
|
+
default_config.rpcs.list_packages.retry_policy = {
|
110
|
+
initial_delay: 0.1,
|
111
|
+
max_delay: 60.0,
|
112
|
+
multiplier: 1.3,
|
113
|
+
retry_codes: [14]
|
114
|
+
}
|
115
|
+
|
116
|
+
default_config.rpcs.get_package.timeout = 30.0
|
117
|
+
default_config.rpcs.get_package.retry_policy = {
|
118
|
+
initial_delay: 0.1,
|
119
|
+
max_delay: 60.0,
|
120
|
+
multiplier: 1.3,
|
121
|
+
retry_codes: [14]
|
122
|
+
}
|
123
|
+
|
124
|
+
default_config.rpcs.delete_package.timeout = 30.0
|
125
|
+
default_config.rpcs.delete_package.retry_policy = {
|
126
|
+
initial_delay: 0.1,
|
127
|
+
max_delay: 60.0,
|
128
|
+
multiplier: 1.3,
|
129
|
+
retry_codes: [14]
|
130
|
+
}
|
131
|
+
|
132
|
+
default_config.rpcs.list_versions.timeout = 30.0
|
133
|
+
default_config.rpcs.list_versions.retry_policy = {
|
134
|
+
initial_delay: 0.1,
|
135
|
+
max_delay: 60.0,
|
136
|
+
multiplier: 1.3,
|
137
|
+
retry_codes: [14]
|
138
|
+
}
|
139
|
+
|
140
|
+
default_config.rpcs.get_version.timeout = 30.0
|
141
|
+
default_config.rpcs.get_version.retry_policy = {
|
142
|
+
initial_delay: 0.1,
|
143
|
+
max_delay: 60.0,
|
144
|
+
multiplier: 1.3,
|
145
|
+
retry_codes: [14]
|
146
|
+
}
|
147
|
+
|
148
|
+
default_config.rpcs.delete_version.timeout = 30.0
|
149
|
+
default_config.rpcs.delete_version.retry_policy = {
|
150
|
+
initial_delay: 0.1,
|
151
|
+
max_delay: 60.0,
|
152
|
+
multiplier: 1.3,
|
153
|
+
retry_codes: [14]
|
154
|
+
}
|
155
|
+
|
156
|
+
default_config.rpcs.list_files.timeout = 30.0
|
157
|
+
default_config.rpcs.list_files.retry_policy = {
|
158
|
+
initial_delay: 0.1,
|
159
|
+
max_delay: 60.0,
|
160
|
+
multiplier: 1.3,
|
161
|
+
retry_codes: [14]
|
162
|
+
}
|
163
|
+
|
164
|
+
default_config.rpcs.get_file.timeout = 30.0
|
165
|
+
default_config.rpcs.get_file.retry_policy = {
|
166
|
+
initial_delay: 0.1,
|
167
|
+
max_delay: 60.0,
|
168
|
+
multiplier: 1.3,
|
169
|
+
retry_codes: [14]
|
170
|
+
}
|
171
|
+
|
172
|
+
default_config.rpcs.list_tags.timeout = 30.0
|
173
|
+
default_config.rpcs.list_tags.retry_policy = {
|
174
|
+
initial_delay: 0.1,
|
175
|
+
max_delay: 60.0,
|
176
|
+
multiplier: 1.3,
|
177
|
+
retry_codes: [14]
|
178
|
+
}
|
179
|
+
|
180
|
+
default_config.rpcs.get_tag.timeout = 30.0
|
181
|
+
default_config.rpcs.get_tag.retry_policy = {
|
182
|
+
initial_delay: 0.1,
|
183
|
+
max_delay: 60.0,
|
184
|
+
multiplier: 1.3,
|
185
|
+
retry_codes: [14]
|
186
|
+
}
|
187
|
+
|
188
|
+
default_config.rpcs.create_tag.timeout = 30.0
|
189
|
+
|
190
|
+
default_config.rpcs.update_tag.timeout = 30.0
|
191
|
+
|
192
|
+
default_config.rpcs.delete_tag.timeout = 30.0
|
193
|
+
default_config.rpcs.delete_tag.retry_policy = {
|
194
|
+
initial_delay: 0.1,
|
195
|
+
max_delay: 60.0,
|
196
|
+
multiplier: 1.3,
|
197
|
+
retry_codes: [14]
|
198
|
+
}
|
199
|
+
|
200
|
+
default_config.rpcs.get_iam_policy.timeout = 30.0
|
201
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
202
|
+
initial_delay: 0.1,
|
203
|
+
max_delay: 60.0,
|
204
|
+
multiplier: 1.3,
|
205
|
+
retry_codes: [14]
|
206
|
+
}
|
207
|
+
|
208
|
+
default_config.rpcs.test_iam_permissions.timeout = 30.0
|
209
|
+
|
210
|
+
default_config
|
211
|
+
end
|
212
|
+
yield @configure if block_given?
|
213
|
+
@configure
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Configure the ArtifactRegistry Client instance.
|
218
|
+
#
|
219
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
220
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
221
|
+
# should be made on {Client.configure}.
|
222
|
+
#
|
223
|
+
# See {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration}
|
224
|
+
# for a description of the configuration fields.
|
225
|
+
#
|
226
|
+
# @yield [config] Configure the Client client.
|
227
|
+
# @yieldparam config [Client::Configuration]
|
228
|
+
#
|
229
|
+
# @return [Client::Configuration]
|
230
|
+
#
|
231
|
+
def configure
|
232
|
+
yield @config if block_given?
|
233
|
+
@config
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Create a new ArtifactRegistry client object.
|
238
|
+
#
|
239
|
+
# ## Examples
|
240
|
+
#
|
241
|
+
# To create a new ArtifactRegistry client with the default
|
242
|
+
# configuration:
|
243
|
+
#
|
244
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new
|
245
|
+
#
|
246
|
+
# To create a new ArtifactRegistry client with a custom
|
247
|
+
# configuration:
|
248
|
+
#
|
249
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
|
250
|
+
# config.timeout = 10.0
|
251
|
+
# end
|
252
|
+
#
|
253
|
+
# @yield [config] Configure the ArtifactRegistry client.
|
254
|
+
# @yieldparam config [Client::Configuration]
|
255
|
+
#
|
256
|
+
def initialize
|
257
|
+
# These require statements are intentionally placed here to initialize
|
258
|
+
# the gRPC module only when it's required.
|
259
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
260
|
+
require "gapic/grpc"
|
261
|
+
require "google/devtools/artifactregistry/v1beta2/service_services_pb"
|
262
|
+
|
263
|
+
# Create the configuration object
|
264
|
+
@config = Configuration.new Client.configure
|
265
|
+
|
266
|
+
# Yield the configuration if needed
|
267
|
+
yield @config if block_given?
|
268
|
+
|
269
|
+
# Create credentials
|
270
|
+
credentials = @config.credentials
|
271
|
+
credentials ||= Credentials.default scope: @config.scope
|
272
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
273
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
274
|
+
end
|
275
|
+
@quota_project_id = @config.quota_project
|
276
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
277
|
+
|
278
|
+
@operations_client = Operations.new do |config|
|
279
|
+
config.credentials = credentials
|
280
|
+
config.endpoint = @config.endpoint
|
281
|
+
end
|
282
|
+
|
283
|
+
@artifact_registry_stub = ::Gapic::ServiceStub.new(
|
284
|
+
::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Stub,
|
285
|
+
credentials: credentials,
|
286
|
+
endpoint: @config.endpoint,
|
287
|
+
channel_args: @config.channel_args,
|
288
|
+
interceptors: @config.interceptors
|
289
|
+
)
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# Get the associated client for long-running operations.
|
294
|
+
#
|
295
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Operations]
|
296
|
+
#
|
297
|
+
attr_reader :operations_client
|
298
|
+
|
299
|
+
# Service calls
|
300
|
+
|
301
|
+
##
|
302
|
+
# Lists repositories.
|
303
|
+
#
|
304
|
+
# @overload list_repositories(request, options = nil)
|
305
|
+
# Pass arguments to `list_repositories` via a request object, either of type
|
306
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest} or an equivalent Hash.
|
307
|
+
#
|
308
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest, ::Hash]
|
309
|
+
# A request object representing the call parameters. Required. To specify no
|
310
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
311
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
312
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
313
|
+
#
|
314
|
+
# @overload list_repositories(parent: nil, page_size: nil, page_token: nil)
|
315
|
+
# Pass arguments to `list_repositories` via keyword arguments. Note that at
|
316
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
317
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
318
|
+
#
|
319
|
+
# @param parent [::String]
|
320
|
+
# The name of the parent resource whose repositories will be listed.
|
321
|
+
# @param page_size [::Integer]
|
322
|
+
# The maximum number of repositories to return.
|
323
|
+
# Maximum page size is 10,000.
|
324
|
+
# @param page_token [::String]
|
325
|
+
# The next_page_token value returned from a previous list request, if any.
|
326
|
+
#
|
327
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
328
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>]
|
329
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
330
|
+
#
|
331
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Repository>]
|
332
|
+
#
|
333
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
334
|
+
#
|
335
|
+
def list_repositories request, options = nil
|
336
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
337
|
+
|
338
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListRepositoriesRequest
|
339
|
+
|
340
|
+
# Converts hash and nil to an options object
|
341
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
342
|
+
|
343
|
+
# Customize the options with defaults
|
344
|
+
metadata = @config.rpcs.list_repositories.metadata.to_h
|
345
|
+
|
346
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
347
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
348
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
349
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
350
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
351
|
+
|
352
|
+
header_params = {
|
353
|
+
"parent" => request.parent
|
354
|
+
}
|
355
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
356
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
357
|
+
|
358
|
+
options.apply_defaults timeout: @config.rpcs.list_repositories.timeout,
|
359
|
+
metadata: metadata,
|
360
|
+
retry_policy: @config.rpcs.list_repositories.retry_policy
|
361
|
+
options.apply_defaults metadata: @config.metadata,
|
362
|
+
retry_policy: @config.retry_policy
|
363
|
+
|
364
|
+
@artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation|
|
365
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options
|
366
|
+
yield response, operation if block_given?
|
367
|
+
return response
|
368
|
+
end
|
369
|
+
rescue ::GRPC::BadStatus => e
|
370
|
+
raise ::Google::Cloud::Error.from_error(e)
|
371
|
+
end
|
372
|
+
|
373
|
+
##
|
374
|
+
# Gets a repository.
|
375
|
+
#
|
376
|
+
# @overload get_repository(request, options = nil)
|
377
|
+
# Pass arguments to `get_repository` via a request object, either of type
|
378
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest} or an equivalent Hash.
|
379
|
+
#
|
380
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest, ::Hash]
|
381
|
+
# A request object representing the call parameters. Required. To specify no
|
382
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
383
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
384
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
385
|
+
#
|
386
|
+
# @overload get_repository(name: nil)
|
387
|
+
# Pass arguments to `get_repository` via keyword arguments. Note that at
|
388
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
389
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
390
|
+
#
|
391
|
+
# @param name [::String]
|
392
|
+
# The name of the repository to retrieve.
|
393
|
+
#
|
394
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
395
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
|
396
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
397
|
+
#
|
398
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
|
399
|
+
#
|
400
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
401
|
+
#
|
402
|
+
def get_repository request, options = nil
|
403
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
404
|
+
|
405
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetRepositoryRequest
|
406
|
+
|
407
|
+
# Converts hash and nil to an options object
|
408
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
409
|
+
|
410
|
+
# Customize the options with defaults
|
411
|
+
metadata = @config.rpcs.get_repository.metadata.to_h
|
412
|
+
|
413
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
414
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
415
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
416
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
417
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
418
|
+
|
419
|
+
header_params = {
|
420
|
+
"name" => request.name
|
421
|
+
}
|
422
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
423
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
424
|
+
|
425
|
+
options.apply_defaults timeout: @config.rpcs.get_repository.timeout,
|
426
|
+
metadata: metadata,
|
427
|
+
retry_policy: @config.rpcs.get_repository.retry_policy
|
428
|
+
options.apply_defaults metadata: @config.metadata,
|
429
|
+
retry_policy: @config.retry_policy
|
430
|
+
|
431
|
+
@artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation|
|
432
|
+
yield response, operation if block_given?
|
433
|
+
return response
|
434
|
+
end
|
435
|
+
rescue ::GRPC::BadStatus => e
|
436
|
+
raise ::Google::Cloud::Error.from_error(e)
|
437
|
+
end
|
438
|
+
|
439
|
+
##
|
440
|
+
# Creates a repository. The returned Operation will finish once the
|
441
|
+
# repository has been created. Its response will be the created Repository.
|
442
|
+
#
|
443
|
+
# @overload create_repository(request, options = nil)
|
444
|
+
# Pass arguments to `create_repository` via a request object, either of type
|
445
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest} or an equivalent Hash.
|
446
|
+
#
|
447
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest, ::Hash]
|
448
|
+
# A request object representing the call parameters. Required. To specify no
|
449
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
450
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
451
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
452
|
+
#
|
453
|
+
# @overload create_repository(parent: nil, repository_id: nil, repository: nil)
|
454
|
+
# Pass arguments to `create_repository` via keyword arguments. Note that at
|
455
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
456
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
457
|
+
#
|
458
|
+
# @param parent [::String]
|
459
|
+
# The name of the parent resource where the repository will be created.
|
460
|
+
# @param repository_id [::String]
|
461
|
+
# The repository id to use for this repository.
|
462
|
+
# @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash]
|
463
|
+
# The repository to be created.
|
464
|
+
#
|
465
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
466
|
+
# @yieldparam response [::Gapic::Operation]
|
467
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
468
|
+
#
|
469
|
+
# @return [::Gapic::Operation]
|
470
|
+
#
|
471
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
472
|
+
#
|
473
|
+
def create_repository request, options = nil
|
474
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
475
|
+
|
476
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateRepositoryRequest
|
477
|
+
|
478
|
+
# Converts hash and nil to an options object
|
479
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
480
|
+
|
481
|
+
# Customize the options with defaults
|
482
|
+
metadata = @config.rpcs.create_repository.metadata.to_h
|
483
|
+
|
484
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
485
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
486
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
487
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
488
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
489
|
+
|
490
|
+
header_params = {
|
491
|
+
"parent" => request.parent
|
492
|
+
}
|
493
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
494
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
495
|
+
|
496
|
+
options.apply_defaults timeout: @config.rpcs.create_repository.timeout,
|
497
|
+
metadata: metadata,
|
498
|
+
retry_policy: @config.rpcs.create_repository.retry_policy
|
499
|
+
options.apply_defaults metadata: @config.metadata,
|
500
|
+
retry_policy: @config.retry_policy
|
501
|
+
|
502
|
+
@artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation|
|
503
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
504
|
+
yield response, operation if block_given?
|
505
|
+
return response
|
506
|
+
end
|
507
|
+
rescue ::GRPC::BadStatus => e
|
508
|
+
raise ::Google::Cloud::Error.from_error(e)
|
509
|
+
end
|
510
|
+
|
511
|
+
##
|
512
|
+
# Updates a repository.
|
513
|
+
#
|
514
|
+
# @overload update_repository(request, options = nil)
|
515
|
+
# Pass arguments to `update_repository` via a request object, either of type
|
516
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest} or an equivalent Hash.
|
517
|
+
#
|
518
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest, ::Hash]
|
519
|
+
# A request object representing the call parameters. Required. To specify no
|
520
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
521
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
522
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
523
|
+
#
|
524
|
+
# @overload update_repository(repository: nil, update_mask: nil)
|
525
|
+
# Pass arguments to `update_repository` via keyword arguments. Note that at
|
526
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
527
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
528
|
+
#
|
529
|
+
# @param repository [::Google::Cloud::ArtifactRegistry::V1beta2::Repository, ::Hash]
|
530
|
+
# The repository that replaces the resource on the server.
|
531
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
532
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
533
|
+
# see
|
534
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
535
|
+
#
|
536
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
537
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
|
538
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
539
|
+
#
|
540
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Repository]
|
541
|
+
#
|
542
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
543
|
+
#
|
544
|
+
def update_repository request, options = nil
|
545
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
546
|
+
|
547
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateRepositoryRequest
|
548
|
+
|
549
|
+
# Converts hash and nil to an options object
|
550
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
551
|
+
|
552
|
+
# Customize the options with defaults
|
553
|
+
metadata = @config.rpcs.update_repository.metadata.to_h
|
554
|
+
|
555
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
556
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
557
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
558
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
559
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
560
|
+
|
561
|
+
header_params = {
|
562
|
+
"repository.name" => request.repository.name
|
563
|
+
}
|
564
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
565
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
566
|
+
|
567
|
+
options.apply_defaults timeout: @config.rpcs.update_repository.timeout,
|
568
|
+
metadata: metadata,
|
569
|
+
retry_policy: @config.rpcs.update_repository.retry_policy
|
570
|
+
options.apply_defaults metadata: @config.metadata,
|
571
|
+
retry_policy: @config.retry_policy
|
572
|
+
|
573
|
+
@artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation|
|
574
|
+
yield response, operation if block_given?
|
575
|
+
return response
|
576
|
+
end
|
577
|
+
rescue ::GRPC::BadStatus => e
|
578
|
+
raise ::Google::Cloud::Error.from_error(e)
|
579
|
+
end
|
580
|
+
|
581
|
+
##
|
582
|
+
# Deletes a repository and all of its contents. The returned Operation will
|
583
|
+
# finish once the repository has been deleted. It will not have any Operation
|
584
|
+
# metadata and will return a google.protobuf.Empty response.
|
585
|
+
#
|
586
|
+
# @overload delete_repository(request, options = nil)
|
587
|
+
# Pass arguments to `delete_repository` via a request object, either of type
|
588
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest} or an equivalent Hash.
|
589
|
+
#
|
590
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest, ::Hash]
|
591
|
+
# A request object representing the call parameters. Required. To specify no
|
592
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
593
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
594
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
595
|
+
#
|
596
|
+
# @overload delete_repository(name: nil)
|
597
|
+
# Pass arguments to `delete_repository` via keyword arguments. Note that at
|
598
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
599
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
600
|
+
#
|
601
|
+
# @param name [::String]
|
602
|
+
# The name of the repository to delete.
|
603
|
+
#
|
604
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
605
|
+
# @yieldparam response [::Gapic::Operation]
|
606
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
607
|
+
#
|
608
|
+
# @return [::Gapic::Operation]
|
609
|
+
#
|
610
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
611
|
+
#
|
612
|
+
def delete_repository request, options = nil
|
613
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
614
|
+
|
615
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteRepositoryRequest
|
616
|
+
|
617
|
+
# Converts hash and nil to an options object
|
618
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
619
|
+
|
620
|
+
# Customize the options with defaults
|
621
|
+
metadata = @config.rpcs.delete_repository.metadata.to_h
|
622
|
+
|
623
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
624
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
625
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
626
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
627
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
628
|
+
|
629
|
+
header_params = {
|
630
|
+
"name" => request.name
|
631
|
+
}
|
632
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
633
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
634
|
+
|
635
|
+
options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
|
636
|
+
metadata: metadata,
|
637
|
+
retry_policy: @config.rpcs.delete_repository.retry_policy
|
638
|
+
options.apply_defaults metadata: @config.metadata,
|
639
|
+
retry_policy: @config.retry_policy
|
640
|
+
|
641
|
+
@artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation|
|
642
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
643
|
+
yield response, operation if block_given?
|
644
|
+
return response
|
645
|
+
end
|
646
|
+
rescue ::GRPC::BadStatus => e
|
647
|
+
raise ::Google::Cloud::Error.from_error(e)
|
648
|
+
end
|
649
|
+
|
650
|
+
##
|
651
|
+
# Lists packages.
|
652
|
+
#
|
653
|
+
# @overload list_packages(request, options = nil)
|
654
|
+
# Pass arguments to `list_packages` via a request object, either of type
|
655
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest} or an equivalent Hash.
|
656
|
+
#
|
657
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest, ::Hash]
|
658
|
+
# A request object representing the call parameters. Required. To specify no
|
659
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
660
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
661
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
662
|
+
#
|
663
|
+
# @overload list_packages(parent: nil, page_size: nil, page_token: nil)
|
664
|
+
# Pass arguments to `list_packages` via keyword arguments. Note that at
|
665
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
666
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
667
|
+
#
|
668
|
+
# @param parent [::String]
|
669
|
+
# The name of the parent resource whose packages will be listed.
|
670
|
+
# @param page_size [::Integer]
|
671
|
+
# The maximum number of packages to return.
|
672
|
+
# Maximum page size is 10,000.
|
673
|
+
# @param page_token [::String]
|
674
|
+
# The next_page_token value returned from a previous list request, if any.
|
675
|
+
#
|
676
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
677
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>]
|
678
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
679
|
+
#
|
680
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Package>]
|
681
|
+
#
|
682
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
683
|
+
#
|
684
|
+
def list_packages request, options = nil
|
685
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
686
|
+
|
687
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListPackagesRequest
|
688
|
+
|
689
|
+
# Converts hash and nil to an options object
|
690
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
691
|
+
|
692
|
+
# Customize the options with defaults
|
693
|
+
metadata = @config.rpcs.list_packages.metadata.to_h
|
694
|
+
|
695
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
696
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
697
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
698
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
699
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
700
|
+
|
701
|
+
header_params = {
|
702
|
+
"parent" => request.parent
|
703
|
+
}
|
704
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
705
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
706
|
+
|
707
|
+
options.apply_defaults timeout: @config.rpcs.list_packages.timeout,
|
708
|
+
metadata: metadata,
|
709
|
+
retry_policy: @config.rpcs.list_packages.retry_policy
|
710
|
+
options.apply_defaults metadata: @config.metadata,
|
711
|
+
retry_policy: @config.retry_policy
|
712
|
+
|
713
|
+
@artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation|
|
714
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options
|
715
|
+
yield response, operation if block_given?
|
716
|
+
return response
|
717
|
+
end
|
718
|
+
rescue ::GRPC::BadStatus => e
|
719
|
+
raise ::Google::Cloud::Error.from_error(e)
|
720
|
+
end
|
721
|
+
|
722
|
+
##
|
723
|
+
# Gets a package.
|
724
|
+
#
|
725
|
+
# @overload get_package(request, options = nil)
|
726
|
+
# Pass arguments to `get_package` via a request object, either of type
|
727
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest} or an equivalent Hash.
|
728
|
+
#
|
729
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest, ::Hash]
|
730
|
+
# A request object representing the call parameters. Required. To specify no
|
731
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
732
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
733
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
734
|
+
#
|
735
|
+
# @overload get_package(name: nil)
|
736
|
+
# Pass arguments to `get_package` via keyword arguments. Note that at
|
737
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
738
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
739
|
+
#
|
740
|
+
# @param name [::String]
|
741
|
+
# The name of the package to retrieve.
|
742
|
+
#
|
743
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
744
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Package]
|
745
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
746
|
+
#
|
747
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Package]
|
748
|
+
#
|
749
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
750
|
+
#
|
751
|
+
def get_package request, options = nil
|
752
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
753
|
+
|
754
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetPackageRequest
|
755
|
+
|
756
|
+
# Converts hash and nil to an options object
|
757
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
758
|
+
|
759
|
+
# Customize the options with defaults
|
760
|
+
metadata = @config.rpcs.get_package.metadata.to_h
|
761
|
+
|
762
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
763
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
764
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
765
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
766
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
767
|
+
|
768
|
+
header_params = {
|
769
|
+
"name" => request.name
|
770
|
+
}
|
771
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
772
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
773
|
+
|
774
|
+
options.apply_defaults timeout: @config.rpcs.get_package.timeout,
|
775
|
+
metadata: metadata,
|
776
|
+
retry_policy: @config.rpcs.get_package.retry_policy
|
777
|
+
options.apply_defaults metadata: @config.metadata,
|
778
|
+
retry_policy: @config.retry_policy
|
779
|
+
|
780
|
+
@artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation|
|
781
|
+
yield response, operation if block_given?
|
782
|
+
return response
|
783
|
+
end
|
784
|
+
rescue ::GRPC::BadStatus => e
|
785
|
+
raise ::Google::Cloud::Error.from_error(e)
|
786
|
+
end
|
787
|
+
|
788
|
+
##
|
789
|
+
# Deletes a package and all of its versions and tags. The returned operation
|
790
|
+
# will complete once the package has been deleted.
|
791
|
+
#
|
792
|
+
# @overload delete_package(request, options = nil)
|
793
|
+
# Pass arguments to `delete_package` via a request object, either of type
|
794
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest} or an equivalent Hash.
|
795
|
+
#
|
796
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest, ::Hash]
|
797
|
+
# A request object representing the call parameters. Required. To specify no
|
798
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
799
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
800
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
801
|
+
#
|
802
|
+
# @overload delete_package(name: nil)
|
803
|
+
# Pass arguments to `delete_package` via keyword arguments. Note that at
|
804
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
805
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
806
|
+
#
|
807
|
+
# @param name [::String]
|
808
|
+
# The name of the package to delete.
|
809
|
+
#
|
810
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
811
|
+
# @yieldparam response [::Gapic::Operation]
|
812
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
813
|
+
#
|
814
|
+
# @return [::Gapic::Operation]
|
815
|
+
#
|
816
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
817
|
+
#
|
818
|
+
def delete_package request, options = nil
|
819
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
820
|
+
|
821
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeletePackageRequest
|
822
|
+
|
823
|
+
# Converts hash and nil to an options object
|
824
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
825
|
+
|
826
|
+
# Customize the options with defaults
|
827
|
+
metadata = @config.rpcs.delete_package.metadata.to_h
|
828
|
+
|
829
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
830
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
831
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
832
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
833
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
834
|
+
|
835
|
+
header_params = {
|
836
|
+
"name" => request.name
|
837
|
+
}
|
838
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
839
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
840
|
+
|
841
|
+
options.apply_defaults timeout: @config.rpcs.delete_package.timeout,
|
842
|
+
metadata: metadata,
|
843
|
+
retry_policy: @config.rpcs.delete_package.retry_policy
|
844
|
+
options.apply_defaults metadata: @config.metadata,
|
845
|
+
retry_policy: @config.retry_policy
|
846
|
+
|
847
|
+
@artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation|
|
848
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
849
|
+
yield response, operation if block_given?
|
850
|
+
return response
|
851
|
+
end
|
852
|
+
rescue ::GRPC::BadStatus => e
|
853
|
+
raise ::Google::Cloud::Error.from_error(e)
|
854
|
+
end
|
855
|
+
|
856
|
+
##
|
857
|
+
# Lists versions.
|
858
|
+
#
|
859
|
+
# @overload list_versions(request, options = nil)
|
860
|
+
# Pass arguments to `list_versions` via a request object, either of type
|
861
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest} or an equivalent Hash.
|
862
|
+
#
|
863
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest, ::Hash]
|
864
|
+
# A request object representing the call parameters. Required. To specify no
|
865
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
866
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
867
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
868
|
+
#
|
869
|
+
# @overload list_versions(parent: nil, page_size: nil, page_token: nil, view: nil)
|
870
|
+
# Pass arguments to `list_versions` via keyword arguments. Note that at
|
871
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
872
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
873
|
+
#
|
874
|
+
# @param parent [::String]
|
875
|
+
# The name of the parent resource whose versions will be listed.
|
876
|
+
# @param page_size [::Integer]
|
877
|
+
# The maximum number of versions to return.
|
878
|
+
# Maximum page size is 10,000.
|
879
|
+
# @param page_token [::String]
|
880
|
+
# The next_page_token value returned from a previous list request, if any.
|
881
|
+
# @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView]
|
882
|
+
# The view that should be returned in the response.
|
883
|
+
#
|
884
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
885
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>]
|
886
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
887
|
+
#
|
888
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Version>]
|
889
|
+
#
|
890
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
891
|
+
#
|
892
|
+
def list_versions request, options = nil
|
893
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
894
|
+
|
895
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListVersionsRequest
|
896
|
+
|
897
|
+
# Converts hash and nil to an options object
|
898
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
899
|
+
|
900
|
+
# Customize the options with defaults
|
901
|
+
metadata = @config.rpcs.list_versions.metadata.to_h
|
902
|
+
|
903
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
904
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
905
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
906
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
907
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
908
|
+
|
909
|
+
header_params = {
|
910
|
+
"parent" => request.parent
|
911
|
+
}
|
912
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
913
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
914
|
+
|
915
|
+
options.apply_defaults timeout: @config.rpcs.list_versions.timeout,
|
916
|
+
metadata: metadata,
|
917
|
+
retry_policy: @config.rpcs.list_versions.retry_policy
|
918
|
+
options.apply_defaults metadata: @config.metadata,
|
919
|
+
retry_policy: @config.retry_policy
|
920
|
+
|
921
|
+
@artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation|
|
922
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options
|
923
|
+
yield response, operation if block_given?
|
924
|
+
return response
|
925
|
+
end
|
926
|
+
rescue ::GRPC::BadStatus => e
|
927
|
+
raise ::Google::Cloud::Error.from_error(e)
|
928
|
+
end
|
929
|
+
|
930
|
+
##
|
931
|
+
# Gets a version
|
932
|
+
#
|
933
|
+
# @overload get_version(request, options = nil)
|
934
|
+
# Pass arguments to `get_version` via a request object, either of type
|
935
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest} or an equivalent Hash.
|
936
|
+
#
|
937
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest, ::Hash]
|
938
|
+
# A request object representing the call parameters. Required. To specify no
|
939
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
940
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
941
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
942
|
+
#
|
943
|
+
# @overload get_version(name: nil, view: nil)
|
944
|
+
# Pass arguments to `get_version` via keyword arguments. Note that at
|
945
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
946
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
947
|
+
#
|
948
|
+
# @param name [::String]
|
949
|
+
# The name of the version to retrieve.
|
950
|
+
# @param view [::Google::Cloud::ArtifactRegistry::V1beta2::VersionView]
|
951
|
+
# The view that should be returned in the response.
|
952
|
+
#
|
953
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
954
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Version]
|
955
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
956
|
+
#
|
957
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Version]
|
958
|
+
#
|
959
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
960
|
+
#
|
961
|
+
def get_version request, options = nil
|
962
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
963
|
+
|
964
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetVersionRequest
|
965
|
+
|
966
|
+
# Converts hash and nil to an options object
|
967
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
968
|
+
|
969
|
+
# Customize the options with defaults
|
970
|
+
metadata = @config.rpcs.get_version.metadata.to_h
|
971
|
+
|
972
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
973
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
974
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
975
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
976
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
977
|
+
|
978
|
+
header_params = {
|
979
|
+
"name" => request.name
|
980
|
+
}
|
981
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
982
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
983
|
+
|
984
|
+
options.apply_defaults timeout: @config.rpcs.get_version.timeout,
|
985
|
+
metadata: metadata,
|
986
|
+
retry_policy: @config.rpcs.get_version.retry_policy
|
987
|
+
options.apply_defaults metadata: @config.metadata,
|
988
|
+
retry_policy: @config.retry_policy
|
989
|
+
|
990
|
+
@artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation|
|
991
|
+
yield response, operation if block_given?
|
992
|
+
return response
|
993
|
+
end
|
994
|
+
rescue ::GRPC::BadStatus => e
|
995
|
+
raise ::Google::Cloud::Error.from_error(e)
|
996
|
+
end
|
997
|
+
|
998
|
+
##
|
999
|
+
# Deletes a version and all of its content. The returned operation will
|
1000
|
+
# complete once the version has been deleted.
|
1001
|
+
#
|
1002
|
+
# @overload delete_version(request, options = nil)
|
1003
|
+
# Pass arguments to `delete_version` via a request object, either of type
|
1004
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest} or an equivalent Hash.
|
1005
|
+
#
|
1006
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest, ::Hash]
|
1007
|
+
# A request object representing the call parameters. Required. To specify no
|
1008
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1009
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1010
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1011
|
+
#
|
1012
|
+
# @overload delete_version(name: nil, force: nil)
|
1013
|
+
# Pass arguments to `delete_version` via keyword arguments. Note that at
|
1014
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1015
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1016
|
+
#
|
1017
|
+
# @param name [::String]
|
1018
|
+
# The name of the version to delete.
|
1019
|
+
# @param force [::Boolean]
|
1020
|
+
# By default, a version that is tagged may not be deleted. If force=true, the
|
1021
|
+
# version and any tags pointing to the version are deleted.
|
1022
|
+
#
|
1023
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1024
|
+
# @yieldparam response [::Gapic::Operation]
|
1025
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1026
|
+
#
|
1027
|
+
# @return [::Gapic::Operation]
|
1028
|
+
#
|
1029
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1030
|
+
#
|
1031
|
+
def delete_version request, options = nil
|
1032
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1033
|
+
|
1034
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteVersionRequest
|
1035
|
+
|
1036
|
+
# Converts hash and nil to an options object
|
1037
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1038
|
+
|
1039
|
+
# Customize the options with defaults
|
1040
|
+
metadata = @config.rpcs.delete_version.metadata.to_h
|
1041
|
+
|
1042
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1043
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1044
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1045
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1046
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1047
|
+
|
1048
|
+
header_params = {
|
1049
|
+
"name" => request.name
|
1050
|
+
}
|
1051
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1052
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1053
|
+
|
1054
|
+
options.apply_defaults timeout: @config.rpcs.delete_version.timeout,
|
1055
|
+
metadata: metadata,
|
1056
|
+
retry_policy: @config.rpcs.delete_version.retry_policy
|
1057
|
+
options.apply_defaults metadata: @config.metadata,
|
1058
|
+
retry_policy: @config.retry_policy
|
1059
|
+
|
1060
|
+
@artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation|
|
1061
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1062
|
+
yield response, operation if block_given?
|
1063
|
+
return response
|
1064
|
+
end
|
1065
|
+
rescue ::GRPC::BadStatus => e
|
1066
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
##
|
1070
|
+
# Lists files.
|
1071
|
+
#
|
1072
|
+
# @overload list_files(request, options = nil)
|
1073
|
+
# Pass arguments to `list_files` via a request object, either of type
|
1074
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest} or an equivalent Hash.
|
1075
|
+
#
|
1076
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest, ::Hash]
|
1077
|
+
# A request object representing the call parameters. Required. To specify no
|
1078
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1079
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1080
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1081
|
+
#
|
1082
|
+
# @overload list_files(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1083
|
+
# Pass arguments to `list_files` via keyword arguments. Note that at
|
1084
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1085
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1086
|
+
#
|
1087
|
+
# @param parent [::String]
|
1088
|
+
# The name of the parent resource whose files will be listed.
|
1089
|
+
# @param filter [::String]
|
1090
|
+
# An expression for filtering the results of the request. Filter rules are
|
1091
|
+
# case insensitive. The fields eligible for filtering are:
|
1092
|
+
#
|
1093
|
+
# * `name`
|
1094
|
+
# * `owner`
|
1095
|
+
#
|
1096
|
+
# An example of using a filter:
|
1097
|
+
#
|
1098
|
+
# * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an
|
1099
|
+
# ID starting with "a/b/".
|
1100
|
+
# * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` -->
|
1101
|
+
# Files owned by the version `1.0` in package `pkg1`.
|
1102
|
+
# @param page_size [::Integer]
|
1103
|
+
# The maximum number of files to return.
|
1104
|
+
# @param page_token [::String]
|
1105
|
+
# The next_page_token value returned from a previous list request, if any.
|
1106
|
+
#
|
1107
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1108
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>]
|
1109
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1110
|
+
#
|
1111
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::File>]
|
1112
|
+
#
|
1113
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1114
|
+
#
|
1115
|
+
def list_files request, options = nil
|
1116
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1117
|
+
|
1118
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListFilesRequest
|
1119
|
+
|
1120
|
+
# Converts hash and nil to an options object
|
1121
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1122
|
+
|
1123
|
+
# Customize the options with defaults
|
1124
|
+
metadata = @config.rpcs.list_files.metadata.to_h
|
1125
|
+
|
1126
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1127
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1128
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1129
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1130
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1131
|
+
|
1132
|
+
header_params = {
|
1133
|
+
"parent" => request.parent
|
1134
|
+
}
|
1135
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1136
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1137
|
+
|
1138
|
+
options.apply_defaults timeout: @config.rpcs.list_files.timeout,
|
1139
|
+
metadata: metadata,
|
1140
|
+
retry_policy: @config.rpcs.list_files.retry_policy
|
1141
|
+
options.apply_defaults metadata: @config.metadata,
|
1142
|
+
retry_policy: @config.retry_policy
|
1143
|
+
|
1144
|
+
@artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation|
|
1145
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options
|
1146
|
+
yield response, operation if block_given?
|
1147
|
+
return response
|
1148
|
+
end
|
1149
|
+
rescue ::GRPC::BadStatus => e
|
1150
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
##
|
1154
|
+
# Gets a file.
|
1155
|
+
#
|
1156
|
+
# @overload get_file(request, options = nil)
|
1157
|
+
# Pass arguments to `get_file` via a request object, either of type
|
1158
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest} or an equivalent Hash.
|
1159
|
+
#
|
1160
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest, ::Hash]
|
1161
|
+
# A request object representing the call parameters. Required. To specify no
|
1162
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1163
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1164
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1165
|
+
#
|
1166
|
+
# @overload get_file(name: nil)
|
1167
|
+
# Pass arguments to `get_file` via keyword arguments. Note that at
|
1168
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1169
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1170
|
+
#
|
1171
|
+
# @param name [::String]
|
1172
|
+
# The name of the file to retrieve.
|
1173
|
+
#
|
1174
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1175
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::File]
|
1176
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1177
|
+
#
|
1178
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::File]
|
1179
|
+
#
|
1180
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1181
|
+
#
|
1182
|
+
def get_file request, options = nil
|
1183
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1184
|
+
|
1185
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetFileRequest
|
1186
|
+
|
1187
|
+
# Converts hash and nil to an options object
|
1188
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1189
|
+
|
1190
|
+
# Customize the options with defaults
|
1191
|
+
metadata = @config.rpcs.get_file.metadata.to_h
|
1192
|
+
|
1193
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1194
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1195
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1196
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1197
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1198
|
+
|
1199
|
+
header_params = {
|
1200
|
+
"name" => request.name
|
1201
|
+
}
|
1202
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1203
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1204
|
+
|
1205
|
+
options.apply_defaults timeout: @config.rpcs.get_file.timeout,
|
1206
|
+
metadata: metadata,
|
1207
|
+
retry_policy: @config.rpcs.get_file.retry_policy
|
1208
|
+
options.apply_defaults metadata: @config.metadata,
|
1209
|
+
retry_policy: @config.retry_policy
|
1210
|
+
|
1211
|
+
@artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation|
|
1212
|
+
yield response, operation if block_given?
|
1213
|
+
return response
|
1214
|
+
end
|
1215
|
+
rescue ::GRPC::BadStatus => e
|
1216
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
##
|
1220
|
+
# Lists tags.
|
1221
|
+
#
|
1222
|
+
# @overload list_tags(request, options = nil)
|
1223
|
+
# Pass arguments to `list_tags` via a request object, either of type
|
1224
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest} or an equivalent Hash.
|
1225
|
+
#
|
1226
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest, ::Hash]
|
1227
|
+
# A request object representing the call parameters. Required. To specify no
|
1228
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1229
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1230
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1231
|
+
#
|
1232
|
+
# @overload list_tags(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1233
|
+
# Pass arguments to `list_tags` via keyword arguments. Note that at
|
1234
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1235
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1236
|
+
#
|
1237
|
+
# @param parent [::String]
|
1238
|
+
# The name of the parent resource whose tags will be listed.
|
1239
|
+
# @param filter [::String]
|
1240
|
+
# An expression for filtering the results of the request. Filter rules are
|
1241
|
+
# case insensitive. The fields eligible for filtering are:
|
1242
|
+
#
|
1243
|
+
# * `version`
|
1244
|
+
#
|
1245
|
+
# An example of using a filter:
|
1246
|
+
#
|
1247
|
+
# * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
|
1248
|
+
# --> Tags that are applied to the version `1.0` in package `pkg1`.
|
1249
|
+
# @param page_size [::Integer]
|
1250
|
+
# The maximum number of tags to return.
|
1251
|
+
# Maximum page size is 10,000.
|
1252
|
+
# @param page_token [::String]
|
1253
|
+
# The next_page_token value returned from a previous list request, if any.
|
1254
|
+
#
|
1255
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1256
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>]
|
1257
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1258
|
+
#
|
1259
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1beta2::Tag>]
|
1260
|
+
#
|
1261
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1262
|
+
#
|
1263
|
+
def list_tags request, options = nil
|
1264
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1265
|
+
|
1266
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::ListTagsRequest
|
1267
|
+
|
1268
|
+
# Converts hash and nil to an options object
|
1269
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1270
|
+
|
1271
|
+
# Customize the options with defaults
|
1272
|
+
metadata = @config.rpcs.list_tags.metadata.to_h
|
1273
|
+
|
1274
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1275
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1276
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1277
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1278
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1279
|
+
|
1280
|
+
header_params = {
|
1281
|
+
"parent" => request.parent
|
1282
|
+
}
|
1283
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1284
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1285
|
+
|
1286
|
+
options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
|
1287
|
+
metadata: metadata,
|
1288
|
+
retry_policy: @config.rpcs.list_tags.retry_policy
|
1289
|
+
options.apply_defaults metadata: @config.metadata,
|
1290
|
+
retry_policy: @config.retry_policy
|
1291
|
+
|
1292
|
+
@artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation|
|
1293
|
+
response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options
|
1294
|
+
yield response, operation if block_given?
|
1295
|
+
return response
|
1296
|
+
end
|
1297
|
+
rescue ::GRPC::BadStatus => e
|
1298
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
##
|
1302
|
+
# Gets a tag.
|
1303
|
+
#
|
1304
|
+
# @overload get_tag(request, options = nil)
|
1305
|
+
# Pass arguments to `get_tag` via a request object, either of type
|
1306
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest} or an equivalent Hash.
|
1307
|
+
#
|
1308
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest, ::Hash]
|
1309
|
+
# A request object representing the call parameters. Required. To specify no
|
1310
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1311
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1312
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1313
|
+
#
|
1314
|
+
# @overload get_tag(name: nil)
|
1315
|
+
# Pass arguments to `get_tag` via keyword arguments. Note that at
|
1316
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1317
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1318
|
+
#
|
1319
|
+
# @param name [::String]
|
1320
|
+
# The name of the tag to retrieve.
|
1321
|
+
#
|
1322
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1323
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
|
1324
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1325
|
+
#
|
1326
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
|
1327
|
+
#
|
1328
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1329
|
+
#
|
1330
|
+
def get_tag request, options = nil
|
1331
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1332
|
+
|
1333
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::GetTagRequest
|
1334
|
+
|
1335
|
+
# Converts hash and nil to an options object
|
1336
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1337
|
+
|
1338
|
+
# Customize the options with defaults
|
1339
|
+
metadata = @config.rpcs.get_tag.metadata.to_h
|
1340
|
+
|
1341
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1342
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1343
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1344
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1345
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1346
|
+
|
1347
|
+
header_params = {
|
1348
|
+
"name" => request.name
|
1349
|
+
}
|
1350
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1351
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1352
|
+
|
1353
|
+
options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
|
1354
|
+
metadata: metadata,
|
1355
|
+
retry_policy: @config.rpcs.get_tag.retry_policy
|
1356
|
+
options.apply_defaults metadata: @config.metadata,
|
1357
|
+
retry_policy: @config.retry_policy
|
1358
|
+
|
1359
|
+
@artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation|
|
1360
|
+
yield response, operation if block_given?
|
1361
|
+
return response
|
1362
|
+
end
|
1363
|
+
rescue ::GRPC::BadStatus => e
|
1364
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
##
|
1368
|
+
# Creates a tag.
|
1369
|
+
#
|
1370
|
+
# @overload create_tag(request, options = nil)
|
1371
|
+
# Pass arguments to `create_tag` via a request object, either of type
|
1372
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest} or an equivalent Hash.
|
1373
|
+
#
|
1374
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest, ::Hash]
|
1375
|
+
# A request object representing the call parameters. Required. To specify no
|
1376
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1377
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1378
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1379
|
+
#
|
1380
|
+
# @overload create_tag(parent: nil, tag_id: nil, tag: nil)
|
1381
|
+
# Pass arguments to `create_tag` via keyword arguments. Note that at
|
1382
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1383
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1384
|
+
#
|
1385
|
+
# @param parent [::String]
|
1386
|
+
# The name of the parent resource where the tag will be created.
|
1387
|
+
# @param tag_id [::String]
|
1388
|
+
# The tag id to use for this repository.
|
1389
|
+
# @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash]
|
1390
|
+
# The tag to be created.
|
1391
|
+
#
|
1392
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1393
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
|
1394
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1395
|
+
#
|
1396
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
|
1397
|
+
#
|
1398
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1399
|
+
#
|
1400
|
+
def create_tag request, options = nil
|
1401
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1402
|
+
|
1403
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::CreateTagRequest
|
1404
|
+
|
1405
|
+
# Converts hash and nil to an options object
|
1406
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1407
|
+
|
1408
|
+
# Customize the options with defaults
|
1409
|
+
metadata = @config.rpcs.create_tag.metadata.to_h
|
1410
|
+
|
1411
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1412
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1413
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1414
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1415
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1416
|
+
|
1417
|
+
header_params = {
|
1418
|
+
"parent" => request.parent
|
1419
|
+
}
|
1420
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1421
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1422
|
+
|
1423
|
+
options.apply_defaults timeout: @config.rpcs.create_tag.timeout,
|
1424
|
+
metadata: metadata,
|
1425
|
+
retry_policy: @config.rpcs.create_tag.retry_policy
|
1426
|
+
options.apply_defaults metadata: @config.metadata,
|
1427
|
+
retry_policy: @config.retry_policy
|
1428
|
+
|
1429
|
+
@artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation|
|
1430
|
+
yield response, operation if block_given?
|
1431
|
+
return response
|
1432
|
+
end
|
1433
|
+
rescue ::GRPC::BadStatus => e
|
1434
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1435
|
+
end
|
1436
|
+
|
1437
|
+
##
|
1438
|
+
# Updates a tag.
|
1439
|
+
#
|
1440
|
+
# @overload update_tag(request, options = nil)
|
1441
|
+
# Pass arguments to `update_tag` via a request object, either of type
|
1442
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest} or an equivalent Hash.
|
1443
|
+
#
|
1444
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest, ::Hash]
|
1445
|
+
# A request object representing the call parameters. Required. To specify no
|
1446
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1447
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1448
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1449
|
+
#
|
1450
|
+
# @overload update_tag(tag: nil, update_mask: nil)
|
1451
|
+
# Pass arguments to `update_tag` via keyword arguments. Note that at
|
1452
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1453
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1454
|
+
#
|
1455
|
+
# @param tag [::Google::Cloud::ArtifactRegistry::V1beta2::Tag, ::Hash]
|
1456
|
+
# The tag that replaces the resource on the server.
|
1457
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1458
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
1459
|
+
# see
|
1460
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
1461
|
+
#
|
1462
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1463
|
+
# @yieldparam response [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
|
1464
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1465
|
+
#
|
1466
|
+
# @return [::Google::Cloud::ArtifactRegistry::V1beta2::Tag]
|
1467
|
+
#
|
1468
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1469
|
+
#
|
1470
|
+
def update_tag request, options = nil
|
1471
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1472
|
+
|
1473
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::UpdateTagRequest
|
1474
|
+
|
1475
|
+
# Converts hash and nil to an options object
|
1476
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1477
|
+
|
1478
|
+
# Customize the options with defaults
|
1479
|
+
metadata = @config.rpcs.update_tag.metadata.to_h
|
1480
|
+
|
1481
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1482
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1483
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1484
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1485
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1486
|
+
|
1487
|
+
header_params = {
|
1488
|
+
"tag.name" => request.tag.name
|
1489
|
+
}
|
1490
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1491
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1492
|
+
|
1493
|
+
options.apply_defaults timeout: @config.rpcs.update_tag.timeout,
|
1494
|
+
metadata: metadata,
|
1495
|
+
retry_policy: @config.rpcs.update_tag.retry_policy
|
1496
|
+
options.apply_defaults metadata: @config.metadata,
|
1497
|
+
retry_policy: @config.retry_policy
|
1498
|
+
|
1499
|
+
@artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation|
|
1500
|
+
yield response, operation if block_given?
|
1501
|
+
return response
|
1502
|
+
end
|
1503
|
+
rescue ::GRPC::BadStatus => e
|
1504
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
##
|
1508
|
+
# Deletes a tag.
|
1509
|
+
#
|
1510
|
+
# @overload delete_tag(request, options = nil)
|
1511
|
+
# Pass arguments to `delete_tag` via a request object, either of type
|
1512
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest} or an equivalent Hash.
|
1513
|
+
#
|
1514
|
+
# @param request [::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest, ::Hash]
|
1515
|
+
# A request object representing the call parameters. Required. To specify no
|
1516
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1517
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1518
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1519
|
+
#
|
1520
|
+
# @overload delete_tag(name: nil)
|
1521
|
+
# Pass arguments to `delete_tag` via keyword arguments. Note that at
|
1522
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1523
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1524
|
+
#
|
1525
|
+
# @param name [::String]
|
1526
|
+
# The name of the tag to delete.
|
1527
|
+
#
|
1528
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1529
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1530
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1531
|
+
#
|
1532
|
+
# @return [::Google::Protobuf::Empty]
|
1533
|
+
#
|
1534
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1535
|
+
#
|
1536
|
+
def delete_tag request, options = nil
|
1537
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1538
|
+
|
1539
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ArtifactRegistry::V1beta2::DeleteTagRequest
|
1540
|
+
|
1541
|
+
# Converts hash and nil to an options object
|
1542
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1543
|
+
|
1544
|
+
# Customize the options with defaults
|
1545
|
+
metadata = @config.rpcs.delete_tag.metadata.to_h
|
1546
|
+
|
1547
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1548
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1549
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1550
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1551
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1552
|
+
|
1553
|
+
header_params = {
|
1554
|
+
"name" => request.name
|
1555
|
+
}
|
1556
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1557
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1558
|
+
|
1559
|
+
options.apply_defaults timeout: @config.rpcs.delete_tag.timeout,
|
1560
|
+
metadata: metadata,
|
1561
|
+
retry_policy: @config.rpcs.delete_tag.retry_policy
|
1562
|
+
options.apply_defaults metadata: @config.metadata,
|
1563
|
+
retry_policy: @config.retry_policy
|
1564
|
+
|
1565
|
+
@artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation|
|
1566
|
+
yield response, operation if block_given?
|
1567
|
+
return response
|
1568
|
+
end
|
1569
|
+
rescue ::GRPC::BadStatus => e
|
1570
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
##
|
1574
|
+
# Updates the IAM policy for a given resource.
|
1575
|
+
#
|
1576
|
+
# @overload set_iam_policy(request, options = nil)
|
1577
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
1578
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
1579
|
+
#
|
1580
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
1581
|
+
# A request object representing the call parameters. Required. To specify no
|
1582
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1583
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1584
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1585
|
+
#
|
1586
|
+
# @overload set_iam_policy(resource: nil, policy: nil)
|
1587
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
1588
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1589
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1590
|
+
#
|
1591
|
+
# @param resource [::String]
|
1592
|
+
# REQUIRED: The resource for which the policy is being specified.
|
1593
|
+
# See the operation documentation for the appropriate value for this field.
|
1594
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
1595
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
1596
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
1597
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
1598
|
+
# might reject them.
|
1599
|
+
#
|
1600
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1601
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
1602
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1603
|
+
#
|
1604
|
+
# @return [::Google::Iam::V1::Policy]
|
1605
|
+
#
|
1606
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1607
|
+
#
|
1608
|
+
def set_iam_policy request, options = nil
|
1609
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1610
|
+
|
1611
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
1612
|
+
|
1613
|
+
# Converts hash and nil to an options object
|
1614
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1615
|
+
|
1616
|
+
# Customize the options with defaults
|
1617
|
+
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1618
|
+
|
1619
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1620
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1621
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1622
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1623
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1624
|
+
|
1625
|
+
header_params = {
|
1626
|
+
"resource" => request.resource
|
1627
|
+
}
|
1628
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1629
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1630
|
+
|
1631
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1632
|
+
metadata: metadata,
|
1633
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1634
|
+
options.apply_defaults metadata: @config.metadata,
|
1635
|
+
retry_policy: @config.retry_policy
|
1636
|
+
|
1637
|
+
@artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1638
|
+
yield response, operation if block_given?
|
1639
|
+
return response
|
1640
|
+
end
|
1641
|
+
rescue ::GRPC::BadStatus => e
|
1642
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1643
|
+
end
|
1644
|
+
|
1645
|
+
##
|
1646
|
+
# Gets the IAM policy for a given resource.
|
1647
|
+
#
|
1648
|
+
# @overload get_iam_policy(request, options = nil)
|
1649
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
1650
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
1651
|
+
#
|
1652
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
1653
|
+
# A request object representing the call parameters. Required. To specify no
|
1654
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1655
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1656
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1657
|
+
#
|
1658
|
+
# @overload get_iam_policy(resource: nil, options: nil)
|
1659
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
1660
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1661
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1662
|
+
#
|
1663
|
+
# @param resource [::String]
|
1664
|
+
# REQUIRED: The resource for which the policy is being requested.
|
1665
|
+
# See the operation documentation for the appropriate value for this field.
|
1666
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
1667
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
1668
|
+
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
1669
|
+
#
|
1670
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1671
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
1672
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1673
|
+
#
|
1674
|
+
# @return [::Google::Iam::V1::Policy]
|
1675
|
+
#
|
1676
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1677
|
+
#
|
1678
|
+
def get_iam_policy request, options = nil
|
1679
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1680
|
+
|
1681
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
1682
|
+
|
1683
|
+
# Converts hash and nil to an options object
|
1684
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1685
|
+
|
1686
|
+
# Customize the options with defaults
|
1687
|
+
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1688
|
+
|
1689
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1690
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1691
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1692
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1693
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1694
|
+
|
1695
|
+
header_params = {
|
1696
|
+
"resource" => request.resource
|
1697
|
+
}
|
1698
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1699
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1700
|
+
|
1701
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
1702
|
+
metadata: metadata,
|
1703
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
1704
|
+
options.apply_defaults metadata: @config.metadata,
|
1705
|
+
retry_policy: @config.retry_policy
|
1706
|
+
|
1707
|
+
@artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
1708
|
+
yield response, operation if block_given?
|
1709
|
+
return response
|
1710
|
+
end
|
1711
|
+
rescue ::GRPC::BadStatus => e
|
1712
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
##
|
1716
|
+
# Tests if the caller has a list of permissions on a resource.
|
1717
|
+
#
|
1718
|
+
# @overload test_iam_permissions(request, options = nil)
|
1719
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
1720
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
1721
|
+
#
|
1722
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
1723
|
+
# A request object representing the call parameters. Required. To specify no
|
1724
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1725
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1726
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1727
|
+
#
|
1728
|
+
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
1729
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
1730
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1731
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1732
|
+
#
|
1733
|
+
# @param resource [::String]
|
1734
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
1735
|
+
# See the operation documentation for the appropriate value for this field.
|
1736
|
+
# @param permissions [::Array<::String>]
|
1737
|
+
# The set of permissions to check for the `resource`. Permissions with
|
1738
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
1739
|
+
# information see
|
1740
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1741
|
+
#
|
1742
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1743
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
1744
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1745
|
+
#
|
1746
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
1747
|
+
#
|
1748
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1749
|
+
#
|
1750
|
+
def test_iam_permissions request, options = nil
|
1751
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1752
|
+
|
1753
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
1754
|
+
|
1755
|
+
# Converts hash and nil to an options object
|
1756
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1757
|
+
|
1758
|
+
# Customize the options with defaults
|
1759
|
+
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1760
|
+
|
1761
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1762
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1763
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1764
|
+
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION
|
1765
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1766
|
+
|
1767
|
+
header_params = {
|
1768
|
+
"resource" => request.resource
|
1769
|
+
}
|
1770
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1771
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1772
|
+
|
1773
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1774
|
+
metadata: metadata,
|
1775
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1776
|
+
options.apply_defaults metadata: @config.metadata,
|
1777
|
+
retry_policy: @config.retry_policy
|
1778
|
+
|
1779
|
+
@artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1780
|
+
yield response, operation if block_given?
|
1781
|
+
return response
|
1782
|
+
end
|
1783
|
+
rescue ::GRPC::BadStatus => e
|
1784
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1785
|
+
end
|
1786
|
+
|
1787
|
+
##
|
1788
|
+
# Configuration class for the ArtifactRegistry API.
|
1789
|
+
#
|
1790
|
+
# This class represents the configuration for ArtifactRegistry,
|
1791
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1792
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1793
|
+
# applied individually to specific RPCs. See
|
1794
|
+
# {::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client::Configuration::Rpcs}
|
1795
|
+
# for a list of RPCs that can be configured independently.
|
1796
|
+
#
|
1797
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1798
|
+
# on construction.
|
1799
|
+
#
|
1800
|
+
# # Examples
|
1801
|
+
#
|
1802
|
+
# To modify the global config, setting the timeout for list_repositories
|
1803
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1804
|
+
#
|
1805
|
+
# ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.configure do |config|
|
1806
|
+
# config.timeout = 10.0
|
1807
|
+
# config.rpcs.list_repositories.timeout = 20.0
|
1808
|
+
# end
|
1809
|
+
#
|
1810
|
+
# To apply the above configuration only to a new client:
|
1811
|
+
#
|
1812
|
+
# client = ::Google::Cloud::ArtifactRegistry::V1beta2::ArtifactRegistry::Client.new do |config|
|
1813
|
+
# config.timeout = 10.0
|
1814
|
+
# config.rpcs.list_repositories.timeout = 20.0
|
1815
|
+
# end
|
1816
|
+
#
|
1817
|
+
# @!attribute [rw] endpoint
|
1818
|
+
# The hostname or hostname:port of the service endpoint.
|
1819
|
+
# Defaults to `"artifactregistry.googleapis.com"`.
|
1820
|
+
# @return [::String]
|
1821
|
+
# @!attribute [rw] credentials
|
1822
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1823
|
+
# * (`String`) The path to a service account key file in JSON format
|
1824
|
+
# * (`Hash`) A service account key as a Hash
|
1825
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1826
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1827
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1828
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1829
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1830
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1831
|
+
# * (`nil`) indicating no credentials
|
1832
|
+
# @return [::Object]
|
1833
|
+
# @!attribute [rw] scope
|
1834
|
+
# The OAuth scopes
|
1835
|
+
# @return [::Array<::String>]
|
1836
|
+
# @!attribute [rw] lib_name
|
1837
|
+
# The library name as recorded in instrumentation and logging
|
1838
|
+
# @return [::String]
|
1839
|
+
# @!attribute [rw] lib_version
|
1840
|
+
# The library version as recorded in instrumentation and logging
|
1841
|
+
# @return [::String]
|
1842
|
+
# @!attribute [rw] channel_args
|
1843
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1844
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1845
|
+
# @return [::Hash]
|
1846
|
+
# @!attribute [rw] interceptors
|
1847
|
+
# An array of interceptors that are run before calls are executed.
|
1848
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1849
|
+
# @!attribute [rw] timeout
|
1850
|
+
# The call timeout in seconds.
|
1851
|
+
# @return [::Numeric]
|
1852
|
+
# @!attribute [rw] metadata
|
1853
|
+
# Additional gRPC headers to be sent with the call.
|
1854
|
+
# @return [::Hash{::Symbol=>::String}]
|
1855
|
+
# @!attribute [rw] retry_policy
|
1856
|
+
# The retry policy. The value is a hash with the following keys:
|
1857
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1858
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1859
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1860
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1861
|
+
# trigger a retry.
|
1862
|
+
# @return [::Hash]
|
1863
|
+
# @!attribute [rw] quota_project
|
1864
|
+
# A separate project against which to charge quota.
|
1865
|
+
# @return [::String]
|
1866
|
+
#
|
1867
|
+
class Configuration
|
1868
|
+
extend ::Gapic::Config
|
1869
|
+
|
1870
|
+
config_attr :endpoint, "artifactregistry.googleapis.com", ::String
|
1871
|
+
config_attr :credentials, nil do |value|
|
1872
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1873
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1874
|
+
allowed.any? { |klass| klass === value }
|
1875
|
+
end
|
1876
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1877
|
+
config_attr :lib_name, nil, ::String, nil
|
1878
|
+
config_attr :lib_version, nil, ::String, nil
|
1879
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1880
|
+
config_attr :interceptors, nil, ::Array, nil
|
1881
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1882
|
+
config_attr :metadata, nil, ::Hash, nil
|
1883
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1884
|
+
config_attr :quota_project, nil, ::String, nil
|
1885
|
+
|
1886
|
+
# @private
|
1887
|
+
def initialize parent_config = nil
|
1888
|
+
@parent_config = parent_config unless parent_config.nil?
|
1889
|
+
|
1890
|
+
yield self if block_given?
|
1891
|
+
end
|
1892
|
+
|
1893
|
+
##
|
1894
|
+
# Configurations for individual RPCs
|
1895
|
+
# @return [Rpcs]
|
1896
|
+
#
|
1897
|
+
def rpcs
|
1898
|
+
@rpcs ||= begin
|
1899
|
+
parent_rpcs = nil
|
1900
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1901
|
+
Rpcs.new parent_rpcs
|
1902
|
+
end
|
1903
|
+
end
|
1904
|
+
|
1905
|
+
##
|
1906
|
+
# Configuration RPC class for the ArtifactRegistry API.
|
1907
|
+
#
|
1908
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1909
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1910
|
+
# the following configuration fields:
|
1911
|
+
#
|
1912
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
1913
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1914
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1915
|
+
# include the following keys:
|
1916
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1917
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1918
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1919
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1920
|
+
# trigger a retry.
|
1921
|
+
#
|
1922
|
+
class Rpcs
|
1923
|
+
##
|
1924
|
+
# RPC-specific configuration for `list_repositories`
|
1925
|
+
# @return [::Gapic::Config::Method]
|
1926
|
+
#
|
1927
|
+
attr_reader :list_repositories
|
1928
|
+
##
|
1929
|
+
# RPC-specific configuration for `get_repository`
|
1930
|
+
# @return [::Gapic::Config::Method]
|
1931
|
+
#
|
1932
|
+
attr_reader :get_repository
|
1933
|
+
##
|
1934
|
+
# RPC-specific configuration for `create_repository`
|
1935
|
+
# @return [::Gapic::Config::Method]
|
1936
|
+
#
|
1937
|
+
attr_reader :create_repository
|
1938
|
+
##
|
1939
|
+
# RPC-specific configuration for `update_repository`
|
1940
|
+
# @return [::Gapic::Config::Method]
|
1941
|
+
#
|
1942
|
+
attr_reader :update_repository
|
1943
|
+
##
|
1944
|
+
# RPC-specific configuration for `delete_repository`
|
1945
|
+
# @return [::Gapic::Config::Method]
|
1946
|
+
#
|
1947
|
+
attr_reader :delete_repository
|
1948
|
+
##
|
1949
|
+
# RPC-specific configuration for `list_packages`
|
1950
|
+
# @return [::Gapic::Config::Method]
|
1951
|
+
#
|
1952
|
+
attr_reader :list_packages
|
1953
|
+
##
|
1954
|
+
# RPC-specific configuration for `get_package`
|
1955
|
+
# @return [::Gapic::Config::Method]
|
1956
|
+
#
|
1957
|
+
attr_reader :get_package
|
1958
|
+
##
|
1959
|
+
# RPC-specific configuration for `delete_package`
|
1960
|
+
# @return [::Gapic::Config::Method]
|
1961
|
+
#
|
1962
|
+
attr_reader :delete_package
|
1963
|
+
##
|
1964
|
+
# RPC-specific configuration for `list_versions`
|
1965
|
+
# @return [::Gapic::Config::Method]
|
1966
|
+
#
|
1967
|
+
attr_reader :list_versions
|
1968
|
+
##
|
1969
|
+
# RPC-specific configuration for `get_version`
|
1970
|
+
# @return [::Gapic::Config::Method]
|
1971
|
+
#
|
1972
|
+
attr_reader :get_version
|
1973
|
+
##
|
1974
|
+
# RPC-specific configuration for `delete_version`
|
1975
|
+
# @return [::Gapic::Config::Method]
|
1976
|
+
#
|
1977
|
+
attr_reader :delete_version
|
1978
|
+
##
|
1979
|
+
# RPC-specific configuration for `list_files`
|
1980
|
+
# @return [::Gapic::Config::Method]
|
1981
|
+
#
|
1982
|
+
attr_reader :list_files
|
1983
|
+
##
|
1984
|
+
# RPC-specific configuration for `get_file`
|
1985
|
+
# @return [::Gapic::Config::Method]
|
1986
|
+
#
|
1987
|
+
attr_reader :get_file
|
1988
|
+
##
|
1989
|
+
# RPC-specific configuration for `list_tags`
|
1990
|
+
# @return [::Gapic::Config::Method]
|
1991
|
+
#
|
1992
|
+
attr_reader :list_tags
|
1993
|
+
##
|
1994
|
+
# RPC-specific configuration for `get_tag`
|
1995
|
+
# @return [::Gapic::Config::Method]
|
1996
|
+
#
|
1997
|
+
attr_reader :get_tag
|
1998
|
+
##
|
1999
|
+
# RPC-specific configuration for `create_tag`
|
2000
|
+
# @return [::Gapic::Config::Method]
|
2001
|
+
#
|
2002
|
+
attr_reader :create_tag
|
2003
|
+
##
|
2004
|
+
# RPC-specific configuration for `update_tag`
|
2005
|
+
# @return [::Gapic::Config::Method]
|
2006
|
+
#
|
2007
|
+
attr_reader :update_tag
|
2008
|
+
##
|
2009
|
+
# RPC-specific configuration for `delete_tag`
|
2010
|
+
# @return [::Gapic::Config::Method]
|
2011
|
+
#
|
2012
|
+
attr_reader :delete_tag
|
2013
|
+
##
|
2014
|
+
# RPC-specific configuration for `set_iam_policy`
|
2015
|
+
# @return [::Gapic::Config::Method]
|
2016
|
+
#
|
2017
|
+
attr_reader :set_iam_policy
|
2018
|
+
##
|
2019
|
+
# RPC-specific configuration for `get_iam_policy`
|
2020
|
+
# @return [::Gapic::Config::Method]
|
2021
|
+
#
|
2022
|
+
attr_reader :get_iam_policy
|
2023
|
+
##
|
2024
|
+
# RPC-specific configuration for `test_iam_permissions`
|
2025
|
+
# @return [::Gapic::Config::Method]
|
2026
|
+
#
|
2027
|
+
attr_reader :test_iam_permissions
|
2028
|
+
|
2029
|
+
# @private
|
2030
|
+
def initialize parent_rpcs = nil
|
2031
|
+
list_repositories_config = parent_rpcs&.list_repositories if parent_rpcs&.respond_to? :list_repositories
|
2032
|
+
@list_repositories = ::Gapic::Config::Method.new list_repositories_config
|
2033
|
+
get_repository_config = parent_rpcs&.get_repository if parent_rpcs&.respond_to? :get_repository
|
2034
|
+
@get_repository = ::Gapic::Config::Method.new get_repository_config
|
2035
|
+
create_repository_config = parent_rpcs&.create_repository if parent_rpcs&.respond_to? :create_repository
|
2036
|
+
@create_repository = ::Gapic::Config::Method.new create_repository_config
|
2037
|
+
update_repository_config = parent_rpcs&.update_repository if parent_rpcs&.respond_to? :update_repository
|
2038
|
+
@update_repository = ::Gapic::Config::Method.new update_repository_config
|
2039
|
+
delete_repository_config = parent_rpcs&.delete_repository if parent_rpcs&.respond_to? :delete_repository
|
2040
|
+
@delete_repository = ::Gapic::Config::Method.new delete_repository_config
|
2041
|
+
list_packages_config = parent_rpcs&.list_packages if parent_rpcs&.respond_to? :list_packages
|
2042
|
+
@list_packages = ::Gapic::Config::Method.new list_packages_config
|
2043
|
+
get_package_config = parent_rpcs&.get_package if parent_rpcs&.respond_to? :get_package
|
2044
|
+
@get_package = ::Gapic::Config::Method.new get_package_config
|
2045
|
+
delete_package_config = parent_rpcs&.delete_package if parent_rpcs&.respond_to? :delete_package
|
2046
|
+
@delete_package = ::Gapic::Config::Method.new delete_package_config
|
2047
|
+
list_versions_config = parent_rpcs&.list_versions if parent_rpcs&.respond_to? :list_versions
|
2048
|
+
@list_versions = ::Gapic::Config::Method.new list_versions_config
|
2049
|
+
get_version_config = parent_rpcs&.get_version if parent_rpcs&.respond_to? :get_version
|
2050
|
+
@get_version = ::Gapic::Config::Method.new get_version_config
|
2051
|
+
delete_version_config = parent_rpcs&.delete_version if parent_rpcs&.respond_to? :delete_version
|
2052
|
+
@delete_version = ::Gapic::Config::Method.new delete_version_config
|
2053
|
+
list_files_config = parent_rpcs&.list_files if parent_rpcs&.respond_to? :list_files
|
2054
|
+
@list_files = ::Gapic::Config::Method.new list_files_config
|
2055
|
+
get_file_config = parent_rpcs&.get_file if parent_rpcs&.respond_to? :get_file
|
2056
|
+
@get_file = ::Gapic::Config::Method.new get_file_config
|
2057
|
+
list_tags_config = parent_rpcs&.list_tags if parent_rpcs&.respond_to? :list_tags
|
2058
|
+
@list_tags = ::Gapic::Config::Method.new list_tags_config
|
2059
|
+
get_tag_config = parent_rpcs&.get_tag if parent_rpcs&.respond_to? :get_tag
|
2060
|
+
@get_tag = ::Gapic::Config::Method.new get_tag_config
|
2061
|
+
create_tag_config = parent_rpcs&.create_tag if parent_rpcs&.respond_to? :create_tag
|
2062
|
+
@create_tag = ::Gapic::Config::Method.new create_tag_config
|
2063
|
+
update_tag_config = parent_rpcs&.update_tag if parent_rpcs&.respond_to? :update_tag
|
2064
|
+
@update_tag = ::Gapic::Config::Method.new update_tag_config
|
2065
|
+
delete_tag_config = parent_rpcs&.delete_tag if parent_rpcs&.respond_to? :delete_tag
|
2066
|
+
@delete_tag = ::Gapic::Config::Method.new delete_tag_config
|
2067
|
+
set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
|
2068
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
2069
|
+
get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
|
2070
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2071
|
+
test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
|
2072
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
2073
|
+
|
2074
|
+
yield self if block_given?
|
2075
|
+
end
|
2076
|
+
end
|
2077
|
+
end
|
2078
|
+
end
|
2079
|
+
end
|
2080
|
+
end
|
2081
|
+
end
|
2082
|
+
end
|
2083
|
+
end
|