1 - | import json_rpc11.model
|
2 - | import json_rpc11.types
|
3 - | import typing
|
4 - |
|
5 - | class ComplexNestedErrorData:
|
6 - | foo: typing.Optional[str]
|
7 - |
|
8 - | def __init__(self, foo: typing.Optional[str] = ...) -> None:
|
9 - | ...
|
10 - |
|
11 - |
|
12 - | class EmptyStruct:
|
13 - | def __init__(self) -> None:
|
14 - | ...
|
15 - |
|
16 - |
|
17 - | class FooEnum:
|
18 - | Bar: FooEnum
|
19 - |
|
20 - | Baz: FooEnum
|
21 - |
|
22 - | Foo: FooEnum
|
23 - |
|
24 - | One: FooEnum
|
25 - |
|
26 - | Zero: FooEnum
|
27 - |
|
28 - | name: typing.Any
|
29 - |
|
30 - | value: typing.Any
|
31 - |
|
32 - | class GreetingStruct:
|
33 - | hi: typing.Optional[str]
|
34 - |
|
35 - | def __init__(self, hi: typing.Optional[str] = ...) -> None:
|
36 - | ...
|
37 - |
|
38 - |
|
39 - | class KitchenSink:
|
40 - | blob: typing.Optional[json_rpc11.types.Blob]
|
41 - |
|
42 - | boolean: typing.Optional[bool]
|
43 - |
|
44 - | double: typing.Optional[float]
|
45 - |
|
46 - | empty_struct: typing.Optional[json_rpc11.model.EmptyStruct]
|
47 - |
|
48 - | float: typing.Optional[float]
|
49 - |
|
50 - | httpdate_timestamp: typing.Optional[json_rpc11.types.DateTime]
|
51 - |
|
52 - | integer: typing.Optional[int]
|
53 - |
|
54 - | iso8601_timestamp: typing.Optional[json_rpc11.types.DateTime]
|
55 - |
|
56 - | json_value: typing.Optional[str]
|
57 - |
|
58 - | list_of_lists: typing.Optional[typing.List[typing.List[str]]]
|
59 - |
|
60 - | list_of_maps_of_strings: typing.Optional[typing.List[typing.Dict[str, str]]]
|
61 - |
|
62 - | list_of_strings: typing.Optional[typing.List[str]]
|
63 - |
|
64 - | list_of_structs: typing.Optional[typing.List[json_rpc11.model.SimpleStruct]]
|
65 - |
|
66 - | long: typing.Optional[int]
|
67 - |
|
68 - | map_of_lists_of_strings: typing.Optional[typing.Dict[str, typing.List[str]]]
|
69 - |
|
70 - | map_of_maps: typing.Optional[typing.Dict[str, typing.Dict[str, str]]]
|
71 - |
|
72 - | map_of_strings: typing.Optional[typing.Dict[str, str]]
|
73 - |
|
74 - | map_of_structs: typing.Optional[typing.Dict[str, json_rpc11.model.SimpleStruct]]
|
75 - |
|
76 - | recursive_list: typing.Optional[typing.List[json_rpc11.model.KitchenSink]]
|
77 - |
|
78 - | recursive_map: typing.Optional[typing.Dict[str, json_rpc11.model.KitchenSink]]
|
79 - |
|
80 - | recursive_struct: typing.Optional[json_rpc11.model.KitchenSink]
|
81 - |
|
82 - | simple_struct: typing.Optional[json_rpc11.model.SimpleStruct]
|
83 - |
|
84 - | string: typing.Optional[str]
|
85 - |
|
86 - | struct_with_json_name: typing.Optional[json_rpc11.model.StructWithJsonName]
|
87 - |
|
88 - | timestamp: typing.Optional[json_rpc11.types.DateTime]
|
89 - |
|
90 - | unix_timestamp: typing.Optional[json_rpc11.types.DateTime]
|
91 - |
|
92 - | def __init__(self, blob: typing.Optional[json_rpc11.types.Blob] = ..., boolean: typing.Optional[bool] = ..., double: typing.Optional[float] = ..., empty_struct: typing.Optional[json_rpc11.model.EmptyStruct] = ..., float: typing.Optional[float] = ..., httpdate_timestamp: typing.Optional[json_rpc11.types.DateTime] = ..., integer: typing.Optional[int] = ..., iso8601_timestamp: typing.Optional[json_rpc11.types.DateTime] = ..., json_value: typing.Optional[str] = ..., list_of_lists: typing.Optional[typing.List[typing.List[str]]] = ..., list_of_maps_of_strings: typing.Optional[typing.List[typing.Dict[str, str]]] = ..., list_of_strings: typing.Optional[typing.List[str]] = ..., list_of_structs: typing.Optional[typing.List[json_rpc11.model.SimpleStruct]] = ..., long: typing.Optional[int] = ..., map_of_lists_of_strings: typing.Optional[typing.Dict[str, typing.List[str]]] = ..., map_of_maps: typing.Optional[typing.Dict[str, typing.Dict[str, str]]] = ..., map_of_strings: typing.Optional[typing.Dict[str, str]] = ..., map_of_structs: typing.Optional[typing.Dict[str, json_rpc11.model.SimpleStruct]] = ..., recursive_list: typing.Optional[typing.List[json_rpc11.model.KitchenSink]] = ..., recursive_map: typing.Optional[typing.Dict[str, json_rpc11.model.KitchenSink]] = ..., recursive_struct: typing.Optional[json_rpc11.model.KitchenSink] = ..., simple_struct: typing.Optional[json_rpc11.model.SimpleStruct] = ..., string: typing.Optional[str] = ..., struct_with_json_name: typing.Optional[json_rpc11.model.StructWithJsonName] = ..., timestamp: typing.Optional[json_rpc11.types.DateTime] = ..., unix_timestamp: typing.Optional[json_rpc11.types.DateTime] = ...) -> None:
|
93 - | ...
|
94 - |
|
95 - |
|
96 - | class MyUnion:
|
97 - | def as_blob_value(self) -> json_rpc11.types.Blob:
|
98 - | """
|
99 - | Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
|
100 - | """
|
101 - | ...
|
102 - |
|
103 - |
|
104 - | def as_boolean_value(self) -> bool:
|
105 - | """
|
106 - | Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
107 - | """
|
108 - | ...
|
109 - |
|
110 - |
|
111 - | def as_enum_value(self) -> json_rpc11.model.FooEnum:
|
112 - | """
|
113 - | Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
114 - | """
|
115 - | ...
|
116 - |
|
117 - |
|
118 - | def as_list_value(self) -> typing.List[str]:
|
119 - | """
|
120 - | Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
121 - | """
|
122 - | ...
|
123 - |
|
124 - |
|
125 - | def as_map_value(self) -> typing.Dict[str, str]:
|
126 - | """
|
127 - | Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
128 - | """
|
129 - | ...
|
130 - |
|
131 - |
|
132 - | def as_number_value(self) -> int:
|
133 - | """
|
134 - | Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
135 - | """
|
136 - | ...
|
137 - |
|
138 - |
|
139 - | def as_string_value(self) -> str:
|
140 - | """
|
141 - | Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
142 - | """
|
143 - | ...
|
144 - |
|
145 - |
|
146 - | def as_structure_value(self) -> json_rpc11.model.GreetingStruct:
|
147 - | """
|
148 - | Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
149 - | """
|
150 - | ...
|
151 - |
|
152 - |
|
153 - | def as_timestamp_value(self) -> json_rpc11.types.DateTime:
|
154 - | """
|
155 - | Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
|
156 - | """
|
157 - | ...
|
158 - |
|
159 - |
|
160 - | @staticmethod
|
161 - | def blob_value(data: json_rpc11.types.Blob) -> MyUnion:
|
162 - | """
|
163 - | Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
|
164 - | """
|
165 - | ...
|
166 - |
|
167 - |
|
168 - | @staticmethod
|
169 - | def boolean_value(data: bool) -> MyUnion:
|
170 - | """
|
171 - | Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
|
172 - | """
|
173 - | ...
|
174 - |
|
175 - |
|
176 - | @staticmethod
|
177 - | def enum_value(data: json_rpc11.model.FooEnum) -> MyUnion:
|
178 - | """
|
179 - | Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
|
180 - | """
|
181 - | ...
|
182 - |
|
183 - |
|
184 - | def is_blob_value(self) -> bool:
|
185 - | """
|
186 - | Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
187 - | """
|
188 - | ...
|
189 - |
|
190 - |
|
191 - | def is_boolean_value(self) -> bool:
|
192 - | """
|
193 - | Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
194 - | """
|
195 - | ...
|
196 - |
|
197 - |
|
198 - | def is_enum_value(self) -> bool:
|
199 - | """
|
200 - | Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
201 - | """
|
202 - | ...
|
203 - |
|
204 - |
|
205 - | def is_list_value(self) -> bool:
|
206 - | """
|
207 - | Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
208 - | """
|
209 - | ...
|
210 - |
|
211 - |
|
212 - | def is_map_value(self) -> bool:
|
213 - | """
|
214 - | Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
215 - | """
|
216 - | ...
|
217 - |
|
218 - |
|
219 - | def is_number_value(self) -> bool:
|
220 - | """
|
221 - | Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
222 - | """
|
223 - | ...
|
224 - |
|
225 - |
|
226 - | def is_string_value(self) -> bool:
|
227 - | """
|
228 - | Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
229 - | """
|
230 - | ...
|
231 - |
|
232 - |
|
233 - | def is_structure_value(self) -> bool:
|
234 - | """
|
235 - | Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
236 - | """
|
237 - | ...
|
238 - |
|
239 - |
|
240 - | def is_timestamp_value(self) -> bool:
|
241 - | """
|
242 - | Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
243 - | """
|
244 - | ...
|
245 - |
|
246 - |
|
247 - | @staticmethod
|
248 - | def list_value(data: typing.List[str]) -> MyUnion:
|
249 - | """
|
250 - | Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
|
251 - | """
|
252 - | ...
|
253 - |
|
254 - |
|
255 - | @staticmethod
|
256 - | def map_value(data: typing.Dict[str, str]) -> MyUnion:
|
257 - | """
|
258 - | Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
|
259 - | """
|
260 - | ...
|
261 - |
|
262 - |
|
263 - | @staticmethod
|
264 - | def number_value(data: int) -> MyUnion:
|
265 - | """
|
266 - | Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
|
267 - | """
|
268 - | ...
|
269 - |
|
270 - |
|
271 - | @staticmethod
|
272 - | def string_value(data: str) -> MyUnion:
|
273 - | """
|
274 - | Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
|
275 - | """
|
276 - | ...
|
277 - |
|
278 - |
|
279 - | @staticmethod
|
280 - | def structure_value(data: json_rpc11.model.GreetingStruct) -> MyUnion:
|
281 - | """
|
282 - | Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
|
283 - | """
|
284 - | ...
|
285 - |
|
286 - |
|
287 - | @staticmethod
|
288 - | def timestamp_value(data: json_rpc11.types.DateTime) -> MyUnion:
|
289 - | """
|
290 - | Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
|
291 - | """
|
292 - | ...
|
293 - |
|
294 - |
|
295 - | class SimpleStruct:
|
296 - | value: typing.Optional[str]
|
297 - |
|
298 - | def __init__(self, value: typing.Optional[str] = ...) -> None:
|
299 - | ...
|
300 - |
|
301 - |
|
302 - | class StructWithJsonName:
|
303 - | value: typing.Optional[str]
|
304 - |
|
305 - | def __init__(self, value: typing.Optional[str] = ...) -> None:
|
306 - | ...
|
307 - |
|
308 - |
|
309 - | class ValidationExceptionField:
|
310 - | """
|
311 - | Describes one specific validation failure for an input member.
|
312 - | """
|
313 - |
|
314 - | message: str
|
315 - | """
|
316 - | A detailed description of the validation failure.
|
317 - | """
|
318 - |
|
319 - | path: str
|
320 - | """
|
321 - | A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
322 - | """
|
323 - |
|
324 - | def __init__(self, path: str, message: str) -> None:
|
325 - | ...
|
326 - |
|