aws-sdk-connectcampaignservice 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,240 @@
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::ConnectCampaignService
11
+
12
+ # When ConnectCampaignService returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::ConnectCampaignService::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all ConnectCampaignService errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::ConnectCampaignService::Errors::ServiceError
20
+ # # rescues all ConnectCampaignService 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
+ # * {InvalidCampaignStateException}
34
+ # * {InvalidStateException}
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::ConnectCampaignService::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
+
60
+ # @return [String]
61
+ def x_amz_error_type
62
+ @data[:x_amz_error_type]
63
+ end
64
+ end
65
+
66
+ class ConflictException < ServiceError
67
+
68
+ # @param [Seahorse::Client::RequestContext] context
69
+ # @param [String] message
70
+ # @param [Aws::ConnectCampaignService::Types::ConflictException] data
71
+ def initialize(context, message, data = Aws::EmptyStructure.new)
72
+ super(context, message, data)
73
+ end
74
+
75
+ # @return [String]
76
+ def message
77
+ @message || @data[:message]
78
+ end
79
+
80
+ # @return [String]
81
+ def x_amz_error_type
82
+ @data[:x_amz_error_type]
83
+ end
84
+ end
85
+
86
+ class InternalServerException < ServiceError
87
+
88
+ # @param [Seahorse::Client::RequestContext] context
89
+ # @param [String] message
90
+ # @param [Aws::ConnectCampaignService::Types::InternalServerException] data
91
+ def initialize(context, message, data = Aws::EmptyStructure.new)
92
+ super(context, message, data)
93
+ end
94
+
95
+ # @return [String]
96
+ def message
97
+ @message || @data[:message]
98
+ end
99
+
100
+ # @return [String]
101
+ def x_amz_error_type
102
+ @data[:x_amz_error_type]
103
+ end
104
+
105
+ def retryable?
106
+ true
107
+ end
108
+ end
109
+
110
+ class InvalidCampaignStateException < ServiceError
111
+
112
+ # @param [Seahorse::Client::RequestContext] context
113
+ # @param [String] message
114
+ # @param [Aws::ConnectCampaignService::Types::InvalidCampaignStateException] data
115
+ def initialize(context, message, data = Aws::EmptyStructure.new)
116
+ super(context, message, data)
117
+ end
118
+
119
+ # @return [String]
120
+ def message
121
+ @message || @data[:message]
122
+ end
123
+
124
+ # @return [String]
125
+ def state
126
+ @data[:state]
127
+ end
128
+
129
+ # @return [String]
130
+ def x_amz_error_type
131
+ @data[:x_amz_error_type]
132
+ end
133
+ end
134
+
135
+ class InvalidStateException < ServiceError
136
+
137
+ # @param [Seahorse::Client::RequestContext] context
138
+ # @param [String] message
139
+ # @param [Aws::ConnectCampaignService::Types::InvalidStateException] data
140
+ def initialize(context, message, data = Aws::EmptyStructure.new)
141
+ super(context, message, data)
142
+ end
143
+
144
+ # @return [String]
145
+ def message
146
+ @message || @data[:message]
147
+ end
148
+
149
+ # @return [String]
150
+ def x_amz_error_type
151
+ @data[:x_amz_error_type]
152
+ end
153
+ end
154
+
155
+ class ResourceNotFoundException < ServiceError
156
+
157
+ # @param [Seahorse::Client::RequestContext] context
158
+ # @param [String] message
159
+ # @param [Aws::ConnectCampaignService::Types::ResourceNotFoundException] data
160
+ def initialize(context, message, data = Aws::EmptyStructure.new)
161
+ super(context, message, data)
162
+ end
163
+
164
+ # @return [String]
165
+ def message
166
+ @message || @data[:message]
167
+ end
168
+
169
+ # @return [String]
170
+ def x_amz_error_type
171
+ @data[:x_amz_error_type]
172
+ end
173
+ end
174
+
175
+ class ServiceQuotaExceededException < ServiceError
176
+
177
+ # @param [Seahorse::Client::RequestContext] context
178
+ # @param [String] message
179
+ # @param [Aws::ConnectCampaignService::Types::ServiceQuotaExceededException] data
180
+ def initialize(context, message, data = Aws::EmptyStructure.new)
181
+ super(context, message, data)
182
+ end
183
+
184
+ # @return [String]
185
+ def message
186
+ @message || @data[:message]
187
+ end
188
+
189
+ # @return [String]
190
+ def x_amz_error_type
191
+ @data[:x_amz_error_type]
192
+ end
193
+ end
194
+
195
+ class ThrottlingException < ServiceError
196
+
197
+ # @param [Seahorse::Client::RequestContext] context
198
+ # @param [String] message
199
+ # @param [Aws::ConnectCampaignService::Types::ThrottlingException] data
200
+ def initialize(context, message, data = Aws::EmptyStructure.new)
201
+ super(context, message, data)
202
+ end
203
+
204
+ # @return [String]
205
+ def message
206
+ @message || @data[:message]
207
+ end
208
+
209
+ # @return [String]
210
+ def x_amz_error_type
211
+ @data[:x_amz_error_type]
212
+ end
213
+
214
+ def retryable?
215
+ true
216
+ end
217
+ end
218
+
219
+ class ValidationException < ServiceError
220
+
221
+ # @param [Seahorse::Client::RequestContext] context
222
+ # @param [String] message
223
+ # @param [Aws::ConnectCampaignService::Types::ValidationException] data
224
+ def initialize(context, message, data = Aws::EmptyStructure.new)
225
+ super(context, message, data)
226
+ end
227
+
228
+ # @return [String]
229
+ def message
230
+ @message || @data[:message]
231
+ end
232
+
233
+ # @return [String]
234
+ def x_amz_error_type
235
+ @data[:x_amz_error_type]
236
+ end
237
+ end
238
+
239
+ end
240
+ 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::ConnectCampaignService
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