aws-sdk-voiceid 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,160 @@
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::VoiceID
11
+
12
+ # When VoiceID returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::VoiceID::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all VoiceID errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::VoiceID::Errors::ServiceError
20
+ # # rescues all VoiceID 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::VoiceID::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
+ end
58
+
59
+ class ConflictException < ServiceError
60
+
61
+ # @param [Seahorse::Client::RequestContext] context
62
+ # @param [String] message
63
+ # @param [Aws::VoiceID::Types::ConflictException] data
64
+ def initialize(context, message, data = Aws::EmptyStructure.new)
65
+ super(context, message, data)
66
+ end
67
+
68
+ # @return [String]
69
+ def conflict_type
70
+ @data[:conflict_type]
71
+ end
72
+
73
+ # @return [String]
74
+ def message
75
+ @message || @data[:message]
76
+ end
77
+ end
78
+
79
+ class InternalServerException < ServiceError
80
+
81
+ # @param [Seahorse::Client::RequestContext] context
82
+ # @param [String] message
83
+ # @param [Aws::VoiceID::Types::InternalServerException] data
84
+ def initialize(context, message, data = Aws::EmptyStructure.new)
85
+ super(context, message, data)
86
+ end
87
+
88
+ # @return [String]
89
+ def message
90
+ @message || @data[:message]
91
+ end
92
+ end
93
+
94
+ class ResourceNotFoundException < ServiceError
95
+
96
+ # @param [Seahorse::Client::RequestContext] context
97
+ # @param [String] message
98
+ # @param [Aws::VoiceID::Types::ResourceNotFoundException] 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 resource_type
110
+ @data[:resource_type]
111
+ end
112
+ end
113
+
114
+ class ServiceQuotaExceededException < ServiceError
115
+
116
+ # @param [Seahorse::Client::RequestContext] context
117
+ # @param [String] message
118
+ # @param [Aws::VoiceID::Types::ServiceQuotaExceededException] data
119
+ def initialize(context, message, data = Aws::EmptyStructure.new)
120
+ super(context, message, data)
121
+ end
122
+
123
+ # @return [String]
124
+ def message
125
+ @message || @data[:message]
126
+ end
127
+ end
128
+
129
+ class ThrottlingException < ServiceError
130
+
131
+ # @param [Seahorse::Client::RequestContext] context
132
+ # @param [String] message
133
+ # @param [Aws::VoiceID::Types::ThrottlingException] data
134
+ def initialize(context, message, data = Aws::EmptyStructure.new)
135
+ super(context, message, data)
136
+ end
137
+
138
+ # @return [String]
139
+ def message
140
+ @message || @data[:message]
141
+ end
142
+ end
143
+
144
+ class ValidationException < ServiceError
145
+
146
+ # @param [Seahorse::Client::RequestContext] context
147
+ # @param [String] message
148
+ # @param [Aws::VoiceID::Types::ValidationException] data
149
+ def initialize(context, message, data = Aws::EmptyStructure.new)
150
+ super(context, message, data)
151
+ end
152
+
153
+ # @return [String]
154
+ def message
155
+ @message || @data[:message]
156
+ end
157
+ end
158
+
159
+ end
160
+ 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::VoiceID
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