google-cloud-life_sciences-v2beta 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-life_sciences-v2beta.rb +21 -0
- data/lib/google/cloud/life_sciences/v2beta.rb +38 -0
- data/lib/google/cloud/life_sciences/v2beta/version.rb +28 -0
- data/lib/google/cloud/life_sciences/v2beta/workflows_service.rb +50 -0
- data/lib/google/cloud/life_sciences/v2beta/workflows_service/client.rb +419 -0
- data/lib/google/cloud/life_sciences/v2beta/workflows_service/credentials.rb +51 -0
- data/lib/google/cloud/life_sciences/v2beta/workflows_service/operations.rb +655 -0
- data/lib/google/cloud/lifesciences/v2beta/workflows_pb.rb +221 -0
- data/lib/google/cloud/lifesciences/v2beta/workflows_services_pb.rb +62 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +65 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/lifesciences/v2beta/workflows.rb +854 -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/timestamp.rb +129 -0
- data/proto_docs/google/rpc/code.rb +185 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +217 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/life_sciences/v2beta"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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/life_sciences/v2beta/workflows_service"
|
20
|
+
require "google/cloud/life_sciences/v2beta/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module LifeSciences
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/life_sciences/v2beta"
|
29
|
+
# client = ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.new
|
30
|
+
#
|
31
|
+
module V2beta
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
helper_path = ::File.join __dir__, "v2beta", "_helpers.rb"
|
38
|
+
require "google/cloud/life_sciences/v2beta/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module LifeSciences
|
23
|
+
module V2beta
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/life_sciences/v2beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/life_sciences/v2beta/workflows_service/credentials"
|
26
|
+
require "google/cloud/life_sciences/v2beta/workflows_service/operations"
|
27
|
+
require "google/cloud/life_sciences/v2beta/workflows_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module LifeSciences
|
32
|
+
module V2beta
|
33
|
+
##
|
34
|
+
# A service for running workflows, such as pipelines consisting of Docker
|
35
|
+
# containers.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/life_sciences/v2beta/workflows_service"
|
40
|
+
# client = ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.new
|
41
|
+
#
|
42
|
+
module WorkflowsService
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "workflows_service", "helpers.rb"
|
50
|
+
require "google/cloud/life_sciences/v2beta/workflows_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,419 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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/lifesciences/v2beta/workflows_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module LifeSciences
|
25
|
+
module V2beta
|
26
|
+
module WorkflowsService
|
27
|
+
##
|
28
|
+
# Client for the WorkflowsService service.
|
29
|
+
#
|
30
|
+
# A service for running workflows, such as pipelines consisting of Docker
|
31
|
+
# containers.
|
32
|
+
#
|
33
|
+
class Client
|
34
|
+
# @private
|
35
|
+
attr_reader :workflows_service_stub
|
36
|
+
|
37
|
+
##
|
38
|
+
# Configure the WorkflowsService Client class.
|
39
|
+
#
|
40
|
+
# See {::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client::Configuration}
|
41
|
+
# for a description of the configuration fields.
|
42
|
+
#
|
43
|
+
# ## Example
|
44
|
+
#
|
45
|
+
# To modify the configuration for all WorkflowsService clients:
|
46
|
+
#
|
47
|
+
# ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
50
|
+
#
|
51
|
+
# @yield [config] Configure the Client client.
|
52
|
+
# @yieldparam config [Client::Configuration]
|
53
|
+
#
|
54
|
+
# @return [Client::Configuration]
|
55
|
+
#
|
56
|
+
def self.configure
|
57
|
+
@configure ||= begin
|
58
|
+
namespace = ["Google", "Cloud", "LifeSciences", "V2beta"]
|
59
|
+
parent_config = while namespace.any?
|
60
|
+
parent_name = namespace.join "::"
|
61
|
+
parent_const = const_get parent_name
|
62
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
63
|
+
namespace.pop
|
64
|
+
end
|
65
|
+
default_config = Client::Configuration.new parent_config
|
66
|
+
|
67
|
+
default_config.timeout = 60.0
|
68
|
+
|
69
|
+
default_config
|
70
|
+
end
|
71
|
+
yield @configure if block_given?
|
72
|
+
@configure
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Configure the WorkflowsService Client instance.
|
77
|
+
#
|
78
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
79
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
80
|
+
# should be made on {Client.configure}.
|
81
|
+
#
|
82
|
+
# See {::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client::Configuration}
|
83
|
+
# for a description of the configuration fields.
|
84
|
+
#
|
85
|
+
# @yield [config] Configure the Client client.
|
86
|
+
# @yieldparam config [Client::Configuration]
|
87
|
+
#
|
88
|
+
# @return [Client::Configuration]
|
89
|
+
#
|
90
|
+
def configure
|
91
|
+
yield @config if block_given?
|
92
|
+
@config
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Create a new WorkflowsService client object.
|
97
|
+
#
|
98
|
+
# ## Examples
|
99
|
+
#
|
100
|
+
# To create a new WorkflowsService client with the default
|
101
|
+
# configuration:
|
102
|
+
#
|
103
|
+
# client = ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.new
|
104
|
+
#
|
105
|
+
# To create a new WorkflowsService client with a custom
|
106
|
+
# configuration:
|
107
|
+
#
|
108
|
+
# client = ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.new do |config|
|
109
|
+
# config.timeout = 10.0
|
110
|
+
# end
|
111
|
+
#
|
112
|
+
# @yield [config] Configure the WorkflowsService client.
|
113
|
+
# @yieldparam config [Client::Configuration]
|
114
|
+
#
|
115
|
+
def initialize
|
116
|
+
# These require statements are intentionally placed here to initialize
|
117
|
+
# the gRPC module only when it's required.
|
118
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
119
|
+
require "gapic/grpc"
|
120
|
+
require "google/cloud/lifesciences/v2beta/workflows_services_pb"
|
121
|
+
|
122
|
+
# Create the configuration object
|
123
|
+
@config = Configuration.new Client.configure
|
124
|
+
|
125
|
+
# Yield the configuration if needed
|
126
|
+
yield @config if block_given?
|
127
|
+
|
128
|
+
# Create credentials
|
129
|
+
credentials = @config.credentials
|
130
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
131
|
+
# but only if the default endpoint does not have a region prefix.
|
132
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
133
|
+
@config.endpoint == Client.configure.endpoint &&
|
134
|
+
!@config.endpoint.split(".").first.include?("-")
|
135
|
+
credentials ||= Credentials.default scope: @config.scope,
|
136
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
137
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
138
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
139
|
+
end
|
140
|
+
@quota_project_id = @config.quota_project
|
141
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
142
|
+
|
143
|
+
@operations_client = Operations.new do |config|
|
144
|
+
config.credentials = credentials
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
148
|
+
@workflows_service_stub = ::Gapic::ServiceStub.new(
|
149
|
+
::Google::Cloud::LifeSciences::V2beta::WorkflowsServiceV2Beta::Stub,
|
150
|
+
credentials: credentials,
|
151
|
+
endpoint: @config.endpoint,
|
152
|
+
channel_args: @config.channel_args,
|
153
|
+
interceptors: @config.interceptors
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Get the associated client for long-running operations.
|
159
|
+
#
|
160
|
+
# @return [::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Operations]
|
161
|
+
#
|
162
|
+
attr_reader :operations_client
|
163
|
+
|
164
|
+
# Service calls
|
165
|
+
|
166
|
+
##
|
167
|
+
# Runs a pipeline. The returned Operation's [metadata]
|
168
|
+
# [google.longrunning.Operation.metadata] field will contain a
|
169
|
+
# {::Google::Cloud::LifeSciences::V2beta::Metadata google.cloud.lifesciences.v2beta.Metadata} object describing the status
|
170
|
+
# of the pipeline execution. The
|
171
|
+
# {::Google::Longrunning::Operation#response response} field will contain a
|
172
|
+
# {::Google::Cloud::LifeSciences::V2beta::RunPipelineResponse google.cloud.lifesciences.v2beta.RunPipelineResponse} object if the
|
173
|
+
# pipeline completes successfully.
|
174
|
+
#
|
175
|
+
# **Note:** Before you can use this method, the *Life Sciences Service Agent*
|
176
|
+
# must have access to your project. This is done automatically when the
|
177
|
+
# Cloud Life Sciences API is first enabled, but if you delete this permission
|
178
|
+
# you must disable and re-enable the API to grant the Life Sciences
|
179
|
+
# Service Agent the required permissions.
|
180
|
+
# Authorization requires the following [Google
|
181
|
+
# IAM](https://cloud.google.com/iam/) permission:
|
182
|
+
#
|
183
|
+
# * `lifesciences.workflows.run`
|
184
|
+
#
|
185
|
+
# @overload run_pipeline(request, options = nil)
|
186
|
+
# Pass arguments to `run_pipeline` via a request object, either of type
|
187
|
+
# {::Google::Cloud::LifeSciences::V2beta::RunPipelineRequest} or an equivalent Hash.
|
188
|
+
#
|
189
|
+
# @param request [::Google::Cloud::LifeSciences::V2beta::RunPipelineRequest, ::Hash]
|
190
|
+
# A request object representing the call parameters. Required. To specify no
|
191
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
192
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
193
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
194
|
+
#
|
195
|
+
# @overload run_pipeline(parent: nil, pipeline: nil, labels: nil, pub_sub_topic: nil)
|
196
|
+
# Pass arguments to `run_pipeline` via keyword arguments. Note that at
|
197
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
198
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
199
|
+
#
|
200
|
+
# @param parent [::String]
|
201
|
+
# The project and location that this request should be executed against.
|
202
|
+
# @param pipeline [::Google::Cloud::LifeSciences::V2beta::Pipeline, ::Hash]
|
203
|
+
# Required. The description of the pipeline to run.
|
204
|
+
# @param labels [::Hash{::String => ::String}]
|
205
|
+
# User-defined labels to associate with the returned operation. These
|
206
|
+
# labels are not propagated to any Google Cloud Platform resources used by
|
207
|
+
# the operation, and can be modified at any time.
|
208
|
+
#
|
209
|
+
# To associate labels with resources created while executing the operation,
|
210
|
+
# see the appropriate resource message (for example, `VirtualMachine`).
|
211
|
+
# @param pub_sub_topic [::String]
|
212
|
+
# The name of an existing Pub/Sub topic. The server will publish
|
213
|
+
# messages to this topic whenever the status of the operation changes.
|
214
|
+
# The Life Sciences Service Agent account must have publisher permissions to
|
215
|
+
# the specified topic or notifications will not be sent.
|
216
|
+
#
|
217
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
218
|
+
# @yieldparam response [::Gapic::Operation]
|
219
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
220
|
+
#
|
221
|
+
# @return [::Gapic::Operation]
|
222
|
+
#
|
223
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
224
|
+
#
|
225
|
+
def run_pipeline request, options = nil
|
226
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
227
|
+
|
228
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::LifeSciences::V2beta::RunPipelineRequest
|
229
|
+
|
230
|
+
# Converts hash and nil to an options object
|
231
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
232
|
+
|
233
|
+
# Customize the options with defaults
|
234
|
+
metadata = @config.rpcs.run_pipeline.metadata.to_h
|
235
|
+
|
236
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
237
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
238
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
239
|
+
gapic_version: ::Google::Cloud::LifeSciences::V2beta::VERSION
|
240
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
241
|
+
|
242
|
+
header_params = {
|
243
|
+
"parent" => request.parent
|
244
|
+
}
|
245
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
246
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
247
|
+
|
248
|
+
options.apply_defaults timeout: @config.rpcs.run_pipeline.timeout,
|
249
|
+
metadata: metadata,
|
250
|
+
retry_policy: @config.rpcs.run_pipeline.retry_policy
|
251
|
+
options.apply_defaults metadata: @config.metadata,
|
252
|
+
retry_policy: @config.retry_policy
|
253
|
+
|
254
|
+
@workflows_service_stub.call_rpc :run_pipeline, request, options: options do |response, operation|
|
255
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
256
|
+
yield response, operation if block_given?
|
257
|
+
return response
|
258
|
+
end
|
259
|
+
rescue ::GRPC::BadStatus => e
|
260
|
+
raise ::Google::Cloud::Error.from_error(e)
|
261
|
+
end
|
262
|
+
|
263
|
+
##
|
264
|
+
# Configuration class for the WorkflowsService API.
|
265
|
+
#
|
266
|
+
# This class represents the configuration for WorkflowsService,
|
267
|
+
# providing control over timeouts, retry behavior, logging, transport
|
268
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
269
|
+
# applied individually to specific RPCs. See
|
270
|
+
# {::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client::Configuration::Rpcs}
|
271
|
+
# for a list of RPCs that can be configured independently.
|
272
|
+
#
|
273
|
+
# Configuration can be applied globally to all clients, or to a single client
|
274
|
+
# on construction.
|
275
|
+
#
|
276
|
+
# # Examples
|
277
|
+
#
|
278
|
+
# To modify the global config, setting the timeout for run_pipeline
|
279
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
280
|
+
#
|
281
|
+
# ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.configure do |config|
|
282
|
+
# config.timeout = 10.0
|
283
|
+
# config.rpcs.run_pipeline.timeout = 20.0
|
284
|
+
# end
|
285
|
+
#
|
286
|
+
# To apply the above configuration only to a new client:
|
287
|
+
#
|
288
|
+
# client = ::Google::Cloud::LifeSciences::V2beta::WorkflowsService::Client.new do |config|
|
289
|
+
# config.timeout = 10.0
|
290
|
+
# config.rpcs.run_pipeline.timeout = 20.0
|
291
|
+
# end
|
292
|
+
#
|
293
|
+
# @!attribute [rw] endpoint
|
294
|
+
# The hostname or hostname:port of the service endpoint.
|
295
|
+
# Defaults to `"lifesciences.googleapis.com"`.
|
296
|
+
# @return [::String]
|
297
|
+
# @!attribute [rw] credentials
|
298
|
+
# Credentials to send with calls. You may provide any of the following types:
|
299
|
+
# * (`String`) The path to a service account key file in JSON format
|
300
|
+
# * (`Hash`) A service account key as a Hash
|
301
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
302
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
303
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
304
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
305
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
306
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
307
|
+
# * (`nil`) indicating no credentials
|
308
|
+
# @return [::Object]
|
309
|
+
# @!attribute [rw] scope
|
310
|
+
# The OAuth scopes
|
311
|
+
# @return [::Array<::String>]
|
312
|
+
# @!attribute [rw] lib_name
|
313
|
+
# The library name as recorded in instrumentation and logging
|
314
|
+
# @return [::String]
|
315
|
+
# @!attribute [rw] lib_version
|
316
|
+
# The library version as recorded in instrumentation and logging
|
317
|
+
# @return [::String]
|
318
|
+
# @!attribute [rw] channel_args
|
319
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
320
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
321
|
+
# @return [::Hash]
|
322
|
+
# @!attribute [rw] interceptors
|
323
|
+
# An array of interceptors that are run before calls are executed.
|
324
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
325
|
+
# @!attribute [rw] timeout
|
326
|
+
# The call timeout in seconds.
|
327
|
+
# @return [::Numeric]
|
328
|
+
# @!attribute [rw] metadata
|
329
|
+
# Additional gRPC headers to be sent with the call.
|
330
|
+
# @return [::Hash{::Symbol=>::String}]
|
331
|
+
# @!attribute [rw] retry_policy
|
332
|
+
# The retry policy. The value is a hash with the following keys:
|
333
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
334
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
335
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
336
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
337
|
+
# trigger a retry.
|
338
|
+
# @return [::Hash]
|
339
|
+
# @!attribute [rw] quota_project
|
340
|
+
# A separate project against which to charge quota.
|
341
|
+
# @return [::String]
|
342
|
+
#
|
343
|
+
class Configuration
|
344
|
+
extend ::Gapic::Config
|
345
|
+
|
346
|
+
config_attr :endpoint, "lifesciences.googleapis.com", ::String
|
347
|
+
config_attr :credentials, nil do |value|
|
348
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
349
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
350
|
+
allowed.any? { |klass| klass === value }
|
351
|
+
end
|
352
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
353
|
+
config_attr :lib_name, nil, ::String, nil
|
354
|
+
config_attr :lib_version, nil, ::String, nil
|
355
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
356
|
+
config_attr :interceptors, nil, ::Array, nil
|
357
|
+
config_attr :timeout, nil, ::Numeric, nil
|
358
|
+
config_attr :metadata, nil, ::Hash, nil
|
359
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
360
|
+
config_attr :quota_project, nil, ::String, nil
|
361
|
+
|
362
|
+
# @private
|
363
|
+
def initialize parent_config = nil
|
364
|
+
@parent_config = parent_config unless parent_config.nil?
|
365
|
+
|
366
|
+
yield self if block_given?
|
367
|
+
end
|
368
|
+
|
369
|
+
##
|
370
|
+
# Configurations for individual RPCs
|
371
|
+
# @return [Rpcs]
|
372
|
+
#
|
373
|
+
def rpcs
|
374
|
+
@rpcs ||= begin
|
375
|
+
parent_rpcs = nil
|
376
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
377
|
+
Rpcs.new parent_rpcs
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
381
|
+
##
|
382
|
+
# Configuration RPC class for the WorkflowsService API.
|
383
|
+
#
|
384
|
+
# Includes fields providing the configuration for each RPC in this service.
|
385
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
386
|
+
# the following configuration fields:
|
387
|
+
#
|
388
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
389
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
390
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
391
|
+
# include the following keys:
|
392
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
393
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
394
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
395
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
396
|
+
# trigger a retry.
|
397
|
+
#
|
398
|
+
class Rpcs
|
399
|
+
##
|
400
|
+
# RPC-specific configuration for `run_pipeline`
|
401
|
+
# @return [::Gapic::Config::Method]
|
402
|
+
#
|
403
|
+
attr_reader :run_pipeline
|
404
|
+
|
405
|
+
# @private
|
406
|
+
def initialize parent_rpcs = nil
|
407
|
+
run_pipeline_config = parent_rpcs.run_pipeline if parent_rpcs.respond_to? :run_pipeline
|
408
|
+
@run_pipeline = ::Gapic::Config::Method.new run_pipeline_config
|
409
|
+
|
410
|
+
yield self if block_given?
|
411
|
+
end
|
412
|
+
end
|
413
|
+
end
|
414
|
+
end
|
415
|
+
end
|
416
|
+
end
|
417
|
+
end
|
418
|
+
end
|
419
|
+
end
|