google-cloud-apigee_registry-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +144 -0
- data/lib/google/cloud/apigee_registry/v1/provisioning/client.rb +636 -0
- data/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb +47 -0
- data/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb +767 -0
- data/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb +69 -0
- data/lib/google/cloud/apigee_registry/v1/provisioning.rb +51 -0
- data/lib/google/cloud/apigee_registry/v1/registry/client.rb +4005 -0
- data/lib/google/cloud/apigee_registry/v1/registry/credentials.rb +47 -0
- data/lib/google/cloud/apigee_registry/v1/registry/paths.rb +238 -0
- data/lib/google/cloud/apigee_registry/v1/registry.rb +49 -0
- data/lib/google/cloud/apigee_registry/v1/version.rb +28 -0
- data/lib/google/cloud/apigee_registry/v1.rb +41 -0
- data/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb +73 -0
- data/lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb +50 -0
- data/lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb +90 -0
- data/lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb +245 -0
- data/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb +128 -0
- data/lib/google-cloud-apigee_registry-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/httpbody.rb +80 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb +157 -0
- data/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb +407 -0
- data/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb +704 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -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 +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +273 -0
@@ -0,0 +1,4005 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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/cloud/apigeeregistry/v1/registry_service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1/iam_policy"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module ApigeeRegistry
|
27
|
+
module V1
|
28
|
+
module Registry
|
29
|
+
##
|
30
|
+
# Client for the Registry service.
|
31
|
+
#
|
32
|
+
# The Registry service allows teams to manage descriptions of APIs.
|
33
|
+
#
|
34
|
+
class Client
|
35
|
+
include Paths
|
36
|
+
|
37
|
+
# @private
|
38
|
+
attr_reader :registry_stub
|
39
|
+
|
40
|
+
##
|
41
|
+
# Configure the Registry Client class.
|
42
|
+
#
|
43
|
+
# See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration}
|
44
|
+
# for a description of the configuration fields.
|
45
|
+
#
|
46
|
+
# @example
|
47
|
+
#
|
48
|
+
# # Modify the configuration for all Registry clients
|
49
|
+
# ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# @yield [config] Configure the Client client.
|
54
|
+
# @yieldparam config [Client::Configuration]
|
55
|
+
#
|
56
|
+
# @return [Client::Configuration]
|
57
|
+
#
|
58
|
+
def self.configure
|
59
|
+
@configure ||= begin
|
60
|
+
namespace = ["Google", "Cloud", "ApigeeRegistry", "V1"]
|
61
|
+
parent_config = while namespace.any?
|
62
|
+
parent_name = namespace.join "::"
|
63
|
+
parent_const = const_get parent_name
|
64
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
65
|
+
namespace.pop
|
66
|
+
end
|
67
|
+
default_config = Client::Configuration.new parent_config
|
68
|
+
|
69
|
+
default_config.rpcs.list_apis.timeout = 60.0
|
70
|
+
default_config.rpcs.list_apis.retry_policy = {
|
71
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
72
|
+
}
|
73
|
+
|
74
|
+
default_config.rpcs.get_api.timeout = 60.0
|
75
|
+
default_config.rpcs.get_api.retry_policy = {
|
76
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
77
|
+
}
|
78
|
+
|
79
|
+
default_config.rpcs.create_api.timeout = 60.0
|
80
|
+
default_config.rpcs.create_api.retry_policy = {
|
81
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
82
|
+
}
|
83
|
+
|
84
|
+
default_config.rpcs.update_api.timeout = 60.0
|
85
|
+
default_config.rpcs.update_api.retry_policy = {
|
86
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
87
|
+
}
|
88
|
+
|
89
|
+
default_config.rpcs.delete_api.timeout = 60.0
|
90
|
+
default_config.rpcs.delete_api.retry_policy = {
|
91
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
92
|
+
}
|
93
|
+
|
94
|
+
default_config.rpcs.list_api_versions.timeout = 60.0
|
95
|
+
default_config.rpcs.list_api_versions.retry_policy = {
|
96
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
97
|
+
}
|
98
|
+
|
99
|
+
default_config.rpcs.get_api_version.timeout = 60.0
|
100
|
+
default_config.rpcs.get_api_version.retry_policy = {
|
101
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
102
|
+
}
|
103
|
+
|
104
|
+
default_config.rpcs.create_api_version.timeout = 60.0
|
105
|
+
default_config.rpcs.create_api_version.retry_policy = {
|
106
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
107
|
+
}
|
108
|
+
|
109
|
+
default_config.rpcs.update_api_version.timeout = 60.0
|
110
|
+
default_config.rpcs.update_api_version.retry_policy = {
|
111
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
112
|
+
}
|
113
|
+
|
114
|
+
default_config.rpcs.delete_api_version.timeout = 60.0
|
115
|
+
default_config.rpcs.delete_api_version.retry_policy = {
|
116
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
117
|
+
}
|
118
|
+
|
119
|
+
default_config.rpcs.list_api_specs.timeout = 60.0
|
120
|
+
default_config.rpcs.list_api_specs.retry_policy = {
|
121
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
122
|
+
}
|
123
|
+
|
124
|
+
default_config.rpcs.get_api_spec.timeout = 60.0
|
125
|
+
default_config.rpcs.get_api_spec.retry_policy = {
|
126
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
127
|
+
}
|
128
|
+
|
129
|
+
default_config.rpcs.get_api_spec_contents.timeout = 60.0
|
130
|
+
default_config.rpcs.get_api_spec_contents.retry_policy = {
|
131
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
132
|
+
}
|
133
|
+
|
134
|
+
default_config.rpcs.create_api_spec.timeout = 60.0
|
135
|
+
default_config.rpcs.create_api_spec.retry_policy = {
|
136
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
137
|
+
}
|
138
|
+
|
139
|
+
default_config.rpcs.update_api_spec.timeout = 60.0
|
140
|
+
default_config.rpcs.update_api_spec.retry_policy = {
|
141
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
142
|
+
}
|
143
|
+
|
144
|
+
default_config.rpcs.delete_api_spec.timeout = 60.0
|
145
|
+
default_config.rpcs.delete_api_spec.retry_policy = {
|
146
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
147
|
+
}
|
148
|
+
|
149
|
+
default_config.rpcs.tag_api_spec_revision.timeout = 60.0
|
150
|
+
default_config.rpcs.tag_api_spec_revision.retry_policy = {
|
151
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
152
|
+
}
|
153
|
+
|
154
|
+
default_config.rpcs.list_api_spec_revisions.timeout = 60.0
|
155
|
+
default_config.rpcs.list_api_spec_revisions.retry_policy = {
|
156
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
157
|
+
}
|
158
|
+
|
159
|
+
default_config.rpcs.rollback_api_spec.timeout = 60.0
|
160
|
+
|
161
|
+
default_config.rpcs.delete_api_spec_revision.timeout = 60.0
|
162
|
+
default_config.rpcs.delete_api_spec_revision.retry_policy = {
|
163
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
164
|
+
}
|
165
|
+
|
166
|
+
default_config.rpcs.list_api_deployments.timeout = 60.0
|
167
|
+
default_config.rpcs.list_api_deployments.retry_policy = {
|
168
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
169
|
+
}
|
170
|
+
|
171
|
+
default_config.rpcs.get_api_deployment.timeout = 60.0
|
172
|
+
default_config.rpcs.get_api_deployment.retry_policy = {
|
173
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
174
|
+
}
|
175
|
+
|
176
|
+
default_config.rpcs.create_api_deployment.timeout = 60.0
|
177
|
+
default_config.rpcs.create_api_deployment.retry_policy = {
|
178
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
179
|
+
}
|
180
|
+
|
181
|
+
default_config.rpcs.update_api_deployment.timeout = 60.0
|
182
|
+
default_config.rpcs.update_api_deployment.retry_policy = {
|
183
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
184
|
+
}
|
185
|
+
|
186
|
+
default_config.rpcs.delete_api_deployment.timeout = 60.0
|
187
|
+
default_config.rpcs.delete_api_deployment.retry_policy = {
|
188
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
189
|
+
}
|
190
|
+
|
191
|
+
default_config.rpcs.tag_api_deployment_revision.timeout = 60.0
|
192
|
+
default_config.rpcs.tag_api_deployment_revision.retry_policy = {
|
193
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
194
|
+
}
|
195
|
+
|
196
|
+
default_config.rpcs.list_api_deployment_revisions.timeout = 60.0
|
197
|
+
default_config.rpcs.list_api_deployment_revisions.retry_policy = {
|
198
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
199
|
+
}
|
200
|
+
|
201
|
+
default_config.rpcs.rollback_api_deployment.timeout = 60.0
|
202
|
+
|
203
|
+
default_config.rpcs.delete_api_deployment_revision.timeout = 60.0
|
204
|
+
default_config.rpcs.delete_api_deployment_revision.retry_policy = {
|
205
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
206
|
+
}
|
207
|
+
|
208
|
+
default_config.rpcs.list_artifacts.timeout = 60.0
|
209
|
+
default_config.rpcs.list_artifacts.retry_policy = {
|
210
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
211
|
+
}
|
212
|
+
|
213
|
+
default_config.rpcs.get_artifact.timeout = 60.0
|
214
|
+
default_config.rpcs.get_artifact.retry_policy = {
|
215
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
216
|
+
}
|
217
|
+
|
218
|
+
default_config.rpcs.get_artifact_contents.timeout = 60.0
|
219
|
+
default_config.rpcs.get_artifact_contents.retry_policy = {
|
220
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
221
|
+
}
|
222
|
+
|
223
|
+
default_config.rpcs.create_artifact.timeout = 60.0
|
224
|
+
default_config.rpcs.create_artifact.retry_policy = {
|
225
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
226
|
+
}
|
227
|
+
|
228
|
+
default_config.rpcs.replace_artifact.timeout = 60.0
|
229
|
+
default_config.rpcs.replace_artifact.retry_policy = {
|
230
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
231
|
+
}
|
232
|
+
|
233
|
+
default_config.rpcs.delete_artifact.timeout = 60.0
|
234
|
+
default_config.rpcs.delete_artifact.retry_policy = {
|
235
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
236
|
+
}
|
237
|
+
|
238
|
+
default_config
|
239
|
+
end
|
240
|
+
yield @configure if block_given?
|
241
|
+
@configure
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# Configure the Registry Client instance.
|
246
|
+
#
|
247
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
248
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
249
|
+
# should be made on {Client.configure}.
|
250
|
+
#
|
251
|
+
# See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration}
|
252
|
+
# for a description of the configuration fields.
|
253
|
+
#
|
254
|
+
# @yield [config] Configure the Client client.
|
255
|
+
# @yieldparam config [Client::Configuration]
|
256
|
+
#
|
257
|
+
# @return [Client::Configuration]
|
258
|
+
#
|
259
|
+
def configure
|
260
|
+
yield @config if block_given?
|
261
|
+
@config
|
262
|
+
end
|
263
|
+
|
264
|
+
##
|
265
|
+
# Create a new Registry client object.
|
266
|
+
#
|
267
|
+
# @example
|
268
|
+
#
|
269
|
+
# # Create a client using the default configuration
|
270
|
+
# client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
271
|
+
#
|
272
|
+
# # Create a client using a custom configuration
|
273
|
+
# client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config|
|
274
|
+
# config.timeout = 10.0
|
275
|
+
# end
|
276
|
+
#
|
277
|
+
# @yield [config] Configure the Registry client.
|
278
|
+
# @yieldparam config [Client::Configuration]
|
279
|
+
#
|
280
|
+
def initialize
|
281
|
+
# These require statements are intentionally placed here to initialize
|
282
|
+
# the gRPC module only when it's required.
|
283
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
284
|
+
require "gapic/grpc"
|
285
|
+
require "google/cloud/apigeeregistry/v1/registry_service_services_pb"
|
286
|
+
|
287
|
+
# Create the configuration object
|
288
|
+
@config = Configuration.new Client.configure
|
289
|
+
|
290
|
+
# Yield the configuration if needed
|
291
|
+
yield @config if block_given?
|
292
|
+
|
293
|
+
# Create credentials
|
294
|
+
credentials = @config.credentials
|
295
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
296
|
+
# but only if the default endpoint does not have a region prefix.
|
297
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
298
|
+
!@config.endpoint.split(".").first.include?("-")
|
299
|
+
credentials ||= Credentials.default scope: @config.scope,
|
300
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
301
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
302
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
303
|
+
end
|
304
|
+
@quota_project_id = @config.quota_project
|
305
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
306
|
+
|
307
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
308
|
+
config.credentials = credentials
|
309
|
+
config.quota_project = @quota_project_id
|
310
|
+
config.endpoint = @config.endpoint
|
311
|
+
end
|
312
|
+
|
313
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
314
|
+
config.credentials = credentials
|
315
|
+
config.quota_project = @quota_project_id
|
316
|
+
config.endpoint = @config.endpoint
|
317
|
+
end
|
318
|
+
|
319
|
+
@registry_stub = ::Gapic::ServiceStub.new(
|
320
|
+
::Google::Cloud::ApigeeRegistry::V1::Registry::Stub,
|
321
|
+
credentials: credentials,
|
322
|
+
endpoint: @config.endpoint,
|
323
|
+
channel_args: @config.channel_args,
|
324
|
+
interceptors: @config.interceptors
|
325
|
+
)
|
326
|
+
end
|
327
|
+
|
328
|
+
##
|
329
|
+
# Get the associated client for mix-in of the Locations.
|
330
|
+
#
|
331
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
332
|
+
#
|
333
|
+
attr_reader :location_client
|
334
|
+
|
335
|
+
##
|
336
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
337
|
+
#
|
338
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
339
|
+
#
|
340
|
+
attr_reader :iam_policy_client
|
341
|
+
|
342
|
+
# Service calls
|
343
|
+
|
344
|
+
##
|
345
|
+
# ListApis returns matching APIs.
|
346
|
+
#
|
347
|
+
# @overload list_apis(request, options = nil)
|
348
|
+
# Pass arguments to `list_apis` via a request object, either of type
|
349
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash.
|
350
|
+
#
|
351
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash]
|
352
|
+
# A request object representing the call parameters. Required. To specify no
|
353
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
354
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
355
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
356
|
+
#
|
357
|
+
# @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
358
|
+
# Pass arguments to `list_apis` via keyword arguments. Note that at
|
359
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
360
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
361
|
+
#
|
362
|
+
# @param parent [::String]
|
363
|
+
# Required. The parent, which owns this collection of APIs.
|
364
|
+
# Format: projects/*/locations/*
|
365
|
+
# @param page_size [::Integer]
|
366
|
+
# The maximum number of APIs to return.
|
367
|
+
# The service may return fewer than this value.
|
368
|
+
# If unspecified, at most 50 values will be returned.
|
369
|
+
# The maximum is 1000; values above 1000 will be coerced to 1000.
|
370
|
+
# @param page_token [::String]
|
371
|
+
# A page token, received from a previous `ListApis` call.
|
372
|
+
# Provide this to retrieve the subsequent page.
|
373
|
+
#
|
374
|
+
# When paginating, all other parameters provided to `ListApis` must match
|
375
|
+
# the call that provided the page token.
|
376
|
+
# @param filter [::String]
|
377
|
+
# An expression that can be used to filter the list. Filters use the Common
|
378
|
+
# Expression Language and can refer to all message fields.
|
379
|
+
#
|
380
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
381
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>]
|
382
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
383
|
+
#
|
384
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>]
|
385
|
+
#
|
386
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
387
|
+
#
|
388
|
+
# @example Basic example
|
389
|
+
# require "google/cloud/apigee_registry/v1"
|
390
|
+
#
|
391
|
+
# # Create a client object. The client can be reused for multiple calls.
|
392
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
393
|
+
#
|
394
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
395
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new
|
396
|
+
#
|
397
|
+
# # Call the list_apis method.
|
398
|
+
# result = client.list_apis request
|
399
|
+
#
|
400
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
401
|
+
# # iterate over all elements by calling #each, and the enumerable
|
402
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
403
|
+
# # methods are also available for managing paging directly.
|
404
|
+
# result.each do |response|
|
405
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api.
|
406
|
+
# p response
|
407
|
+
# end
|
408
|
+
#
|
409
|
+
def list_apis request, options = nil
|
410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
411
|
+
|
412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest
|
413
|
+
|
414
|
+
# Converts hash and nil to an options object
|
415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
416
|
+
|
417
|
+
# Customize the options with defaults
|
418
|
+
metadata = @config.rpcs.list_apis.metadata.to_h
|
419
|
+
|
420
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
421
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
423
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
424
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
425
|
+
|
426
|
+
header_params = {}
|
427
|
+
if request.parent
|
428
|
+
header_params["parent"] = request.parent
|
429
|
+
end
|
430
|
+
|
431
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
432
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
433
|
+
|
434
|
+
options.apply_defaults timeout: @config.rpcs.list_apis.timeout,
|
435
|
+
metadata: metadata,
|
436
|
+
retry_policy: @config.rpcs.list_apis.retry_policy
|
437
|
+
|
438
|
+
options.apply_defaults timeout: @config.timeout,
|
439
|
+
metadata: @config.metadata,
|
440
|
+
retry_policy: @config.retry_policy
|
441
|
+
|
442
|
+
@registry_stub.call_rpc :list_apis, request, options: options do |response, operation|
|
443
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_apis, request, response, operation, options
|
444
|
+
yield response, operation if block_given?
|
445
|
+
return response
|
446
|
+
end
|
447
|
+
rescue ::GRPC::BadStatus => e
|
448
|
+
raise ::Google::Cloud::Error.from_error(e)
|
449
|
+
end
|
450
|
+
|
451
|
+
##
|
452
|
+
# GetApi returns a specified API.
|
453
|
+
#
|
454
|
+
# @overload get_api(request, options = nil)
|
455
|
+
# Pass arguments to `get_api` via a request object, either of type
|
456
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash.
|
457
|
+
#
|
458
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash]
|
459
|
+
# A request object representing the call parameters. Required. To specify no
|
460
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
461
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
462
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
463
|
+
#
|
464
|
+
# @overload get_api(name: nil)
|
465
|
+
# Pass arguments to `get_api` via keyword arguments. Note that at
|
466
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
467
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
468
|
+
#
|
469
|
+
# @param name [::String]
|
470
|
+
# Required. The name of the API to retrieve.
|
471
|
+
# Format: projects/*/locations/*/apis/*
|
472
|
+
#
|
473
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
474
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api]
|
475
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
476
|
+
#
|
477
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::Api]
|
478
|
+
#
|
479
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
480
|
+
#
|
481
|
+
# @example Basic example
|
482
|
+
# require "google/cloud/apigee_registry/v1"
|
483
|
+
#
|
484
|
+
# # Create a client object. The client can be reused for multiple calls.
|
485
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
486
|
+
#
|
487
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
488
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new
|
489
|
+
#
|
490
|
+
# # Call the get_api method.
|
491
|
+
# result = client.get_api request
|
492
|
+
#
|
493
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api.
|
494
|
+
# p result
|
495
|
+
#
|
496
|
+
def get_api request, options = nil
|
497
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
498
|
+
|
499
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest
|
500
|
+
|
501
|
+
# Converts hash and nil to an options object
|
502
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
503
|
+
|
504
|
+
# Customize the options with defaults
|
505
|
+
metadata = @config.rpcs.get_api.metadata.to_h
|
506
|
+
|
507
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
508
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
509
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
510
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
511
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
512
|
+
|
513
|
+
header_params = {}
|
514
|
+
if request.name
|
515
|
+
header_params["name"] = request.name
|
516
|
+
end
|
517
|
+
|
518
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
519
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
520
|
+
|
521
|
+
options.apply_defaults timeout: @config.rpcs.get_api.timeout,
|
522
|
+
metadata: metadata,
|
523
|
+
retry_policy: @config.rpcs.get_api.retry_policy
|
524
|
+
|
525
|
+
options.apply_defaults timeout: @config.timeout,
|
526
|
+
metadata: @config.metadata,
|
527
|
+
retry_policy: @config.retry_policy
|
528
|
+
|
529
|
+
@registry_stub.call_rpc :get_api, request, options: options do |response, operation|
|
530
|
+
yield response, operation if block_given?
|
531
|
+
return response
|
532
|
+
end
|
533
|
+
rescue ::GRPC::BadStatus => e
|
534
|
+
raise ::Google::Cloud::Error.from_error(e)
|
535
|
+
end
|
536
|
+
|
537
|
+
##
|
538
|
+
# CreateApi creates a specified API.
|
539
|
+
#
|
540
|
+
# @overload create_api(request, options = nil)
|
541
|
+
# Pass arguments to `create_api` via a request object, either of type
|
542
|
+
# {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash.
|
543
|
+
#
|
544
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash]
|
545
|
+
# A request object representing the call parameters. Required. To specify no
|
546
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
547
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
548
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
549
|
+
#
|
550
|
+
# @overload create_api(parent: nil, api: nil, api_id: nil)
|
551
|
+
# Pass arguments to `create_api` via keyword arguments. Note that at
|
552
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
553
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
554
|
+
#
|
555
|
+
# @param parent [::String]
|
556
|
+
# Required. The parent, which owns this collection of APIs.
|
557
|
+
# Format: projects/*/locations/*
|
558
|
+
# @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash]
|
559
|
+
# Required. The API to create.
|
560
|
+
# @param api_id [::String]
|
561
|
+
# Required. The ID to use for the api, which will become the final component of
|
562
|
+
# the api's resource name.
|
563
|
+
#
|
564
|
+
# This value should be 4-63 characters, and valid characters
|
565
|
+
# are /[a-z][0-9]-/.
|
566
|
+
#
|
567
|
+
# Following AIP-162, IDs must not have the form of a UUID.
|
568
|
+
#
|
569
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
570
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api]
|
571
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
572
|
+
#
|
573
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::Api]
|
574
|
+
#
|
575
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
576
|
+
#
|
577
|
+
# @example Basic example
|
578
|
+
# require "google/cloud/apigee_registry/v1"
|
579
|
+
#
|
580
|
+
# # Create a client object. The client can be reused for multiple calls.
|
581
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
582
|
+
#
|
583
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
584
|
+
# request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new
|
585
|
+
#
|
586
|
+
# # Call the create_api method.
|
587
|
+
# result = client.create_api request
|
588
|
+
#
|
589
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api.
|
590
|
+
# p result
|
591
|
+
#
|
592
|
+
def create_api request, options = nil
|
593
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
594
|
+
|
595
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest
|
596
|
+
|
597
|
+
# Converts hash and nil to an options object
|
598
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
599
|
+
|
600
|
+
# Customize the options with defaults
|
601
|
+
metadata = @config.rpcs.create_api.metadata.to_h
|
602
|
+
|
603
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
604
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
605
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
606
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
607
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
608
|
+
|
609
|
+
header_params = {}
|
610
|
+
if request.parent
|
611
|
+
header_params["parent"] = request.parent
|
612
|
+
end
|
613
|
+
|
614
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
615
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
616
|
+
|
617
|
+
options.apply_defaults timeout: @config.rpcs.create_api.timeout,
|
618
|
+
metadata: metadata,
|
619
|
+
retry_policy: @config.rpcs.create_api.retry_policy
|
620
|
+
|
621
|
+
options.apply_defaults timeout: @config.timeout,
|
622
|
+
metadata: @config.metadata,
|
623
|
+
retry_policy: @config.retry_policy
|
624
|
+
|
625
|
+
@registry_stub.call_rpc :create_api, request, options: options do |response, operation|
|
626
|
+
yield response, operation if block_given?
|
627
|
+
return response
|
628
|
+
end
|
629
|
+
rescue ::GRPC::BadStatus => e
|
630
|
+
raise ::Google::Cloud::Error.from_error(e)
|
631
|
+
end
|
632
|
+
|
633
|
+
##
|
634
|
+
# UpdateApi can be used to modify a specified API.
|
635
|
+
#
|
636
|
+
# @overload update_api(request, options = nil)
|
637
|
+
# Pass arguments to `update_api` via a request object, either of type
|
638
|
+
# {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash.
|
639
|
+
#
|
640
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash]
|
641
|
+
# A request object representing the call parameters. Required. To specify no
|
642
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
643
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
644
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
645
|
+
#
|
646
|
+
# @overload update_api(api: nil, update_mask: nil, allow_missing: nil)
|
647
|
+
# Pass arguments to `update_api` via keyword arguments. Note that at
|
648
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
649
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
650
|
+
#
|
651
|
+
# @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash]
|
652
|
+
# Required. The API to update.
|
653
|
+
#
|
654
|
+
# The `name` field is used to identify the API to update.
|
655
|
+
# Format: projects/*/locations/*/apis/*
|
656
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
657
|
+
# The list of fields to be updated. If omitted, all fields are updated that
|
658
|
+
# are set in the request message (fields set to default values are ignored).
|
659
|
+
# If a "*" is specified, all fields are updated, including fields that are
|
660
|
+
# unspecified/default in the request.
|
661
|
+
# @param allow_missing [::Boolean]
|
662
|
+
# If set to true, and the api is not found, a new api will be created.
|
663
|
+
# In this situation, `update_mask` is ignored.
|
664
|
+
#
|
665
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
666
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api]
|
667
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
668
|
+
#
|
669
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::Api]
|
670
|
+
#
|
671
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
672
|
+
#
|
673
|
+
# @example Basic example
|
674
|
+
# require "google/cloud/apigee_registry/v1"
|
675
|
+
#
|
676
|
+
# # Create a client object. The client can be reused for multiple calls.
|
677
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
678
|
+
#
|
679
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
680
|
+
# request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new
|
681
|
+
#
|
682
|
+
# # Call the update_api method.
|
683
|
+
# result = client.update_api request
|
684
|
+
#
|
685
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api.
|
686
|
+
# p result
|
687
|
+
#
|
688
|
+
def update_api request, options = nil
|
689
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
690
|
+
|
691
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest
|
692
|
+
|
693
|
+
# Converts hash and nil to an options object
|
694
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
695
|
+
|
696
|
+
# Customize the options with defaults
|
697
|
+
metadata = @config.rpcs.update_api.metadata.to_h
|
698
|
+
|
699
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
700
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
701
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
702
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
703
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
704
|
+
|
705
|
+
header_params = {}
|
706
|
+
if request.api&.name
|
707
|
+
header_params["api.name"] = request.api.name
|
708
|
+
end
|
709
|
+
|
710
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
711
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
712
|
+
|
713
|
+
options.apply_defaults timeout: @config.rpcs.update_api.timeout,
|
714
|
+
metadata: metadata,
|
715
|
+
retry_policy: @config.rpcs.update_api.retry_policy
|
716
|
+
|
717
|
+
options.apply_defaults timeout: @config.timeout,
|
718
|
+
metadata: @config.metadata,
|
719
|
+
retry_policy: @config.retry_policy
|
720
|
+
|
721
|
+
@registry_stub.call_rpc :update_api, request, options: options do |response, operation|
|
722
|
+
yield response, operation if block_given?
|
723
|
+
return response
|
724
|
+
end
|
725
|
+
rescue ::GRPC::BadStatus => e
|
726
|
+
raise ::Google::Cloud::Error.from_error(e)
|
727
|
+
end
|
728
|
+
|
729
|
+
##
|
730
|
+
# DeleteApi removes a specified API and all of the resources that it
|
731
|
+
# owns.
|
732
|
+
#
|
733
|
+
# @overload delete_api(request, options = nil)
|
734
|
+
# Pass arguments to `delete_api` via a request object, either of type
|
735
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash.
|
736
|
+
#
|
737
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash]
|
738
|
+
# A request object representing the call parameters. Required. To specify no
|
739
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
740
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
741
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
742
|
+
#
|
743
|
+
# @overload delete_api(name: nil)
|
744
|
+
# Pass arguments to `delete_api` via keyword arguments. Note that at
|
745
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
746
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
747
|
+
#
|
748
|
+
# @param name [::String]
|
749
|
+
# Required. The name of the API to delete.
|
750
|
+
# Format: projects/*/locations/*/apis/*
|
751
|
+
#
|
752
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
753
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
754
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
755
|
+
#
|
756
|
+
# @return [::Google::Protobuf::Empty]
|
757
|
+
#
|
758
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
759
|
+
#
|
760
|
+
# @example Basic example
|
761
|
+
# require "google/cloud/apigee_registry/v1"
|
762
|
+
#
|
763
|
+
# # Create a client object. The client can be reused for multiple calls.
|
764
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
765
|
+
#
|
766
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
767
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new
|
768
|
+
#
|
769
|
+
# # Call the delete_api method.
|
770
|
+
# result = client.delete_api request
|
771
|
+
#
|
772
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
773
|
+
# p result
|
774
|
+
#
|
775
|
+
def delete_api request, options = nil
|
776
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
777
|
+
|
778
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest
|
779
|
+
|
780
|
+
# Converts hash and nil to an options object
|
781
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
782
|
+
|
783
|
+
# Customize the options with defaults
|
784
|
+
metadata = @config.rpcs.delete_api.metadata.to_h
|
785
|
+
|
786
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
787
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
788
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
789
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
790
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
791
|
+
|
792
|
+
header_params = {}
|
793
|
+
if request.name
|
794
|
+
header_params["name"] = request.name
|
795
|
+
end
|
796
|
+
|
797
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
798
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
799
|
+
|
800
|
+
options.apply_defaults timeout: @config.rpcs.delete_api.timeout,
|
801
|
+
metadata: metadata,
|
802
|
+
retry_policy: @config.rpcs.delete_api.retry_policy
|
803
|
+
|
804
|
+
options.apply_defaults timeout: @config.timeout,
|
805
|
+
metadata: @config.metadata,
|
806
|
+
retry_policy: @config.retry_policy
|
807
|
+
|
808
|
+
@registry_stub.call_rpc :delete_api, request, options: options do |response, operation|
|
809
|
+
yield response, operation if block_given?
|
810
|
+
return response
|
811
|
+
end
|
812
|
+
rescue ::GRPC::BadStatus => e
|
813
|
+
raise ::Google::Cloud::Error.from_error(e)
|
814
|
+
end
|
815
|
+
|
816
|
+
##
|
817
|
+
# ListApiVersions returns matching versions.
|
818
|
+
#
|
819
|
+
# @overload list_api_versions(request, options = nil)
|
820
|
+
# Pass arguments to `list_api_versions` via a request object, either of type
|
821
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash.
|
822
|
+
#
|
823
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash]
|
824
|
+
# A request object representing the call parameters. Required. To specify no
|
825
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
826
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
827
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
828
|
+
#
|
829
|
+
# @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
830
|
+
# Pass arguments to `list_api_versions` via keyword arguments. Note that at
|
831
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
832
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
833
|
+
#
|
834
|
+
# @param parent [::String]
|
835
|
+
# Required. The parent, which owns this collection of versions.
|
836
|
+
# Format: projects/*/locations/*/apis/*
|
837
|
+
# @param page_size [::Integer]
|
838
|
+
# The maximum number of versions to return.
|
839
|
+
# The service may return fewer than this value.
|
840
|
+
# If unspecified, at most 50 values will be returned.
|
841
|
+
# The maximum is 1000; values above 1000 will be coerced to 1000.
|
842
|
+
# @param page_token [::String]
|
843
|
+
# A page token, received from a previous `ListApiVersions` call.
|
844
|
+
# Provide this to retrieve the subsequent page.
|
845
|
+
#
|
846
|
+
# When paginating, all other parameters provided to `ListApiVersions` must
|
847
|
+
# match the call that provided the page token.
|
848
|
+
# @param filter [::String]
|
849
|
+
# An expression that can be used to filter the list. Filters use the Common
|
850
|
+
# Expression Language and can refer to all message fields.
|
851
|
+
#
|
852
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
853
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>]
|
854
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
855
|
+
#
|
856
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>]
|
857
|
+
#
|
858
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
859
|
+
#
|
860
|
+
# @example Basic example
|
861
|
+
# require "google/cloud/apigee_registry/v1"
|
862
|
+
#
|
863
|
+
# # Create a client object. The client can be reused for multiple calls.
|
864
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
865
|
+
#
|
866
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
867
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new
|
868
|
+
#
|
869
|
+
# # Call the list_api_versions method.
|
870
|
+
# result = client.list_api_versions request
|
871
|
+
#
|
872
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
873
|
+
# # iterate over all elements by calling #each, and the enumerable
|
874
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
875
|
+
# # methods are also available for managing paging directly.
|
876
|
+
# result.each do |response|
|
877
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.
|
878
|
+
# p response
|
879
|
+
# end
|
880
|
+
#
|
881
|
+
def list_api_versions request, options = nil
|
882
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
883
|
+
|
884
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest
|
885
|
+
|
886
|
+
# Converts hash and nil to an options object
|
887
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
888
|
+
|
889
|
+
# Customize the options with defaults
|
890
|
+
metadata = @config.rpcs.list_api_versions.metadata.to_h
|
891
|
+
|
892
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
893
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
894
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
895
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
896
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
897
|
+
|
898
|
+
header_params = {}
|
899
|
+
if request.parent
|
900
|
+
header_params["parent"] = request.parent
|
901
|
+
end
|
902
|
+
|
903
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
904
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
905
|
+
|
906
|
+
options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout,
|
907
|
+
metadata: metadata,
|
908
|
+
retry_policy: @config.rpcs.list_api_versions.retry_policy
|
909
|
+
|
910
|
+
options.apply_defaults timeout: @config.timeout,
|
911
|
+
metadata: @config.metadata,
|
912
|
+
retry_policy: @config.retry_policy
|
913
|
+
|
914
|
+
@registry_stub.call_rpc :list_api_versions, request, options: options do |response, operation|
|
915
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_versions, request, response, operation, options
|
916
|
+
yield response, operation if block_given?
|
917
|
+
return response
|
918
|
+
end
|
919
|
+
rescue ::GRPC::BadStatus => e
|
920
|
+
raise ::Google::Cloud::Error.from_error(e)
|
921
|
+
end
|
922
|
+
|
923
|
+
##
|
924
|
+
# GetApiVersion returns a specified version.
|
925
|
+
#
|
926
|
+
# @overload get_api_version(request, options = nil)
|
927
|
+
# Pass arguments to `get_api_version` via a request object, either of type
|
928
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash.
|
929
|
+
#
|
930
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash]
|
931
|
+
# A request object representing the call parameters. Required. To specify no
|
932
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
933
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
934
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
935
|
+
#
|
936
|
+
# @overload get_api_version(name: nil)
|
937
|
+
# Pass arguments to `get_api_version` via keyword arguments. Note that at
|
938
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
939
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
940
|
+
#
|
941
|
+
# @param name [::String]
|
942
|
+
# Required. The name of the version to retrieve.
|
943
|
+
# Format: projects/*/locations/*/apis/*/versions/*
|
944
|
+
#
|
945
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
946
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion]
|
947
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
948
|
+
#
|
949
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion]
|
950
|
+
#
|
951
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
952
|
+
#
|
953
|
+
# @example Basic example
|
954
|
+
# require "google/cloud/apigee_registry/v1"
|
955
|
+
#
|
956
|
+
# # Create a client object. The client can be reused for multiple calls.
|
957
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
958
|
+
#
|
959
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
960
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new
|
961
|
+
#
|
962
|
+
# # Call the get_api_version method.
|
963
|
+
# result = client.get_api_version request
|
964
|
+
#
|
965
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion.
|
966
|
+
# p result
|
967
|
+
#
|
968
|
+
def get_api_version request, options = nil
|
969
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
970
|
+
|
971
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest
|
972
|
+
|
973
|
+
# Converts hash and nil to an options object
|
974
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
975
|
+
|
976
|
+
# Customize the options with defaults
|
977
|
+
metadata = @config.rpcs.get_api_version.metadata.to_h
|
978
|
+
|
979
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
980
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
981
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
982
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
983
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
984
|
+
|
985
|
+
header_params = {}
|
986
|
+
if request.name
|
987
|
+
header_params["name"] = request.name
|
988
|
+
end
|
989
|
+
|
990
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
991
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
992
|
+
|
993
|
+
options.apply_defaults timeout: @config.rpcs.get_api_version.timeout,
|
994
|
+
metadata: metadata,
|
995
|
+
retry_policy: @config.rpcs.get_api_version.retry_policy
|
996
|
+
|
997
|
+
options.apply_defaults timeout: @config.timeout,
|
998
|
+
metadata: @config.metadata,
|
999
|
+
retry_policy: @config.retry_policy
|
1000
|
+
|
1001
|
+
@registry_stub.call_rpc :get_api_version, request, options: options do |response, operation|
|
1002
|
+
yield response, operation if block_given?
|
1003
|
+
return response
|
1004
|
+
end
|
1005
|
+
rescue ::GRPC::BadStatus => e
|
1006
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
##
|
1010
|
+
# CreateApiVersion creates a specified version.
|
1011
|
+
#
|
1012
|
+
# @overload create_api_version(request, options = nil)
|
1013
|
+
# Pass arguments to `create_api_version` via a request object, either of type
|
1014
|
+
# {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash.
|
1015
|
+
#
|
1016
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash]
|
1017
|
+
# A request object representing the call parameters. Required. To specify no
|
1018
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1019
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1020
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1021
|
+
#
|
1022
|
+
# @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil)
|
1023
|
+
# Pass arguments to `create_api_version` via keyword arguments. Note that at
|
1024
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1025
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1026
|
+
#
|
1027
|
+
# @param parent [::String]
|
1028
|
+
# Required. The parent, which owns this collection of versions.
|
1029
|
+
# Format: projects/*/locations/*/apis/*
|
1030
|
+
# @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash]
|
1031
|
+
# Required. The version to create.
|
1032
|
+
# @param api_version_id [::String]
|
1033
|
+
# Required. The ID to use for the version, which will become the final component of
|
1034
|
+
# the version's resource name.
|
1035
|
+
#
|
1036
|
+
# This value should be 1-63 characters, and valid characters
|
1037
|
+
# are /[a-z][0-9]-/.
|
1038
|
+
#
|
1039
|
+
# Following AIP-162, IDs must not have the form of a UUID.
|
1040
|
+
#
|
1041
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1042
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion]
|
1043
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1044
|
+
#
|
1045
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion]
|
1046
|
+
#
|
1047
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1048
|
+
#
|
1049
|
+
# @example Basic example
|
1050
|
+
# require "google/cloud/apigee_registry/v1"
|
1051
|
+
#
|
1052
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1053
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1054
|
+
#
|
1055
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1056
|
+
# request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new
|
1057
|
+
#
|
1058
|
+
# # Call the create_api_version method.
|
1059
|
+
# result = client.create_api_version request
|
1060
|
+
#
|
1061
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion.
|
1062
|
+
# p result
|
1063
|
+
#
|
1064
|
+
def create_api_version request, options = nil
|
1065
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1066
|
+
|
1067
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest
|
1068
|
+
|
1069
|
+
# Converts hash and nil to an options object
|
1070
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1071
|
+
|
1072
|
+
# Customize the options with defaults
|
1073
|
+
metadata = @config.rpcs.create_api_version.metadata.to_h
|
1074
|
+
|
1075
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1076
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1077
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1078
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1079
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1080
|
+
|
1081
|
+
header_params = {}
|
1082
|
+
if request.parent
|
1083
|
+
header_params["parent"] = request.parent
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1087
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1088
|
+
|
1089
|
+
options.apply_defaults timeout: @config.rpcs.create_api_version.timeout,
|
1090
|
+
metadata: metadata,
|
1091
|
+
retry_policy: @config.rpcs.create_api_version.retry_policy
|
1092
|
+
|
1093
|
+
options.apply_defaults timeout: @config.timeout,
|
1094
|
+
metadata: @config.metadata,
|
1095
|
+
retry_policy: @config.retry_policy
|
1096
|
+
|
1097
|
+
@registry_stub.call_rpc :create_api_version, request, options: options do |response, operation|
|
1098
|
+
yield response, operation if block_given?
|
1099
|
+
return response
|
1100
|
+
end
|
1101
|
+
rescue ::GRPC::BadStatus => e
|
1102
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
##
|
1106
|
+
# UpdateApiVersion can be used to modify a specified version.
|
1107
|
+
#
|
1108
|
+
# @overload update_api_version(request, options = nil)
|
1109
|
+
# Pass arguments to `update_api_version` via a request object, either of type
|
1110
|
+
# {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash.
|
1111
|
+
#
|
1112
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash]
|
1113
|
+
# A request object representing the call parameters. Required. To specify no
|
1114
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1115
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1116
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1117
|
+
#
|
1118
|
+
# @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil)
|
1119
|
+
# Pass arguments to `update_api_version` via keyword arguments. Note that at
|
1120
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1121
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1122
|
+
#
|
1123
|
+
# @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash]
|
1124
|
+
# Required. The version to update.
|
1125
|
+
#
|
1126
|
+
# The `name` field is used to identify the version to update.
|
1127
|
+
# Format: projects/*/locations/*/apis/*/versions/*
|
1128
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1129
|
+
# The list of fields to be updated. If omitted, all fields are updated that
|
1130
|
+
# are set in the request message (fields set to default values are ignored).
|
1131
|
+
# If a "*" is specified, all fields are updated, including fields that are
|
1132
|
+
# unspecified/default in the request.
|
1133
|
+
# @param allow_missing [::Boolean]
|
1134
|
+
# If set to true, and the version is not found, a new version will be
|
1135
|
+
# created. In this situation, `update_mask` is ignored.
|
1136
|
+
#
|
1137
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1138
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion]
|
1139
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1140
|
+
#
|
1141
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion]
|
1142
|
+
#
|
1143
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1144
|
+
#
|
1145
|
+
# @example Basic example
|
1146
|
+
# require "google/cloud/apigee_registry/v1"
|
1147
|
+
#
|
1148
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1149
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1150
|
+
#
|
1151
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1152
|
+
# request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new
|
1153
|
+
#
|
1154
|
+
# # Call the update_api_version method.
|
1155
|
+
# result = client.update_api_version request
|
1156
|
+
#
|
1157
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion.
|
1158
|
+
# p result
|
1159
|
+
#
|
1160
|
+
def update_api_version request, options = nil
|
1161
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1162
|
+
|
1163
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest
|
1164
|
+
|
1165
|
+
# Converts hash and nil to an options object
|
1166
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1167
|
+
|
1168
|
+
# Customize the options with defaults
|
1169
|
+
metadata = @config.rpcs.update_api_version.metadata.to_h
|
1170
|
+
|
1171
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1172
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1173
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1174
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1175
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1176
|
+
|
1177
|
+
header_params = {}
|
1178
|
+
if request.api_version&.name
|
1179
|
+
header_params["api_version.name"] = request.api_version.name
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1183
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1184
|
+
|
1185
|
+
options.apply_defaults timeout: @config.rpcs.update_api_version.timeout,
|
1186
|
+
metadata: metadata,
|
1187
|
+
retry_policy: @config.rpcs.update_api_version.retry_policy
|
1188
|
+
|
1189
|
+
options.apply_defaults timeout: @config.timeout,
|
1190
|
+
metadata: @config.metadata,
|
1191
|
+
retry_policy: @config.retry_policy
|
1192
|
+
|
1193
|
+
@registry_stub.call_rpc :update_api_version, request, options: options do |response, operation|
|
1194
|
+
yield response, operation if block_given?
|
1195
|
+
return response
|
1196
|
+
end
|
1197
|
+
rescue ::GRPC::BadStatus => e
|
1198
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
##
|
1202
|
+
# DeleteApiVersion removes a specified version and all of the resources that
|
1203
|
+
# it owns.
|
1204
|
+
#
|
1205
|
+
# @overload delete_api_version(request, options = nil)
|
1206
|
+
# Pass arguments to `delete_api_version` via a request object, either of type
|
1207
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash.
|
1208
|
+
#
|
1209
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash]
|
1210
|
+
# A request object representing the call parameters. Required. To specify no
|
1211
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1212
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1213
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1214
|
+
#
|
1215
|
+
# @overload delete_api_version(name: nil)
|
1216
|
+
# Pass arguments to `delete_api_version` via keyword arguments. Note that at
|
1217
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1218
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1219
|
+
#
|
1220
|
+
# @param name [::String]
|
1221
|
+
# Required. The name of the version to delete.
|
1222
|
+
# Format: projects/*/locations/*/apis/*/versions/*
|
1223
|
+
#
|
1224
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1225
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1226
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1227
|
+
#
|
1228
|
+
# @return [::Google::Protobuf::Empty]
|
1229
|
+
#
|
1230
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1231
|
+
#
|
1232
|
+
# @example Basic example
|
1233
|
+
# require "google/cloud/apigee_registry/v1"
|
1234
|
+
#
|
1235
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1236
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1237
|
+
#
|
1238
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1239
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new
|
1240
|
+
#
|
1241
|
+
# # Call the delete_api_version method.
|
1242
|
+
# result = client.delete_api_version request
|
1243
|
+
#
|
1244
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1245
|
+
# p result
|
1246
|
+
#
|
1247
|
+
def delete_api_version request, options = nil
|
1248
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1249
|
+
|
1250
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest
|
1251
|
+
|
1252
|
+
# Converts hash and nil to an options object
|
1253
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1254
|
+
|
1255
|
+
# Customize the options with defaults
|
1256
|
+
metadata = @config.rpcs.delete_api_version.metadata.to_h
|
1257
|
+
|
1258
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1259
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1260
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1261
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1262
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1263
|
+
|
1264
|
+
header_params = {}
|
1265
|
+
if request.name
|
1266
|
+
header_params["name"] = request.name
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1270
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1271
|
+
|
1272
|
+
options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout,
|
1273
|
+
metadata: metadata,
|
1274
|
+
retry_policy: @config.rpcs.delete_api_version.retry_policy
|
1275
|
+
|
1276
|
+
options.apply_defaults timeout: @config.timeout,
|
1277
|
+
metadata: @config.metadata,
|
1278
|
+
retry_policy: @config.retry_policy
|
1279
|
+
|
1280
|
+
@registry_stub.call_rpc :delete_api_version, request, options: options do |response, operation|
|
1281
|
+
yield response, operation if block_given?
|
1282
|
+
return response
|
1283
|
+
end
|
1284
|
+
rescue ::GRPC::BadStatus => e
|
1285
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
##
|
1289
|
+
# ListApiSpecs returns matching specs.
|
1290
|
+
#
|
1291
|
+
# @overload list_api_specs(request, options = nil)
|
1292
|
+
# Pass arguments to `list_api_specs` via a request object, either of type
|
1293
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash.
|
1294
|
+
#
|
1295
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash]
|
1296
|
+
# A request object representing the call parameters. Required. To specify no
|
1297
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1298
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1299
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1300
|
+
#
|
1301
|
+
# @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
1302
|
+
# Pass arguments to `list_api_specs` via keyword arguments. Note that at
|
1303
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1304
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1305
|
+
#
|
1306
|
+
# @param parent [::String]
|
1307
|
+
# Required. The parent, which owns this collection of specs.
|
1308
|
+
# Format: projects/*/locations/*/apis/*/versions/*
|
1309
|
+
# @param page_size [::Integer]
|
1310
|
+
# The maximum number of specs to return.
|
1311
|
+
# The service may return fewer than this value.
|
1312
|
+
# If unspecified, at most 50 values will be returned.
|
1313
|
+
# The maximum is 1000; values above 1000 will be coerced to 1000.
|
1314
|
+
# @param page_token [::String]
|
1315
|
+
# A page token, received from a previous `ListApiSpecs` call.
|
1316
|
+
# Provide this to retrieve the subsequent page.
|
1317
|
+
#
|
1318
|
+
# When paginating, all other parameters provided to `ListApiSpecs` must match
|
1319
|
+
# the call that provided the page token.
|
1320
|
+
# @param filter [::String]
|
1321
|
+
# An expression that can be used to filter the list. Filters use the Common
|
1322
|
+
# Expression Language and can refer to all message fields except contents.
|
1323
|
+
#
|
1324
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1325
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>]
|
1326
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1327
|
+
#
|
1328
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>]
|
1329
|
+
#
|
1330
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1331
|
+
#
|
1332
|
+
# @example Basic example
|
1333
|
+
# require "google/cloud/apigee_registry/v1"
|
1334
|
+
#
|
1335
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1336
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1337
|
+
#
|
1338
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1339
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new
|
1340
|
+
#
|
1341
|
+
# # Call the list_api_specs method.
|
1342
|
+
# result = client.list_api_specs request
|
1343
|
+
#
|
1344
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1345
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1346
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1347
|
+
# # methods are also available for managing paging directly.
|
1348
|
+
# result.each do |response|
|
1349
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
1350
|
+
# p response
|
1351
|
+
# end
|
1352
|
+
#
|
1353
|
+
def list_api_specs request, options = nil
|
1354
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1355
|
+
|
1356
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest
|
1357
|
+
|
1358
|
+
# Converts hash and nil to an options object
|
1359
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1360
|
+
|
1361
|
+
# Customize the options with defaults
|
1362
|
+
metadata = @config.rpcs.list_api_specs.metadata.to_h
|
1363
|
+
|
1364
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1365
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1366
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1367
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1368
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1369
|
+
|
1370
|
+
header_params = {}
|
1371
|
+
if request.parent
|
1372
|
+
header_params["parent"] = request.parent
|
1373
|
+
end
|
1374
|
+
|
1375
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1376
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1377
|
+
|
1378
|
+
options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout,
|
1379
|
+
metadata: metadata,
|
1380
|
+
retry_policy: @config.rpcs.list_api_specs.retry_policy
|
1381
|
+
|
1382
|
+
options.apply_defaults timeout: @config.timeout,
|
1383
|
+
metadata: @config.metadata,
|
1384
|
+
retry_policy: @config.retry_policy
|
1385
|
+
|
1386
|
+
@registry_stub.call_rpc :list_api_specs, request, options: options do |response, operation|
|
1387
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_specs, request, response, operation, options
|
1388
|
+
yield response, operation if block_given?
|
1389
|
+
return response
|
1390
|
+
end
|
1391
|
+
rescue ::GRPC::BadStatus => e
|
1392
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1393
|
+
end
|
1394
|
+
|
1395
|
+
##
|
1396
|
+
# GetApiSpec returns a specified spec.
|
1397
|
+
#
|
1398
|
+
# @overload get_api_spec(request, options = nil)
|
1399
|
+
# Pass arguments to `get_api_spec` via a request object, either of type
|
1400
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash.
|
1401
|
+
#
|
1402
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash]
|
1403
|
+
# A request object representing the call parameters. Required. To specify no
|
1404
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1405
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1406
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1407
|
+
#
|
1408
|
+
# @overload get_api_spec(name: nil)
|
1409
|
+
# Pass arguments to `get_api_spec` via keyword arguments. Note that at
|
1410
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1411
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1412
|
+
#
|
1413
|
+
# @param name [::String]
|
1414
|
+
# Required. The name of the spec to retrieve.
|
1415
|
+
# Format: projects/*/locations/*/apis/*/versions/*/specs/*
|
1416
|
+
#
|
1417
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1418
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1419
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1420
|
+
#
|
1421
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1422
|
+
#
|
1423
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1424
|
+
#
|
1425
|
+
# @example Basic example
|
1426
|
+
# require "google/cloud/apigee_registry/v1"
|
1427
|
+
#
|
1428
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1429
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1430
|
+
#
|
1431
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1432
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new
|
1433
|
+
#
|
1434
|
+
# # Call the get_api_spec method.
|
1435
|
+
# result = client.get_api_spec request
|
1436
|
+
#
|
1437
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
1438
|
+
# p result
|
1439
|
+
#
|
1440
|
+
def get_api_spec request, options = nil
|
1441
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1442
|
+
|
1443
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest
|
1444
|
+
|
1445
|
+
# Converts hash and nil to an options object
|
1446
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1447
|
+
|
1448
|
+
# Customize the options with defaults
|
1449
|
+
metadata = @config.rpcs.get_api_spec.metadata.to_h
|
1450
|
+
|
1451
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1452
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1453
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1454
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1455
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1456
|
+
|
1457
|
+
header_params = {}
|
1458
|
+
if request.name
|
1459
|
+
header_params["name"] = request.name
|
1460
|
+
end
|
1461
|
+
|
1462
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1463
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1464
|
+
|
1465
|
+
options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout,
|
1466
|
+
metadata: metadata,
|
1467
|
+
retry_policy: @config.rpcs.get_api_spec.retry_policy
|
1468
|
+
|
1469
|
+
options.apply_defaults timeout: @config.timeout,
|
1470
|
+
metadata: @config.metadata,
|
1471
|
+
retry_policy: @config.retry_policy
|
1472
|
+
|
1473
|
+
@registry_stub.call_rpc :get_api_spec, request, options: options do |response, operation|
|
1474
|
+
yield response, operation if block_given?
|
1475
|
+
return response
|
1476
|
+
end
|
1477
|
+
rescue ::GRPC::BadStatus => e
|
1478
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
##
|
1482
|
+
# GetApiSpecContents returns the contents of a specified spec.
|
1483
|
+
# If specs are stored with GZip compression, the default behavior
|
1484
|
+
# is to return the spec uncompressed (the mime_type response field
|
1485
|
+
# indicates the exact format returned).
|
1486
|
+
#
|
1487
|
+
# @overload get_api_spec_contents(request, options = nil)
|
1488
|
+
# Pass arguments to `get_api_spec_contents` via a request object, either of type
|
1489
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash.
|
1490
|
+
#
|
1491
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash]
|
1492
|
+
# A request object representing the call parameters. Required. To specify no
|
1493
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1494
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1495
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1496
|
+
#
|
1497
|
+
# @overload get_api_spec_contents(name: nil)
|
1498
|
+
# Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at
|
1499
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1500
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1501
|
+
#
|
1502
|
+
# @param name [::String]
|
1503
|
+
# Required. The name of the spec whose contents should be retrieved.
|
1504
|
+
# Format: projects/*/locations/*/apis/*/versions/*/specs/*
|
1505
|
+
#
|
1506
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1507
|
+
# @yieldparam response [::Google::Api::HttpBody]
|
1508
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1509
|
+
#
|
1510
|
+
# @return [::Google::Api::HttpBody]
|
1511
|
+
#
|
1512
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1513
|
+
#
|
1514
|
+
# @example Basic example
|
1515
|
+
# require "google/cloud/apigee_registry/v1"
|
1516
|
+
#
|
1517
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1518
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1519
|
+
#
|
1520
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1521
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new
|
1522
|
+
#
|
1523
|
+
# # Call the get_api_spec_contents method.
|
1524
|
+
# result = client.get_api_spec_contents request
|
1525
|
+
#
|
1526
|
+
# # The returned object is of type Google::Api::HttpBody.
|
1527
|
+
# p result
|
1528
|
+
#
|
1529
|
+
def get_api_spec_contents request, options = nil
|
1530
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1531
|
+
|
1532
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest
|
1533
|
+
|
1534
|
+
# Converts hash and nil to an options object
|
1535
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1536
|
+
|
1537
|
+
# Customize the options with defaults
|
1538
|
+
metadata = @config.rpcs.get_api_spec_contents.metadata.to_h
|
1539
|
+
|
1540
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1541
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1542
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1543
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1544
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1545
|
+
|
1546
|
+
header_params = {}
|
1547
|
+
if request.name
|
1548
|
+
header_params["name"] = request.name
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1552
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1553
|
+
|
1554
|
+
options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout,
|
1555
|
+
metadata: metadata,
|
1556
|
+
retry_policy: @config.rpcs.get_api_spec_contents.retry_policy
|
1557
|
+
|
1558
|
+
options.apply_defaults timeout: @config.timeout,
|
1559
|
+
metadata: @config.metadata,
|
1560
|
+
retry_policy: @config.retry_policy
|
1561
|
+
|
1562
|
+
@registry_stub.call_rpc :get_api_spec_contents, request, options: options do |response, operation|
|
1563
|
+
yield response, operation if block_given?
|
1564
|
+
return response
|
1565
|
+
end
|
1566
|
+
rescue ::GRPC::BadStatus => e
|
1567
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
##
|
1571
|
+
# CreateApiSpec creates a specified spec.
|
1572
|
+
#
|
1573
|
+
# @overload create_api_spec(request, options = nil)
|
1574
|
+
# Pass arguments to `create_api_spec` via a request object, either of type
|
1575
|
+
# {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash.
|
1576
|
+
#
|
1577
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash]
|
1578
|
+
# A request object representing the call parameters. Required. To specify no
|
1579
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1580
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1581
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1582
|
+
#
|
1583
|
+
# @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil)
|
1584
|
+
# Pass arguments to `create_api_spec` via keyword arguments. Note that at
|
1585
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1586
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1587
|
+
#
|
1588
|
+
# @param parent [::String]
|
1589
|
+
# Required. The parent, which owns this collection of specs.
|
1590
|
+
# Format: projects/*/locations/*/apis/*/versions/*
|
1591
|
+
# @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash]
|
1592
|
+
# Required. The spec to create.
|
1593
|
+
# @param api_spec_id [::String]
|
1594
|
+
# Required. The ID to use for the spec, which will become the final component of
|
1595
|
+
# the spec's resource name.
|
1596
|
+
#
|
1597
|
+
# This value should be 4-63 characters, and valid characters
|
1598
|
+
# are /[a-z][0-9]-/.
|
1599
|
+
#
|
1600
|
+
# Following AIP-162, IDs must not have the form of a UUID.
|
1601
|
+
#
|
1602
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1603
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1604
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1605
|
+
#
|
1606
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1607
|
+
#
|
1608
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1609
|
+
#
|
1610
|
+
# @example Basic example
|
1611
|
+
# require "google/cloud/apigee_registry/v1"
|
1612
|
+
#
|
1613
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1614
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1615
|
+
#
|
1616
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1617
|
+
# request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new
|
1618
|
+
#
|
1619
|
+
# # Call the create_api_spec method.
|
1620
|
+
# result = client.create_api_spec request
|
1621
|
+
#
|
1622
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
1623
|
+
# p result
|
1624
|
+
#
|
1625
|
+
def create_api_spec request, options = nil
|
1626
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1627
|
+
|
1628
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest
|
1629
|
+
|
1630
|
+
# Converts hash and nil to an options object
|
1631
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1632
|
+
|
1633
|
+
# Customize the options with defaults
|
1634
|
+
metadata = @config.rpcs.create_api_spec.metadata.to_h
|
1635
|
+
|
1636
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1637
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1638
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1639
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1640
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1641
|
+
|
1642
|
+
header_params = {}
|
1643
|
+
if request.parent
|
1644
|
+
header_params["parent"] = request.parent
|
1645
|
+
end
|
1646
|
+
|
1647
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1648
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1649
|
+
|
1650
|
+
options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout,
|
1651
|
+
metadata: metadata,
|
1652
|
+
retry_policy: @config.rpcs.create_api_spec.retry_policy
|
1653
|
+
|
1654
|
+
options.apply_defaults timeout: @config.timeout,
|
1655
|
+
metadata: @config.metadata,
|
1656
|
+
retry_policy: @config.retry_policy
|
1657
|
+
|
1658
|
+
@registry_stub.call_rpc :create_api_spec, request, options: options do |response, operation|
|
1659
|
+
yield response, operation if block_given?
|
1660
|
+
return response
|
1661
|
+
end
|
1662
|
+
rescue ::GRPC::BadStatus => e
|
1663
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1664
|
+
end
|
1665
|
+
|
1666
|
+
##
|
1667
|
+
# UpdateApiSpec can be used to modify a specified spec.
|
1668
|
+
#
|
1669
|
+
# @overload update_api_spec(request, options = nil)
|
1670
|
+
# Pass arguments to `update_api_spec` via a request object, either of type
|
1671
|
+
# {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash.
|
1672
|
+
#
|
1673
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash]
|
1674
|
+
# A request object representing the call parameters. Required. To specify no
|
1675
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1676
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1677
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1678
|
+
#
|
1679
|
+
# @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil)
|
1680
|
+
# Pass arguments to `update_api_spec` via keyword arguments. Note that at
|
1681
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1682
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1683
|
+
#
|
1684
|
+
# @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash]
|
1685
|
+
# Required. The spec to update.
|
1686
|
+
#
|
1687
|
+
# The `name` field is used to identify the spec to update.
|
1688
|
+
# Format: projects/*/locations/*/apis/*/versions/*/specs/*
|
1689
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1690
|
+
# The list of fields to be updated. If omitted, all fields are updated that
|
1691
|
+
# are set in the request message (fields set to default values are ignored).
|
1692
|
+
# If a "*" is specified, all fields are updated, including fields that are
|
1693
|
+
# unspecified/default in the request.
|
1694
|
+
# @param allow_missing [::Boolean]
|
1695
|
+
# If set to true, and the spec is not found, a new spec will be created.
|
1696
|
+
# In this situation, `update_mask` is ignored.
|
1697
|
+
#
|
1698
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1699
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1700
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1701
|
+
#
|
1702
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1703
|
+
#
|
1704
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1705
|
+
#
|
1706
|
+
# @example Basic example
|
1707
|
+
# require "google/cloud/apigee_registry/v1"
|
1708
|
+
#
|
1709
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1710
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1711
|
+
#
|
1712
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1713
|
+
# request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new
|
1714
|
+
#
|
1715
|
+
# # Call the update_api_spec method.
|
1716
|
+
# result = client.update_api_spec request
|
1717
|
+
#
|
1718
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
1719
|
+
# p result
|
1720
|
+
#
|
1721
|
+
def update_api_spec request, options = nil
|
1722
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1723
|
+
|
1724
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest
|
1725
|
+
|
1726
|
+
# Converts hash and nil to an options object
|
1727
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1728
|
+
|
1729
|
+
# Customize the options with defaults
|
1730
|
+
metadata = @config.rpcs.update_api_spec.metadata.to_h
|
1731
|
+
|
1732
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1733
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1734
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1735
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1736
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1737
|
+
|
1738
|
+
header_params = {}
|
1739
|
+
if request.api_spec&.name
|
1740
|
+
header_params["api_spec.name"] = request.api_spec.name
|
1741
|
+
end
|
1742
|
+
|
1743
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1744
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1745
|
+
|
1746
|
+
options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout,
|
1747
|
+
metadata: metadata,
|
1748
|
+
retry_policy: @config.rpcs.update_api_spec.retry_policy
|
1749
|
+
|
1750
|
+
options.apply_defaults timeout: @config.timeout,
|
1751
|
+
metadata: @config.metadata,
|
1752
|
+
retry_policy: @config.retry_policy
|
1753
|
+
|
1754
|
+
@registry_stub.call_rpc :update_api_spec, request, options: options do |response, operation|
|
1755
|
+
yield response, operation if block_given?
|
1756
|
+
return response
|
1757
|
+
end
|
1758
|
+
rescue ::GRPC::BadStatus => e
|
1759
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1760
|
+
end
|
1761
|
+
|
1762
|
+
##
|
1763
|
+
# DeleteApiSpec removes a specified spec, all revisions, and all child
|
1764
|
+
# resources (e.g. artifacts).
|
1765
|
+
#
|
1766
|
+
# @overload delete_api_spec(request, options = nil)
|
1767
|
+
# Pass arguments to `delete_api_spec` via a request object, either of type
|
1768
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash.
|
1769
|
+
#
|
1770
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash]
|
1771
|
+
# A request object representing the call parameters. Required. To specify no
|
1772
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1773
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1774
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1775
|
+
#
|
1776
|
+
# @overload delete_api_spec(name: nil, force: nil)
|
1777
|
+
# Pass arguments to `delete_api_spec` via keyword arguments. Note that at
|
1778
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1779
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1780
|
+
#
|
1781
|
+
# @param name [::String]
|
1782
|
+
# Required. The name of the spec to delete.
|
1783
|
+
# Format: projects/*/locations/*/apis/*/versions/*/specs/*
|
1784
|
+
# @param force [::Boolean]
|
1785
|
+
# If set to true, any child resources will also be deleted.
|
1786
|
+
# (Otherwise, the request will only work if there are no child resources.)
|
1787
|
+
#
|
1788
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1789
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1790
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1791
|
+
#
|
1792
|
+
# @return [::Google::Protobuf::Empty]
|
1793
|
+
#
|
1794
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1795
|
+
#
|
1796
|
+
# @example Basic example
|
1797
|
+
# require "google/cloud/apigee_registry/v1"
|
1798
|
+
#
|
1799
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1800
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1801
|
+
#
|
1802
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1803
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new
|
1804
|
+
#
|
1805
|
+
# # Call the delete_api_spec method.
|
1806
|
+
# result = client.delete_api_spec request
|
1807
|
+
#
|
1808
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1809
|
+
# p result
|
1810
|
+
#
|
1811
|
+
def delete_api_spec request, options = nil
|
1812
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1813
|
+
|
1814
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest
|
1815
|
+
|
1816
|
+
# Converts hash and nil to an options object
|
1817
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1818
|
+
|
1819
|
+
# Customize the options with defaults
|
1820
|
+
metadata = @config.rpcs.delete_api_spec.metadata.to_h
|
1821
|
+
|
1822
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1823
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1824
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1825
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1826
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1827
|
+
|
1828
|
+
header_params = {}
|
1829
|
+
if request.name
|
1830
|
+
header_params["name"] = request.name
|
1831
|
+
end
|
1832
|
+
|
1833
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1834
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1835
|
+
|
1836
|
+
options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout,
|
1837
|
+
metadata: metadata,
|
1838
|
+
retry_policy: @config.rpcs.delete_api_spec.retry_policy
|
1839
|
+
|
1840
|
+
options.apply_defaults timeout: @config.timeout,
|
1841
|
+
metadata: @config.metadata,
|
1842
|
+
retry_policy: @config.retry_policy
|
1843
|
+
|
1844
|
+
@registry_stub.call_rpc :delete_api_spec, request, options: options do |response, operation|
|
1845
|
+
yield response, operation if block_given?
|
1846
|
+
return response
|
1847
|
+
end
|
1848
|
+
rescue ::GRPC::BadStatus => e
|
1849
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
##
|
1853
|
+
# TagApiSpecRevision adds a tag to a specified revision of a spec.
|
1854
|
+
#
|
1855
|
+
# @overload tag_api_spec_revision(request, options = nil)
|
1856
|
+
# Pass arguments to `tag_api_spec_revision` via a request object, either of type
|
1857
|
+
# {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash.
|
1858
|
+
#
|
1859
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash]
|
1860
|
+
# A request object representing the call parameters. Required. To specify no
|
1861
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1862
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1863
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1864
|
+
#
|
1865
|
+
# @overload tag_api_spec_revision(name: nil, tag: nil)
|
1866
|
+
# Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at
|
1867
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1868
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1869
|
+
#
|
1870
|
+
# @param name [::String]
|
1871
|
+
# Required. The name of the spec to be tagged, including the revision ID.
|
1872
|
+
# @param tag [::String]
|
1873
|
+
# Required. The tag to apply.
|
1874
|
+
# The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
|
1875
|
+
#
|
1876
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1877
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1878
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1879
|
+
#
|
1880
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
1881
|
+
#
|
1882
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1883
|
+
#
|
1884
|
+
# @example Basic example
|
1885
|
+
# require "google/cloud/apigee_registry/v1"
|
1886
|
+
#
|
1887
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1888
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1889
|
+
#
|
1890
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1891
|
+
# request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new
|
1892
|
+
#
|
1893
|
+
# # Call the tag_api_spec_revision method.
|
1894
|
+
# result = client.tag_api_spec_revision request
|
1895
|
+
#
|
1896
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
1897
|
+
# p result
|
1898
|
+
#
|
1899
|
+
def tag_api_spec_revision request, options = nil
|
1900
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1901
|
+
|
1902
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest
|
1903
|
+
|
1904
|
+
# Converts hash and nil to an options object
|
1905
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1906
|
+
|
1907
|
+
# Customize the options with defaults
|
1908
|
+
metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h
|
1909
|
+
|
1910
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1911
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1912
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1913
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
1914
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1915
|
+
|
1916
|
+
header_params = {}
|
1917
|
+
if request.name
|
1918
|
+
header_params["name"] = request.name
|
1919
|
+
end
|
1920
|
+
|
1921
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1922
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1923
|
+
|
1924
|
+
options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout,
|
1925
|
+
metadata: metadata,
|
1926
|
+
retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy
|
1927
|
+
|
1928
|
+
options.apply_defaults timeout: @config.timeout,
|
1929
|
+
metadata: @config.metadata,
|
1930
|
+
retry_policy: @config.retry_policy
|
1931
|
+
|
1932
|
+
@registry_stub.call_rpc :tag_api_spec_revision, request, options: options do |response, operation|
|
1933
|
+
yield response, operation if block_given?
|
1934
|
+
return response
|
1935
|
+
end
|
1936
|
+
rescue ::GRPC::BadStatus => e
|
1937
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1938
|
+
end
|
1939
|
+
|
1940
|
+
##
|
1941
|
+
# ListApiSpecRevisions lists all revisions of a spec.
|
1942
|
+
# Revisions are returned in descending order of revision creation time.
|
1943
|
+
#
|
1944
|
+
# @overload list_api_spec_revisions(request, options = nil)
|
1945
|
+
# Pass arguments to `list_api_spec_revisions` via a request object, either of type
|
1946
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash.
|
1947
|
+
#
|
1948
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash]
|
1949
|
+
# A request object representing the call parameters. Required. To specify no
|
1950
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1951
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1952
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1953
|
+
#
|
1954
|
+
# @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil)
|
1955
|
+
# Pass arguments to `list_api_spec_revisions` via keyword arguments. Note that at
|
1956
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1957
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1958
|
+
#
|
1959
|
+
# @param name [::String]
|
1960
|
+
# Required. The name of the spec to list revisions for.
|
1961
|
+
# @param page_size [::Integer]
|
1962
|
+
# The maximum number of revisions to return per page.
|
1963
|
+
# @param page_token [::String]
|
1964
|
+
# The page token, received from a previous ListApiSpecRevisions call.
|
1965
|
+
# Provide this to retrieve the subsequent page.
|
1966
|
+
#
|
1967
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1968
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>]
|
1969
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1970
|
+
#
|
1971
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>]
|
1972
|
+
#
|
1973
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1974
|
+
#
|
1975
|
+
# @example Basic example
|
1976
|
+
# require "google/cloud/apigee_registry/v1"
|
1977
|
+
#
|
1978
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1979
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
1980
|
+
#
|
1981
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1982
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new
|
1983
|
+
#
|
1984
|
+
# # Call the list_api_spec_revisions method.
|
1985
|
+
# result = client.list_api_spec_revisions request
|
1986
|
+
#
|
1987
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1988
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1989
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1990
|
+
# # methods are also available for managing paging directly.
|
1991
|
+
# result.each do |response|
|
1992
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
1993
|
+
# p response
|
1994
|
+
# end
|
1995
|
+
#
|
1996
|
+
def list_api_spec_revisions request, options = nil
|
1997
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1998
|
+
|
1999
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest
|
2000
|
+
|
2001
|
+
# Converts hash and nil to an options object
|
2002
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2003
|
+
|
2004
|
+
# Customize the options with defaults
|
2005
|
+
metadata = @config.rpcs.list_api_spec_revisions.metadata.to_h
|
2006
|
+
|
2007
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2008
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2009
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2010
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2011
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2012
|
+
|
2013
|
+
header_params = {}
|
2014
|
+
if request.name
|
2015
|
+
header_params["name"] = request.name
|
2016
|
+
end
|
2017
|
+
|
2018
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2019
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2020
|
+
|
2021
|
+
options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout,
|
2022
|
+
metadata: metadata,
|
2023
|
+
retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy
|
2024
|
+
|
2025
|
+
options.apply_defaults timeout: @config.timeout,
|
2026
|
+
metadata: @config.metadata,
|
2027
|
+
retry_policy: @config.retry_policy
|
2028
|
+
|
2029
|
+
@registry_stub.call_rpc :list_api_spec_revisions, request, options: options do |response, operation|
|
2030
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_spec_revisions, request, response, operation, options
|
2031
|
+
yield response, operation if block_given?
|
2032
|
+
return response
|
2033
|
+
end
|
2034
|
+
rescue ::GRPC::BadStatus => e
|
2035
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2036
|
+
end
|
2037
|
+
|
2038
|
+
##
|
2039
|
+
# RollbackApiSpec sets the current revision to a specified prior revision.
|
2040
|
+
# Note that this creates a new revision with a new revision ID.
|
2041
|
+
#
|
2042
|
+
# @overload rollback_api_spec(request, options = nil)
|
2043
|
+
# Pass arguments to `rollback_api_spec` via a request object, either of type
|
2044
|
+
# {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash.
|
2045
|
+
#
|
2046
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash]
|
2047
|
+
# A request object representing the call parameters. Required. To specify no
|
2048
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2049
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2050
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2051
|
+
#
|
2052
|
+
# @overload rollback_api_spec(name: nil, revision_id: nil)
|
2053
|
+
# Pass arguments to `rollback_api_spec` via keyword arguments. Note that at
|
2054
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2055
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2056
|
+
#
|
2057
|
+
# @param name [::String]
|
2058
|
+
# Required. The spec being rolled back.
|
2059
|
+
# @param revision_id [::String]
|
2060
|
+
# Required. The revision ID to roll back to.
|
2061
|
+
# It must be a revision of the same spec.
|
2062
|
+
#
|
2063
|
+
# Example: c7cfa2a8
|
2064
|
+
#
|
2065
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2066
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
2067
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2068
|
+
#
|
2069
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
2070
|
+
#
|
2071
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2072
|
+
#
|
2073
|
+
# @example Basic example
|
2074
|
+
# require "google/cloud/apigee_registry/v1"
|
2075
|
+
#
|
2076
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2077
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2078
|
+
#
|
2079
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2080
|
+
# request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new
|
2081
|
+
#
|
2082
|
+
# # Call the rollback_api_spec method.
|
2083
|
+
# result = client.rollback_api_spec request
|
2084
|
+
#
|
2085
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
2086
|
+
# p result
|
2087
|
+
#
|
2088
|
+
def rollback_api_spec request, options = nil
|
2089
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2090
|
+
|
2091
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest
|
2092
|
+
|
2093
|
+
# Converts hash and nil to an options object
|
2094
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2095
|
+
|
2096
|
+
# Customize the options with defaults
|
2097
|
+
metadata = @config.rpcs.rollback_api_spec.metadata.to_h
|
2098
|
+
|
2099
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2100
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2101
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2102
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2103
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2104
|
+
|
2105
|
+
header_params = {}
|
2106
|
+
if request.name
|
2107
|
+
header_params["name"] = request.name
|
2108
|
+
end
|
2109
|
+
|
2110
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2111
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2112
|
+
|
2113
|
+
options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout,
|
2114
|
+
metadata: metadata,
|
2115
|
+
retry_policy: @config.rpcs.rollback_api_spec.retry_policy
|
2116
|
+
|
2117
|
+
options.apply_defaults timeout: @config.timeout,
|
2118
|
+
metadata: @config.metadata,
|
2119
|
+
retry_policy: @config.retry_policy
|
2120
|
+
|
2121
|
+
@registry_stub.call_rpc :rollback_api_spec, request, options: options do |response, operation|
|
2122
|
+
yield response, operation if block_given?
|
2123
|
+
return response
|
2124
|
+
end
|
2125
|
+
rescue ::GRPC::BadStatus => e
|
2126
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2127
|
+
end
|
2128
|
+
|
2129
|
+
##
|
2130
|
+
# DeleteApiSpecRevision deletes a revision of a spec.
|
2131
|
+
#
|
2132
|
+
# @overload delete_api_spec_revision(request, options = nil)
|
2133
|
+
# Pass arguments to `delete_api_spec_revision` via a request object, either of type
|
2134
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash.
|
2135
|
+
#
|
2136
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash]
|
2137
|
+
# A request object representing the call parameters. Required. To specify no
|
2138
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2139
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2140
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2141
|
+
#
|
2142
|
+
# @overload delete_api_spec_revision(name: nil)
|
2143
|
+
# Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at
|
2144
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2145
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2146
|
+
#
|
2147
|
+
# @param name [::String]
|
2148
|
+
# Required. The name of the spec revision to be deleted,
|
2149
|
+
# with a revision ID explicitly included.
|
2150
|
+
#
|
2151
|
+
# Example:
|
2152
|
+
# projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8
|
2153
|
+
#
|
2154
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2155
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
2156
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2157
|
+
#
|
2158
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec]
|
2159
|
+
#
|
2160
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2161
|
+
#
|
2162
|
+
# @example Basic example
|
2163
|
+
# require "google/cloud/apigee_registry/v1"
|
2164
|
+
#
|
2165
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2166
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2167
|
+
#
|
2168
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2169
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new
|
2170
|
+
#
|
2171
|
+
# # Call the delete_api_spec_revision method.
|
2172
|
+
# result = client.delete_api_spec_revision request
|
2173
|
+
#
|
2174
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec.
|
2175
|
+
# p result
|
2176
|
+
#
|
2177
|
+
def delete_api_spec_revision request, options = nil
|
2178
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2179
|
+
|
2180
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest
|
2181
|
+
|
2182
|
+
# Converts hash and nil to an options object
|
2183
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2184
|
+
|
2185
|
+
# Customize the options with defaults
|
2186
|
+
metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h
|
2187
|
+
|
2188
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2189
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2190
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2191
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2192
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2193
|
+
|
2194
|
+
header_params = {}
|
2195
|
+
if request.name
|
2196
|
+
header_params["name"] = request.name
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2200
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2201
|
+
|
2202
|
+
options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout,
|
2203
|
+
metadata: metadata,
|
2204
|
+
retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy
|
2205
|
+
|
2206
|
+
options.apply_defaults timeout: @config.timeout,
|
2207
|
+
metadata: @config.metadata,
|
2208
|
+
retry_policy: @config.retry_policy
|
2209
|
+
|
2210
|
+
@registry_stub.call_rpc :delete_api_spec_revision, request, options: options do |response, operation|
|
2211
|
+
yield response, operation if block_given?
|
2212
|
+
return response
|
2213
|
+
end
|
2214
|
+
rescue ::GRPC::BadStatus => e
|
2215
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2216
|
+
end
|
2217
|
+
|
2218
|
+
##
|
2219
|
+
# ListApiDeployments returns matching deployments.
|
2220
|
+
#
|
2221
|
+
# @overload list_api_deployments(request, options = nil)
|
2222
|
+
# Pass arguments to `list_api_deployments` via a request object, either of type
|
2223
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash.
|
2224
|
+
#
|
2225
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash]
|
2226
|
+
# A request object representing the call parameters. Required. To specify no
|
2227
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2228
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2229
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2230
|
+
#
|
2231
|
+
# @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
2232
|
+
# Pass arguments to `list_api_deployments` via keyword arguments. Note that at
|
2233
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2234
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2235
|
+
#
|
2236
|
+
# @param parent [::String]
|
2237
|
+
# Required. The parent, which owns this collection of deployments.
|
2238
|
+
# Format: projects/*/locations/*/apis/*
|
2239
|
+
# @param page_size [::Integer]
|
2240
|
+
# The maximum number of deployments to return.
|
2241
|
+
# The service may return fewer than this value.
|
2242
|
+
# If unspecified, at most 50 values will be returned.
|
2243
|
+
# The maximum is 1000; values above 1000 will be coerced to 1000.
|
2244
|
+
# @param page_token [::String]
|
2245
|
+
# A page token, received from a previous `ListApiDeployments` call.
|
2246
|
+
# Provide this to retrieve the subsequent page.
|
2247
|
+
#
|
2248
|
+
# When paginating, all other parameters provided to `ListApiDeployments` must
|
2249
|
+
# match the call that provided the page token.
|
2250
|
+
# @param filter [::String]
|
2251
|
+
# An expression that can be used to filter the list. Filters use the Common
|
2252
|
+
# Expression Language and can refer to all message fields.
|
2253
|
+
#
|
2254
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2255
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>]
|
2256
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2257
|
+
#
|
2258
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>]
|
2259
|
+
#
|
2260
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2261
|
+
#
|
2262
|
+
# @example Basic example
|
2263
|
+
# require "google/cloud/apigee_registry/v1"
|
2264
|
+
#
|
2265
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2266
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2267
|
+
#
|
2268
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2269
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new
|
2270
|
+
#
|
2271
|
+
# # Call the list_api_deployments method.
|
2272
|
+
# result = client.list_api_deployments request
|
2273
|
+
#
|
2274
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2275
|
+
# # iterate over all elements by calling #each, and the enumerable
|
2276
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
2277
|
+
# # methods are also available for managing paging directly.
|
2278
|
+
# result.each do |response|
|
2279
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2280
|
+
# p response
|
2281
|
+
# end
|
2282
|
+
#
|
2283
|
+
def list_api_deployments request, options = nil
|
2284
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2285
|
+
|
2286
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest
|
2287
|
+
|
2288
|
+
# Converts hash and nil to an options object
|
2289
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2290
|
+
|
2291
|
+
# Customize the options with defaults
|
2292
|
+
metadata = @config.rpcs.list_api_deployments.metadata.to_h
|
2293
|
+
|
2294
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2295
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2296
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2297
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2298
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2299
|
+
|
2300
|
+
header_params = {}
|
2301
|
+
if request.parent
|
2302
|
+
header_params["parent"] = request.parent
|
2303
|
+
end
|
2304
|
+
|
2305
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2306
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2307
|
+
|
2308
|
+
options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout,
|
2309
|
+
metadata: metadata,
|
2310
|
+
retry_policy: @config.rpcs.list_api_deployments.retry_policy
|
2311
|
+
|
2312
|
+
options.apply_defaults timeout: @config.timeout,
|
2313
|
+
metadata: @config.metadata,
|
2314
|
+
retry_policy: @config.retry_policy
|
2315
|
+
|
2316
|
+
@registry_stub.call_rpc :list_api_deployments, request, options: options do |response, operation|
|
2317
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployments, request, response, operation, options
|
2318
|
+
yield response, operation if block_given?
|
2319
|
+
return response
|
2320
|
+
end
|
2321
|
+
rescue ::GRPC::BadStatus => e
|
2322
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2323
|
+
end
|
2324
|
+
|
2325
|
+
##
|
2326
|
+
# GetApiDeployment returns a specified deployment.
|
2327
|
+
#
|
2328
|
+
# @overload get_api_deployment(request, options = nil)
|
2329
|
+
# Pass arguments to `get_api_deployment` via a request object, either of type
|
2330
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash.
|
2331
|
+
#
|
2332
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash]
|
2333
|
+
# A request object representing the call parameters. Required. To specify no
|
2334
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2335
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2336
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2337
|
+
#
|
2338
|
+
# @overload get_api_deployment(name: nil)
|
2339
|
+
# Pass arguments to `get_api_deployment` via keyword arguments. Note that at
|
2340
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2341
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2342
|
+
#
|
2343
|
+
# @param name [::String]
|
2344
|
+
# Required. The name of the deployment to retrieve.
|
2345
|
+
# Format: projects/*/locations/*/apis/*/deployments/*
|
2346
|
+
#
|
2347
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2348
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2349
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2350
|
+
#
|
2351
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2352
|
+
#
|
2353
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2354
|
+
#
|
2355
|
+
# @example Basic example
|
2356
|
+
# require "google/cloud/apigee_registry/v1"
|
2357
|
+
#
|
2358
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2359
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2360
|
+
#
|
2361
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2362
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new
|
2363
|
+
#
|
2364
|
+
# # Call the get_api_deployment method.
|
2365
|
+
# result = client.get_api_deployment request
|
2366
|
+
#
|
2367
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2368
|
+
# p result
|
2369
|
+
#
|
2370
|
+
def get_api_deployment request, options = nil
|
2371
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2372
|
+
|
2373
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest
|
2374
|
+
|
2375
|
+
# Converts hash and nil to an options object
|
2376
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2377
|
+
|
2378
|
+
# Customize the options with defaults
|
2379
|
+
metadata = @config.rpcs.get_api_deployment.metadata.to_h
|
2380
|
+
|
2381
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2382
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2383
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2384
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2385
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2386
|
+
|
2387
|
+
header_params = {}
|
2388
|
+
if request.name
|
2389
|
+
header_params["name"] = request.name
|
2390
|
+
end
|
2391
|
+
|
2392
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2393
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2394
|
+
|
2395
|
+
options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout,
|
2396
|
+
metadata: metadata,
|
2397
|
+
retry_policy: @config.rpcs.get_api_deployment.retry_policy
|
2398
|
+
|
2399
|
+
options.apply_defaults timeout: @config.timeout,
|
2400
|
+
metadata: @config.metadata,
|
2401
|
+
retry_policy: @config.retry_policy
|
2402
|
+
|
2403
|
+
@registry_stub.call_rpc :get_api_deployment, request, options: options do |response, operation|
|
2404
|
+
yield response, operation if block_given?
|
2405
|
+
return response
|
2406
|
+
end
|
2407
|
+
rescue ::GRPC::BadStatus => e
|
2408
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2409
|
+
end
|
2410
|
+
|
2411
|
+
##
|
2412
|
+
# CreateApiDeployment creates a specified deployment.
|
2413
|
+
#
|
2414
|
+
# @overload create_api_deployment(request, options = nil)
|
2415
|
+
# Pass arguments to `create_api_deployment` via a request object, either of type
|
2416
|
+
# {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash.
|
2417
|
+
#
|
2418
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash]
|
2419
|
+
# A request object representing the call parameters. Required. To specify no
|
2420
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2421
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2422
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2423
|
+
#
|
2424
|
+
# @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil)
|
2425
|
+
# Pass arguments to `create_api_deployment` via keyword arguments. Note that at
|
2426
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2427
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2428
|
+
#
|
2429
|
+
# @param parent [::String]
|
2430
|
+
# Required. The parent, which owns this collection of deployments.
|
2431
|
+
# Format: projects/*/locations/*/apis/*
|
2432
|
+
# @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash]
|
2433
|
+
# Required. The deployment to create.
|
2434
|
+
# @param api_deployment_id [::String]
|
2435
|
+
# Required. The ID to use for the deployment, which will become the final component of
|
2436
|
+
# the deployment's resource name.
|
2437
|
+
#
|
2438
|
+
# This value should be 4-63 characters, and valid characters
|
2439
|
+
# are /[a-z][0-9]-/.
|
2440
|
+
#
|
2441
|
+
# Following AIP-162, IDs must not have the form of a UUID.
|
2442
|
+
#
|
2443
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2444
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2445
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2446
|
+
#
|
2447
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2448
|
+
#
|
2449
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2450
|
+
#
|
2451
|
+
# @example Basic example
|
2452
|
+
# require "google/cloud/apigee_registry/v1"
|
2453
|
+
#
|
2454
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2455
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2456
|
+
#
|
2457
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2458
|
+
# request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new
|
2459
|
+
#
|
2460
|
+
# # Call the create_api_deployment method.
|
2461
|
+
# result = client.create_api_deployment request
|
2462
|
+
#
|
2463
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2464
|
+
# p result
|
2465
|
+
#
|
2466
|
+
def create_api_deployment request, options = nil
|
2467
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2468
|
+
|
2469
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest
|
2470
|
+
|
2471
|
+
# Converts hash and nil to an options object
|
2472
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2473
|
+
|
2474
|
+
# Customize the options with defaults
|
2475
|
+
metadata = @config.rpcs.create_api_deployment.metadata.to_h
|
2476
|
+
|
2477
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2478
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2479
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2480
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2481
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2482
|
+
|
2483
|
+
header_params = {}
|
2484
|
+
if request.parent
|
2485
|
+
header_params["parent"] = request.parent
|
2486
|
+
end
|
2487
|
+
|
2488
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2489
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2490
|
+
|
2491
|
+
options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout,
|
2492
|
+
metadata: metadata,
|
2493
|
+
retry_policy: @config.rpcs.create_api_deployment.retry_policy
|
2494
|
+
|
2495
|
+
options.apply_defaults timeout: @config.timeout,
|
2496
|
+
metadata: @config.metadata,
|
2497
|
+
retry_policy: @config.retry_policy
|
2498
|
+
|
2499
|
+
@registry_stub.call_rpc :create_api_deployment, request, options: options do |response, operation|
|
2500
|
+
yield response, operation if block_given?
|
2501
|
+
return response
|
2502
|
+
end
|
2503
|
+
rescue ::GRPC::BadStatus => e
|
2504
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2505
|
+
end
|
2506
|
+
|
2507
|
+
##
|
2508
|
+
# UpdateApiDeployment can be used to modify a specified deployment.
|
2509
|
+
#
|
2510
|
+
# @overload update_api_deployment(request, options = nil)
|
2511
|
+
# Pass arguments to `update_api_deployment` via a request object, either of type
|
2512
|
+
# {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash.
|
2513
|
+
#
|
2514
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash]
|
2515
|
+
# A request object representing the call parameters. Required. To specify no
|
2516
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2517
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2518
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2519
|
+
#
|
2520
|
+
# @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil)
|
2521
|
+
# Pass arguments to `update_api_deployment` via keyword arguments. Note that at
|
2522
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2523
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2524
|
+
#
|
2525
|
+
# @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash]
|
2526
|
+
# Required. The deployment to update.
|
2527
|
+
#
|
2528
|
+
# The `name` field is used to identify the deployment to update.
|
2529
|
+
# Format: projects/*/locations/*/apis/*/deployments/*
|
2530
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2531
|
+
# The list of fields to be updated. If omitted, all fields are updated that
|
2532
|
+
# are set in the request message (fields set to default values are ignored).
|
2533
|
+
# If a "*" is specified, all fields are updated, including fields that are
|
2534
|
+
# unspecified/default in the request.
|
2535
|
+
# @param allow_missing [::Boolean]
|
2536
|
+
# If set to true, and the deployment is not found, a new deployment will be
|
2537
|
+
# created. In this situation, `update_mask` is ignored.
|
2538
|
+
#
|
2539
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2540
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2541
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2542
|
+
#
|
2543
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2544
|
+
#
|
2545
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2546
|
+
#
|
2547
|
+
# @example Basic example
|
2548
|
+
# require "google/cloud/apigee_registry/v1"
|
2549
|
+
#
|
2550
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2551
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2552
|
+
#
|
2553
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2554
|
+
# request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new
|
2555
|
+
#
|
2556
|
+
# # Call the update_api_deployment method.
|
2557
|
+
# result = client.update_api_deployment request
|
2558
|
+
#
|
2559
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2560
|
+
# p result
|
2561
|
+
#
|
2562
|
+
def update_api_deployment request, options = nil
|
2563
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2564
|
+
|
2565
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest
|
2566
|
+
|
2567
|
+
# Converts hash and nil to an options object
|
2568
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2569
|
+
|
2570
|
+
# Customize the options with defaults
|
2571
|
+
metadata = @config.rpcs.update_api_deployment.metadata.to_h
|
2572
|
+
|
2573
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2574
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2575
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2576
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2577
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2578
|
+
|
2579
|
+
header_params = {}
|
2580
|
+
if request.api_deployment&.name
|
2581
|
+
header_params["api_deployment.name"] = request.api_deployment.name
|
2582
|
+
end
|
2583
|
+
|
2584
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2585
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2586
|
+
|
2587
|
+
options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout,
|
2588
|
+
metadata: metadata,
|
2589
|
+
retry_policy: @config.rpcs.update_api_deployment.retry_policy
|
2590
|
+
|
2591
|
+
options.apply_defaults timeout: @config.timeout,
|
2592
|
+
metadata: @config.metadata,
|
2593
|
+
retry_policy: @config.retry_policy
|
2594
|
+
|
2595
|
+
@registry_stub.call_rpc :update_api_deployment, request, options: options do |response, operation|
|
2596
|
+
yield response, operation if block_given?
|
2597
|
+
return response
|
2598
|
+
end
|
2599
|
+
rescue ::GRPC::BadStatus => e
|
2600
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2601
|
+
end
|
2602
|
+
|
2603
|
+
##
|
2604
|
+
# DeleteApiDeployment removes a specified deployment, all revisions, and all
|
2605
|
+
# child resources (e.g. artifacts).
|
2606
|
+
#
|
2607
|
+
# @overload delete_api_deployment(request, options = nil)
|
2608
|
+
# Pass arguments to `delete_api_deployment` via a request object, either of type
|
2609
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash.
|
2610
|
+
#
|
2611
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash]
|
2612
|
+
# A request object representing the call parameters. Required. To specify no
|
2613
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2614
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2615
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2616
|
+
#
|
2617
|
+
# @overload delete_api_deployment(name: nil, force: nil)
|
2618
|
+
# Pass arguments to `delete_api_deployment` via keyword arguments. Note that at
|
2619
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2620
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2621
|
+
#
|
2622
|
+
# @param name [::String]
|
2623
|
+
# Required. The name of the deployment to delete.
|
2624
|
+
# Format: projects/*/locations/*/apis/*/deployments/*
|
2625
|
+
# @param force [::Boolean]
|
2626
|
+
# If set to true, any child resources will also be deleted.
|
2627
|
+
# (Otherwise, the request will only work if there are no child resources.)
|
2628
|
+
#
|
2629
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2630
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
2631
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2632
|
+
#
|
2633
|
+
# @return [::Google::Protobuf::Empty]
|
2634
|
+
#
|
2635
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2636
|
+
#
|
2637
|
+
# @example Basic example
|
2638
|
+
# require "google/cloud/apigee_registry/v1"
|
2639
|
+
#
|
2640
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2641
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2642
|
+
#
|
2643
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2644
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new
|
2645
|
+
#
|
2646
|
+
# # Call the delete_api_deployment method.
|
2647
|
+
# result = client.delete_api_deployment request
|
2648
|
+
#
|
2649
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2650
|
+
# p result
|
2651
|
+
#
|
2652
|
+
def delete_api_deployment request, options = nil
|
2653
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2654
|
+
|
2655
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest
|
2656
|
+
|
2657
|
+
# Converts hash and nil to an options object
|
2658
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2659
|
+
|
2660
|
+
# Customize the options with defaults
|
2661
|
+
metadata = @config.rpcs.delete_api_deployment.metadata.to_h
|
2662
|
+
|
2663
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2664
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2665
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2666
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2667
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2668
|
+
|
2669
|
+
header_params = {}
|
2670
|
+
if request.name
|
2671
|
+
header_params["name"] = request.name
|
2672
|
+
end
|
2673
|
+
|
2674
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2675
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2676
|
+
|
2677
|
+
options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout,
|
2678
|
+
metadata: metadata,
|
2679
|
+
retry_policy: @config.rpcs.delete_api_deployment.retry_policy
|
2680
|
+
|
2681
|
+
options.apply_defaults timeout: @config.timeout,
|
2682
|
+
metadata: @config.metadata,
|
2683
|
+
retry_policy: @config.retry_policy
|
2684
|
+
|
2685
|
+
@registry_stub.call_rpc :delete_api_deployment, request, options: options do |response, operation|
|
2686
|
+
yield response, operation if block_given?
|
2687
|
+
return response
|
2688
|
+
end
|
2689
|
+
rescue ::GRPC::BadStatus => e
|
2690
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2691
|
+
end
|
2692
|
+
|
2693
|
+
##
|
2694
|
+
# TagApiDeploymentRevision adds a tag to a specified revision of a
|
2695
|
+
# deployment.
|
2696
|
+
#
|
2697
|
+
# @overload tag_api_deployment_revision(request, options = nil)
|
2698
|
+
# Pass arguments to `tag_api_deployment_revision` via a request object, either of type
|
2699
|
+
# {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash.
|
2700
|
+
#
|
2701
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash]
|
2702
|
+
# A request object representing the call parameters. Required. To specify no
|
2703
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2704
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2705
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2706
|
+
#
|
2707
|
+
# @overload tag_api_deployment_revision(name: nil, tag: nil)
|
2708
|
+
# Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at
|
2709
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2710
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2711
|
+
#
|
2712
|
+
# @param name [::String]
|
2713
|
+
# Required. The name of the deployment to be tagged, including the revision ID.
|
2714
|
+
# @param tag [::String]
|
2715
|
+
# Required. The tag to apply.
|
2716
|
+
# The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
|
2717
|
+
#
|
2718
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2719
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2720
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2721
|
+
#
|
2722
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2723
|
+
#
|
2724
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2725
|
+
#
|
2726
|
+
# @example Basic example
|
2727
|
+
# require "google/cloud/apigee_registry/v1"
|
2728
|
+
#
|
2729
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2730
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2731
|
+
#
|
2732
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2733
|
+
# request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new
|
2734
|
+
#
|
2735
|
+
# # Call the tag_api_deployment_revision method.
|
2736
|
+
# result = client.tag_api_deployment_revision request
|
2737
|
+
#
|
2738
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2739
|
+
# p result
|
2740
|
+
#
|
2741
|
+
def tag_api_deployment_revision request, options = nil
|
2742
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2743
|
+
|
2744
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest
|
2745
|
+
|
2746
|
+
# Converts hash and nil to an options object
|
2747
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2748
|
+
|
2749
|
+
# Customize the options with defaults
|
2750
|
+
metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h
|
2751
|
+
|
2752
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2753
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2754
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2755
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2756
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2757
|
+
|
2758
|
+
header_params = {}
|
2759
|
+
if request.name
|
2760
|
+
header_params["name"] = request.name
|
2761
|
+
end
|
2762
|
+
|
2763
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2764
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2765
|
+
|
2766
|
+
options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout,
|
2767
|
+
metadata: metadata,
|
2768
|
+
retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy
|
2769
|
+
|
2770
|
+
options.apply_defaults timeout: @config.timeout,
|
2771
|
+
metadata: @config.metadata,
|
2772
|
+
retry_policy: @config.retry_policy
|
2773
|
+
|
2774
|
+
@registry_stub.call_rpc :tag_api_deployment_revision, request, options: options do |response, operation|
|
2775
|
+
yield response, operation if block_given?
|
2776
|
+
return response
|
2777
|
+
end
|
2778
|
+
rescue ::GRPC::BadStatus => e
|
2779
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2780
|
+
end
|
2781
|
+
|
2782
|
+
##
|
2783
|
+
# ListApiDeploymentRevisions lists all revisions of a deployment.
|
2784
|
+
# Revisions are returned in descending order of revision creation time.
|
2785
|
+
#
|
2786
|
+
# @overload list_api_deployment_revisions(request, options = nil)
|
2787
|
+
# Pass arguments to `list_api_deployment_revisions` via a request object, either of type
|
2788
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash.
|
2789
|
+
#
|
2790
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash]
|
2791
|
+
# A request object representing the call parameters. Required. To specify no
|
2792
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2793
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2794
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2795
|
+
#
|
2796
|
+
# @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil)
|
2797
|
+
# Pass arguments to `list_api_deployment_revisions` via keyword arguments. Note that at
|
2798
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2799
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2800
|
+
#
|
2801
|
+
# @param name [::String]
|
2802
|
+
# Required. The name of the deployment to list revisions for.
|
2803
|
+
# @param page_size [::Integer]
|
2804
|
+
# The maximum number of revisions to return per page.
|
2805
|
+
# @param page_token [::String]
|
2806
|
+
# The page token, received from a previous ListApiDeploymentRevisions call.
|
2807
|
+
# Provide this to retrieve the subsequent page.
|
2808
|
+
#
|
2809
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2810
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>]
|
2811
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2812
|
+
#
|
2813
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>]
|
2814
|
+
#
|
2815
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2816
|
+
#
|
2817
|
+
# @example Basic example
|
2818
|
+
# require "google/cloud/apigee_registry/v1"
|
2819
|
+
#
|
2820
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2821
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2822
|
+
#
|
2823
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2824
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new
|
2825
|
+
#
|
2826
|
+
# # Call the list_api_deployment_revisions method.
|
2827
|
+
# result = client.list_api_deployment_revisions request
|
2828
|
+
#
|
2829
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2830
|
+
# # iterate over all elements by calling #each, and the enumerable
|
2831
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
2832
|
+
# # methods are also available for managing paging directly.
|
2833
|
+
# result.each do |response|
|
2834
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2835
|
+
# p response
|
2836
|
+
# end
|
2837
|
+
#
|
2838
|
+
def list_api_deployment_revisions request, options = nil
|
2839
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2840
|
+
|
2841
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest
|
2842
|
+
|
2843
|
+
# Converts hash and nil to an options object
|
2844
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2845
|
+
|
2846
|
+
# Customize the options with defaults
|
2847
|
+
metadata = @config.rpcs.list_api_deployment_revisions.metadata.to_h
|
2848
|
+
|
2849
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2850
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2851
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2852
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2853
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2854
|
+
|
2855
|
+
header_params = {}
|
2856
|
+
if request.name
|
2857
|
+
header_params["name"] = request.name
|
2858
|
+
end
|
2859
|
+
|
2860
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2861
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2862
|
+
|
2863
|
+
options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout,
|
2864
|
+
metadata: metadata,
|
2865
|
+
retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy
|
2866
|
+
|
2867
|
+
options.apply_defaults timeout: @config.timeout,
|
2868
|
+
metadata: @config.metadata,
|
2869
|
+
retry_policy: @config.retry_policy
|
2870
|
+
|
2871
|
+
@registry_stub.call_rpc :list_api_deployment_revisions, request, options: options do |response, operation|
|
2872
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployment_revisions, request, response, operation, options
|
2873
|
+
yield response, operation if block_given?
|
2874
|
+
return response
|
2875
|
+
end
|
2876
|
+
rescue ::GRPC::BadStatus => e
|
2877
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2878
|
+
end
|
2879
|
+
|
2880
|
+
##
|
2881
|
+
# RollbackApiDeployment sets the current revision to a specified prior
|
2882
|
+
# revision. Note that this creates a new revision with a new revision ID.
|
2883
|
+
#
|
2884
|
+
# @overload rollback_api_deployment(request, options = nil)
|
2885
|
+
# Pass arguments to `rollback_api_deployment` via a request object, either of type
|
2886
|
+
# {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash.
|
2887
|
+
#
|
2888
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash]
|
2889
|
+
# A request object representing the call parameters. Required. To specify no
|
2890
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2891
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2892
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2893
|
+
#
|
2894
|
+
# @overload rollback_api_deployment(name: nil, revision_id: nil)
|
2895
|
+
# Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at
|
2896
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2897
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2898
|
+
#
|
2899
|
+
# @param name [::String]
|
2900
|
+
# Required. The deployment being rolled back.
|
2901
|
+
# @param revision_id [::String]
|
2902
|
+
# Required. The revision ID to roll back to.
|
2903
|
+
# It must be a revision of the same deployment.
|
2904
|
+
#
|
2905
|
+
# Example: c7cfa2a8
|
2906
|
+
#
|
2907
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2908
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2909
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2910
|
+
#
|
2911
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2912
|
+
#
|
2913
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2914
|
+
#
|
2915
|
+
# @example Basic example
|
2916
|
+
# require "google/cloud/apigee_registry/v1"
|
2917
|
+
#
|
2918
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2919
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
2920
|
+
#
|
2921
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2922
|
+
# request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new
|
2923
|
+
#
|
2924
|
+
# # Call the rollback_api_deployment method.
|
2925
|
+
# result = client.rollback_api_deployment request
|
2926
|
+
#
|
2927
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
2928
|
+
# p result
|
2929
|
+
#
|
2930
|
+
def rollback_api_deployment request, options = nil
|
2931
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2932
|
+
|
2933
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest
|
2934
|
+
|
2935
|
+
# Converts hash and nil to an options object
|
2936
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2937
|
+
|
2938
|
+
# Customize the options with defaults
|
2939
|
+
metadata = @config.rpcs.rollback_api_deployment.metadata.to_h
|
2940
|
+
|
2941
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2942
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2943
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2944
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
2945
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2946
|
+
|
2947
|
+
header_params = {}
|
2948
|
+
if request.name
|
2949
|
+
header_params["name"] = request.name
|
2950
|
+
end
|
2951
|
+
|
2952
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2953
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2954
|
+
|
2955
|
+
options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout,
|
2956
|
+
metadata: metadata,
|
2957
|
+
retry_policy: @config.rpcs.rollback_api_deployment.retry_policy
|
2958
|
+
|
2959
|
+
options.apply_defaults timeout: @config.timeout,
|
2960
|
+
metadata: @config.metadata,
|
2961
|
+
retry_policy: @config.retry_policy
|
2962
|
+
|
2963
|
+
@registry_stub.call_rpc :rollback_api_deployment, request, options: options do |response, operation|
|
2964
|
+
yield response, operation if block_given?
|
2965
|
+
return response
|
2966
|
+
end
|
2967
|
+
rescue ::GRPC::BadStatus => e
|
2968
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2969
|
+
end
|
2970
|
+
|
2971
|
+
##
|
2972
|
+
# DeleteApiDeploymentRevision deletes a revision of a deployment.
|
2973
|
+
#
|
2974
|
+
# @overload delete_api_deployment_revision(request, options = nil)
|
2975
|
+
# Pass arguments to `delete_api_deployment_revision` via a request object, either of type
|
2976
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash.
|
2977
|
+
#
|
2978
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash]
|
2979
|
+
# A request object representing the call parameters. Required. To specify no
|
2980
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2981
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2982
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2983
|
+
#
|
2984
|
+
# @overload delete_api_deployment_revision(name: nil)
|
2985
|
+
# Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at
|
2986
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2987
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2988
|
+
#
|
2989
|
+
# @param name [::String]
|
2990
|
+
# Required. The name of the deployment revision to be deleted,
|
2991
|
+
# with a revision ID explicitly included.
|
2992
|
+
#
|
2993
|
+
# Example:
|
2994
|
+
# projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8
|
2995
|
+
#
|
2996
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2997
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
2998
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2999
|
+
#
|
3000
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment]
|
3001
|
+
#
|
3002
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3003
|
+
#
|
3004
|
+
# @example Basic example
|
3005
|
+
# require "google/cloud/apigee_registry/v1"
|
3006
|
+
#
|
3007
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3008
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3009
|
+
#
|
3010
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3011
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new
|
3012
|
+
#
|
3013
|
+
# # Call the delete_api_deployment_revision method.
|
3014
|
+
# result = client.delete_api_deployment_revision request
|
3015
|
+
#
|
3016
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment.
|
3017
|
+
# p result
|
3018
|
+
#
|
3019
|
+
def delete_api_deployment_revision request, options = nil
|
3020
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3021
|
+
|
3022
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest
|
3023
|
+
|
3024
|
+
# Converts hash and nil to an options object
|
3025
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3026
|
+
|
3027
|
+
# Customize the options with defaults
|
3028
|
+
metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h
|
3029
|
+
|
3030
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3031
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3032
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3033
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3034
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3035
|
+
|
3036
|
+
header_params = {}
|
3037
|
+
if request.name
|
3038
|
+
header_params["name"] = request.name
|
3039
|
+
end
|
3040
|
+
|
3041
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3042
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3043
|
+
|
3044
|
+
options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout,
|
3045
|
+
metadata: metadata,
|
3046
|
+
retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy
|
3047
|
+
|
3048
|
+
options.apply_defaults timeout: @config.timeout,
|
3049
|
+
metadata: @config.metadata,
|
3050
|
+
retry_policy: @config.retry_policy
|
3051
|
+
|
3052
|
+
@registry_stub.call_rpc :delete_api_deployment_revision, request, options: options do |response, operation|
|
3053
|
+
yield response, operation if block_given?
|
3054
|
+
return response
|
3055
|
+
end
|
3056
|
+
rescue ::GRPC::BadStatus => e
|
3057
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3058
|
+
end
|
3059
|
+
|
3060
|
+
##
|
3061
|
+
# ListArtifacts returns matching artifacts.
|
3062
|
+
#
|
3063
|
+
# @overload list_artifacts(request, options = nil)
|
3064
|
+
# Pass arguments to `list_artifacts` via a request object, either of type
|
3065
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash.
|
3066
|
+
#
|
3067
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash]
|
3068
|
+
# A request object representing the call parameters. Required. To specify no
|
3069
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3070
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3071
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3072
|
+
#
|
3073
|
+
# @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
3074
|
+
# Pass arguments to `list_artifacts` via keyword arguments. Note that at
|
3075
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3076
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3077
|
+
#
|
3078
|
+
# @param parent [::String]
|
3079
|
+
# Required. The parent, which owns this collection of artifacts.
|
3080
|
+
# Format: \\{parent}
|
3081
|
+
# @param page_size [::Integer]
|
3082
|
+
# The maximum number of artifacts to return.
|
3083
|
+
# The service may return fewer than this value.
|
3084
|
+
# If unspecified, at most 50 values will be returned.
|
3085
|
+
# The maximum is 1000; values above 1000 will be coerced to 1000.
|
3086
|
+
# @param page_token [::String]
|
3087
|
+
# A page token, received from a previous `ListArtifacts` call.
|
3088
|
+
# Provide this to retrieve the subsequent page.
|
3089
|
+
#
|
3090
|
+
# When paginating, all other parameters provided to `ListArtifacts` must
|
3091
|
+
# match the call that provided the page token.
|
3092
|
+
# @param filter [::String]
|
3093
|
+
# An expression that can be used to filter the list. Filters use the Common
|
3094
|
+
# Expression Language and can refer to all message fields except contents.
|
3095
|
+
#
|
3096
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3097
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>]
|
3098
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3099
|
+
#
|
3100
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>]
|
3101
|
+
#
|
3102
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3103
|
+
#
|
3104
|
+
# @example Basic example
|
3105
|
+
# require "google/cloud/apigee_registry/v1"
|
3106
|
+
#
|
3107
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3108
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3109
|
+
#
|
3110
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3111
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new
|
3112
|
+
#
|
3113
|
+
# # Call the list_artifacts method.
|
3114
|
+
# result = client.list_artifacts request
|
3115
|
+
#
|
3116
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3117
|
+
# # iterate over all elements by calling #each, and the enumerable
|
3118
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
3119
|
+
# # methods are also available for managing paging directly.
|
3120
|
+
# result.each do |response|
|
3121
|
+
# # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact.
|
3122
|
+
# p response
|
3123
|
+
# end
|
3124
|
+
#
|
3125
|
+
def list_artifacts request, options = nil
|
3126
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3127
|
+
|
3128
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest
|
3129
|
+
|
3130
|
+
# Converts hash and nil to an options object
|
3131
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3132
|
+
|
3133
|
+
# Customize the options with defaults
|
3134
|
+
metadata = @config.rpcs.list_artifacts.metadata.to_h
|
3135
|
+
|
3136
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3137
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3138
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3139
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3140
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3141
|
+
|
3142
|
+
header_params = {}
|
3143
|
+
if request.parent
|
3144
|
+
header_params["parent"] = request.parent
|
3145
|
+
end
|
3146
|
+
|
3147
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3148
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3149
|
+
|
3150
|
+
options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout,
|
3151
|
+
metadata: metadata,
|
3152
|
+
retry_policy: @config.rpcs.list_artifacts.retry_policy
|
3153
|
+
|
3154
|
+
options.apply_defaults timeout: @config.timeout,
|
3155
|
+
metadata: @config.metadata,
|
3156
|
+
retry_policy: @config.retry_policy
|
3157
|
+
|
3158
|
+
@registry_stub.call_rpc :list_artifacts, request, options: options do |response, operation|
|
3159
|
+
response = ::Gapic::PagedEnumerable.new @registry_stub, :list_artifacts, request, response, operation, options
|
3160
|
+
yield response, operation if block_given?
|
3161
|
+
return response
|
3162
|
+
end
|
3163
|
+
rescue ::GRPC::BadStatus => e
|
3164
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3165
|
+
end
|
3166
|
+
|
3167
|
+
##
|
3168
|
+
# GetArtifact returns a specified artifact.
|
3169
|
+
#
|
3170
|
+
# @overload get_artifact(request, options = nil)
|
3171
|
+
# Pass arguments to `get_artifact` via a request object, either of type
|
3172
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash.
|
3173
|
+
#
|
3174
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash]
|
3175
|
+
# A request object representing the call parameters. Required. To specify no
|
3176
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3177
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3178
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3179
|
+
#
|
3180
|
+
# @overload get_artifact(name: nil)
|
3181
|
+
# Pass arguments to `get_artifact` via keyword arguments. Note that at
|
3182
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3183
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3184
|
+
#
|
3185
|
+
# @param name [::String]
|
3186
|
+
# Required. The name of the artifact to retrieve.
|
3187
|
+
# Format: \\{parent}/artifacts/*
|
3188
|
+
#
|
3189
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3190
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact]
|
3191
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3192
|
+
#
|
3193
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::Artifact]
|
3194
|
+
#
|
3195
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3196
|
+
#
|
3197
|
+
# @example Basic example
|
3198
|
+
# require "google/cloud/apigee_registry/v1"
|
3199
|
+
#
|
3200
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3201
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3202
|
+
#
|
3203
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3204
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new
|
3205
|
+
#
|
3206
|
+
# # Call the get_artifact method.
|
3207
|
+
# result = client.get_artifact request
|
3208
|
+
#
|
3209
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact.
|
3210
|
+
# p result
|
3211
|
+
#
|
3212
|
+
def get_artifact request, options = nil
|
3213
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3214
|
+
|
3215
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest
|
3216
|
+
|
3217
|
+
# Converts hash and nil to an options object
|
3218
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3219
|
+
|
3220
|
+
# Customize the options with defaults
|
3221
|
+
metadata = @config.rpcs.get_artifact.metadata.to_h
|
3222
|
+
|
3223
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3224
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3225
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3226
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3227
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3228
|
+
|
3229
|
+
header_params = {}
|
3230
|
+
if request.name
|
3231
|
+
header_params["name"] = request.name
|
3232
|
+
end
|
3233
|
+
|
3234
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3235
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3236
|
+
|
3237
|
+
options.apply_defaults timeout: @config.rpcs.get_artifact.timeout,
|
3238
|
+
metadata: metadata,
|
3239
|
+
retry_policy: @config.rpcs.get_artifact.retry_policy
|
3240
|
+
|
3241
|
+
options.apply_defaults timeout: @config.timeout,
|
3242
|
+
metadata: @config.metadata,
|
3243
|
+
retry_policy: @config.retry_policy
|
3244
|
+
|
3245
|
+
@registry_stub.call_rpc :get_artifact, request, options: options do |response, operation|
|
3246
|
+
yield response, operation if block_given?
|
3247
|
+
return response
|
3248
|
+
end
|
3249
|
+
rescue ::GRPC::BadStatus => e
|
3250
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3251
|
+
end
|
3252
|
+
|
3253
|
+
##
|
3254
|
+
# GetArtifactContents returns the contents of a specified artifact.
|
3255
|
+
# If artifacts are stored with GZip compression, the default behavior
|
3256
|
+
# is to return the artifact uncompressed (the mime_type response field
|
3257
|
+
# indicates the exact format returned).
|
3258
|
+
#
|
3259
|
+
# @overload get_artifact_contents(request, options = nil)
|
3260
|
+
# Pass arguments to `get_artifact_contents` via a request object, either of type
|
3261
|
+
# {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash.
|
3262
|
+
#
|
3263
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash]
|
3264
|
+
# A request object representing the call parameters. Required. To specify no
|
3265
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3266
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3267
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3268
|
+
#
|
3269
|
+
# @overload get_artifact_contents(name: nil)
|
3270
|
+
# Pass arguments to `get_artifact_contents` via keyword arguments. Note that at
|
3271
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3272
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3273
|
+
#
|
3274
|
+
# @param name [::String]
|
3275
|
+
# Required. The name of the artifact whose contents should be retrieved.
|
3276
|
+
# Format: \\{parent}/artifacts/*
|
3277
|
+
#
|
3278
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3279
|
+
# @yieldparam response [::Google::Api::HttpBody]
|
3280
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3281
|
+
#
|
3282
|
+
# @return [::Google::Api::HttpBody]
|
3283
|
+
#
|
3284
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3285
|
+
#
|
3286
|
+
# @example Basic example
|
3287
|
+
# require "google/cloud/apigee_registry/v1"
|
3288
|
+
#
|
3289
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3290
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3291
|
+
#
|
3292
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3293
|
+
# request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new
|
3294
|
+
#
|
3295
|
+
# # Call the get_artifact_contents method.
|
3296
|
+
# result = client.get_artifact_contents request
|
3297
|
+
#
|
3298
|
+
# # The returned object is of type Google::Api::HttpBody.
|
3299
|
+
# p result
|
3300
|
+
#
|
3301
|
+
def get_artifact_contents request, options = nil
|
3302
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3303
|
+
|
3304
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest
|
3305
|
+
|
3306
|
+
# Converts hash and nil to an options object
|
3307
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3308
|
+
|
3309
|
+
# Customize the options with defaults
|
3310
|
+
metadata = @config.rpcs.get_artifact_contents.metadata.to_h
|
3311
|
+
|
3312
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3313
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3314
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3315
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3316
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3317
|
+
|
3318
|
+
header_params = {}
|
3319
|
+
if request.name
|
3320
|
+
header_params["name"] = request.name
|
3321
|
+
end
|
3322
|
+
|
3323
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3324
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3325
|
+
|
3326
|
+
options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout,
|
3327
|
+
metadata: metadata,
|
3328
|
+
retry_policy: @config.rpcs.get_artifact_contents.retry_policy
|
3329
|
+
|
3330
|
+
options.apply_defaults timeout: @config.timeout,
|
3331
|
+
metadata: @config.metadata,
|
3332
|
+
retry_policy: @config.retry_policy
|
3333
|
+
|
3334
|
+
@registry_stub.call_rpc :get_artifact_contents, request, options: options do |response, operation|
|
3335
|
+
yield response, operation if block_given?
|
3336
|
+
return response
|
3337
|
+
end
|
3338
|
+
rescue ::GRPC::BadStatus => e
|
3339
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3340
|
+
end
|
3341
|
+
|
3342
|
+
##
|
3343
|
+
# CreateArtifact creates a specified artifact.
|
3344
|
+
#
|
3345
|
+
# @overload create_artifact(request, options = nil)
|
3346
|
+
# Pass arguments to `create_artifact` via a request object, either of type
|
3347
|
+
# {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash.
|
3348
|
+
#
|
3349
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash]
|
3350
|
+
# A request object representing the call parameters. Required. To specify no
|
3351
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3352
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3353
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3354
|
+
#
|
3355
|
+
# @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil)
|
3356
|
+
# Pass arguments to `create_artifact` via keyword arguments. Note that at
|
3357
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3358
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3359
|
+
#
|
3360
|
+
# @param parent [::String]
|
3361
|
+
# Required. The parent, which owns this collection of artifacts.
|
3362
|
+
# Format: \\{parent}
|
3363
|
+
# @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash]
|
3364
|
+
# Required. The artifact to create.
|
3365
|
+
# @param artifact_id [::String]
|
3366
|
+
# Required. The ID to use for the artifact, which will become the final component of
|
3367
|
+
# the artifact's resource name.
|
3368
|
+
#
|
3369
|
+
# This value should be 4-63 characters, and valid characters
|
3370
|
+
# are /[a-z][0-9]-/.
|
3371
|
+
#
|
3372
|
+
# Following AIP-162, IDs must not have the form of a UUID.
|
3373
|
+
#
|
3374
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3375
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact]
|
3376
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3377
|
+
#
|
3378
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::Artifact]
|
3379
|
+
#
|
3380
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3381
|
+
#
|
3382
|
+
# @example Basic example
|
3383
|
+
# require "google/cloud/apigee_registry/v1"
|
3384
|
+
#
|
3385
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3386
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3387
|
+
#
|
3388
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3389
|
+
# request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new
|
3390
|
+
#
|
3391
|
+
# # Call the create_artifact method.
|
3392
|
+
# result = client.create_artifact request
|
3393
|
+
#
|
3394
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact.
|
3395
|
+
# p result
|
3396
|
+
#
|
3397
|
+
def create_artifact request, options = nil
|
3398
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3399
|
+
|
3400
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest
|
3401
|
+
|
3402
|
+
# Converts hash and nil to an options object
|
3403
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3404
|
+
|
3405
|
+
# Customize the options with defaults
|
3406
|
+
metadata = @config.rpcs.create_artifact.metadata.to_h
|
3407
|
+
|
3408
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3409
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3410
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3411
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3412
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3413
|
+
|
3414
|
+
header_params = {}
|
3415
|
+
if request.parent
|
3416
|
+
header_params["parent"] = request.parent
|
3417
|
+
end
|
3418
|
+
|
3419
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3420
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3421
|
+
|
3422
|
+
options.apply_defaults timeout: @config.rpcs.create_artifact.timeout,
|
3423
|
+
metadata: metadata,
|
3424
|
+
retry_policy: @config.rpcs.create_artifact.retry_policy
|
3425
|
+
|
3426
|
+
options.apply_defaults timeout: @config.timeout,
|
3427
|
+
metadata: @config.metadata,
|
3428
|
+
retry_policy: @config.retry_policy
|
3429
|
+
|
3430
|
+
@registry_stub.call_rpc :create_artifact, request, options: options do |response, operation|
|
3431
|
+
yield response, operation if block_given?
|
3432
|
+
return response
|
3433
|
+
end
|
3434
|
+
rescue ::GRPC::BadStatus => e
|
3435
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3436
|
+
end
|
3437
|
+
|
3438
|
+
##
|
3439
|
+
# ReplaceArtifact can be used to replace a specified artifact.
|
3440
|
+
#
|
3441
|
+
# @overload replace_artifact(request, options = nil)
|
3442
|
+
# Pass arguments to `replace_artifact` via a request object, either of type
|
3443
|
+
# {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash.
|
3444
|
+
#
|
3445
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash]
|
3446
|
+
# A request object representing the call parameters. Required. To specify no
|
3447
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3448
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3449
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3450
|
+
#
|
3451
|
+
# @overload replace_artifact(artifact: nil)
|
3452
|
+
# Pass arguments to `replace_artifact` via keyword arguments. Note that at
|
3453
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3454
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3455
|
+
#
|
3456
|
+
# @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash]
|
3457
|
+
# Required. The artifact to replace.
|
3458
|
+
#
|
3459
|
+
# The `name` field is used to identify the artifact to replace.
|
3460
|
+
# Format: \\{parent}/artifacts/*
|
3461
|
+
#
|
3462
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3463
|
+
# @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact]
|
3464
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3465
|
+
#
|
3466
|
+
# @return [::Google::Cloud::ApigeeRegistry::V1::Artifact]
|
3467
|
+
#
|
3468
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3469
|
+
#
|
3470
|
+
# @example Basic example
|
3471
|
+
# require "google/cloud/apigee_registry/v1"
|
3472
|
+
#
|
3473
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3474
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3475
|
+
#
|
3476
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3477
|
+
# request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new
|
3478
|
+
#
|
3479
|
+
# # Call the replace_artifact method.
|
3480
|
+
# result = client.replace_artifact request
|
3481
|
+
#
|
3482
|
+
# # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact.
|
3483
|
+
# p result
|
3484
|
+
#
|
3485
|
+
def replace_artifact request, options = nil
|
3486
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3487
|
+
|
3488
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest
|
3489
|
+
|
3490
|
+
# Converts hash and nil to an options object
|
3491
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3492
|
+
|
3493
|
+
# Customize the options with defaults
|
3494
|
+
metadata = @config.rpcs.replace_artifact.metadata.to_h
|
3495
|
+
|
3496
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3497
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3498
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3499
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3500
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3501
|
+
|
3502
|
+
header_params = {}
|
3503
|
+
if request.artifact&.name
|
3504
|
+
header_params["artifact.name"] = request.artifact.name
|
3505
|
+
end
|
3506
|
+
|
3507
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3508
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3509
|
+
|
3510
|
+
options.apply_defaults timeout: @config.rpcs.replace_artifact.timeout,
|
3511
|
+
metadata: metadata,
|
3512
|
+
retry_policy: @config.rpcs.replace_artifact.retry_policy
|
3513
|
+
|
3514
|
+
options.apply_defaults timeout: @config.timeout,
|
3515
|
+
metadata: @config.metadata,
|
3516
|
+
retry_policy: @config.retry_policy
|
3517
|
+
|
3518
|
+
@registry_stub.call_rpc :replace_artifact, request, options: options do |response, operation|
|
3519
|
+
yield response, operation if block_given?
|
3520
|
+
return response
|
3521
|
+
end
|
3522
|
+
rescue ::GRPC::BadStatus => e
|
3523
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3524
|
+
end
|
3525
|
+
|
3526
|
+
##
|
3527
|
+
# DeleteArtifact removes a specified artifact.
|
3528
|
+
#
|
3529
|
+
# @overload delete_artifact(request, options = nil)
|
3530
|
+
# Pass arguments to `delete_artifact` via a request object, either of type
|
3531
|
+
# {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash.
|
3532
|
+
#
|
3533
|
+
# @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash]
|
3534
|
+
# A request object representing the call parameters. Required. To specify no
|
3535
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3536
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3537
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3538
|
+
#
|
3539
|
+
# @overload delete_artifact(name: nil)
|
3540
|
+
# Pass arguments to `delete_artifact` via keyword arguments. Note that at
|
3541
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3542
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3543
|
+
#
|
3544
|
+
# @param name [::String]
|
3545
|
+
# Required. The name of the artifact to delete.
|
3546
|
+
# Format: \\{parent}/artifacts/*
|
3547
|
+
#
|
3548
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3549
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
3550
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3551
|
+
#
|
3552
|
+
# @return [::Google::Protobuf::Empty]
|
3553
|
+
#
|
3554
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3555
|
+
#
|
3556
|
+
# @example Basic example
|
3557
|
+
# require "google/cloud/apigee_registry/v1"
|
3558
|
+
#
|
3559
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3560
|
+
# client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new
|
3561
|
+
#
|
3562
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3563
|
+
# request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new
|
3564
|
+
#
|
3565
|
+
# # Call the delete_artifact method.
|
3566
|
+
# result = client.delete_artifact request
|
3567
|
+
#
|
3568
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3569
|
+
# p result
|
3570
|
+
#
|
3571
|
+
def delete_artifact request, options = nil
|
3572
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3573
|
+
|
3574
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest
|
3575
|
+
|
3576
|
+
# Converts hash and nil to an options object
|
3577
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3578
|
+
|
3579
|
+
# Customize the options with defaults
|
3580
|
+
metadata = @config.rpcs.delete_artifact.metadata.to_h
|
3581
|
+
|
3582
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3583
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3584
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3585
|
+
gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION
|
3586
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3587
|
+
|
3588
|
+
header_params = {}
|
3589
|
+
if request.name
|
3590
|
+
header_params["name"] = request.name
|
3591
|
+
end
|
3592
|
+
|
3593
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3594
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3595
|
+
|
3596
|
+
options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout,
|
3597
|
+
metadata: metadata,
|
3598
|
+
retry_policy: @config.rpcs.delete_artifact.retry_policy
|
3599
|
+
|
3600
|
+
options.apply_defaults timeout: @config.timeout,
|
3601
|
+
metadata: @config.metadata,
|
3602
|
+
retry_policy: @config.retry_policy
|
3603
|
+
|
3604
|
+
@registry_stub.call_rpc :delete_artifact, request, options: options do |response, operation|
|
3605
|
+
yield response, operation if block_given?
|
3606
|
+
return response
|
3607
|
+
end
|
3608
|
+
rescue ::GRPC::BadStatus => e
|
3609
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3610
|
+
end
|
3611
|
+
|
3612
|
+
##
|
3613
|
+
# Configuration class for the Registry API.
|
3614
|
+
#
|
3615
|
+
# This class represents the configuration for Registry,
|
3616
|
+
# providing control over timeouts, retry behavior, logging, transport
|
3617
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
3618
|
+
# applied individually to specific RPCs. See
|
3619
|
+
# {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration::Rpcs}
|
3620
|
+
# for a list of RPCs that can be configured independently.
|
3621
|
+
#
|
3622
|
+
# Configuration can be applied globally to all clients, or to a single client
|
3623
|
+
# on construction.
|
3624
|
+
#
|
3625
|
+
# @example
|
3626
|
+
#
|
3627
|
+
# # Modify the global config, setting the timeout for
|
3628
|
+
# # list_apis to 20 seconds,
|
3629
|
+
# # and all remaining timeouts to 10 seconds.
|
3630
|
+
# ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config|
|
3631
|
+
# config.timeout = 10.0
|
3632
|
+
# config.rpcs.list_apis.timeout = 20.0
|
3633
|
+
# end
|
3634
|
+
#
|
3635
|
+
# # Apply the above configuration only to a new client.
|
3636
|
+
# client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config|
|
3637
|
+
# config.timeout = 10.0
|
3638
|
+
# config.rpcs.list_apis.timeout = 20.0
|
3639
|
+
# end
|
3640
|
+
#
|
3641
|
+
# @!attribute [rw] endpoint
|
3642
|
+
# The hostname or hostname:port of the service endpoint.
|
3643
|
+
# Defaults to `"apigeeregistry.googleapis.com"`.
|
3644
|
+
# @return [::String]
|
3645
|
+
# @!attribute [rw] credentials
|
3646
|
+
# Credentials to send with calls. You may provide any of the following types:
|
3647
|
+
# * (`String`) The path to a service account key file in JSON format
|
3648
|
+
# * (`Hash`) A service account key as a Hash
|
3649
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3650
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
3651
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3652
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
3653
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3654
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3655
|
+
# * (`nil`) indicating no credentials
|
3656
|
+
# @return [::Object]
|
3657
|
+
# @!attribute [rw] scope
|
3658
|
+
# The OAuth scopes
|
3659
|
+
# @return [::Array<::String>]
|
3660
|
+
# @!attribute [rw] lib_name
|
3661
|
+
# The library name as recorded in instrumentation and logging
|
3662
|
+
# @return [::String]
|
3663
|
+
# @!attribute [rw] lib_version
|
3664
|
+
# The library version as recorded in instrumentation and logging
|
3665
|
+
# @return [::String]
|
3666
|
+
# @!attribute [rw] channel_args
|
3667
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
3668
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
3669
|
+
# @return [::Hash]
|
3670
|
+
# @!attribute [rw] interceptors
|
3671
|
+
# An array of interceptors that are run before calls are executed.
|
3672
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
3673
|
+
# @!attribute [rw] timeout
|
3674
|
+
# The call timeout in seconds.
|
3675
|
+
# @return [::Numeric]
|
3676
|
+
# @!attribute [rw] metadata
|
3677
|
+
# Additional gRPC headers to be sent with the call.
|
3678
|
+
# @return [::Hash{::Symbol=>::String}]
|
3679
|
+
# @!attribute [rw] retry_policy
|
3680
|
+
# The retry policy. The value is a hash with the following keys:
|
3681
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3682
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3683
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3684
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3685
|
+
# trigger a retry.
|
3686
|
+
# @return [::Hash]
|
3687
|
+
# @!attribute [rw] quota_project
|
3688
|
+
# A separate project against which to charge quota.
|
3689
|
+
# @return [::String]
|
3690
|
+
#
|
3691
|
+
class Configuration
|
3692
|
+
extend ::Gapic::Config
|
3693
|
+
|
3694
|
+
config_attr :endpoint, "apigeeregistry.googleapis.com", ::String
|
3695
|
+
config_attr :credentials, nil do |value|
|
3696
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3697
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
3698
|
+
allowed.any? { |klass| klass === value }
|
3699
|
+
end
|
3700
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
3701
|
+
config_attr :lib_name, nil, ::String, nil
|
3702
|
+
config_attr :lib_version, nil, ::String, nil
|
3703
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
3704
|
+
config_attr :interceptors, nil, ::Array, nil
|
3705
|
+
config_attr :timeout, nil, ::Numeric, nil
|
3706
|
+
config_attr :metadata, nil, ::Hash, nil
|
3707
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3708
|
+
config_attr :quota_project, nil, ::String, nil
|
3709
|
+
|
3710
|
+
# @private
|
3711
|
+
def initialize parent_config = nil
|
3712
|
+
@parent_config = parent_config unless parent_config.nil?
|
3713
|
+
|
3714
|
+
yield self if block_given?
|
3715
|
+
end
|
3716
|
+
|
3717
|
+
##
|
3718
|
+
# Configurations for individual RPCs
|
3719
|
+
# @return [Rpcs]
|
3720
|
+
#
|
3721
|
+
def rpcs
|
3722
|
+
@rpcs ||= begin
|
3723
|
+
parent_rpcs = nil
|
3724
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
3725
|
+
Rpcs.new parent_rpcs
|
3726
|
+
end
|
3727
|
+
end
|
3728
|
+
|
3729
|
+
##
|
3730
|
+
# Configuration RPC class for the Registry API.
|
3731
|
+
#
|
3732
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3733
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3734
|
+
# the following configuration fields:
|
3735
|
+
#
|
3736
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
3737
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3738
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3739
|
+
# include the following keys:
|
3740
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3741
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3742
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3743
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3744
|
+
# trigger a retry.
|
3745
|
+
#
|
3746
|
+
class Rpcs
|
3747
|
+
##
|
3748
|
+
# RPC-specific configuration for `list_apis`
|
3749
|
+
# @return [::Gapic::Config::Method]
|
3750
|
+
#
|
3751
|
+
attr_reader :list_apis
|
3752
|
+
##
|
3753
|
+
# RPC-specific configuration for `get_api`
|
3754
|
+
# @return [::Gapic::Config::Method]
|
3755
|
+
#
|
3756
|
+
attr_reader :get_api
|
3757
|
+
##
|
3758
|
+
# RPC-specific configuration for `create_api`
|
3759
|
+
# @return [::Gapic::Config::Method]
|
3760
|
+
#
|
3761
|
+
attr_reader :create_api
|
3762
|
+
##
|
3763
|
+
# RPC-specific configuration for `update_api`
|
3764
|
+
# @return [::Gapic::Config::Method]
|
3765
|
+
#
|
3766
|
+
attr_reader :update_api
|
3767
|
+
##
|
3768
|
+
# RPC-specific configuration for `delete_api`
|
3769
|
+
# @return [::Gapic::Config::Method]
|
3770
|
+
#
|
3771
|
+
attr_reader :delete_api
|
3772
|
+
##
|
3773
|
+
# RPC-specific configuration for `list_api_versions`
|
3774
|
+
# @return [::Gapic::Config::Method]
|
3775
|
+
#
|
3776
|
+
attr_reader :list_api_versions
|
3777
|
+
##
|
3778
|
+
# RPC-specific configuration for `get_api_version`
|
3779
|
+
# @return [::Gapic::Config::Method]
|
3780
|
+
#
|
3781
|
+
attr_reader :get_api_version
|
3782
|
+
##
|
3783
|
+
# RPC-specific configuration for `create_api_version`
|
3784
|
+
# @return [::Gapic::Config::Method]
|
3785
|
+
#
|
3786
|
+
attr_reader :create_api_version
|
3787
|
+
##
|
3788
|
+
# RPC-specific configuration for `update_api_version`
|
3789
|
+
# @return [::Gapic::Config::Method]
|
3790
|
+
#
|
3791
|
+
attr_reader :update_api_version
|
3792
|
+
##
|
3793
|
+
# RPC-specific configuration for `delete_api_version`
|
3794
|
+
# @return [::Gapic::Config::Method]
|
3795
|
+
#
|
3796
|
+
attr_reader :delete_api_version
|
3797
|
+
##
|
3798
|
+
# RPC-specific configuration for `list_api_specs`
|
3799
|
+
# @return [::Gapic::Config::Method]
|
3800
|
+
#
|
3801
|
+
attr_reader :list_api_specs
|
3802
|
+
##
|
3803
|
+
# RPC-specific configuration for `get_api_spec`
|
3804
|
+
# @return [::Gapic::Config::Method]
|
3805
|
+
#
|
3806
|
+
attr_reader :get_api_spec
|
3807
|
+
##
|
3808
|
+
# RPC-specific configuration for `get_api_spec_contents`
|
3809
|
+
# @return [::Gapic::Config::Method]
|
3810
|
+
#
|
3811
|
+
attr_reader :get_api_spec_contents
|
3812
|
+
##
|
3813
|
+
# RPC-specific configuration for `create_api_spec`
|
3814
|
+
# @return [::Gapic::Config::Method]
|
3815
|
+
#
|
3816
|
+
attr_reader :create_api_spec
|
3817
|
+
##
|
3818
|
+
# RPC-specific configuration for `update_api_spec`
|
3819
|
+
# @return [::Gapic::Config::Method]
|
3820
|
+
#
|
3821
|
+
attr_reader :update_api_spec
|
3822
|
+
##
|
3823
|
+
# RPC-specific configuration for `delete_api_spec`
|
3824
|
+
# @return [::Gapic::Config::Method]
|
3825
|
+
#
|
3826
|
+
attr_reader :delete_api_spec
|
3827
|
+
##
|
3828
|
+
# RPC-specific configuration for `tag_api_spec_revision`
|
3829
|
+
# @return [::Gapic::Config::Method]
|
3830
|
+
#
|
3831
|
+
attr_reader :tag_api_spec_revision
|
3832
|
+
##
|
3833
|
+
# RPC-specific configuration for `list_api_spec_revisions`
|
3834
|
+
# @return [::Gapic::Config::Method]
|
3835
|
+
#
|
3836
|
+
attr_reader :list_api_spec_revisions
|
3837
|
+
##
|
3838
|
+
# RPC-specific configuration for `rollback_api_spec`
|
3839
|
+
# @return [::Gapic::Config::Method]
|
3840
|
+
#
|
3841
|
+
attr_reader :rollback_api_spec
|
3842
|
+
##
|
3843
|
+
# RPC-specific configuration for `delete_api_spec_revision`
|
3844
|
+
# @return [::Gapic::Config::Method]
|
3845
|
+
#
|
3846
|
+
attr_reader :delete_api_spec_revision
|
3847
|
+
##
|
3848
|
+
# RPC-specific configuration for `list_api_deployments`
|
3849
|
+
# @return [::Gapic::Config::Method]
|
3850
|
+
#
|
3851
|
+
attr_reader :list_api_deployments
|
3852
|
+
##
|
3853
|
+
# RPC-specific configuration for `get_api_deployment`
|
3854
|
+
# @return [::Gapic::Config::Method]
|
3855
|
+
#
|
3856
|
+
attr_reader :get_api_deployment
|
3857
|
+
##
|
3858
|
+
# RPC-specific configuration for `create_api_deployment`
|
3859
|
+
# @return [::Gapic::Config::Method]
|
3860
|
+
#
|
3861
|
+
attr_reader :create_api_deployment
|
3862
|
+
##
|
3863
|
+
# RPC-specific configuration for `update_api_deployment`
|
3864
|
+
# @return [::Gapic::Config::Method]
|
3865
|
+
#
|
3866
|
+
attr_reader :update_api_deployment
|
3867
|
+
##
|
3868
|
+
# RPC-specific configuration for `delete_api_deployment`
|
3869
|
+
# @return [::Gapic::Config::Method]
|
3870
|
+
#
|
3871
|
+
attr_reader :delete_api_deployment
|
3872
|
+
##
|
3873
|
+
# RPC-specific configuration for `tag_api_deployment_revision`
|
3874
|
+
# @return [::Gapic::Config::Method]
|
3875
|
+
#
|
3876
|
+
attr_reader :tag_api_deployment_revision
|
3877
|
+
##
|
3878
|
+
# RPC-specific configuration for `list_api_deployment_revisions`
|
3879
|
+
# @return [::Gapic::Config::Method]
|
3880
|
+
#
|
3881
|
+
attr_reader :list_api_deployment_revisions
|
3882
|
+
##
|
3883
|
+
# RPC-specific configuration for `rollback_api_deployment`
|
3884
|
+
# @return [::Gapic::Config::Method]
|
3885
|
+
#
|
3886
|
+
attr_reader :rollback_api_deployment
|
3887
|
+
##
|
3888
|
+
# RPC-specific configuration for `delete_api_deployment_revision`
|
3889
|
+
# @return [::Gapic::Config::Method]
|
3890
|
+
#
|
3891
|
+
attr_reader :delete_api_deployment_revision
|
3892
|
+
##
|
3893
|
+
# RPC-specific configuration for `list_artifacts`
|
3894
|
+
# @return [::Gapic::Config::Method]
|
3895
|
+
#
|
3896
|
+
attr_reader :list_artifacts
|
3897
|
+
##
|
3898
|
+
# RPC-specific configuration for `get_artifact`
|
3899
|
+
# @return [::Gapic::Config::Method]
|
3900
|
+
#
|
3901
|
+
attr_reader :get_artifact
|
3902
|
+
##
|
3903
|
+
# RPC-specific configuration for `get_artifact_contents`
|
3904
|
+
# @return [::Gapic::Config::Method]
|
3905
|
+
#
|
3906
|
+
attr_reader :get_artifact_contents
|
3907
|
+
##
|
3908
|
+
# RPC-specific configuration for `create_artifact`
|
3909
|
+
# @return [::Gapic::Config::Method]
|
3910
|
+
#
|
3911
|
+
attr_reader :create_artifact
|
3912
|
+
##
|
3913
|
+
# RPC-specific configuration for `replace_artifact`
|
3914
|
+
# @return [::Gapic::Config::Method]
|
3915
|
+
#
|
3916
|
+
attr_reader :replace_artifact
|
3917
|
+
##
|
3918
|
+
# RPC-specific configuration for `delete_artifact`
|
3919
|
+
# @return [::Gapic::Config::Method]
|
3920
|
+
#
|
3921
|
+
attr_reader :delete_artifact
|
3922
|
+
|
3923
|
+
# @private
|
3924
|
+
def initialize parent_rpcs = nil
|
3925
|
+
list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis
|
3926
|
+
@list_apis = ::Gapic::Config::Method.new list_apis_config
|
3927
|
+
get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api
|
3928
|
+
@get_api = ::Gapic::Config::Method.new get_api_config
|
3929
|
+
create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api
|
3930
|
+
@create_api = ::Gapic::Config::Method.new create_api_config
|
3931
|
+
update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api
|
3932
|
+
@update_api = ::Gapic::Config::Method.new update_api_config
|
3933
|
+
delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api
|
3934
|
+
@delete_api = ::Gapic::Config::Method.new delete_api_config
|
3935
|
+
list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions
|
3936
|
+
@list_api_versions = ::Gapic::Config::Method.new list_api_versions_config
|
3937
|
+
get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version
|
3938
|
+
@get_api_version = ::Gapic::Config::Method.new get_api_version_config
|
3939
|
+
create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version
|
3940
|
+
@create_api_version = ::Gapic::Config::Method.new create_api_version_config
|
3941
|
+
update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version
|
3942
|
+
@update_api_version = ::Gapic::Config::Method.new update_api_version_config
|
3943
|
+
delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version
|
3944
|
+
@delete_api_version = ::Gapic::Config::Method.new delete_api_version_config
|
3945
|
+
list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs
|
3946
|
+
@list_api_specs = ::Gapic::Config::Method.new list_api_specs_config
|
3947
|
+
get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec
|
3948
|
+
@get_api_spec = ::Gapic::Config::Method.new get_api_spec_config
|
3949
|
+
get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents
|
3950
|
+
@get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config
|
3951
|
+
create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec
|
3952
|
+
@create_api_spec = ::Gapic::Config::Method.new create_api_spec_config
|
3953
|
+
update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec
|
3954
|
+
@update_api_spec = ::Gapic::Config::Method.new update_api_spec_config
|
3955
|
+
delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec
|
3956
|
+
@delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config
|
3957
|
+
tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision
|
3958
|
+
@tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config
|
3959
|
+
list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions
|
3960
|
+
@list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config
|
3961
|
+
rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec
|
3962
|
+
@rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config
|
3963
|
+
delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision
|
3964
|
+
@delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config
|
3965
|
+
list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments
|
3966
|
+
@list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config
|
3967
|
+
get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment
|
3968
|
+
@get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config
|
3969
|
+
create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment
|
3970
|
+
@create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config
|
3971
|
+
update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment
|
3972
|
+
@update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config
|
3973
|
+
delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment
|
3974
|
+
@delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config
|
3975
|
+
tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision
|
3976
|
+
@tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config
|
3977
|
+
list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions
|
3978
|
+
@list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config
|
3979
|
+
rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment
|
3980
|
+
@rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config
|
3981
|
+
delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision
|
3982
|
+
@delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config
|
3983
|
+
list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts
|
3984
|
+
@list_artifacts = ::Gapic::Config::Method.new list_artifacts_config
|
3985
|
+
get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact
|
3986
|
+
@get_artifact = ::Gapic::Config::Method.new get_artifact_config
|
3987
|
+
get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents
|
3988
|
+
@get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config
|
3989
|
+
create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact
|
3990
|
+
@create_artifact = ::Gapic::Config::Method.new create_artifact_config
|
3991
|
+
replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact
|
3992
|
+
@replace_artifact = ::Gapic::Config::Method.new replace_artifact_config
|
3993
|
+
delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact
|
3994
|
+
@delete_artifact = ::Gapic::Config::Method.new delete_artifact_config
|
3995
|
+
|
3996
|
+
yield self if block_given?
|
3997
|
+
end
|
3998
|
+
end
|
3999
|
+
end
|
4000
|
+
end
|
4001
|
+
end
|
4002
|
+
end
|
4003
|
+
end
|
4004
|
+
end
|
4005
|
+
end
|