aws-sdk-connectcases 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,173 @@
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::ConnectCases
11
+
12
+ # When ConnectCases returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::ConnectCases::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all ConnectCases errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::ConnectCases::Errors::ServiceError
20
+ # # rescues all ConnectCases 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::ConnectCases::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::ConnectCases::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
+ end
73
+
74
+ class InternalServerException < ServiceError
75
+
76
+ # @param [Seahorse::Client::RequestContext] context
77
+ # @param [String] message
78
+ # @param [Aws::ConnectCases::Types::InternalServerException] data
79
+ def initialize(context, message, data = Aws::EmptyStructure.new)
80
+ super(context, message, data)
81
+ end
82
+
83
+ # @return [String]
84
+ def message
85
+ @message || @data[:message]
86
+ end
87
+
88
+ # @return [String]
89
+ def retry_after_seconds
90
+ @data[:retry_after_seconds]
91
+ end
92
+
93
+ def retryable?
94
+ true
95
+ end
96
+ end
97
+
98
+ class ResourceNotFoundException < ServiceError
99
+
100
+ # @param [Seahorse::Client::RequestContext] context
101
+ # @param [String] message
102
+ # @param [Aws::ConnectCases::Types::ResourceNotFoundException] data
103
+ def initialize(context, message, data = Aws::EmptyStructure.new)
104
+ super(context, message, data)
105
+ end
106
+
107
+ # @return [String]
108
+ def message
109
+ @message || @data[:message]
110
+ end
111
+
112
+ # @return [String]
113
+ def resource_id
114
+ @data[:resource_id]
115
+ end
116
+
117
+ # @return [String]
118
+ def resource_type
119
+ @data[:resource_type]
120
+ end
121
+ end
122
+
123
+ class ServiceQuotaExceededException < ServiceError
124
+
125
+ # @param [Seahorse::Client::RequestContext] context
126
+ # @param [String] message
127
+ # @param [Aws::ConnectCases::Types::ServiceQuotaExceededException] data
128
+ def initialize(context, message, data = Aws::EmptyStructure.new)
129
+ super(context, message, data)
130
+ end
131
+
132
+ # @return [String]
133
+ def message
134
+ @message || @data[:message]
135
+ end
136
+ end
137
+
138
+ class ThrottlingException < ServiceError
139
+
140
+ # @param [Seahorse::Client::RequestContext] context
141
+ # @param [String] message
142
+ # @param [Aws::ConnectCases::Types::ThrottlingException] data
143
+ def initialize(context, message, data = Aws::EmptyStructure.new)
144
+ super(context, message, data)
145
+ end
146
+
147
+ # @return [String]
148
+ def message
149
+ @message || @data[:message]
150
+ end
151
+
152
+ def retryable?
153
+ true
154
+ end
155
+ end
156
+
157
+ class ValidationException < ServiceError
158
+
159
+ # @param [Seahorse::Client::RequestContext] context
160
+ # @param [String] message
161
+ # @param [Aws::ConnectCases::Types::ValidationException] data
162
+ def initialize(context, message, data = Aws::EmptyStructure.new)
163
+ super(context, message, data)
164
+ end
165
+
166
+ # @return [String]
167
+ def message
168
+ @message || @data[:message]
169
+ end
170
+ end
171
+
172
+ end
173
+ 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::ConnectCases
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