aws-sdk-privatenetworks 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,171 @@
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::PrivateNetworks
11
+
12
+ # When PrivateNetworks returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::PrivateNetworks::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all PrivateNetworks errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::PrivateNetworks::Errors::ServiceError
20
+ # # rescues all PrivateNetworks 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
+ # * {InternalServerException}
32
+ # * {LimitExceededException}
33
+ # * {ResourceNotFoundException}
34
+ # * {ThrottlingException}
35
+ # * {ValidationException}
36
+ #
37
+ # Additionally, error classes are dynamically generated for service errors based on the error code
38
+ # if they are not defined above.
39
+ module Errors
40
+
41
+ extend Aws::Errors::DynamicErrors
42
+
43
+ class AccessDeniedException < ServiceError
44
+
45
+ # @param [Seahorse::Client::RequestContext] context
46
+ # @param [String] message
47
+ # @param [Aws::PrivateNetworks::Types::AccessDeniedException] data
48
+ def initialize(context, message, data = Aws::EmptyStructure.new)
49
+ super(context, message, data)
50
+ end
51
+
52
+ # @return [String]
53
+ def message
54
+ @message || @data[:message]
55
+ end
56
+ end
57
+
58
+ class InternalServerException < ServiceError
59
+
60
+ # @param [Seahorse::Client::RequestContext] context
61
+ # @param [String] message
62
+ # @param [Aws::PrivateNetworks::Types::InternalServerException] data
63
+ def initialize(context, message, data = Aws::EmptyStructure.new)
64
+ super(context, message, data)
65
+ end
66
+
67
+ # @return [String]
68
+ def message
69
+ @message || @data[:message]
70
+ end
71
+
72
+ # @return [String]
73
+ def retry_after_seconds
74
+ @data[:retry_after_seconds]
75
+ end
76
+
77
+ def retryable?
78
+ true
79
+ end
80
+ end
81
+
82
+ class LimitExceededException < ServiceError
83
+
84
+ # @param [Seahorse::Client::RequestContext] context
85
+ # @param [String] message
86
+ # @param [Aws::PrivateNetworks::Types::LimitExceededException] data
87
+ def initialize(context, message, data = Aws::EmptyStructure.new)
88
+ super(context, message, data)
89
+ end
90
+
91
+ # @return [String]
92
+ def message
93
+ @message || @data[:message]
94
+ end
95
+ end
96
+
97
+ class ResourceNotFoundException < ServiceError
98
+
99
+ # @param [Seahorse::Client::RequestContext] context
100
+ # @param [String] message
101
+ # @param [Aws::PrivateNetworks::Types::ResourceNotFoundException] data
102
+ def initialize(context, message, data = Aws::EmptyStructure.new)
103
+ super(context, message, data)
104
+ end
105
+
106
+ # @return [String]
107
+ def message
108
+ @message || @data[:message]
109
+ end
110
+
111
+ # @return [String]
112
+ def resource_id
113
+ @data[:resource_id]
114
+ end
115
+
116
+ # @return [String]
117
+ def resource_type
118
+ @data[:resource_type]
119
+ end
120
+ end
121
+
122
+ class ThrottlingException < ServiceError
123
+
124
+ # @param [Seahorse::Client::RequestContext] context
125
+ # @param [String] message
126
+ # @param [Aws::PrivateNetworks::Types::ThrottlingException] data
127
+ def initialize(context, message, data = Aws::EmptyStructure.new)
128
+ super(context, message, data)
129
+ end
130
+
131
+ # @return [String]
132
+ def message
133
+ @message || @data[:message]
134
+ end
135
+
136
+ def retryable?
137
+ true
138
+ end
139
+
140
+ def throttling?
141
+ true
142
+ end
143
+ end
144
+
145
+ class ValidationException < ServiceError
146
+
147
+ # @param [Seahorse::Client::RequestContext] context
148
+ # @param [String] message
149
+ # @param [Aws::PrivateNetworks::Types::ValidationException] data
150
+ def initialize(context, message, data = Aws::EmptyStructure.new)
151
+ super(context, message, data)
152
+ end
153
+
154
+ # @return [String]
155
+ def field_list
156
+ @data[:field_list]
157
+ end
158
+
159
+ # @return [String]
160
+ def message
161
+ @message || @data[:message]
162
+ end
163
+
164
+ # @return [String]
165
+ def reason
166
+ @data[:reason]
167
+ end
168
+ end
169
+
170
+ end
171
+ 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::PrivateNetworks
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