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