aws-sdk-gamesparks 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,150 @@
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::GameSparks
11
+
12
+ # When GameSparks returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::GameSparks::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all GameSparks errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::GameSparks::Errors::ServiceError
20
+ # # rescues all GameSparks 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::GameSparks::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::GameSparks::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::GameSparks::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
+ end
88
+
89
+ class ResourceNotFoundException < ServiceError
90
+
91
+ # @param [Seahorse::Client::RequestContext] context
92
+ # @param [String] message
93
+ # @param [Aws::GameSparks::Types::ResourceNotFoundException] data
94
+ def initialize(context, message, data = Aws::EmptyStructure.new)
95
+ super(context, message, data)
96
+ end
97
+
98
+ # @return [String]
99
+ def message
100
+ @message || @data[:message]
101
+ end
102
+ end
103
+
104
+ class ServiceQuotaExceededException < ServiceError
105
+
106
+ # @param [Seahorse::Client::RequestContext] context
107
+ # @param [String] message
108
+ # @param [Aws::GameSparks::Types::ServiceQuotaExceededException] 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
+ end
118
+
119
+ class ThrottlingException < ServiceError
120
+
121
+ # @param [Seahorse::Client::RequestContext] context
122
+ # @param [String] message
123
+ # @param [Aws::GameSparks::Types::ThrottlingException] data
124
+ def initialize(context, message, data = Aws::EmptyStructure.new)
125
+ super(context, message, data)
126
+ end
127
+
128
+ # @return [String]
129
+ def message
130
+ @message || @data[:message]
131
+ end
132
+ end
133
+
134
+ class ValidationException < ServiceError
135
+
136
+ # @param [Seahorse::Client::RequestContext] context
137
+ # @param [String] message
138
+ # @param [Aws::GameSparks::Types::ValidationException] data
139
+ def initialize(context, message, data = Aws::EmptyStructure.new)
140
+ super(context, message, data)
141
+ end
142
+
143
+ # @return [String]
144
+ def message
145
+ @message || @data[:message]
146
+ end
147
+ end
148
+
149
+ end
150
+ 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::GameSparks
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