aws-sdk-pinpointsmsvoicev2 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.
File without changes
@@ -0,0 +1,212 @@
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::PinpointSMSVoiceV2
11
+
12
+ # When PinpointSMSVoiceV2 returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::PinpointSMSVoiceV2::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all PinpointSMSVoiceV2 errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::PinpointSMSVoiceV2::Errors::ServiceError
20
+ # # rescues all PinpointSMSVoiceV2 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
+ # * {ResourceNotFoundException}
34
+ # * {ServiceQuotaExceededException}
35
+ # * {ThrottlingException}
36
+ # * {ValidationException}
37
+ #
38
+ # Additionally, error classes are dynamically generated for service errors based on the error code
39
+ # if they are not defined above.
40
+ module Errors
41
+
42
+ extend Aws::Errors::DynamicErrors
43
+
44
+ class AccessDeniedException < ServiceError
45
+
46
+ # @param [Seahorse::Client::RequestContext] context
47
+ # @param [String] message
48
+ # @param [Aws::PinpointSMSVoiceV2::Types::AccessDeniedException] data
49
+ def initialize(context, message, data = Aws::EmptyStructure.new)
50
+ super(context, message, data)
51
+ end
52
+
53
+ # @return [String]
54
+ def message
55
+ @message || @data[:message]
56
+ end
57
+
58
+ # @return [String]
59
+ def reason
60
+ @data[:reason]
61
+ end
62
+ end
63
+
64
+ class ConflictException < ServiceError
65
+
66
+ # @param [Seahorse::Client::RequestContext] context
67
+ # @param [String] message
68
+ # @param [Aws::PinpointSMSVoiceV2::Types::ConflictException] data
69
+ def initialize(context, message, data = Aws::EmptyStructure.new)
70
+ super(context, message, data)
71
+ end
72
+
73
+ # @return [String]
74
+ def message
75
+ @message || @data[:message]
76
+ end
77
+
78
+ # @return [String]
79
+ def reason
80
+ @data[:reason]
81
+ end
82
+
83
+ # @return [String]
84
+ def resource_type
85
+ @data[:resource_type]
86
+ end
87
+
88
+ # @return [String]
89
+ def resource_id
90
+ @data[:resource_id]
91
+ end
92
+ end
93
+
94
+ class InternalServerException < ServiceError
95
+
96
+ # @param [Seahorse::Client::RequestContext] context
97
+ # @param [String] message
98
+ # @param [Aws::PinpointSMSVoiceV2::Types::InternalServerException] data
99
+ def initialize(context, message, data = Aws::EmptyStructure.new)
100
+ super(context, message, data)
101
+ end
102
+
103
+ # @return [String]
104
+ def message
105
+ @message || @data[:message]
106
+ end
107
+
108
+ # @return [String]
109
+ def request_id
110
+ @data[:request_id]
111
+ end
112
+
113
+ def retryable?
114
+ true
115
+ end
116
+ end
117
+
118
+ class ResourceNotFoundException < ServiceError
119
+
120
+ # @param [Seahorse::Client::RequestContext] context
121
+ # @param [String] message
122
+ # @param [Aws::PinpointSMSVoiceV2::Types::ResourceNotFoundException] data
123
+ def initialize(context, message, data = Aws::EmptyStructure.new)
124
+ super(context, message, data)
125
+ end
126
+
127
+ # @return [String]
128
+ def message
129
+ @message || @data[:message]
130
+ end
131
+
132
+ # @return [String]
133
+ def resource_type
134
+ @data[:resource_type]
135
+ end
136
+
137
+ # @return [String]
138
+ def resource_id
139
+ @data[:resource_id]
140
+ end
141
+ end
142
+
143
+ class ServiceQuotaExceededException < ServiceError
144
+
145
+ # @param [Seahorse::Client::RequestContext] context
146
+ # @param [String] message
147
+ # @param [Aws::PinpointSMSVoiceV2::Types::ServiceQuotaExceededException] data
148
+ def initialize(context, message, data = Aws::EmptyStructure.new)
149
+ super(context, message, data)
150
+ end
151
+
152
+ # @return [String]
153
+ def message
154
+ @message || @data[:message]
155
+ end
156
+
157
+ # @return [String]
158
+ def reason
159
+ @data[:reason]
160
+ end
161
+ end
162
+
163
+ class ThrottlingException < ServiceError
164
+
165
+ # @param [Seahorse::Client::RequestContext] context
166
+ # @param [String] message
167
+ # @param [Aws::PinpointSMSVoiceV2::Types::ThrottlingException] data
168
+ def initialize(context, message, data = Aws::EmptyStructure.new)
169
+ super(context, message, data)
170
+ end
171
+
172
+ # @return [String]
173
+ def message
174
+ @message || @data[:message]
175
+ end
176
+
177
+ def retryable?
178
+ true
179
+ end
180
+
181
+ def throttling?
182
+ true
183
+ end
184
+ end
185
+
186
+ class ValidationException < ServiceError
187
+
188
+ # @param [Seahorse::Client::RequestContext] context
189
+ # @param [String] message
190
+ # @param [Aws::PinpointSMSVoiceV2::Types::ValidationException] data
191
+ def initialize(context, message, data = Aws::EmptyStructure.new)
192
+ super(context, message, data)
193
+ end
194
+
195
+ # @return [String]
196
+ def message
197
+ @message || @data[:message]
198
+ end
199
+
200
+ # @return [String]
201
+ def reason
202
+ @data[:reason]
203
+ end
204
+
205
+ # @return [String]
206
+ def fields
207
+ @data[:fields]
208
+ end
209
+ end
210
+
211
+ end
212
+ 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::PinpointSMSVoiceV2
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