aws-sdk-iottwinmaker 1.0.0

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