aws-sdk-medialive 1.90.0 → 1.92.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,186 @@
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::MediaLive
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::MediaLive::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::MediaLive::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::MediaLive::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 :accept_input_device_transfer
60
+ Aws::MediaLive::Endpoints::AcceptInputDeviceTransfer.build(context)
61
+ when :batch_delete
62
+ Aws::MediaLive::Endpoints::BatchDelete.build(context)
63
+ when :batch_start
64
+ Aws::MediaLive::Endpoints::BatchStart.build(context)
65
+ when :batch_stop
66
+ Aws::MediaLive::Endpoints::BatchStop.build(context)
67
+ when :batch_update_schedule
68
+ Aws::MediaLive::Endpoints::BatchUpdateSchedule.build(context)
69
+ when :cancel_input_device_transfer
70
+ Aws::MediaLive::Endpoints::CancelInputDeviceTransfer.build(context)
71
+ when :claim_device
72
+ Aws::MediaLive::Endpoints::ClaimDevice.build(context)
73
+ when :create_channel
74
+ Aws::MediaLive::Endpoints::CreateChannel.build(context)
75
+ when :create_input
76
+ Aws::MediaLive::Endpoints::CreateInput.build(context)
77
+ when :create_input_security_group
78
+ Aws::MediaLive::Endpoints::CreateInputSecurityGroup.build(context)
79
+ when :create_multiplex
80
+ Aws::MediaLive::Endpoints::CreateMultiplex.build(context)
81
+ when :create_multiplex_program
82
+ Aws::MediaLive::Endpoints::CreateMultiplexProgram.build(context)
83
+ when :create_partner_input
84
+ Aws::MediaLive::Endpoints::CreatePartnerInput.build(context)
85
+ when :create_tags
86
+ Aws::MediaLive::Endpoints::CreateTags.build(context)
87
+ when :delete_channel
88
+ Aws::MediaLive::Endpoints::DeleteChannel.build(context)
89
+ when :delete_input
90
+ Aws::MediaLive::Endpoints::DeleteInput.build(context)
91
+ when :delete_input_security_group
92
+ Aws::MediaLive::Endpoints::DeleteInputSecurityGroup.build(context)
93
+ when :delete_multiplex
94
+ Aws::MediaLive::Endpoints::DeleteMultiplex.build(context)
95
+ when :delete_multiplex_program
96
+ Aws::MediaLive::Endpoints::DeleteMultiplexProgram.build(context)
97
+ when :delete_reservation
98
+ Aws::MediaLive::Endpoints::DeleteReservation.build(context)
99
+ when :delete_schedule
100
+ Aws::MediaLive::Endpoints::DeleteSchedule.build(context)
101
+ when :delete_tags
102
+ Aws::MediaLive::Endpoints::DeleteTags.build(context)
103
+ when :describe_channel
104
+ Aws::MediaLive::Endpoints::DescribeChannel.build(context)
105
+ when :describe_input
106
+ Aws::MediaLive::Endpoints::DescribeInput.build(context)
107
+ when :describe_input_device
108
+ Aws::MediaLive::Endpoints::DescribeInputDevice.build(context)
109
+ when :describe_input_device_thumbnail
110
+ Aws::MediaLive::Endpoints::DescribeInputDeviceThumbnail.build(context)
111
+ when :describe_input_security_group
112
+ Aws::MediaLive::Endpoints::DescribeInputSecurityGroup.build(context)
113
+ when :describe_multiplex
114
+ Aws::MediaLive::Endpoints::DescribeMultiplex.build(context)
115
+ when :describe_multiplex_program
116
+ Aws::MediaLive::Endpoints::DescribeMultiplexProgram.build(context)
117
+ when :describe_offering
118
+ Aws::MediaLive::Endpoints::DescribeOffering.build(context)
119
+ when :describe_reservation
120
+ Aws::MediaLive::Endpoints::DescribeReservation.build(context)
121
+ when :describe_schedule
122
+ Aws::MediaLive::Endpoints::DescribeSchedule.build(context)
123
+ when :list_channels
124
+ Aws::MediaLive::Endpoints::ListChannels.build(context)
125
+ when :list_input_device_transfers
126
+ Aws::MediaLive::Endpoints::ListInputDeviceTransfers.build(context)
127
+ when :list_input_devices
128
+ Aws::MediaLive::Endpoints::ListInputDevices.build(context)
129
+ when :list_input_security_groups
130
+ Aws::MediaLive::Endpoints::ListInputSecurityGroups.build(context)
131
+ when :list_inputs
132
+ Aws::MediaLive::Endpoints::ListInputs.build(context)
133
+ when :list_multiplex_programs
134
+ Aws::MediaLive::Endpoints::ListMultiplexPrograms.build(context)
135
+ when :list_multiplexes
136
+ Aws::MediaLive::Endpoints::ListMultiplexes.build(context)
137
+ when :list_offerings
138
+ Aws::MediaLive::Endpoints::ListOfferings.build(context)
139
+ when :list_reservations
140
+ Aws::MediaLive::Endpoints::ListReservations.build(context)
141
+ when :list_tags_for_resource
142
+ Aws::MediaLive::Endpoints::ListTagsForResource.build(context)
143
+ when :purchase_offering
144
+ Aws::MediaLive::Endpoints::PurchaseOffering.build(context)
145
+ when :reboot_input_device
146
+ Aws::MediaLive::Endpoints::RebootInputDevice.build(context)
147
+ when :reject_input_device_transfer
148
+ Aws::MediaLive::Endpoints::RejectInputDeviceTransfer.build(context)
149
+ when :start_channel
150
+ Aws::MediaLive::Endpoints::StartChannel.build(context)
151
+ when :start_input_device_maintenance_window
152
+ Aws::MediaLive::Endpoints::StartInputDeviceMaintenanceWindow.build(context)
153
+ when :start_multiplex
154
+ Aws::MediaLive::Endpoints::StartMultiplex.build(context)
155
+ when :stop_channel
156
+ Aws::MediaLive::Endpoints::StopChannel.build(context)
157
+ when :stop_multiplex
158
+ Aws::MediaLive::Endpoints::StopMultiplex.build(context)
159
+ when :transfer_input_device
160
+ Aws::MediaLive::Endpoints::TransferInputDevice.build(context)
161
+ when :update_channel
162
+ Aws::MediaLive::Endpoints::UpdateChannel.build(context)
163
+ when :update_channel_class
164
+ Aws::MediaLive::Endpoints::UpdateChannelClass.build(context)
165
+ when :update_input
166
+ Aws::MediaLive::Endpoints::UpdateInput.build(context)
167
+ when :update_input_device
168
+ Aws::MediaLive::Endpoints::UpdateInputDevice.build(context)
169
+ when :update_input_security_group
170
+ Aws::MediaLive::Endpoints::UpdateInputSecurityGroup.build(context)
171
+ when :update_multiplex
172
+ Aws::MediaLive::Endpoints::UpdateMultiplex.build(context)
173
+ when :update_multiplex_program
174
+ Aws::MediaLive::Endpoints::UpdateMultiplexProgram.build(context)
175
+ when :update_reservation
176
+ Aws::MediaLive::Endpoints::UpdateReservation.build(context)
177
+ end
178
+ end
179
+ end
180
+
181
+ def add_handlers(handlers, _config)
182
+ handlers.add(Handler, step: :build, priority: 75)
183
+ end
184
+ end
185
+ end
186
+ end