aws-sdk-cloudwatchevidently 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,226 @@
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::CloudWatchEvidently
11
+
12
+ # When CloudWatchEvidently returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::CloudWatchEvidently::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all CloudWatchEvidently errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::CloudWatchEvidently::Errors::ServiceError
20
+ # # rescues all CloudWatchEvidently 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
+ # * {ServiceUnavailableException}
36
+ # * {ThrottlingException}
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::CloudWatchEvidently::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::CloudWatchEvidently::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::CloudWatchEvidently::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
+ end
99
+
100
+ class ResourceNotFoundException < ServiceError
101
+
102
+ # @param [Seahorse::Client::RequestContext] context
103
+ # @param [String] message
104
+ # @param [Aws::CloudWatchEvidently::Types::ResourceNotFoundException] data
105
+ def initialize(context, message, data = Aws::EmptyStructure.new)
106
+ super(context, message, data)
107
+ end
108
+
109
+ # @return [String]
110
+ def message
111
+ @message || @data[:message]
112
+ end
113
+
114
+ # @return [String]
115
+ def resource_id
116
+ @data[:resource_id]
117
+ end
118
+
119
+ # @return [String]
120
+ def resource_type
121
+ @data[:resource_type]
122
+ end
123
+ end
124
+
125
+ class ServiceQuotaExceededException < ServiceError
126
+
127
+ # @param [Seahorse::Client::RequestContext] context
128
+ # @param [String] message
129
+ # @param [Aws::CloudWatchEvidently::Types::ServiceQuotaExceededException] data
130
+ def initialize(context, message, data = Aws::EmptyStructure.new)
131
+ super(context, message, data)
132
+ end
133
+
134
+ # @return [String]
135
+ def message
136
+ @message || @data[:message]
137
+ end
138
+
139
+ # @return [String]
140
+ def quota_code
141
+ @data[:quota_code]
142
+ end
143
+
144
+ # @return [String]
145
+ def resource_id
146
+ @data[:resource_id]
147
+ end
148
+
149
+ # @return [String]
150
+ def resource_type
151
+ @data[:resource_type]
152
+ end
153
+
154
+ # @return [String]
155
+ def service_code
156
+ @data[:service_code]
157
+ end
158
+ end
159
+
160
+ class ServiceUnavailableException < ServiceError
161
+
162
+ # @param [Seahorse::Client::RequestContext] context
163
+ # @param [String] message
164
+ # @param [Aws::CloudWatchEvidently::Types::ServiceUnavailableException] data
165
+ def initialize(context, message, data = Aws::EmptyStructure.new)
166
+ super(context, message, data)
167
+ end
168
+
169
+ # @return [String]
170
+ def message
171
+ @message || @data[:message]
172
+ end
173
+ end
174
+
175
+ class ThrottlingException < ServiceError
176
+
177
+ # @param [Seahorse::Client::RequestContext] context
178
+ # @param [String] message
179
+ # @param [Aws::CloudWatchEvidently::Types::ThrottlingException] data
180
+ def initialize(context, message, data = Aws::EmptyStructure.new)
181
+ super(context, message, data)
182
+ end
183
+
184
+ # @return [String]
185
+ def message
186
+ @message || @data[:message]
187
+ end
188
+
189
+ # @return [String]
190
+ def quota_code
191
+ @data[:quota_code]
192
+ end
193
+
194
+ # @return [String]
195
+ def service_code
196
+ @data[:service_code]
197
+ end
198
+ end
199
+
200
+ class ValidationException < ServiceError
201
+
202
+ # @param [Seahorse::Client::RequestContext] context
203
+ # @param [String] message
204
+ # @param [Aws::CloudWatchEvidently::Types::ValidationException] data
205
+ def initialize(context, message, data = Aws::EmptyStructure.new)
206
+ super(context, message, data)
207
+ end
208
+
209
+ # @return [String]
210
+ def field_list
211
+ @data[:field_list]
212
+ end
213
+
214
+ # @return [String]
215
+ def message
216
+ @message || @data[:message]
217
+ end
218
+
219
+ # @return [String]
220
+ def reason
221
+ @data[:reason]
222
+ end
223
+ end
224
+
225
+ end
226
+ 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::CloudWatchEvidently
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