google-apis-lifesciences_v2beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,293 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module LifesciencesV2beta
23
+ # Cloud Life Sciences API
24
+ #
25
+ # Cloud Life Sciences is a suite of services and tools for managing, processing,
26
+ # and transforming life sciences data.
27
+ #
28
+ # @example
29
+ # require 'google/apis/lifesciences_v2beta'
30
+ #
31
+ # Lifesciences = Google::Apis::LifesciencesV2beta # Alias the module
32
+ # service = Lifesciences::CloudLifeSciencesService.new
33
+ #
34
+ # @see https://cloud.google.com/life-sciences
35
+ class CloudLifeSciencesService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://lifesciences.googleapis.com/', '',
48
+ client_name: 'google-apis-lifesciences_v2beta',
49
+ client_version: Google::Apis::LifesciencesV2beta::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::LifesciencesV2beta::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::LifesciencesV2beta::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v2beta/{+name}', options)
75
+ command.response_representation = Google::Apis::LifesciencesV2beta::Location::Representation
76
+ command.response_class = Google::Apis::LifesciencesV2beta::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::LifesciencesV2beta::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::LifesciencesV2beta::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v2beta/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::LifesciencesV2beta::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::LifesciencesV2beta::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Starts asynchronous cancellation on a long-running operation. The server makes
123
+ # a best effort to cancel the operation, but success is not guaranteed. Clients
124
+ # may use Operations.GetOperation or Operations.ListOperations to check whether
125
+ # the cancellation succeeded or the operation completed despite cancellation.
126
+ # Authorization requires the following [Google IAM](https://cloud.google.com/iam)
127
+ # permission: * `lifesciences.operations.cancel`
128
+ # @param [String] name
129
+ # The name of the operation resource to be cancelled.
130
+ # @param [Google::Apis::LifesciencesV2beta::CancelOperationRequest] cancel_operation_request_object
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
133
+ # @param [String] quota_user
134
+ # Available to use for quota purposes for server-side applications. Can be any
135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
136
+ # @param [Google::Apis::RequestOptions] options
137
+ # Request-specific options
138
+ #
139
+ # @yield [result, err] Result & error if block supplied
140
+ # @yieldparam result [Google::Apis::LifesciencesV2beta::Empty] parsed result object
141
+ # @yieldparam err [StandardError] error object if request failed
142
+ #
143
+ # @return [Google::Apis::LifesciencesV2beta::Empty]
144
+ #
145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
148
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
149
+ command = make_simple_command(:post, 'v2beta/{+name}:cancel', options)
150
+ command.request_representation = Google::Apis::LifesciencesV2beta::CancelOperationRequest::Representation
151
+ command.request_object = cancel_operation_request_object
152
+ command.response_representation = Google::Apis::LifesciencesV2beta::Empty::Representation
153
+ command.response_class = Google::Apis::LifesciencesV2beta::Empty
154
+ command.params['name'] = name unless name.nil?
155
+ command.query['fields'] = fields unless fields.nil?
156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
157
+ execute_or_queue_command(command, &block)
158
+ end
159
+
160
+ # Gets the latest state of a long-running operation. Clients can use this method
161
+ # to poll the operation result at intervals as recommended by the API service.
162
+ # Authorization requires the following [Google IAM](https://cloud.google.com/iam)
163
+ # permission: * `lifesciences.operations.get`
164
+ # @param [String] name
165
+ # The name of the operation resource.
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::LifesciencesV2beta::Operation] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::LifesciencesV2beta::Operation]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:get, 'v2beta/{+name}', options)
185
+ command.response_representation = Google::Apis::LifesciencesV2beta::Operation::Representation
186
+ command.response_class = Google::Apis::LifesciencesV2beta::Operation
187
+ command.params['name'] = name unless name.nil?
188
+ command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ execute_or_queue_command(command, &block)
191
+ end
192
+
193
+ # Lists operations that match the specified filter in the request. Authorization
194
+ # requires the following [Google IAM](https://cloud.google.com/iam) permission: *
195
+ # `lifesciences.operations.list`
196
+ # @param [String] name
197
+ # The name of the operation's parent resource.
198
+ # @param [String] filter
199
+ # A string for filtering Operations. The following filter fields are supported: *
200
+ # createTime: The time this job was created * events: The set of event (names)
201
+ # that have occurred while running the pipeline. The : operator can be used to
202
+ # determine if a particular event has occurred. * error: If the pipeline is
203
+ # running, this value is NULL. Once the pipeline finishes, the value is the
204
+ # standard Google error code. * labels.key or labels."key with space" where key
205
+ # is a label key. * done: If the pipeline is running, this value is false. Once
206
+ # the pipeline finishes, the value is true.
207
+ # @param [Fixnum] page_size
208
+ # The maximum number of results to return. The maximum value is 256.
209
+ # @param [String] page_token
210
+ # The standard list page token.
211
+ # @param [String] fields
212
+ # Selector specifying which fields to include in a partial response.
213
+ # @param [String] quota_user
214
+ # Available to use for quota purposes for server-side applications. Can be any
215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
216
+ # @param [Google::Apis::RequestOptions] options
217
+ # Request-specific options
218
+ #
219
+ # @yield [result, err] Result & error if block supplied
220
+ # @yieldparam result [Google::Apis::LifesciencesV2beta::ListOperationsResponse] parsed result object
221
+ # @yieldparam err [StandardError] error object if request failed
222
+ #
223
+ # @return [Google::Apis::LifesciencesV2beta::ListOperationsResponse]
224
+ #
225
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
226
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
227
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
228
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
229
+ command = make_simple_command(:get, 'v2beta/{+name}/operations', options)
230
+ command.response_representation = Google::Apis::LifesciencesV2beta::ListOperationsResponse::Representation
231
+ command.response_class = Google::Apis::LifesciencesV2beta::ListOperationsResponse
232
+ command.params['name'] = name unless name.nil?
233
+ command.query['filter'] = filter unless filter.nil?
234
+ command.query['pageSize'] = page_size unless page_size.nil?
235
+ command.query['pageToken'] = page_token unless page_token.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ execute_or_queue_command(command, &block)
239
+ end
240
+
241
+ # Runs a pipeline. The returned Operation's metadata field will contain a google.
242
+ # cloud.lifesciences.v2beta.Metadata object describing the status of the
243
+ # pipeline execution. The response field will contain a google.cloud.
244
+ # lifesciences.v2beta.RunPipelineResponse object if the pipeline completes
245
+ # successfully. **Note:** Before you can use this method, the *Life Sciences
246
+ # Service Agent* must have access to your project. This is done automatically
247
+ # when the Cloud Life Sciences API is first enabled, but if you delete this
248
+ # permission you must disable and re-enable the API to grant the Life Sciences
249
+ # Service Agent the required permissions. Authorization requires the following [
250
+ # Google IAM](https://cloud.google.com/iam/) permission: * `lifesciences.
251
+ # workflows.run`
252
+ # @param [String] parent
253
+ # The project and location that this request should be executed against.
254
+ # @param [Google::Apis::LifesciencesV2beta::RunPipelineRequest] run_pipeline_request_object
255
+ # @param [String] fields
256
+ # Selector specifying which fields to include in a partial response.
257
+ # @param [String] quota_user
258
+ # Available to use for quota purposes for server-side applications. Can be any
259
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
260
+ # @param [Google::Apis::RequestOptions] options
261
+ # Request-specific options
262
+ #
263
+ # @yield [result, err] Result & error if block supplied
264
+ # @yieldparam result [Google::Apis::LifesciencesV2beta::Operation] parsed result object
265
+ # @yieldparam err [StandardError] error object if request failed
266
+ #
267
+ # @return [Google::Apis::LifesciencesV2beta::Operation]
268
+ #
269
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
270
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
271
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
272
+ def run_pipeline(parent, run_pipeline_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
273
+ command = make_simple_command(:post, 'v2beta/{+parent}/pipelines:run', options)
274
+ command.request_representation = Google::Apis::LifesciencesV2beta::RunPipelineRequest::Representation
275
+ command.request_object = run_pipeline_request_object
276
+ command.response_representation = Google::Apis::LifesciencesV2beta::Operation::Representation
277
+ command.response_class = Google::Apis::LifesciencesV2beta::Operation
278
+ command.params['parent'] = parent unless parent.nil?
279
+ command.query['fields'] = fields unless fields.nil?
280
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
281
+ execute_or_queue_command(command, &block)
282
+ end
283
+
284
+ protected
285
+
286
+ def apply_command_defaults(command)
287
+ command.query['key'] = key unless key.nil?
288
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
289
+ end
290
+ end
291
+ end
292
+ end
293
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-lifesciences_v2beta
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ description: This is the simple REST client for Cloud Life Sciences API V2beta. Simple
28
+ REST clients are Ruby client libraries that provide access to Google services via
29
+ their HTTP REST API endpoints. These libraries are generated and updated automatically
30
+ based on the discovery documents published by the service, and they handle most
31
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
32
+ use this client to access the Cloud Life Sciences API, but note that some services
33
+ may provide a separate modern client that is easier to use.
34
+ email: googleapis-packages@google.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - ".yardopts"
40
+ - CHANGELOG.md
41
+ - LICENSE.md
42
+ - OVERVIEW.md
43
+ - lib/google-apis-lifesciences_v2beta.rb
44
+ - lib/google/apis/lifesciences_v2beta.rb
45
+ - lib/google/apis/lifesciences_v2beta/classes.rb
46
+ - lib/google/apis/lifesciences_v2beta/gem_version.rb
47
+ - lib/google/apis/lifesciences_v2beta/representations.rb
48
+ - lib/google/apis/lifesciences_v2beta/service.rb
49
+ homepage: https://github.com/google/google-api-ruby-client
50
+ licenses:
51
+ - Apache-2.0
52
+ metadata:
53
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-lifesciences_v2beta/CHANGELOG.md
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-lifesciences_v2beta/v0.1.0
56
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-lifesciences_v2beta
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '2.4'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Simple REST client for Cloud Life Sciences API V2beta
76
+ test_files: []