aws-sdk-billingconductor 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,210 @@
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::BillingConductor
11
+
12
+ # When BillingConductor returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::BillingConductor::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all BillingConductor errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::BillingConductor::Errors::ServiceError
20
+ # # rescues all BillingConductor 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
+ # * {ServiceLimitExceededException}
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::BillingConductor::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::BillingConductor::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 message
70
+ @message || @data[:message]
71
+ end
72
+
73
+ # @return [String]
74
+ def resource_id
75
+ @data[:resource_id]
76
+ end
77
+
78
+ # @return [String]
79
+ def resource_type
80
+ @data[:resource_type]
81
+ end
82
+ end
83
+
84
+ class InternalServerException < ServiceError
85
+
86
+ # @param [Seahorse::Client::RequestContext] context
87
+ # @param [String] message
88
+ # @param [Aws::BillingConductor::Types::InternalServerException] data
89
+ def initialize(context, message, data = Aws::EmptyStructure.new)
90
+ super(context, message, data)
91
+ end
92
+
93
+ # @return [String]
94
+ def message
95
+ @message || @data[:message]
96
+ end
97
+
98
+ # @return [String]
99
+ def retry_after_seconds
100
+ @data[:retry_after_seconds]
101
+ end
102
+ end
103
+
104
+ class ResourceNotFoundException < ServiceError
105
+
106
+ # @param [Seahorse::Client::RequestContext] context
107
+ # @param [String] message
108
+ # @param [Aws::BillingConductor::Types::ResourceNotFoundException] data
109
+ def initialize(context, message, data = Aws::EmptyStructure.new)
110
+ super(context, message, data)
111
+ end
112
+
113
+ # @return [String]
114
+ def message
115
+ @message || @data[:message]
116
+ end
117
+
118
+ # @return [String]
119
+ def resource_id
120
+ @data[:resource_id]
121
+ end
122
+
123
+ # @return [String]
124
+ def resource_type
125
+ @data[:resource_type]
126
+ end
127
+ end
128
+
129
+ class ServiceLimitExceededException < ServiceError
130
+
131
+ # @param [Seahorse::Client::RequestContext] context
132
+ # @param [String] message
133
+ # @param [Aws::BillingConductor::Types::ServiceLimitExceededException] 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
+
143
+ # @return [String]
144
+ def resource_id
145
+ @data[:resource_id]
146
+ end
147
+
148
+ # @return [String]
149
+ def resource_type
150
+ @data[:resource_type]
151
+ end
152
+
153
+ # @return [String]
154
+ def limit_code
155
+ @data[:limit_code]
156
+ end
157
+
158
+ # @return [String]
159
+ def service_code
160
+ @data[:service_code]
161
+ end
162
+ end
163
+
164
+ class ThrottlingException < ServiceError
165
+
166
+ # @param [Seahorse::Client::RequestContext] context
167
+ # @param [String] message
168
+ # @param [Aws::BillingConductor::Types::ThrottlingException] data
169
+ def initialize(context, message, data = Aws::EmptyStructure.new)
170
+ super(context, message, data)
171
+ end
172
+
173
+ # @return [String]
174
+ def message
175
+ @message || @data[:message]
176
+ end
177
+
178
+ # @return [String]
179
+ def retry_after_seconds
180
+ @data[:retry_after_seconds]
181
+ end
182
+ end
183
+
184
+ class ValidationException < ServiceError
185
+
186
+ # @param [Seahorse::Client::RequestContext] context
187
+ # @param [String] message
188
+ # @param [Aws::BillingConductor::Types::ValidationException] data
189
+ def initialize(context, message, data = Aws::EmptyStructure.new)
190
+ super(context, message, data)
191
+ end
192
+
193
+ # @return [String]
194
+ def message
195
+ @message || @data[:message]
196
+ end
197
+
198
+ # @return [String]
199
+ def reason
200
+ @data[:reason]
201
+ end
202
+
203
+ # @return [String]
204
+ def fields
205
+ @data[:fields]
206
+ end
207
+ end
208
+
209
+ end
210
+ 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::BillingConductor
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