aws-sdk-chatbot 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,346 @@
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::Chatbot
11
+
12
+ # When Chatbot returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::Chatbot::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all Chatbot errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::Chatbot::Errors::ServiceError
20
+ # # rescues all Chatbot 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
+ # * {ConflictException}
31
+ # * {CreateChimeWebhookConfigurationException}
32
+ # * {CreateSlackChannelConfigurationException}
33
+ # * {CreateTeamsChannelConfigurationException}
34
+ # * {DeleteChimeWebhookConfigurationException}
35
+ # * {DeleteMicrosoftTeamsUserIdentityException}
36
+ # * {DeleteSlackChannelConfigurationException}
37
+ # * {DeleteSlackUserIdentityException}
38
+ # * {DeleteSlackWorkspaceAuthorizationFault}
39
+ # * {DeleteTeamsChannelConfigurationException}
40
+ # * {DeleteTeamsConfiguredTeamException}
41
+ # * {DescribeChimeWebhookConfigurationsException}
42
+ # * {DescribeSlackChannelConfigurationsException}
43
+ # * {DescribeSlackUserIdentitiesException}
44
+ # * {DescribeSlackWorkspacesException}
45
+ # * {GetAccountPreferencesException}
46
+ # * {GetTeamsChannelConfigurationException}
47
+ # * {InvalidParameterException}
48
+ # * {InvalidRequestException}
49
+ # * {LimitExceededException}
50
+ # * {ListMicrosoftTeamsConfiguredTeamsException}
51
+ # * {ListMicrosoftTeamsUserIdentitiesException}
52
+ # * {ListTeamsChannelConfigurationsException}
53
+ # * {ResourceNotFoundException}
54
+ # * {UpdateAccountPreferencesException}
55
+ # * {UpdateChimeWebhookConfigurationException}
56
+ # * {UpdateSlackChannelConfigurationException}
57
+ # * {UpdateTeamsChannelConfigurationException}
58
+ #
59
+ # Additionally, error classes are dynamically generated for service errors based on the error code
60
+ # if they are not defined above.
61
+ module Errors
62
+
63
+ extend Aws::Errors::DynamicErrors
64
+
65
+ class ConflictException < ServiceError
66
+
67
+ # @param [Seahorse::Client::RequestContext] context
68
+ # @param [String] message
69
+ # @param [Aws::Chatbot::Types::ConflictException] data
70
+ def initialize(context, message, data = Aws::EmptyStructure.new)
71
+ super(context, message, data)
72
+ end
73
+ end
74
+
75
+ class CreateChimeWebhookConfigurationException < ServiceError
76
+
77
+ # @param [Seahorse::Client::RequestContext] context
78
+ # @param [String] message
79
+ # @param [Aws::Chatbot::Types::CreateChimeWebhookConfigurationException] data
80
+ def initialize(context, message, data = Aws::EmptyStructure.new)
81
+ super(context, message, data)
82
+ end
83
+ end
84
+
85
+ class CreateSlackChannelConfigurationException < ServiceError
86
+
87
+ # @param [Seahorse::Client::RequestContext] context
88
+ # @param [String] message
89
+ # @param [Aws::Chatbot::Types::CreateSlackChannelConfigurationException] data
90
+ def initialize(context, message, data = Aws::EmptyStructure.new)
91
+ super(context, message, data)
92
+ end
93
+ end
94
+
95
+ class CreateTeamsChannelConfigurationException < ServiceError
96
+
97
+ # @param [Seahorse::Client::RequestContext] context
98
+ # @param [String] message
99
+ # @param [Aws::Chatbot::Types::CreateTeamsChannelConfigurationException] data
100
+ def initialize(context, message, data = Aws::EmptyStructure.new)
101
+ super(context, message, data)
102
+ end
103
+ end
104
+
105
+ class DeleteChimeWebhookConfigurationException < ServiceError
106
+
107
+ # @param [Seahorse::Client::RequestContext] context
108
+ # @param [String] message
109
+ # @param [Aws::Chatbot::Types::DeleteChimeWebhookConfigurationException] data
110
+ def initialize(context, message, data = Aws::EmptyStructure.new)
111
+ super(context, message, data)
112
+ end
113
+ end
114
+
115
+ class DeleteMicrosoftTeamsUserIdentityException < ServiceError
116
+
117
+ # @param [Seahorse::Client::RequestContext] context
118
+ # @param [String] message
119
+ # @param [Aws::Chatbot::Types::DeleteMicrosoftTeamsUserIdentityException] data
120
+ def initialize(context, message, data = Aws::EmptyStructure.new)
121
+ super(context, message, data)
122
+ end
123
+ end
124
+
125
+ class DeleteSlackChannelConfigurationException < ServiceError
126
+
127
+ # @param [Seahorse::Client::RequestContext] context
128
+ # @param [String] message
129
+ # @param [Aws::Chatbot::Types::DeleteSlackChannelConfigurationException] data
130
+ def initialize(context, message, data = Aws::EmptyStructure.new)
131
+ super(context, message, data)
132
+ end
133
+ end
134
+
135
+ class DeleteSlackUserIdentityException < ServiceError
136
+
137
+ # @param [Seahorse::Client::RequestContext] context
138
+ # @param [String] message
139
+ # @param [Aws::Chatbot::Types::DeleteSlackUserIdentityException] data
140
+ def initialize(context, message, data = Aws::EmptyStructure.new)
141
+ super(context, message, data)
142
+ end
143
+ end
144
+
145
+ class DeleteSlackWorkspaceAuthorizationFault < ServiceError
146
+
147
+ # @param [Seahorse::Client::RequestContext] context
148
+ # @param [String] message
149
+ # @param [Aws::Chatbot::Types::DeleteSlackWorkspaceAuthorizationFault] data
150
+ def initialize(context, message, data = Aws::EmptyStructure.new)
151
+ super(context, message, data)
152
+ end
153
+ end
154
+
155
+ class DeleteTeamsChannelConfigurationException < ServiceError
156
+
157
+ # @param [Seahorse::Client::RequestContext] context
158
+ # @param [String] message
159
+ # @param [Aws::Chatbot::Types::DeleteTeamsChannelConfigurationException] data
160
+ def initialize(context, message, data = Aws::EmptyStructure.new)
161
+ super(context, message, data)
162
+ end
163
+ end
164
+
165
+ class DeleteTeamsConfiguredTeamException < ServiceError
166
+
167
+ # @param [Seahorse::Client::RequestContext] context
168
+ # @param [String] message
169
+ # @param [Aws::Chatbot::Types::DeleteTeamsConfiguredTeamException] data
170
+ def initialize(context, message, data = Aws::EmptyStructure.new)
171
+ super(context, message, data)
172
+ end
173
+ end
174
+
175
+ class DescribeChimeWebhookConfigurationsException < ServiceError
176
+
177
+ # @param [Seahorse::Client::RequestContext] context
178
+ # @param [String] message
179
+ # @param [Aws::Chatbot::Types::DescribeChimeWebhookConfigurationsException] data
180
+ def initialize(context, message, data = Aws::EmptyStructure.new)
181
+ super(context, message, data)
182
+ end
183
+ end
184
+
185
+ class DescribeSlackChannelConfigurationsException < ServiceError
186
+
187
+ # @param [Seahorse::Client::RequestContext] context
188
+ # @param [String] message
189
+ # @param [Aws::Chatbot::Types::DescribeSlackChannelConfigurationsException] data
190
+ def initialize(context, message, data = Aws::EmptyStructure.new)
191
+ super(context, message, data)
192
+ end
193
+ end
194
+
195
+ class DescribeSlackUserIdentitiesException < ServiceError
196
+
197
+ # @param [Seahorse::Client::RequestContext] context
198
+ # @param [String] message
199
+ # @param [Aws::Chatbot::Types::DescribeSlackUserIdentitiesException] data
200
+ def initialize(context, message, data = Aws::EmptyStructure.new)
201
+ super(context, message, data)
202
+ end
203
+ end
204
+
205
+ class DescribeSlackWorkspacesException < ServiceError
206
+
207
+ # @param [Seahorse::Client::RequestContext] context
208
+ # @param [String] message
209
+ # @param [Aws::Chatbot::Types::DescribeSlackWorkspacesException] data
210
+ def initialize(context, message, data = Aws::EmptyStructure.new)
211
+ super(context, message, data)
212
+ end
213
+ end
214
+
215
+ class GetAccountPreferencesException < ServiceError
216
+
217
+ # @param [Seahorse::Client::RequestContext] context
218
+ # @param [String] message
219
+ # @param [Aws::Chatbot::Types::GetAccountPreferencesException] data
220
+ def initialize(context, message, data = Aws::EmptyStructure.new)
221
+ super(context, message, data)
222
+ end
223
+ end
224
+
225
+ class GetTeamsChannelConfigurationException < ServiceError
226
+
227
+ # @param [Seahorse::Client::RequestContext] context
228
+ # @param [String] message
229
+ # @param [Aws::Chatbot::Types::GetTeamsChannelConfigurationException] data
230
+ def initialize(context, message, data = Aws::EmptyStructure.new)
231
+ super(context, message, data)
232
+ end
233
+ end
234
+
235
+ class InvalidParameterException < ServiceError
236
+
237
+ # @param [Seahorse::Client::RequestContext] context
238
+ # @param [String] message
239
+ # @param [Aws::Chatbot::Types::InvalidParameterException] data
240
+ def initialize(context, message, data = Aws::EmptyStructure.new)
241
+ super(context, message, data)
242
+ end
243
+ end
244
+
245
+ class InvalidRequestException < ServiceError
246
+
247
+ # @param [Seahorse::Client::RequestContext] context
248
+ # @param [String] message
249
+ # @param [Aws::Chatbot::Types::InvalidRequestException] data
250
+ def initialize(context, message, data = Aws::EmptyStructure.new)
251
+ super(context, message, data)
252
+ end
253
+ end
254
+
255
+ class LimitExceededException < ServiceError
256
+
257
+ # @param [Seahorse::Client::RequestContext] context
258
+ # @param [String] message
259
+ # @param [Aws::Chatbot::Types::LimitExceededException] data
260
+ def initialize(context, message, data = Aws::EmptyStructure.new)
261
+ super(context, message, data)
262
+ end
263
+ end
264
+
265
+ class ListMicrosoftTeamsConfiguredTeamsException < ServiceError
266
+
267
+ # @param [Seahorse::Client::RequestContext] context
268
+ # @param [String] message
269
+ # @param [Aws::Chatbot::Types::ListMicrosoftTeamsConfiguredTeamsException] data
270
+ def initialize(context, message, data = Aws::EmptyStructure.new)
271
+ super(context, message, data)
272
+ end
273
+ end
274
+
275
+ class ListMicrosoftTeamsUserIdentitiesException < ServiceError
276
+
277
+ # @param [Seahorse::Client::RequestContext] context
278
+ # @param [String] message
279
+ # @param [Aws::Chatbot::Types::ListMicrosoftTeamsUserIdentitiesException] data
280
+ def initialize(context, message, data = Aws::EmptyStructure.new)
281
+ super(context, message, data)
282
+ end
283
+ end
284
+
285
+ class ListTeamsChannelConfigurationsException < ServiceError
286
+
287
+ # @param [Seahorse::Client::RequestContext] context
288
+ # @param [String] message
289
+ # @param [Aws::Chatbot::Types::ListTeamsChannelConfigurationsException] data
290
+ def initialize(context, message, data = Aws::EmptyStructure.new)
291
+ super(context, message, data)
292
+ end
293
+ end
294
+
295
+ class ResourceNotFoundException < ServiceError
296
+
297
+ # @param [Seahorse::Client::RequestContext] context
298
+ # @param [String] message
299
+ # @param [Aws::Chatbot::Types::ResourceNotFoundException] data
300
+ def initialize(context, message, data = Aws::EmptyStructure.new)
301
+ super(context, message, data)
302
+ end
303
+ end
304
+
305
+ class UpdateAccountPreferencesException < ServiceError
306
+
307
+ # @param [Seahorse::Client::RequestContext] context
308
+ # @param [String] message
309
+ # @param [Aws::Chatbot::Types::UpdateAccountPreferencesException] data
310
+ def initialize(context, message, data = Aws::EmptyStructure.new)
311
+ super(context, message, data)
312
+ end
313
+ end
314
+
315
+ class UpdateChimeWebhookConfigurationException < ServiceError
316
+
317
+ # @param [Seahorse::Client::RequestContext] context
318
+ # @param [String] message
319
+ # @param [Aws::Chatbot::Types::UpdateChimeWebhookConfigurationException] data
320
+ def initialize(context, message, data = Aws::EmptyStructure.new)
321
+ super(context, message, data)
322
+ end
323
+ end
324
+
325
+ class UpdateSlackChannelConfigurationException < ServiceError
326
+
327
+ # @param [Seahorse::Client::RequestContext] context
328
+ # @param [String] message
329
+ # @param [Aws::Chatbot::Types::UpdateSlackChannelConfigurationException] data
330
+ def initialize(context, message, data = Aws::EmptyStructure.new)
331
+ super(context, message, data)
332
+ end
333
+ end
334
+
335
+ class UpdateTeamsChannelConfigurationException < ServiceError
336
+
337
+ # @param [Seahorse::Client::RequestContext] context
338
+ # @param [String] message
339
+ # @param [Aws::Chatbot::Types::UpdateTeamsChannelConfigurationException] data
340
+ def initialize(context, message, data = Aws::EmptyStructure.new)
341
+ super(context, message, data)
342
+ end
343
+ end
344
+
345
+ end
346
+ end
@@ -0,0 +1,116 @@
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::Chatbot
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Chatbot::EndpointProvider',
17
+ rbs_type: 'untyped',
18
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
19
+ 'object that responds to `#resolve_endpoint(parameters)` '\
20
+ 'where `parameters` is a Struct similar to '\
21
+ '`Aws::Chatbot::EndpointParameters`'
22
+ ) do |cfg|
23
+ Aws::Chatbot::EndpointProvider.new
24
+ end
25
+
26
+ # @api private
27
+ class Handler < Seahorse::Client::Handler
28
+ def call(context)
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
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
38
+ end
39
+
40
+ context[:auth_scheme] =
41
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
+
43
+ @handler.call(context)
44
+ end
45
+
46
+ private
47
+
48
+ def apply_endpoint_headers(context, headers)
49
+ headers.each do |key, values|
50
+ value = values
51
+ .compact
52
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
53
+ .join(',')
54
+
55
+ context.http_request.headers[key] = value
56
+ end
57
+ end
58
+
59
+ def parameters_for_operation(context)
60
+ case context.operation_name
61
+ when :create_chime_webhook_configuration
62
+ Aws::Chatbot::Endpoints::CreateChimeWebhookConfiguration.build(context)
63
+ when :create_microsoft_teams_channel_configuration
64
+ Aws::Chatbot::Endpoints::CreateMicrosoftTeamsChannelConfiguration.build(context)
65
+ when :create_slack_channel_configuration
66
+ Aws::Chatbot::Endpoints::CreateSlackChannelConfiguration.build(context)
67
+ when :delete_chime_webhook_configuration
68
+ Aws::Chatbot::Endpoints::DeleteChimeWebhookConfiguration.build(context)
69
+ when :delete_microsoft_teams_channel_configuration
70
+ Aws::Chatbot::Endpoints::DeleteMicrosoftTeamsChannelConfiguration.build(context)
71
+ when :delete_microsoft_teams_configured_team
72
+ Aws::Chatbot::Endpoints::DeleteMicrosoftTeamsConfiguredTeam.build(context)
73
+ when :delete_microsoft_teams_user_identity
74
+ Aws::Chatbot::Endpoints::DeleteMicrosoftTeamsUserIdentity.build(context)
75
+ when :delete_slack_channel_configuration
76
+ Aws::Chatbot::Endpoints::DeleteSlackChannelConfiguration.build(context)
77
+ when :delete_slack_user_identity
78
+ Aws::Chatbot::Endpoints::DeleteSlackUserIdentity.build(context)
79
+ when :delete_slack_workspace_authorization
80
+ Aws::Chatbot::Endpoints::DeleteSlackWorkspaceAuthorization.build(context)
81
+ when :describe_chime_webhook_configurations
82
+ Aws::Chatbot::Endpoints::DescribeChimeWebhookConfigurations.build(context)
83
+ when :describe_slack_channel_configurations
84
+ Aws::Chatbot::Endpoints::DescribeSlackChannelConfigurations.build(context)
85
+ when :describe_slack_user_identities
86
+ Aws::Chatbot::Endpoints::DescribeSlackUserIdentities.build(context)
87
+ when :describe_slack_workspaces
88
+ Aws::Chatbot::Endpoints::DescribeSlackWorkspaces.build(context)
89
+ when :get_account_preferences
90
+ Aws::Chatbot::Endpoints::GetAccountPreferences.build(context)
91
+ when :get_microsoft_teams_channel_configuration
92
+ Aws::Chatbot::Endpoints::GetMicrosoftTeamsChannelConfiguration.build(context)
93
+ when :list_microsoft_teams_channel_configurations
94
+ Aws::Chatbot::Endpoints::ListMicrosoftTeamsChannelConfigurations.build(context)
95
+ when :list_microsoft_teams_configured_teams
96
+ Aws::Chatbot::Endpoints::ListMicrosoftTeamsConfiguredTeams.build(context)
97
+ when :list_microsoft_teams_user_identities
98
+ Aws::Chatbot::Endpoints::ListMicrosoftTeamsUserIdentities.build(context)
99
+ when :update_account_preferences
100
+ Aws::Chatbot::Endpoints::UpdateAccountPreferences.build(context)
101
+ when :update_chime_webhook_configuration
102
+ Aws::Chatbot::Endpoints::UpdateChimeWebhookConfiguration.build(context)
103
+ when :update_microsoft_teams_channel_configuration
104
+ Aws::Chatbot::Endpoints::UpdateMicrosoftTeamsChannelConfiguration.build(context)
105
+ when :update_slack_channel_configuration
106
+ Aws::Chatbot::Endpoints::UpdateSlackChannelConfiguration.build(context)
107
+ end
108
+ end
109
+ end
110
+
111
+ def add_handlers(handlers, _config)
112
+ handlers.add(Handler, step: :build, priority: 75)
113
+ end
114
+ end
115
+ end
116
+ 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::Chatbot
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