aws-sdk-robomaker 1.51.0 → 1.53.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,182 @@
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::RoboMaker
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::RoboMaker::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::RoboMaker::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::RoboMaker::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_worlds
60
+ Aws::RoboMaker::Endpoints::BatchDeleteWorlds.build(context)
61
+ when :batch_describe_simulation_job
62
+ Aws::RoboMaker::Endpoints::BatchDescribeSimulationJob.build(context)
63
+ when :cancel_deployment_job
64
+ Aws::RoboMaker::Endpoints::CancelDeploymentJob.build(context)
65
+ when :cancel_simulation_job
66
+ Aws::RoboMaker::Endpoints::CancelSimulationJob.build(context)
67
+ when :cancel_simulation_job_batch
68
+ Aws::RoboMaker::Endpoints::CancelSimulationJobBatch.build(context)
69
+ when :cancel_world_export_job
70
+ Aws::RoboMaker::Endpoints::CancelWorldExportJob.build(context)
71
+ when :cancel_world_generation_job
72
+ Aws::RoboMaker::Endpoints::CancelWorldGenerationJob.build(context)
73
+ when :create_deployment_job
74
+ Aws::RoboMaker::Endpoints::CreateDeploymentJob.build(context)
75
+ when :create_fleet
76
+ Aws::RoboMaker::Endpoints::CreateFleet.build(context)
77
+ when :create_robot
78
+ Aws::RoboMaker::Endpoints::CreateRobot.build(context)
79
+ when :create_robot_application
80
+ Aws::RoboMaker::Endpoints::CreateRobotApplication.build(context)
81
+ when :create_robot_application_version
82
+ Aws::RoboMaker::Endpoints::CreateRobotApplicationVersion.build(context)
83
+ when :create_simulation_application
84
+ Aws::RoboMaker::Endpoints::CreateSimulationApplication.build(context)
85
+ when :create_simulation_application_version
86
+ Aws::RoboMaker::Endpoints::CreateSimulationApplicationVersion.build(context)
87
+ when :create_simulation_job
88
+ Aws::RoboMaker::Endpoints::CreateSimulationJob.build(context)
89
+ when :create_world_export_job
90
+ Aws::RoboMaker::Endpoints::CreateWorldExportJob.build(context)
91
+ when :create_world_generation_job
92
+ Aws::RoboMaker::Endpoints::CreateWorldGenerationJob.build(context)
93
+ when :create_world_template
94
+ Aws::RoboMaker::Endpoints::CreateWorldTemplate.build(context)
95
+ when :delete_fleet
96
+ Aws::RoboMaker::Endpoints::DeleteFleet.build(context)
97
+ when :delete_robot
98
+ Aws::RoboMaker::Endpoints::DeleteRobot.build(context)
99
+ when :delete_robot_application
100
+ Aws::RoboMaker::Endpoints::DeleteRobotApplication.build(context)
101
+ when :delete_simulation_application
102
+ Aws::RoboMaker::Endpoints::DeleteSimulationApplication.build(context)
103
+ when :delete_world_template
104
+ Aws::RoboMaker::Endpoints::DeleteWorldTemplate.build(context)
105
+ when :deregister_robot
106
+ Aws::RoboMaker::Endpoints::DeregisterRobot.build(context)
107
+ when :describe_deployment_job
108
+ Aws::RoboMaker::Endpoints::DescribeDeploymentJob.build(context)
109
+ when :describe_fleet
110
+ Aws::RoboMaker::Endpoints::DescribeFleet.build(context)
111
+ when :describe_robot
112
+ Aws::RoboMaker::Endpoints::DescribeRobot.build(context)
113
+ when :describe_robot_application
114
+ Aws::RoboMaker::Endpoints::DescribeRobotApplication.build(context)
115
+ when :describe_simulation_application
116
+ Aws::RoboMaker::Endpoints::DescribeSimulationApplication.build(context)
117
+ when :describe_simulation_job
118
+ Aws::RoboMaker::Endpoints::DescribeSimulationJob.build(context)
119
+ when :describe_simulation_job_batch
120
+ Aws::RoboMaker::Endpoints::DescribeSimulationJobBatch.build(context)
121
+ when :describe_world
122
+ Aws::RoboMaker::Endpoints::DescribeWorld.build(context)
123
+ when :describe_world_export_job
124
+ Aws::RoboMaker::Endpoints::DescribeWorldExportJob.build(context)
125
+ when :describe_world_generation_job
126
+ Aws::RoboMaker::Endpoints::DescribeWorldGenerationJob.build(context)
127
+ when :describe_world_template
128
+ Aws::RoboMaker::Endpoints::DescribeWorldTemplate.build(context)
129
+ when :get_world_template_body
130
+ Aws::RoboMaker::Endpoints::GetWorldTemplateBody.build(context)
131
+ when :list_deployment_jobs
132
+ Aws::RoboMaker::Endpoints::ListDeploymentJobs.build(context)
133
+ when :list_fleets
134
+ Aws::RoboMaker::Endpoints::ListFleets.build(context)
135
+ when :list_robot_applications
136
+ Aws::RoboMaker::Endpoints::ListRobotApplications.build(context)
137
+ when :list_robots
138
+ Aws::RoboMaker::Endpoints::ListRobots.build(context)
139
+ when :list_simulation_applications
140
+ Aws::RoboMaker::Endpoints::ListSimulationApplications.build(context)
141
+ when :list_simulation_job_batches
142
+ Aws::RoboMaker::Endpoints::ListSimulationJobBatches.build(context)
143
+ when :list_simulation_jobs
144
+ Aws::RoboMaker::Endpoints::ListSimulationJobs.build(context)
145
+ when :list_tags_for_resource
146
+ Aws::RoboMaker::Endpoints::ListTagsForResource.build(context)
147
+ when :list_world_export_jobs
148
+ Aws::RoboMaker::Endpoints::ListWorldExportJobs.build(context)
149
+ when :list_world_generation_jobs
150
+ Aws::RoboMaker::Endpoints::ListWorldGenerationJobs.build(context)
151
+ when :list_world_templates
152
+ Aws::RoboMaker::Endpoints::ListWorldTemplates.build(context)
153
+ when :list_worlds
154
+ Aws::RoboMaker::Endpoints::ListWorlds.build(context)
155
+ when :register_robot
156
+ Aws::RoboMaker::Endpoints::RegisterRobot.build(context)
157
+ when :restart_simulation_job
158
+ Aws::RoboMaker::Endpoints::RestartSimulationJob.build(context)
159
+ when :start_simulation_job_batch
160
+ Aws::RoboMaker::Endpoints::StartSimulationJobBatch.build(context)
161
+ when :sync_deployment_job
162
+ Aws::RoboMaker::Endpoints::SyncDeploymentJob.build(context)
163
+ when :tag_resource
164
+ Aws::RoboMaker::Endpoints::TagResource.build(context)
165
+ when :untag_resource
166
+ Aws::RoboMaker::Endpoints::UntagResource.build(context)
167
+ when :update_robot_application
168
+ Aws::RoboMaker::Endpoints::UpdateRobotApplication.build(context)
169
+ when :update_simulation_application
170
+ Aws::RoboMaker::Endpoints::UpdateSimulationApplication.build(context)
171
+ when :update_world_template
172
+ Aws::RoboMaker::Endpoints::UpdateWorldTemplate.build(context)
173
+ end
174
+ end
175
+ end
176
+
177
+ def add_handlers(handlers, _config)
178
+ handlers.add(Handler, step: :build, priority: 75)
179
+ end
180
+ end
181
+ end
182
+ end