1 - | import json_rpc10.model
|
2 - | import json_rpc10.types
|
3 - | import typing
|
4 - |
|
5 - | class ClientOptionalDefaults:
|
6 - | member: int
|
7 - |
|
8 - | def __init__(self, member: int) -> None:
|
9 - | ...
|
10 - |
|
11 - |
|
12 - | class ComplexNestedErrorData:
|
13 - | foo: typing.Optional[str]
|
14 - |
|
15 - | def __init__(self, foo: typing.Optional[str] = ...) -> None:
|
16 - | ...
|
17 - |
|
18 - |
|
19 - | class Defaults:
|
20 - | default_blob: json_rpc10.types.Blob
|
21 - |
|
22 - | default_boolean: bool
|
23 - |
|
24 - | default_byte: int
|
25 - |
|
26 - | default_document_boolean: json_rpc10.types.Document
|
27 - |
|
28 - | default_document_list: json_rpc10.types.Document
|
29 - |
|
30 - | default_document_map: json_rpc10.types.Document
|
31 - |
|
32 - | default_document_string: json_rpc10.types.Document
|
33 - |
|
34 - | default_double: float
|
35 - |
|
36 - | default_enum: json_rpc10.model.TestEnum
|
37 - |
|
38 - | default_float: float
|
39 - |
|
40 - | default_int_enum: int
|
41 - |
|
42 - | default_integer: int
|
43 - |
|
44 - | default_list: typing.List[str]
|
45 - |
|
46 - | default_long: int
|
47 - |
|
48 - | default_map: typing.Dict[str, str]
|
49 - |
|
50 - | default_null_document: typing.Optional[json_rpc10.types.Document]
|
51 - |
|
52 - | default_short: int
|
53 - |
|
54 - | default_string: str
|
55 - |
|
56 - | default_timestamp: json_rpc10.types.DateTime
|
57 - |
|
58 - | empty_blob: json_rpc10.types.Blob
|
59 - |
|
60 - | empty_string: str
|
61 - |
|
62 - | false_boolean: bool
|
63 - |
|
64 - | zero_byte: int
|
65 - |
|
66 - | zero_double: float
|
67 - |
|
68 - | zero_float: float
|
69 - |
|
70 - | zero_integer: int
|
71 - |
|
72 - | zero_long: int
|
73 - |
|
74 - | zero_short: int
|
75 - |
|
76 - | def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float, default_null_document: typing.Optional[json_rpc10.types.Document] = ...) -> None:
|
77 - | ...
|
78 - |
|
79 - |
|
80 - | class Dialog:
|
81 - | farewell: typing.Optional[json_rpc10.model.Farewell]
|
82 - |
|
83 - | greeting: str
|
84 - |
|
85 - | language: typing.Optional[str]
|
86 - |
|
87 - | def __init__(self, greeting: str, language: typing.Optional[str] = ..., farewell: typing.Optional[json_rpc10.model.Farewell] = ...) -> None:
|
88 - | ...
|
89 - |
|
90 - |
|
91 - | class Farewell:
|
92 - | phrase: str
|
93 - |
|
94 - | def __init__(self, phrase: str) -> None:
|
95 - | ...
|
96 - |
|
97 - |
|
98 - | class FooEnum:
|
99 - | Bar: FooEnum
|
100 - |
|
101 - | Baz: FooEnum
|
102 - |
|
103 - | Foo: FooEnum
|
104 - |
|
105 - | One: FooEnum
|
106 - |
|
107 - | Zero: FooEnum
|
108 - |
|
109 - | name: typing.Any
|
110 - |
|
111 - | value: typing.Any
|
112 - |
|
113 - | class GreetingStruct:
|
114 - | hi: typing.Optional[str]
|
115 - |
|
116 - | def __init__(self, hi: typing.Optional[str] = ...) -> None:
|
117 - | ...
|
118 - |
|
119 - |
|
120 - | class MyUnion:
|
121 - | def as_blob_value(self) -> json_rpc10.types.Blob:
|
122 - | """
|
123 - | Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
|
124 - | """
|
125 - | ...
|
126 - |
|
127 - |
|
128 - | def as_boolean_value(self) -> bool:
|
129 - | """
|
130 - | Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
131 - | """
|
132 - | ...
|
133 - |
|
134 - |
|
135 - | def as_enum_value(self) -> json_rpc10.model.FooEnum:
|
136 - | """
|
137 - | Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
138 - | """
|
139 - | ...
|
140 - |
|
141 - |
|
142 - | def as_int_enum_value(self) -> int:
|
143 - | """
|
144 - | Tries to convert the enum instance into [`IntEnumValue`](crate::model::MyUnion::IntEnumValue), extracting the inner [`i32`](i32).
|
145 - | """
|
146 - | ...
|
147 - |
|
148 - |
|
149 - | def as_list_value(self) -> typing.List[str]:
|
150 - | """
|
151 - | Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
152 - | """
|
153 - | ...
|
154 - |
|
155 - |
|
156 - | def as_map_value(self) -> typing.Dict[str, str]:
|
157 - | """
|
158 - | Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
159 - | """
|
160 - | ...
|
161 - |
|
162 - |
|
163 - | def as_number_value(self) -> int:
|
164 - | """
|
165 - | Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
166 - | """
|
167 - | ...
|
168 - |
|
169 - |
|
170 - | def as_string_value(self) -> str:
|
171 - | """
|
172 - | Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
173 - | """
|
174 - | ...
|
175 - |
|
176 - |
|
177 - | def as_structure_value(self) -> json_rpc10.model.GreetingStruct:
|
178 - | """
|
179 - | Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
180 - | """
|
181 - | ...
|
182 - |
|
183 - |
|
184 - | def as_timestamp_value(self) -> json_rpc10.types.DateTime:
|
185 - | """
|
186 - | Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
|
187 - | """
|
188 - | ...
|
189 - |
|
190 - |
|
191 - | @staticmethod
|
192 - | def blob_value(data: json_rpc10.types.Blob) -> MyUnion:
|
193 - | """
|
194 - | Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
|
195 - | """
|
196 - | ...
|
197 - |
|
198 - |
|
199 - | @staticmethod
|
200 - | def boolean_value(data: bool) -> MyUnion:
|
201 - | """
|
202 - | Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
|
203 - | """
|
204 - | ...
|
205 - |
|
206 - |
|
207 - | @staticmethod
|
208 - | def enum_value(data: json_rpc10.model.FooEnum) -> MyUnion:
|
209 - | """
|
210 - | Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
|
211 - | """
|
212 - | ...
|
213 - |
|
214 - |
|
215 - | @staticmethod
|
216 - | def int_enum_value(data: int) -> MyUnion:
|
217 - | """
|
218 - | Creates a new union instance of [`IntEnumValue`](crate::model::MyUnion::IntEnumValue)
|
219 - | """
|
220 - | ...
|
221 - |
|
222 - |
|
223 - | def is_blob_value(self) -> bool:
|
224 - | """
|
225 - | Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
226 - | """
|
227 - | ...
|
228 - |
|
229 - |
|
230 - | def is_boolean_value(self) -> bool:
|
231 - | """
|
232 - | Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
233 - | """
|
234 - | ...
|
235 - |
|
236 - |
|
237 - | def is_enum_value(self) -> bool:
|
238 - | """
|
239 - | Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
240 - | """
|
241 - | ...
|
242 - |
|
243 - |
|
244 - | def is_int_enum_value(self) -> bool:
|
245 - | """
|
246 - | Returns true if this is a [`IntEnumValue`](crate::model::MyUnion::IntEnumValue).
|
247 - | """
|
248 - | ...
|
249 - |
|
250 - |
|
251 - | def is_list_value(self) -> bool:
|
252 - | """
|
253 - | Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
254 - | """
|
255 - | ...
|
256 - |
|
257 - |
|
258 - | def is_map_value(self) -> bool:
|
259 - | """
|
260 - | Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
261 - | """
|
262 - | ...
|
263 - |
|
264 - |
|
265 - | def is_number_value(self) -> bool:
|
266 - | """
|
267 - | Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
268 - | """
|
269 - | ...
|
270 - |
|
271 - |
|
272 - | def is_string_value(self) -> bool:
|
273 - | """
|
274 - | Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
275 - | """
|
276 - | ...
|
277 - |
|
278 - |
|
279 - | def is_structure_value(self) -> bool:
|
280 - | """
|
281 - | Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
282 - | """
|
283 - | ...
|
284 - |
|
285 - |
|
286 - | def is_timestamp_value(self) -> bool:
|
287 - | """
|
288 - | Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
289 - | """
|
290 - | ...
|
291 - |
|
292 - |
|
293 - | @staticmethod
|
294 - | def list_value(data: typing.List[str]) -> MyUnion:
|
295 - | """
|
296 - | Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
|
297 - | """
|
298 - | ...
|
299 - |
|
300 - |
|
301 - | @staticmethod
|
302 - | def map_value(data: typing.Dict[str, str]) -> MyUnion:
|
303 - | """
|
304 - | Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
|
305 - | """
|
306 - | ...
|
307 - |
|
308 - |
|
309 - | @staticmethod
|
310 - | def number_value(data: int) -> MyUnion:
|
311 - | """
|
312 - | Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
|
313 - | """
|
314 - | ...
|
315 - |
|
316 - |
|
317 - | @staticmethod
|
318 - | def string_value(data: str) -> MyUnion:
|
319 - | """
|
320 - | Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
|
321 - | """
|
322 - | ...
|
323 - |
|
324 - |
|
325 - | @staticmethod
|
326 - | def structure_value(data: json_rpc10.model.GreetingStruct) -> MyUnion:
|
327 - | """
|
328 - | Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
|
329 - | """
|
330 - | ...
|
331 - |
|
332 - |
|
333 - | @staticmethod
|
334 - | def timestamp_value(data: json_rpc10.types.DateTime) -> MyUnion:
|
335 - | """
|
336 - | Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
|
337 - | """
|
338 - | ...
|
339 - |
|
340 - |
|
341 - | class RequiredEnum:
|
342 - | Bar: RequiredEnum
|
343 - |
|
344 - | Baz: RequiredEnum
|
345 - |
|
346 - | Foo: RequiredEnum
|
347 - |
|
348 - | name: typing.Any
|
349 - |
|
350 - | value: typing.Any
|
351 - |
|
352 - | class TestEnum:
|
353 - | Bar: TestEnum
|
354 - |
|
355 - | Baz: TestEnum
|
356 - |
|
357 - | Foo: TestEnum
|
358 - |
|
359 - | name: typing.Any
|
360 - |
|
361 - | value: typing.Any
|
362 - |
|
363 - | class TopLevel:
|
364 - | dialog: json_rpc10.model.Dialog
|
365 - |
|
366 - | dialog_list: typing.List[json_rpc10.model.Dialog]
|
367 - |
|
368 - | dialog_map: typing.Dict[str, json_rpc10.model.Dialog]
|
369 - |
|
370 - | def __init__(self, dialog: json_rpc10.model.Dialog, dialog_list: typing.List[json_rpc10.model.Dialog], dialog_map: typing.Dict[str, json_rpc10.model.Dialog]) -> None:
|
371 - | ...
|
372 - |
|
373 - |
|
374 - | class ValidationExceptionField:
|
375 - | """
|
376 - | Describes one specific validation failure for an input member.
|
377 - | """
|
378 - |
|
379 - | message: str
|
380 - | """
|
381 - | A detailed description of the validation failure.
|
382 - | """
|
383 - |
|
384 - | path: str
|
385 - | """
|
386 - | A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
387 - | """
|
388 - |
|
389 - | def __init__(self, path: str, message: str) -> None:
|
390 - | ...
|
391 - |
|