aws-sdk-neptunedata 1.0.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.
@@ -0,0 +1,154 @@
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::Neptunedata
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Neptunedata::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::Neptunedata::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Neptunedata::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 :cancel_gremlin_query
60
+ Aws::Neptunedata::Endpoints::CancelGremlinQuery.build(context)
61
+ when :cancel_loader_job
62
+ Aws::Neptunedata::Endpoints::CancelLoaderJob.build(context)
63
+ when :cancel_ml_data_processing_job
64
+ Aws::Neptunedata::Endpoints::CancelMLDataProcessingJob.build(context)
65
+ when :cancel_ml_model_training_job
66
+ Aws::Neptunedata::Endpoints::CancelMLModelTrainingJob.build(context)
67
+ when :cancel_ml_model_transform_job
68
+ Aws::Neptunedata::Endpoints::CancelMLModelTransformJob.build(context)
69
+ when :cancel_open_cypher_query
70
+ Aws::Neptunedata::Endpoints::CancelOpenCypherQuery.build(context)
71
+ when :create_ml_endpoint
72
+ Aws::Neptunedata::Endpoints::CreateMLEndpoint.build(context)
73
+ when :delete_ml_endpoint
74
+ Aws::Neptunedata::Endpoints::DeleteMLEndpoint.build(context)
75
+ when :delete_propertygraph_statistics
76
+ Aws::Neptunedata::Endpoints::DeletePropertygraphStatistics.build(context)
77
+ when :delete_sparql_statistics
78
+ Aws::Neptunedata::Endpoints::DeleteSparqlStatistics.build(context)
79
+ when :execute_fast_reset
80
+ Aws::Neptunedata::Endpoints::ExecuteFastReset.build(context)
81
+ when :execute_gremlin_explain_query
82
+ Aws::Neptunedata::Endpoints::ExecuteGremlinExplainQuery.build(context)
83
+ when :execute_gremlin_profile_query
84
+ Aws::Neptunedata::Endpoints::ExecuteGremlinProfileQuery.build(context)
85
+ when :execute_gremlin_query
86
+ Aws::Neptunedata::Endpoints::ExecuteGremlinQuery.build(context)
87
+ when :execute_open_cypher_explain_query
88
+ Aws::Neptunedata::Endpoints::ExecuteOpenCypherExplainQuery.build(context)
89
+ when :execute_open_cypher_query
90
+ Aws::Neptunedata::Endpoints::ExecuteOpenCypherQuery.build(context)
91
+ when :get_engine_status
92
+ Aws::Neptunedata::Endpoints::GetEngineStatus.build(context)
93
+ when :get_gremlin_query_status
94
+ Aws::Neptunedata::Endpoints::GetGremlinQueryStatus.build(context)
95
+ when :get_loader_job_status
96
+ Aws::Neptunedata::Endpoints::GetLoaderJobStatus.build(context)
97
+ when :get_ml_data_processing_job
98
+ Aws::Neptunedata::Endpoints::GetMLDataProcessingJob.build(context)
99
+ when :get_ml_endpoint
100
+ Aws::Neptunedata::Endpoints::GetMLEndpoint.build(context)
101
+ when :get_ml_model_training_job
102
+ Aws::Neptunedata::Endpoints::GetMLModelTrainingJob.build(context)
103
+ when :get_ml_model_transform_job
104
+ Aws::Neptunedata::Endpoints::GetMLModelTransformJob.build(context)
105
+ when :get_open_cypher_query_status
106
+ Aws::Neptunedata::Endpoints::GetOpenCypherQueryStatus.build(context)
107
+ when :get_propertygraph_statistics
108
+ Aws::Neptunedata::Endpoints::GetPropertygraphStatistics.build(context)
109
+ when :get_propertygraph_stream
110
+ Aws::Neptunedata::Endpoints::GetPropertygraphStream.build(context)
111
+ when :get_propertygraph_summary
112
+ Aws::Neptunedata::Endpoints::GetPropertygraphSummary.build(context)
113
+ when :get_rdf_graph_summary
114
+ Aws::Neptunedata::Endpoints::GetRDFGraphSummary.build(context)
115
+ when :get_sparql_statistics
116
+ Aws::Neptunedata::Endpoints::GetSparqlStatistics.build(context)
117
+ when :get_sparql_stream
118
+ Aws::Neptunedata::Endpoints::GetSparqlStream.build(context)
119
+ when :list_gremlin_queries
120
+ Aws::Neptunedata::Endpoints::ListGremlinQueries.build(context)
121
+ when :list_loader_jobs
122
+ Aws::Neptunedata::Endpoints::ListLoaderJobs.build(context)
123
+ when :list_ml_data_processing_jobs
124
+ Aws::Neptunedata::Endpoints::ListMLDataProcessingJobs.build(context)
125
+ when :list_ml_endpoints
126
+ Aws::Neptunedata::Endpoints::ListMLEndpoints.build(context)
127
+ when :list_ml_model_training_jobs
128
+ Aws::Neptunedata::Endpoints::ListMLModelTrainingJobs.build(context)
129
+ when :list_ml_model_transform_jobs
130
+ Aws::Neptunedata::Endpoints::ListMLModelTransformJobs.build(context)
131
+ when :list_open_cypher_queries
132
+ Aws::Neptunedata::Endpoints::ListOpenCypherQueries.build(context)
133
+ when :manage_propertygraph_statistics
134
+ Aws::Neptunedata::Endpoints::ManagePropertygraphStatistics.build(context)
135
+ when :manage_sparql_statistics
136
+ Aws::Neptunedata::Endpoints::ManageSparqlStatistics.build(context)
137
+ when :start_loader_job
138
+ Aws::Neptunedata::Endpoints::StartLoaderJob.build(context)
139
+ when :start_ml_data_processing_job
140
+ Aws::Neptunedata::Endpoints::StartMLDataProcessingJob.build(context)
141
+ when :start_ml_model_training_job
142
+ Aws::Neptunedata::Endpoints::StartMLModelTrainingJob.build(context)
143
+ when :start_ml_model_transform_job
144
+ Aws::Neptunedata::Endpoints::StartMLModelTransformJob.build(context)
145
+ end
146
+ end
147
+ end
148
+
149
+ def add_handlers(handlers, _config)
150
+ handlers.add(Handler, step: :build, priority: 75)
151
+ end
152
+ end
153
+ end
154
+ 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::Neptunedata
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