aws-sdk-omics 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,198 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::Omics
11
+
12
+ # When Omics returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::Omics::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all Omics errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::Omics::Errors::ServiceError
20
+ # # rescues all Omics API errors
21
+ # end
22
+ #
23
+ #
24
+ # ## Request Context
25
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
26
+ # information about the request that generated the error.
27
+ # See {Seahorse::Client::RequestContext} for more information.
28
+ #
29
+ # ## Error Classes
30
+ # * {AccessDeniedException}
31
+ # * {ConflictException}
32
+ # * {InternalServerException}
33
+ # * {RangeNotSatisfiableException}
34
+ # * {RequestTimeoutException}
35
+ # * {ResourceNotFoundException}
36
+ # * {ServiceQuotaExceededException}
37
+ # * {ThrottlingException}
38
+ # * {ValidationException}
39
+ #
40
+ # Additionally, error classes are dynamically generated for service errors based on the error code
41
+ # if they are not defined above.
42
+ module Errors
43
+
44
+ extend Aws::Errors::DynamicErrors
45
+
46
+ class AccessDeniedException < ServiceError
47
+
48
+ # @param [Seahorse::Client::RequestContext] context
49
+ # @param [String] message
50
+ # @param [Aws::Omics::Types::AccessDeniedException] data
51
+ def initialize(context, message, data = Aws::EmptyStructure.new)
52
+ super(context, message, data)
53
+ end
54
+
55
+ # @return [String]
56
+ def message
57
+ @message || @data[:message]
58
+ end
59
+ end
60
+
61
+ class ConflictException < ServiceError
62
+
63
+ # @param [Seahorse::Client::RequestContext] context
64
+ # @param [String] message
65
+ # @param [Aws::Omics::Types::ConflictException] data
66
+ def initialize(context, message, data = Aws::EmptyStructure.new)
67
+ super(context, message, data)
68
+ end
69
+
70
+ # @return [String]
71
+ def message
72
+ @message || @data[:message]
73
+ end
74
+ end
75
+
76
+ class InternalServerException < ServiceError
77
+
78
+ # @param [Seahorse::Client::RequestContext] context
79
+ # @param [String] message
80
+ # @param [Aws::Omics::Types::InternalServerException] data
81
+ def initialize(context, message, data = Aws::EmptyStructure.new)
82
+ super(context, message, data)
83
+ end
84
+
85
+ # @return [String]
86
+ def message
87
+ @message || @data[:message]
88
+ end
89
+
90
+ def retryable?
91
+ true
92
+ end
93
+ end
94
+
95
+ class RangeNotSatisfiableException < ServiceError
96
+
97
+ # @param [Seahorse::Client::RequestContext] context
98
+ # @param [String] message
99
+ # @param [Aws::Omics::Types::RangeNotSatisfiableException] data
100
+ def initialize(context, message, data = Aws::EmptyStructure.new)
101
+ super(context, message, data)
102
+ end
103
+
104
+ # @return [String]
105
+ def message
106
+ @message || @data[:message]
107
+ end
108
+
109
+ def retryable?
110
+ true
111
+ end
112
+ end
113
+
114
+ class RequestTimeoutException < ServiceError
115
+
116
+ # @param [Seahorse::Client::RequestContext] context
117
+ # @param [String] message
118
+ # @param [Aws::Omics::Types::RequestTimeoutException] data
119
+ def initialize(context, message, data = Aws::EmptyStructure.new)
120
+ super(context, message, data)
121
+ end
122
+
123
+ # @return [String]
124
+ def message
125
+ @message || @data[:message]
126
+ end
127
+ end
128
+
129
+ class ResourceNotFoundException < ServiceError
130
+
131
+ # @param [Seahorse::Client::RequestContext] context
132
+ # @param [String] message
133
+ # @param [Aws::Omics::Types::ResourceNotFoundException] data
134
+ def initialize(context, message, data = Aws::EmptyStructure.new)
135
+ super(context, message, data)
136
+ end
137
+
138
+ # @return [String]
139
+ def message
140
+ @message || @data[:message]
141
+ end
142
+ end
143
+
144
+ class ServiceQuotaExceededException < ServiceError
145
+
146
+ # @param [Seahorse::Client::RequestContext] context
147
+ # @param [String] message
148
+ # @param [Aws::Omics::Types::ServiceQuotaExceededException] data
149
+ def initialize(context, message, data = Aws::EmptyStructure.new)
150
+ super(context, message, data)
151
+ end
152
+
153
+ # @return [String]
154
+ def message
155
+ @message || @data[:message]
156
+ end
157
+ end
158
+
159
+ class ThrottlingException < ServiceError
160
+
161
+ # @param [Seahorse::Client::RequestContext] context
162
+ # @param [String] message
163
+ # @param [Aws::Omics::Types::ThrottlingException] data
164
+ def initialize(context, message, data = Aws::EmptyStructure.new)
165
+ super(context, message, data)
166
+ end
167
+
168
+ # @return [String]
169
+ def message
170
+ @message || @data[:message]
171
+ end
172
+
173
+ def retryable?
174
+ true
175
+ end
176
+
177
+ def throttling?
178
+ true
179
+ end
180
+ end
181
+
182
+ class ValidationException < ServiceError
183
+
184
+ # @param [Seahorse::Client::RequestContext] context
185
+ # @param [String] message
186
+ # @param [Aws::Omics::Types::ValidationException] data
187
+ def initialize(context, message, data = Aws::EmptyStructure.new)
188
+ super(context, message, data)
189
+ end
190
+
191
+ # @return [String]
192
+ def message
193
+ @message || @data[:message]
194
+ end
195
+ end
196
+
197
+ end
198
+ end
@@ -0,0 +1,200 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::Omics
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Omics::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Omics::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Omics::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :batch_delete_read_set
60
+ Aws::Omics::Endpoints::BatchDeleteReadSet.build(context)
61
+ when :cancel_annotation_import_job
62
+ Aws::Omics::Endpoints::CancelAnnotationImportJob.build(context)
63
+ when :cancel_run
64
+ Aws::Omics::Endpoints::CancelRun.build(context)
65
+ when :cancel_variant_import_job
66
+ Aws::Omics::Endpoints::CancelVariantImportJob.build(context)
67
+ when :create_annotation_store
68
+ Aws::Omics::Endpoints::CreateAnnotationStore.build(context)
69
+ when :create_reference_store
70
+ Aws::Omics::Endpoints::CreateReferenceStore.build(context)
71
+ when :create_run_group
72
+ Aws::Omics::Endpoints::CreateRunGroup.build(context)
73
+ when :create_sequence_store
74
+ Aws::Omics::Endpoints::CreateSequenceStore.build(context)
75
+ when :create_variant_store
76
+ Aws::Omics::Endpoints::CreateVariantStore.build(context)
77
+ when :create_workflow
78
+ Aws::Omics::Endpoints::CreateWorkflow.build(context)
79
+ when :delete_annotation_store
80
+ Aws::Omics::Endpoints::DeleteAnnotationStore.build(context)
81
+ when :delete_reference
82
+ Aws::Omics::Endpoints::DeleteReference.build(context)
83
+ when :delete_reference_store
84
+ Aws::Omics::Endpoints::DeleteReferenceStore.build(context)
85
+ when :delete_run
86
+ Aws::Omics::Endpoints::DeleteRun.build(context)
87
+ when :delete_run_group
88
+ Aws::Omics::Endpoints::DeleteRunGroup.build(context)
89
+ when :delete_sequence_store
90
+ Aws::Omics::Endpoints::DeleteSequenceStore.build(context)
91
+ when :delete_variant_store
92
+ Aws::Omics::Endpoints::DeleteVariantStore.build(context)
93
+ when :delete_workflow
94
+ Aws::Omics::Endpoints::DeleteWorkflow.build(context)
95
+ when :get_annotation_import_job
96
+ Aws::Omics::Endpoints::GetAnnotationImportJob.build(context)
97
+ when :get_annotation_store
98
+ Aws::Omics::Endpoints::GetAnnotationStore.build(context)
99
+ when :get_read_set
100
+ Aws::Omics::Endpoints::GetReadSet.build(context)
101
+ when :get_read_set_activation_job
102
+ Aws::Omics::Endpoints::GetReadSetActivationJob.build(context)
103
+ when :get_read_set_export_job
104
+ Aws::Omics::Endpoints::GetReadSetExportJob.build(context)
105
+ when :get_read_set_import_job
106
+ Aws::Omics::Endpoints::GetReadSetImportJob.build(context)
107
+ when :get_read_set_metadata
108
+ Aws::Omics::Endpoints::GetReadSetMetadata.build(context)
109
+ when :get_reference
110
+ Aws::Omics::Endpoints::GetReference.build(context)
111
+ when :get_reference_import_job
112
+ Aws::Omics::Endpoints::GetReferenceImportJob.build(context)
113
+ when :get_reference_metadata
114
+ Aws::Omics::Endpoints::GetReferenceMetadata.build(context)
115
+ when :get_reference_store
116
+ Aws::Omics::Endpoints::GetReferenceStore.build(context)
117
+ when :get_run
118
+ Aws::Omics::Endpoints::GetRun.build(context)
119
+ when :get_run_group
120
+ Aws::Omics::Endpoints::GetRunGroup.build(context)
121
+ when :get_run_task
122
+ Aws::Omics::Endpoints::GetRunTask.build(context)
123
+ when :get_sequence_store
124
+ Aws::Omics::Endpoints::GetSequenceStore.build(context)
125
+ when :get_variant_import_job
126
+ Aws::Omics::Endpoints::GetVariantImportJob.build(context)
127
+ when :get_variant_store
128
+ Aws::Omics::Endpoints::GetVariantStore.build(context)
129
+ when :get_workflow
130
+ Aws::Omics::Endpoints::GetWorkflow.build(context)
131
+ when :list_annotation_import_jobs
132
+ Aws::Omics::Endpoints::ListAnnotationImportJobs.build(context)
133
+ when :list_annotation_stores
134
+ Aws::Omics::Endpoints::ListAnnotationStores.build(context)
135
+ when :list_read_set_activation_jobs
136
+ Aws::Omics::Endpoints::ListReadSetActivationJobs.build(context)
137
+ when :list_read_set_export_jobs
138
+ Aws::Omics::Endpoints::ListReadSetExportJobs.build(context)
139
+ when :list_read_set_import_jobs
140
+ Aws::Omics::Endpoints::ListReadSetImportJobs.build(context)
141
+ when :list_read_sets
142
+ Aws::Omics::Endpoints::ListReadSets.build(context)
143
+ when :list_reference_import_jobs
144
+ Aws::Omics::Endpoints::ListReferenceImportJobs.build(context)
145
+ when :list_reference_stores
146
+ Aws::Omics::Endpoints::ListReferenceStores.build(context)
147
+ when :list_references
148
+ Aws::Omics::Endpoints::ListReferences.build(context)
149
+ when :list_run_groups
150
+ Aws::Omics::Endpoints::ListRunGroups.build(context)
151
+ when :list_run_tasks
152
+ Aws::Omics::Endpoints::ListRunTasks.build(context)
153
+ when :list_runs
154
+ Aws::Omics::Endpoints::ListRuns.build(context)
155
+ when :list_sequence_stores
156
+ Aws::Omics::Endpoints::ListSequenceStores.build(context)
157
+ when :list_tags_for_resource
158
+ Aws::Omics::Endpoints::ListTagsForResource.build(context)
159
+ when :list_variant_import_jobs
160
+ Aws::Omics::Endpoints::ListVariantImportJobs.build(context)
161
+ when :list_variant_stores
162
+ Aws::Omics::Endpoints::ListVariantStores.build(context)
163
+ when :list_workflows
164
+ Aws::Omics::Endpoints::ListWorkflows.build(context)
165
+ when :start_annotation_import_job
166
+ Aws::Omics::Endpoints::StartAnnotationImportJob.build(context)
167
+ when :start_read_set_activation_job
168
+ Aws::Omics::Endpoints::StartReadSetActivationJob.build(context)
169
+ when :start_read_set_export_job
170
+ Aws::Omics::Endpoints::StartReadSetExportJob.build(context)
171
+ when :start_read_set_import_job
172
+ Aws::Omics::Endpoints::StartReadSetImportJob.build(context)
173
+ when :start_reference_import_job
174
+ Aws::Omics::Endpoints::StartReferenceImportJob.build(context)
175
+ when :start_run
176
+ Aws::Omics::Endpoints::StartRun.build(context)
177
+ when :start_variant_import_job
178
+ Aws::Omics::Endpoints::StartVariantImportJob.build(context)
179
+ when :tag_resource
180
+ Aws::Omics::Endpoints::TagResource.build(context)
181
+ when :untag_resource
182
+ Aws::Omics::Endpoints::UntagResource.build(context)
183
+ when :update_annotation_store
184
+ Aws::Omics::Endpoints::UpdateAnnotationStore.build(context)
185
+ when :update_run_group
186
+ Aws::Omics::Endpoints::UpdateRunGroup.build(context)
187
+ when :update_variant_store
188
+ Aws::Omics::Endpoints::UpdateVariantStore.build(context)
189
+ when :update_workflow
190
+ Aws::Omics::Endpoints::UpdateWorkflow.build(context)
191
+ end
192
+ end
193
+ end
194
+
195
+ def add_handlers(handlers, _config)
196
+ handlers.add(Handler, step: :build, priority: 75)
197
+ end
198
+ end
199
+ end
200
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::Omics
11
+
12
+ class Resource
13
+
14
+ # @param options ({})
15
+ # @option options [Client] :client
16
+ def initialize(options = {})
17
+ @client = options[:client] || Client.new(options)
18
+ end
19
+
20
+ # @return [Client]
21
+ def client
22
+ @client
23
+ end
24
+
25
+ end
26
+ end