google-cloud-api_hub-v1 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/README.md +1 -27
- data/lib/google/cloud/api_hub/v1/api_hub.rb +0 -7
- data/lib/google/cloud/api_hub/v1/api_hub_dependencies.rb +0 -7
- data/lib/google/cloud/api_hub/v1/api_hub_plugin.rb +0 -7
- data/lib/google/cloud/api_hub/v1/host_project_registration_service.rb +0 -7
- data/lib/google/cloud/api_hub/v1/linting_service.rb +0 -7
- data/lib/google/cloud/api_hub/v1/provisioning.rb +0 -8
- data/lib/google/cloud/api_hub/v1/runtime_project_attachment_service.rb +0 -7
- data/lib/google/cloud/api_hub/v1/version.rb +1 -1
- data/lib/google/cloud/api_hub/v1.rb +0 -5
- data/proto_docs/google/cloud/apihub/v1/apihub_service.rb +47 -47
- data/proto_docs/google/cloud/apihub/v1/common_fields.rb +1 -1
- data/proto_docs/google/cloud/apihub/v1/host_project_registration_service.rb +4 -4
- data/proto_docs/google/cloud/apihub/v1/plugin_service.rb +3 -3
- data/proto_docs/google/cloud/apihub/v1/provisioning_service.rb +4 -4
- data/proto_docs/google/cloud/apihub/v1/runtime_project_attachment_service.rb +7 -7
- metadata +2 -10
- data/lib/google/cloud/api_hub/v1/api_hub/client.rb +0 -4514
- data/lib/google/cloud/api_hub/v1/api_hub_dependencies/client.rb +0 -906
- data/lib/google/cloud/api_hub/v1/api_hub_plugin/client.rb +0 -640
- data/lib/google/cloud/api_hub/v1/host_project_registration_service/client.rb +0 -689
- data/lib/google/cloud/api_hub/v1/linting_service/client.rb +0 -744
- data/lib/google/cloud/api_hub/v1/provisioning/client.rb +0 -676
- data/lib/google/cloud/api_hub/v1/provisioning/operations.rb +0 -809
- data/lib/google/cloud/api_hub/v1/runtime_project_attachment_service/client.rb +0 -885
@@ -1,906 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2024 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/apihub/v1/apihub_service_pb"
|
21
|
-
require "google/cloud/location"
|
22
|
-
|
23
|
-
module Google
|
24
|
-
module Cloud
|
25
|
-
module ApiHub
|
26
|
-
module V1
|
27
|
-
module ApiHubDependencies
|
28
|
-
##
|
29
|
-
# Client for the ApiHubDependencies service.
|
30
|
-
#
|
31
|
-
# This service provides methods for various operations related to a
|
32
|
-
# {::Google::Cloud::ApiHub::V1::Dependency Dependency} in the API hub.
|
33
|
-
#
|
34
|
-
class Client
|
35
|
-
# @private
|
36
|
-
API_VERSION = ""
|
37
|
-
|
38
|
-
# @private
|
39
|
-
DEFAULT_ENDPOINT_TEMPLATE = "apihub.$UNIVERSE_DOMAIN$"
|
40
|
-
|
41
|
-
include Paths
|
42
|
-
|
43
|
-
# @private
|
44
|
-
attr_reader :api_hub_dependencies_stub
|
45
|
-
|
46
|
-
##
|
47
|
-
# Configure the ApiHubDependencies Client class.
|
48
|
-
#
|
49
|
-
# See {::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client::Configuration}
|
50
|
-
# for a description of the configuration fields.
|
51
|
-
#
|
52
|
-
# @example
|
53
|
-
#
|
54
|
-
# # Modify the configuration for all ApiHubDependencies clients
|
55
|
-
# ::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.configure do |config|
|
56
|
-
# config.timeout = 10.0
|
57
|
-
# end
|
58
|
-
#
|
59
|
-
# @yield [config] Configure the Client client.
|
60
|
-
# @yieldparam config [Client::Configuration]
|
61
|
-
#
|
62
|
-
# @return [Client::Configuration]
|
63
|
-
#
|
64
|
-
def self.configure
|
65
|
-
@configure ||= begin
|
66
|
-
namespace = ["Google", "Cloud", "ApiHub", "V1"]
|
67
|
-
parent_config = while namespace.any?
|
68
|
-
parent_name = namespace.join "::"
|
69
|
-
parent_const = const_get parent_name
|
70
|
-
break parent_const.configure if parent_const.respond_to? :configure
|
71
|
-
namespace.pop
|
72
|
-
end
|
73
|
-
default_config = Client::Configuration.new parent_config
|
74
|
-
|
75
|
-
default_config.rpcs.create_dependency.timeout = 60.0
|
76
|
-
|
77
|
-
default_config.rpcs.get_dependency.timeout = 60.0
|
78
|
-
default_config.rpcs.get_dependency.retry_policy = {
|
79
|
-
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
80
|
-
}
|
81
|
-
|
82
|
-
default_config.rpcs.update_dependency.timeout = 60.0
|
83
|
-
|
84
|
-
default_config.rpcs.delete_dependency.timeout = 60.0
|
85
|
-
|
86
|
-
default_config.rpcs.list_dependencies.timeout = 60.0
|
87
|
-
default_config.rpcs.list_dependencies.retry_policy = {
|
88
|
-
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
89
|
-
}
|
90
|
-
|
91
|
-
default_config
|
92
|
-
end
|
93
|
-
yield @configure if block_given?
|
94
|
-
@configure
|
95
|
-
end
|
96
|
-
|
97
|
-
##
|
98
|
-
# Configure the ApiHubDependencies Client instance.
|
99
|
-
#
|
100
|
-
# The configuration is set to the derived mode, meaning that values can be changed,
|
101
|
-
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
102
|
-
# should be made on {Client.configure}.
|
103
|
-
#
|
104
|
-
# See {::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client::Configuration}
|
105
|
-
# for a description of the configuration fields.
|
106
|
-
#
|
107
|
-
# @yield [config] Configure the Client client.
|
108
|
-
# @yieldparam config [Client::Configuration]
|
109
|
-
#
|
110
|
-
# @return [Client::Configuration]
|
111
|
-
#
|
112
|
-
def configure
|
113
|
-
yield @config if block_given?
|
114
|
-
@config
|
115
|
-
end
|
116
|
-
|
117
|
-
##
|
118
|
-
# The effective universe domain
|
119
|
-
#
|
120
|
-
# @return [String]
|
121
|
-
#
|
122
|
-
def universe_domain
|
123
|
-
@api_hub_dependencies_stub.universe_domain
|
124
|
-
end
|
125
|
-
|
126
|
-
##
|
127
|
-
# Create a new ApiHubDependencies client object.
|
128
|
-
#
|
129
|
-
# @example
|
130
|
-
#
|
131
|
-
# # Create a client using the default configuration
|
132
|
-
# client = ::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new
|
133
|
-
#
|
134
|
-
# # Create a client using a custom configuration
|
135
|
-
# client = ::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new do |config|
|
136
|
-
# config.timeout = 10.0
|
137
|
-
# end
|
138
|
-
#
|
139
|
-
# @yield [config] Configure the ApiHubDependencies client.
|
140
|
-
# @yieldparam config [Client::Configuration]
|
141
|
-
#
|
142
|
-
def initialize
|
143
|
-
# These require statements are intentionally placed here to initialize
|
144
|
-
# the gRPC module only when it's required.
|
145
|
-
# See https://github.com/googleapis/toolkit/issues/446
|
146
|
-
require "gapic/grpc"
|
147
|
-
require "google/cloud/apihub/v1/apihub_service_services_pb"
|
148
|
-
|
149
|
-
# Create the configuration object
|
150
|
-
@config = Configuration.new Client.configure
|
151
|
-
|
152
|
-
# Yield the configuration if needed
|
153
|
-
yield @config if block_given?
|
154
|
-
|
155
|
-
# Create credentials
|
156
|
-
credentials = @config.credentials
|
157
|
-
# Use self-signed JWT if the endpoint is unchanged from default,
|
158
|
-
# but only if the default endpoint does not have a region prefix.
|
159
|
-
enable_self_signed_jwt = @config.endpoint.nil? ||
|
160
|
-
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
161
|
-
!@config.endpoint.split(".").first.include?("-"))
|
162
|
-
credentials ||= Credentials.default scope: @config.scope,
|
163
|
-
enable_self_signed_jwt: enable_self_signed_jwt
|
164
|
-
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
165
|
-
credentials = Credentials.new credentials, scope: @config.scope
|
166
|
-
end
|
167
|
-
@quota_project_id = @config.quota_project
|
168
|
-
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
169
|
-
|
170
|
-
@api_hub_dependencies_stub = ::Gapic::ServiceStub.new(
|
171
|
-
::Google::Cloud::ApiHub::V1::ApiHubDependencies::Stub,
|
172
|
-
credentials: credentials,
|
173
|
-
endpoint: @config.endpoint,
|
174
|
-
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
175
|
-
universe_domain: @config.universe_domain,
|
176
|
-
channel_args: @config.channel_args,
|
177
|
-
interceptors: @config.interceptors,
|
178
|
-
channel_pool_config: @config.channel_pool
|
179
|
-
)
|
180
|
-
|
181
|
-
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
182
|
-
config.credentials = credentials
|
183
|
-
config.quota_project = @quota_project_id
|
184
|
-
config.endpoint = @api_hub_dependencies_stub.endpoint
|
185
|
-
config.universe_domain = @api_hub_dependencies_stub.universe_domain
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
|
-
##
|
190
|
-
# Get the associated client for mix-in of the Locations.
|
191
|
-
#
|
192
|
-
# @return [Google::Cloud::Location::Locations::Client]
|
193
|
-
#
|
194
|
-
attr_reader :location_client
|
195
|
-
|
196
|
-
# Service calls
|
197
|
-
|
198
|
-
##
|
199
|
-
# Create a dependency between two entities in the API hub.
|
200
|
-
#
|
201
|
-
# @overload create_dependency(request, options = nil)
|
202
|
-
# Pass arguments to `create_dependency` via a request object, either of type
|
203
|
-
# {::Google::Cloud::ApiHub::V1::CreateDependencyRequest} or an equivalent Hash.
|
204
|
-
#
|
205
|
-
# @param request [::Google::Cloud::ApiHub::V1::CreateDependencyRequest, ::Hash]
|
206
|
-
# A request object representing the call parameters. Required. To specify no
|
207
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
208
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
209
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
210
|
-
#
|
211
|
-
# @overload create_dependency(parent: nil, dependency_id: nil, dependency: nil)
|
212
|
-
# Pass arguments to `create_dependency` via keyword arguments. Note that at
|
213
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
214
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
215
|
-
#
|
216
|
-
# @param parent [::String]
|
217
|
-
# Required. The parent resource for the dependency resource.
|
218
|
-
# Format: `projects/{project}/locations/{location}`
|
219
|
-
# @param dependency_id [::String]
|
220
|
-
# Optional. The ID to use for the dependency resource, which will become the
|
221
|
-
# final component of the dependency's resource name. This field is optional.
|
222
|
-
# * If provided, the same will be used. The service will throw an error if
|
223
|
-
# duplicate id is provided by the client.
|
224
|
-
# * If not provided, a system generated id will be used.
|
225
|
-
#
|
226
|
-
# This value should be 4-500 characters, and valid characters
|
227
|
-
# are `[a-z][A-Z][0-9]-_`.
|
228
|
-
# @param dependency [::Google::Cloud::ApiHub::V1::Dependency, ::Hash]
|
229
|
-
# Required. The dependency resource to create.
|
230
|
-
#
|
231
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
232
|
-
# @yieldparam response [::Google::Cloud::ApiHub::V1::Dependency]
|
233
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
234
|
-
#
|
235
|
-
# @return [::Google::Cloud::ApiHub::V1::Dependency]
|
236
|
-
#
|
237
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
238
|
-
#
|
239
|
-
# @example Basic example
|
240
|
-
# require "google/cloud/api_hub/v1"
|
241
|
-
#
|
242
|
-
# # Create a client object. The client can be reused for multiple calls.
|
243
|
-
# client = Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new
|
244
|
-
#
|
245
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
246
|
-
# request = Google::Cloud::ApiHub::V1::CreateDependencyRequest.new
|
247
|
-
#
|
248
|
-
# # Call the create_dependency method.
|
249
|
-
# result = client.create_dependency request
|
250
|
-
#
|
251
|
-
# # The returned object is of type Google::Cloud::ApiHub::V1::Dependency.
|
252
|
-
# p result
|
253
|
-
#
|
254
|
-
def create_dependency request, options = nil
|
255
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
256
|
-
|
257
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::CreateDependencyRequest
|
258
|
-
|
259
|
-
# Converts hash and nil to an options object
|
260
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
261
|
-
|
262
|
-
# Customize the options with defaults
|
263
|
-
metadata = @config.rpcs.create_dependency.metadata.to_h
|
264
|
-
|
265
|
-
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
266
|
-
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
267
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
268
|
-
gapic_version: ::Google::Cloud::ApiHub::V1::VERSION
|
269
|
-
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
270
|
-
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
271
|
-
|
272
|
-
header_params = {}
|
273
|
-
if request.parent
|
274
|
-
header_params["parent"] = request.parent
|
275
|
-
end
|
276
|
-
|
277
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
278
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
279
|
-
|
280
|
-
options.apply_defaults timeout: @config.rpcs.create_dependency.timeout,
|
281
|
-
metadata: metadata,
|
282
|
-
retry_policy: @config.rpcs.create_dependency.retry_policy
|
283
|
-
|
284
|
-
options.apply_defaults timeout: @config.timeout,
|
285
|
-
metadata: @config.metadata,
|
286
|
-
retry_policy: @config.retry_policy
|
287
|
-
|
288
|
-
@api_hub_dependencies_stub.call_rpc :create_dependency, request, options: options do |response, operation|
|
289
|
-
yield response, operation if block_given?
|
290
|
-
return response
|
291
|
-
end
|
292
|
-
rescue ::GRPC::BadStatus => e
|
293
|
-
raise ::Google::Cloud::Error.from_error(e)
|
294
|
-
end
|
295
|
-
|
296
|
-
##
|
297
|
-
# Get details about a dependency resource in the API hub.
|
298
|
-
#
|
299
|
-
# @overload get_dependency(request, options = nil)
|
300
|
-
# Pass arguments to `get_dependency` via a request object, either of type
|
301
|
-
# {::Google::Cloud::ApiHub::V1::GetDependencyRequest} or an equivalent Hash.
|
302
|
-
#
|
303
|
-
# @param request [::Google::Cloud::ApiHub::V1::GetDependencyRequest, ::Hash]
|
304
|
-
# A request object representing the call parameters. Required. To specify no
|
305
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
306
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
307
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
308
|
-
#
|
309
|
-
# @overload get_dependency(name: nil)
|
310
|
-
# Pass arguments to `get_dependency` via keyword arguments. Note that at
|
311
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
312
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
313
|
-
#
|
314
|
-
# @param name [::String]
|
315
|
-
# Required. The name of the dependency resource to retrieve.
|
316
|
-
# Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
|
317
|
-
#
|
318
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
319
|
-
# @yieldparam response [::Google::Cloud::ApiHub::V1::Dependency]
|
320
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
321
|
-
#
|
322
|
-
# @return [::Google::Cloud::ApiHub::V1::Dependency]
|
323
|
-
#
|
324
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
325
|
-
#
|
326
|
-
# @example Basic example
|
327
|
-
# require "google/cloud/api_hub/v1"
|
328
|
-
#
|
329
|
-
# # Create a client object. The client can be reused for multiple calls.
|
330
|
-
# client = Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new
|
331
|
-
#
|
332
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
333
|
-
# request = Google::Cloud::ApiHub::V1::GetDependencyRequest.new
|
334
|
-
#
|
335
|
-
# # Call the get_dependency method.
|
336
|
-
# result = client.get_dependency request
|
337
|
-
#
|
338
|
-
# # The returned object is of type Google::Cloud::ApiHub::V1::Dependency.
|
339
|
-
# p result
|
340
|
-
#
|
341
|
-
def get_dependency request, options = nil
|
342
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
|
-
|
344
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::GetDependencyRequest
|
345
|
-
|
346
|
-
# Converts hash and nil to an options object
|
347
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
348
|
-
|
349
|
-
# Customize the options with defaults
|
350
|
-
metadata = @config.rpcs.get_dependency.metadata.to_h
|
351
|
-
|
352
|
-
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
353
|
-
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
354
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
355
|
-
gapic_version: ::Google::Cloud::ApiHub::V1::VERSION
|
356
|
-
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
357
|
-
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
358
|
-
|
359
|
-
header_params = {}
|
360
|
-
if request.name
|
361
|
-
header_params["name"] = request.name
|
362
|
-
end
|
363
|
-
|
364
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
365
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
366
|
-
|
367
|
-
options.apply_defaults timeout: @config.rpcs.get_dependency.timeout,
|
368
|
-
metadata: metadata,
|
369
|
-
retry_policy: @config.rpcs.get_dependency.retry_policy
|
370
|
-
|
371
|
-
options.apply_defaults timeout: @config.timeout,
|
372
|
-
metadata: @config.metadata,
|
373
|
-
retry_policy: @config.retry_policy
|
374
|
-
|
375
|
-
@api_hub_dependencies_stub.call_rpc :get_dependency, request, options: options do |response, operation|
|
376
|
-
yield response, operation if block_given?
|
377
|
-
return response
|
378
|
-
end
|
379
|
-
rescue ::GRPC::BadStatus => e
|
380
|
-
raise ::Google::Cloud::Error.from_error(e)
|
381
|
-
end
|
382
|
-
|
383
|
-
##
|
384
|
-
# Update a dependency based on the
|
385
|
-
# {::Google::Cloud::ApiHub::V1::UpdateDependencyRequest#update_mask update_mask}
|
386
|
-
# provided in the request.
|
387
|
-
#
|
388
|
-
# The following fields in the {::Google::Cloud::ApiHub::V1::Dependency dependency}
|
389
|
-
# can be updated:
|
390
|
-
# * {::Google::Cloud::ApiHub::V1::Dependency#description description}
|
391
|
-
#
|
392
|
-
# @overload update_dependency(request, options = nil)
|
393
|
-
# Pass arguments to `update_dependency` via a request object, either of type
|
394
|
-
# {::Google::Cloud::ApiHub::V1::UpdateDependencyRequest} or an equivalent Hash.
|
395
|
-
#
|
396
|
-
# @param request [::Google::Cloud::ApiHub::V1::UpdateDependencyRequest, ::Hash]
|
397
|
-
# A request object representing the call parameters. Required. To specify no
|
398
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
399
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
400
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
401
|
-
#
|
402
|
-
# @overload update_dependency(dependency: nil, update_mask: nil)
|
403
|
-
# Pass arguments to `update_dependency` via keyword arguments. Note that at
|
404
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
405
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
406
|
-
#
|
407
|
-
# @param dependency [::Google::Cloud::ApiHub::V1::Dependency, ::Hash]
|
408
|
-
# Required. The dependency resource to update.
|
409
|
-
#
|
410
|
-
# The dependency's `name` field is used to identify the dependency to update.
|
411
|
-
# Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
|
412
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
413
|
-
# Required. The list of fields to update.
|
414
|
-
#
|
415
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
416
|
-
# @yieldparam response [::Google::Cloud::ApiHub::V1::Dependency]
|
417
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
418
|
-
#
|
419
|
-
# @return [::Google::Cloud::ApiHub::V1::Dependency]
|
420
|
-
#
|
421
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
422
|
-
#
|
423
|
-
# @example Basic example
|
424
|
-
# require "google/cloud/api_hub/v1"
|
425
|
-
#
|
426
|
-
# # Create a client object. The client can be reused for multiple calls.
|
427
|
-
# client = Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new
|
428
|
-
#
|
429
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
430
|
-
# request = Google::Cloud::ApiHub::V1::UpdateDependencyRequest.new
|
431
|
-
#
|
432
|
-
# # Call the update_dependency method.
|
433
|
-
# result = client.update_dependency request
|
434
|
-
#
|
435
|
-
# # The returned object is of type Google::Cloud::ApiHub::V1::Dependency.
|
436
|
-
# p result
|
437
|
-
#
|
438
|
-
def update_dependency request, options = nil
|
439
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
440
|
-
|
441
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::UpdateDependencyRequest
|
442
|
-
|
443
|
-
# Converts hash and nil to an options object
|
444
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
445
|
-
|
446
|
-
# Customize the options with defaults
|
447
|
-
metadata = @config.rpcs.update_dependency.metadata.to_h
|
448
|
-
|
449
|
-
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
450
|
-
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
451
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
452
|
-
gapic_version: ::Google::Cloud::ApiHub::V1::VERSION
|
453
|
-
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
454
|
-
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
455
|
-
|
456
|
-
header_params = {}
|
457
|
-
if request.dependency&.name
|
458
|
-
header_params["dependency.name"] = request.dependency.name
|
459
|
-
end
|
460
|
-
|
461
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
462
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
463
|
-
|
464
|
-
options.apply_defaults timeout: @config.rpcs.update_dependency.timeout,
|
465
|
-
metadata: metadata,
|
466
|
-
retry_policy: @config.rpcs.update_dependency.retry_policy
|
467
|
-
|
468
|
-
options.apply_defaults timeout: @config.timeout,
|
469
|
-
metadata: @config.metadata,
|
470
|
-
retry_policy: @config.retry_policy
|
471
|
-
|
472
|
-
@api_hub_dependencies_stub.call_rpc :update_dependency, request, options: options do |response, operation|
|
473
|
-
yield response, operation if block_given?
|
474
|
-
return response
|
475
|
-
end
|
476
|
-
rescue ::GRPC::BadStatus => e
|
477
|
-
raise ::Google::Cloud::Error.from_error(e)
|
478
|
-
end
|
479
|
-
|
480
|
-
##
|
481
|
-
# Delete the dependency resource.
|
482
|
-
#
|
483
|
-
# @overload delete_dependency(request, options = nil)
|
484
|
-
# Pass arguments to `delete_dependency` via a request object, either of type
|
485
|
-
# {::Google::Cloud::ApiHub::V1::DeleteDependencyRequest} or an equivalent Hash.
|
486
|
-
#
|
487
|
-
# @param request [::Google::Cloud::ApiHub::V1::DeleteDependencyRequest, ::Hash]
|
488
|
-
# A request object representing the call parameters. Required. To specify no
|
489
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
490
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
491
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
492
|
-
#
|
493
|
-
# @overload delete_dependency(name: nil)
|
494
|
-
# Pass arguments to `delete_dependency` via keyword arguments. Note that at
|
495
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
496
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
497
|
-
#
|
498
|
-
# @param name [::String]
|
499
|
-
# Required. The name of the dependency resource to delete.
|
500
|
-
# Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
|
501
|
-
#
|
502
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
503
|
-
# @yieldparam response [::Google::Protobuf::Empty]
|
504
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
505
|
-
#
|
506
|
-
# @return [::Google::Protobuf::Empty]
|
507
|
-
#
|
508
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
509
|
-
#
|
510
|
-
# @example Basic example
|
511
|
-
# require "google/cloud/api_hub/v1"
|
512
|
-
#
|
513
|
-
# # Create a client object. The client can be reused for multiple calls.
|
514
|
-
# client = Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new
|
515
|
-
#
|
516
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
517
|
-
# request = Google::Cloud::ApiHub::V1::DeleteDependencyRequest.new
|
518
|
-
#
|
519
|
-
# # Call the delete_dependency method.
|
520
|
-
# result = client.delete_dependency request
|
521
|
-
#
|
522
|
-
# # The returned object is of type Google::Protobuf::Empty.
|
523
|
-
# p result
|
524
|
-
#
|
525
|
-
def delete_dependency request, options = nil
|
526
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
527
|
-
|
528
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::DeleteDependencyRequest
|
529
|
-
|
530
|
-
# Converts hash and nil to an options object
|
531
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
532
|
-
|
533
|
-
# Customize the options with defaults
|
534
|
-
metadata = @config.rpcs.delete_dependency.metadata.to_h
|
535
|
-
|
536
|
-
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
537
|
-
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
538
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
539
|
-
gapic_version: ::Google::Cloud::ApiHub::V1::VERSION
|
540
|
-
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
541
|
-
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
542
|
-
|
543
|
-
header_params = {}
|
544
|
-
if request.name
|
545
|
-
header_params["name"] = request.name
|
546
|
-
end
|
547
|
-
|
548
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
549
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
550
|
-
|
551
|
-
options.apply_defaults timeout: @config.rpcs.delete_dependency.timeout,
|
552
|
-
metadata: metadata,
|
553
|
-
retry_policy: @config.rpcs.delete_dependency.retry_policy
|
554
|
-
|
555
|
-
options.apply_defaults timeout: @config.timeout,
|
556
|
-
metadata: @config.metadata,
|
557
|
-
retry_policy: @config.retry_policy
|
558
|
-
|
559
|
-
@api_hub_dependencies_stub.call_rpc :delete_dependency, request, options: options do |response, operation|
|
560
|
-
yield response, operation if block_given?
|
561
|
-
return response
|
562
|
-
end
|
563
|
-
rescue ::GRPC::BadStatus => e
|
564
|
-
raise ::Google::Cloud::Error.from_error(e)
|
565
|
-
end
|
566
|
-
|
567
|
-
##
|
568
|
-
# List dependencies based on the provided filter and pagination parameters.
|
569
|
-
#
|
570
|
-
# @overload list_dependencies(request, options = nil)
|
571
|
-
# Pass arguments to `list_dependencies` via a request object, either of type
|
572
|
-
# {::Google::Cloud::ApiHub::V1::ListDependenciesRequest} or an equivalent Hash.
|
573
|
-
#
|
574
|
-
# @param request [::Google::Cloud::ApiHub::V1::ListDependenciesRequest, ::Hash]
|
575
|
-
# A request object representing the call parameters. Required. To specify no
|
576
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
577
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
578
|
-
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
579
|
-
#
|
580
|
-
# @overload list_dependencies(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
581
|
-
# Pass arguments to `list_dependencies` via keyword arguments. Note that at
|
582
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
583
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
584
|
-
#
|
585
|
-
# @param parent [::String]
|
586
|
-
# Required. The parent which owns this collection of dependency resources.
|
587
|
-
# Format: `projects/{project}/locations/{location}`
|
588
|
-
# @param filter [::String]
|
589
|
-
# Optional. An expression that filters the list of Dependencies.
|
590
|
-
#
|
591
|
-
# A filter expression consists of a field name, a comparison operator, and
|
592
|
-
# a value for filtering. The value must be a string. Allowed comparison
|
593
|
-
# operator is `=`. Filters are not case sensitive.
|
594
|
-
#
|
595
|
-
# The following fields in the `Dependency` are eligible for filtering:
|
596
|
-
#
|
597
|
-
# * `consumer.operation_resource_name` - The operation resource name for
|
598
|
-
# the consumer entity involved in a dependency. Allowed comparison
|
599
|
-
# operators: `=`.
|
600
|
-
# * `consumer.external_api_resource_name` - The external api resource name
|
601
|
-
# for the consumer entity involved in a dependency. Allowed comparison
|
602
|
-
# operators: `=`.
|
603
|
-
# * `supplier.operation_resource_name` - The operation resource name for
|
604
|
-
# the supplier entity involved in a dependency. Allowed comparison
|
605
|
-
# operators: `=`.
|
606
|
-
# * `supplier.external_api_resource_name` - The external api resource name
|
607
|
-
# for the supplier entity involved in a dependency. Allowed comparison
|
608
|
-
# operators: `=`.
|
609
|
-
#
|
610
|
-
# Expressions are combined with either `AND` logic operator or `OR` logical
|
611
|
-
# operator but not both of them together i.e. only one of the `AND` or `OR`
|
612
|
-
# operator can be used throughout the filter string and both the operators
|
613
|
-
# cannot be used together. No other logical operators are supported. At most
|
614
|
-
# three filter fields are allowed in the filter string and if provided
|
615
|
-
# more than that then `INVALID_ARGUMENT` error is returned by the API.
|
616
|
-
#
|
617
|
-
# For example, `consumer.operation_resource_name =
|
618
|
-
# \"projects/p1/locations/global/apis/a1/versions/v1/operations/o1\" OR
|
619
|
-
# supplier.operation_resource_name =
|
620
|
-
# \"projects/p1/locations/global/apis/a1/versions/v1/operations/o1\"` - The
|
621
|
-
# dependencies with either consumer or supplier operation resource name as
|
622
|
-
# _projects/p1/locations/global/apis/a1/versions/v1/operations/o1_.
|
623
|
-
# @param page_size [::Integer]
|
624
|
-
# Optional. The maximum number of dependency resources to return. The service
|
625
|
-
# may return fewer than this value. If unspecified, at most 50 dependencies
|
626
|
-
# will be returned. The maximum value is 1000; values above 1000 will be
|
627
|
-
# coerced to 1000.
|
628
|
-
# @param page_token [::String]
|
629
|
-
# Optional. A page token, received from a previous `ListDependencies` call.
|
630
|
-
# Provide this to retrieve the subsequent page.
|
631
|
-
#
|
632
|
-
# When paginating, all other parameters provided to `ListDependencies` must
|
633
|
-
# match the call that provided the page token.
|
634
|
-
#
|
635
|
-
# @yield [response, operation] Access the result along with the RPC operation
|
636
|
-
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApiHub::V1::Dependency>]
|
637
|
-
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
638
|
-
#
|
639
|
-
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ApiHub::V1::Dependency>]
|
640
|
-
#
|
641
|
-
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
642
|
-
#
|
643
|
-
# @example Basic example
|
644
|
-
# require "google/cloud/api_hub/v1"
|
645
|
-
#
|
646
|
-
# # Create a client object. The client can be reused for multiple calls.
|
647
|
-
# client = Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new
|
648
|
-
#
|
649
|
-
# # Create a request. To set request fields, pass in keyword arguments.
|
650
|
-
# request = Google::Cloud::ApiHub::V1::ListDependenciesRequest.new
|
651
|
-
#
|
652
|
-
# # Call the list_dependencies method.
|
653
|
-
# result = client.list_dependencies request
|
654
|
-
#
|
655
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
656
|
-
# # over elements, and API calls will be issued to fetch pages as needed.
|
657
|
-
# result.each do |item|
|
658
|
-
# # Each element is of type ::Google::Cloud::ApiHub::V1::Dependency.
|
659
|
-
# p item
|
660
|
-
# end
|
661
|
-
#
|
662
|
-
def list_dependencies request, options = nil
|
663
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
664
|
-
|
665
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::ListDependenciesRequest
|
666
|
-
|
667
|
-
# Converts hash and nil to an options object
|
668
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
669
|
-
|
670
|
-
# Customize the options with defaults
|
671
|
-
metadata = @config.rpcs.list_dependencies.metadata.to_h
|
672
|
-
|
673
|
-
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
674
|
-
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
675
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
676
|
-
gapic_version: ::Google::Cloud::ApiHub::V1::VERSION
|
677
|
-
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
678
|
-
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
679
|
-
|
680
|
-
header_params = {}
|
681
|
-
if request.parent
|
682
|
-
header_params["parent"] = request.parent
|
683
|
-
end
|
684
|
-
|
685
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
686
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
687
|
-
|
688
|
-
options.apply_defaults timeout: @config.rpcs.list_dependencies.timeout,
|
689
|
-
metadata: metadata,
|
690
|
-
retry_policy: @config.rpcs.list_dependencies.retry_policy
|
691
|
-
|
692
|
-
options.apply_defaults timeout: @config.timeout,
|
693
|
-
metadata: @config.metadata,
|
694
|
-
retry_policy: @config.retry_policy
|
695
|
-
|
696
|
-
@api_hub_dependencies_stub.call_rpc :list_dependencies, request, options: options do |response, operation|
|
697
|
-
response = ::Gapic::PagedEnumerable.new @api_hub_dependencies_stub, :list_dependencies, request, response, operation, options
|
698
|
-
yield response, operation if block_given?
|
699
|
-
return response
|
700
|
-
end
|
701
|
-
rescue ::GRPC::BadStatus => e
|
702
|
-
raise ::Google::Cloud::Error.from_error(e)
|
703
|
-
end
|
704
|
-
|
705
|
-
##
|
706
|
-
# Configuration class for the ApiHubDependencies API.
|
707
|
-
#
|
708
|
-
# This class represents the configuration for ApiHubDependencies,
|
709
|
-
# providing control over timeouts, retry behavior, logging, transport
|
710
|
-
# parameters, and other low-level controls. Certain parameters can also be
|
711
|
-
# applied individually to specific RPCs. See
|
712
|
-
# {::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client::Configuration::Rpcs}
|
713
|
-
# for a list of RPCs that can be configured independently.
|
714
|
-
#
|
715
|
-
# Configuration can be applied globally to all clients, or to a single client
|
716
|
-
# on construction.
|
717
|
-
#
|
718
|
-
# @example
|
719
|
-
#
|
720
|
-
# # Modify the global config, setting the timeout for
|
721
|
-
# # create_dependency to 20 seconds,
|
722
|
-
# # and all remaining timeouts to 10 seconds.
|
723
|
-
# ::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.configure do |config|
|
724
|
-
# config.timeout = 10.0
|
725
|
-
# config.rpcs.create_dependency.timeout = 20.0
|
726
|
-
# end
|
727
|
-
#
|
728
|
-
# # Apply the above configuration only to a new client.
|
729
|
-
# client = ::Google::Cloud::ApiHub::V1::ApiHubDependencies::Client.new do |config|
|
730
|
-
# config.timeout = 10.0
|
731
|
-
# config.rpcs.create_dependency.timeout = 20.0
|
732
|
-
# end
|
733
|
-
#
|
734
|
-
# @!attribute [rw] endpoint
|
735
|
-
# A custom service endpoint, as a hostname or hostname:port. The default is
|
736
|
-
# nil, indicating to use the default endpoint in the current universe domain.
|
737
|
-
# @return [::String,nil]
|
738
|
-
# @!attribute [rw] credentials
|
739
|
-
# Credentials to send with calls. You may provide any of the following types:
|
740
|
-
# * (`String`) The path to a service account key file in JSON format
|
741
|
-
# * (`Hash`) A service account key as a Hash
|
742
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
743
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
744
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
745
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
746
|
-
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
747
|
-
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
748
|
-
# * (`nil`) indicating no credentials
|
749
|
-
# @return [::Object]
|
750
|
-
# @!attribute [rw] scope
|
751
|
-
# The OAuth scopes
|
752
|
-
# @return [::Array<::String>]
|
753
|
-
# @!attribute [rw] lib_name
|
754
|
-
# The library name as recorded in instrumentation and logging
|
755
|
-
# @return [::String]
|
756
|
-
# @!attribute [rw] lib_version
|
757
|
-
# The library version as recorded in instrumentation and logging
|
758
|
-
# @return [::String]
|
759
|
-
# @!attribute [rw] channel_args
|
760
|
-
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
761
|
-
# `GRPC::Core::Channel` object is provided as the credential.
|
762
|
-
# @return [::Hash]
|
763
|
-
# @!attribute [rw] interceptors
|
764
|
-
# An array of interceptors that are run before calls are executed.
|
765
|
-
# @return [::Array<::GRPC::ClientInterceptor>]
|
766
|
-
# @!attribute [rw] timeout
|
767
|
-
# The call timeout in seconds.
|
768
|
-
# @return [::Numeric]
|
769
|
-
# @!attribute [rw] metadata
|
770
|
-
# Additional gRPC headers to be sent with the call.
|
771
|
-
# @return [::Hash{::Symbol=>::String}]
|
772
|
-
# @!attribute [rw] retry_policy
|
773
|
-
# The retry policy. The value is a hash with the following keys:
|
774
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
775
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
776
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
777
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
778
|
-
# trigger a retry.
|
779
|
-
# @return [::Hash]
|
780
|
-
# @!attribute [rw] quota_project
|
781
|
-
# A separate project against which to charge quota.
|
782
|
-
# @return [::String]
|
783
|
-
# @!attribute [rw] universe_domain
|
784
|
-
# The universe domain within which to make requests. This determines the
|
785
|
-
# default endpoint URL. The default value of nil uses the environment
|
786
|
-
# universe (usually the default "googleapis.com" universe).
|
787
|
-
# @return [::String,nil]
|
788
|
-
#
|
789
|
-
class Configuration
|
790
|
-
extend ::Gapic::Config
|
791
|
-
|
792
|
-
# @private
|
793
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
794
|
-
DEFAULT_ENDPOINT = "apihub.googleapis.com"
|
795
|
-
|
796
|
-
config_attr :endpoint, nil, ::String, nil
|
797
|
-
config_attr :credentials, nil do |value|
|
798
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
799
|
-
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
800
|
-
allowed.any? { |klass| klass === value }
|
801
|
-
end
|
802
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
803
|
-
config_attr :lib_name, nil, ::String, nil
|
804
|
-
config_attr :lib_version, nil, ::String, nil
|
805
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
806
|
-
config_attr :interceptors, nil, ::Array, nil
|
807
|
-
config_attr :timeout, nil, ::Numeric, nil
|
808
|
-
config_attr :metadata, nil, ::Hash, nil
|
809
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
810
|
-
config_attr :quota_project, nil, ::String, nil
|
811
|
-
config_attr :universe_domain, nil, ::String, nil
|
812
|
-
|
813
|
-
# @private
|
814
|
-
def initialize parent_config = nil
|
815
|
-
@parent_config = parent_config unless parent_config.nil?
|
816
|
-
|
817
|
-
yield self if block_given?
|
818
|
-
end
|
819
|
-
|
820
|
-
##
|
821
|
-
# Configurations for individual RPCs
|
822
|
-
# @return [Rpcs]
|
823
|
-
#
|
824
|
-
def rpcs
|
825
|
-
@rpcs ||= begin
|
826
|
-
parent_rpcs = nil
|
827
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
828
|
-
Rpcs.new parent_rpcs
|
829
|
-
end
|
830
|
-
end
|
831
|
-
|
832
|
-
##
|
833
|
-
# Configuration for the channel pool
|
834
|
-
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
835
|
-
#
|
836
|
-
def channel_pool
|
837
|
-
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
838
|
-
end
|
839
|
-
|
840
|
-
##
|
841
|
-
# Configuration RPC class for the ApiHubDependencies API.
|
842
|
-
#
|
843
|
-
# Includes fields providing the configuration for each RPC in this service.
|
844
|
-
# Each configuration object is of type `Gapic::Config::Method` and includes
|
845
|
-
# the following configuration fields:
|
846
|
-
#
|
847
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
848
|
-
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
849
|
-
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
850
|
-
# include the following keys:
|
851
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
852
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
853
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
854
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
855
|
-
# trigger a retry.
|
856
|
-
#
|
857
|
-
class Rpcs
|
858
|
-
##
|
859
|
-
# RPC-specific configuration for `create_dependency`
|
860
|
-
# @return [::Gapic::Config::Method]
|
861
|
-
#
|
862
|
-
attr_reader :create_dependency
|
863
|
-
##
|
864
|
-
# RPC-specific configuration for `get_dependency`
|
865
|
-
# @return [::Gapic::Config::Method]
|
866
|
-
#
|
867
|
-
attr_reader :get_dependency
|
868
|
-
##
|
869
|
-
# RPC-specific configuration for `update_dependency`
|
870
|
-
# @return [::Gapic::Config::Method]
|
871
|
-
#
|
872
|
-
attr_reader :update_dependency
|
873
|
-
##
|
874
|
-
# RPC-specific configuration for `delete_dependency`
|
875
|
-
# @return [::Gapic::Config::Method]
|
876
|
-
#
|
877
|
-
attr_reader :delete_dependency
|
878
|
-
##
|
879
|
-
# RPC-specific configuration for `list_dependencies`
|
880
|
-
# @return [::Gapic::Config::Method]
|
881
|
-
#
|
882
|
-
attr_reader :list_dependencies
|
883
|
-
|
884
|
-
# @private
|
885
|
-
def initialize parent_rpcs = nil
|
886
|
-
create_dependency_config = parent_rpcs.create_dependency if parent_rpcs.respond_to? :create_dependency
|
887
|
-
@create_dependency = ::Gapic::Config::Method.new create_dependency_config
|
888
|
-
get_dependency_config = parent_rpcs.get_dependency if parent_rpcs.respond_to? :get_dependency
|
889
|
-
@get_dependency = ::Gapic::Config::Method.new get_dependency_config
|
890
|
-
update_dependency_config = parent_rpcs.update_dependency if parent_rpcs.respond_to? :update_dependency
|
891
|
-
@update_dependency = ::Gapic::Config::Method.new update_dependency_config
|
892
|
-
delete_dependency_config = parent_rpcs.delete_dependency if parent_rpcs.respond_to? :delete_dependency
|
893
|
-
@delete_dependency = ::Gapic::Config::Method.new delete_dependency_config
|
894
|
-
list_dependencies_config = parent_rpcs.list_dependencies if parent_rpcs.respond_to? :list_dependencies
|
895
|
-
@list_dependencies = ::Gapic::Config::Method.new list_dependencies_config
|
896
|
-
|
897
|
-
yield self if block_given?
|
898
|
-
end
|
899
|
-
end
|
900
|
-
end
|
901
|
-
end
|
902
|
-
end
|
903
|
-
end
|
904
|
-
end
|
905
|
-
end
|
906
|
-
end
|