1050 1069 | ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
|
1051 1070 | self.timestamp.as_ref()
|
1052 1071 | }
|
1053 1072 | #[allow(missing_docs)] // documentation missing in model
|
1054 1073 | pub fn unix_timestamp(
|
1055 1074 | &self,
|
1056 1075 | ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
|
1057 1076 | self.unix_timestamp.as_ref()
|
1058 1077 | }
|
1059 1078 | }
|
1079 + | impl ::std::fmt::Display for KitchenSink {
|
1080 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1081 + | ::std::write!(f, "KitchenSink {{")?;
|
1082 + | if let ::std::option::Option::Some(_) = &self.blob {
|
1083 + | ::std::write!(f, "blob=Some()")?;
|
1084 + | } else {
|
1085 + | ::std::write!(f, "blob=None")?;
|
1086 + | }
|
1087 + | if let ::std::option::Option::Some(inner) = &self.boolean {
|
1088 + | ::std::write!(f, ", boolean=Some({})", inner)?;
|
1089 + | } else {
|
1090 + | ::std::write!(f, ", boolean=None")?;
|
1091 + | }
|
1092 + | if let ::std::option::Option::Some(inner) = &self.double {
|
1093 + | ::std::write!(f, ", double=Some({})", inner)?;
|
1094 + | } else {
|
1095 + | ::std::write!(f, ", double=None")?;
|
1096 + | }
|
1097 + | if let ::std::option::Option::Some(inner) = &self.empty_struct {
|
1098 + | ::std::write!(f, ", empty_struct=Some({})", inner)?;
|
1099 + | } else {
|
1100 + | ::std::write!(f, ", empty_struct=None")?;
|
1101 + | }
|
1102 + | if let ::std::option::Option::Some(inner) = &self.float {
|
1103 + | ::std::write!(f, ", float=Some({})", inner)?;
|
1104 + | } else {
|
1105 + | ::std::write!(f, ", float=None")?;
|
1106 + | }
|
1107 + | if let ::std::option::Option::Some(inner) = &self.httpdate_timestamp {
|
1108 + | ::std::write!(f, ", httpdate_timestamp=Some({})", inner)?;
|
1109 + | } else {
|
1110 + | ::std::write!(f, ", httpdate_timestamp=None")?;
|
1111 + | }
|
1112 + | if let ::std::option::Option::Some(inner) = &self.integer {
|
1113 + | ::std::write!(f, ", integer=Some({})", inner)?;
|
1114 + | } else {
|
1115 + | ::std::write!(f, ", integer=None")?;
|
1116 + | }
|
1117 + | if let ::std::option::Option::Some(inner) = &self.iso8601_timestamp {
|
1118 + | ::std::write!(f, ", iso8601_timestamp=Some({})", inner)?;
|
1119 + | } else {
|
1120 + | ::std::write!(f, ", iso8601_timestamp=None")?;
|
1121 + | }
|
1122 + | if let ::std::option::Option::Some(inner) = &self.json_value {
|
1123 + | ::std::write!(f, ", json_value=Some({})", inner)?;
|
1124 + | } else {
|
1125 + | ::std::write!(f, ", json_value=None")?;
|
1126 + | }
|
1127 + | if let ::std::option::Option::Some(_) = &self.list_of_lists {
|
1128 + | ::std::write!(f, ", list_of_lists=Some()")?;
|
1129 + | } else {
|
1130 + | ::std::write!(f, ", list_of_lists=None")?;
|
1131 + | }
|
1132 + | if let ::std::option::Option::Some(_) = &self.list_of_maps_of_strings {
|
1133 + | ::std::write!(f, ", list_of_maps_of_strings=Some()")?;
|
1134 + | } else {
|
1135 + | ::std::write!(f, ", list_of_maps_of_strings=None")?;
|
1136 + | }
|
1137 + | if let ::std::option::Option::Some(_) = &self.list_of_strings {
|
1138 + | ::std::write!(f, ", list_of_strings=Some()")?;
|
1139 + | } else {
|
1140 + | ::std::write!(f, ", list_of_strings=None")?;
|
1141 + | }
|
1142 + | if let ::std::option::Option::Some(_) = &self.list_of_structs {
|
1143 + | ::std::write!(f, ", list_of_structs=Some()")?;
|
1144 + | } else {
|
1145 + | ::std::write!(f, ", list_of_structs=None")?;
|
1146 + | }
|
1147 + | if let ::std::option::Option::Some(inner) = &self.long {
|
1148 + | ::std::write!(f, ", long=Some({})", inner)?;
|
1149 + | } else {
|
1150 + | ::std::write!(f, ", long=None")?;
|
1151 + | }
|
1152 + | if let ::std::option::Option::Some(_) = &self.map_of_lists_of_strings {
|
1153 + | ::std::write!(f, ", map_of_lists_of_strings=Some()")?;
|
1154 + | } else {
|
1155 + | ::std::write!(f, ", map_of_lists_of_strings=None")?;
|
1156 + | }
|
1157 + | if let ::std::option::Option::Some(_) = &self.map_of_maps {
|
1158 + | ::std::write!(f, ", map_of_maps=Some()")?;
|
1159 + | } else {
|
1160 + | ::std::write!(f, ", map_of_maps=None")?;
|
1161 + | }
|
1162 + | if let ::std::option::Option::Some(_) = &self.map_of_strings {
|
1163 + | ::std::write!(f, ", map_of_strings=Some()")?;
|
1164 + | } else {
|
1165 + | ::std::write!(f, ", map_of_strings=None")?;
|
1166 + | }
|
1167 + | if let ::std::option::Option::Some(_) = &self.map_of_structs {
|
1168 + | ::std::write!(f, ", map_of_structs=Some()")?;
|
1169 + | } else {
|
1170 + | ::std::write!(f, ", map_of_structs=None")?;
|
1171 + | }
|
1172 + | if let ::std::option::Option::Some(_) = &self.recursive_list {
|
1173 + | ::std::write!(f, ", recursive_list=Some()")?;
|
1174 + | } else {
|
1175 + | ::std::write!(f, ", recursive_list=None")?;
|
1176 + | }
|
1177 + | if let ::std::option::Option::Some(_) = &self.recursive_map {
|
1178 + | ::std::write!(f, ", recursive_map=Some()")?;
|
1179 + | } else {
|
1180 + | ::std::write!(f, ", recursive_map=None")?;
|
1181 + | }
|
1182 + | if let ::std::option::Option::Some(inner) = &self.recursive_struct {
|
1183 + | ::std::write!(f, ", recursive_struct=Some({})", inner)?;
|
1184 + | } else {
|
1185 + | ::std::write!(f, ", recursive_struct=None")?;
|
1186 + | }
|
1187 + | if let ::std::option::Option::Some(inner) = &self.simple_struct {
|
1188 + | ::std::write!(f, ", simple_struct=Some({})", inner)?;
|
1189 + | } else {
|
1190 + | ::std::write!(f, ", simple_struct=None")?;
|
1191 + | }
|
1192 + | if let ::std::option::Option::Some(inner) = &self.string {
|
1193 + | ::std::write!(f, ", string=Some({})", inner)?;
|
1194 + | } else {
|
1195 + | ::std::write!(f, ", string=None")?;
|
1196 + | }
|
1197 + | if let ::std::option::Option::Some(inner) = &self.struct_with_json_name {
|
1198 + | ::std::write!(f, ", struct_with_json_name=Some({})", inner)?;
|
1199 + | } else {
|
1200 + | ::std::write!(f, ", struct_with_json_name=None")?;
|
1201 + | }
|
1202 + | if let ::std::option::Option::Some(inner) = &self.timestamp {
|
1203 + | ::std::write!(f, ", timestamp=Some({})", inner)?;
|
1204 + | } else {
|
1205 + | ::std::write!(f, ", timestamp=None")?;
|
1206 + | }
|
1207 + | if let ::std::option::Option::Some(inner) = &self.unix_timestamp {
|
1208 + | ::std::write!(f, ", unix_timestamp=Some({})", inner)?;
|
1209 + | } else {
|
1210 + | ::std::write!(f, ", unix_timestamp=None")?;
|
1211 + | }
|
1212 + | ::std::write!(f, "}}")
|
1213 + | }
|
1214 + | }
|
1060 1215 | #[allow(clippy::new_without_default)]
|
1061 1216 | #[allow(clippy::too_many_arguments)]
|
1062 1217 | #[::pyo3::pymethods]
|
1063 1218 | impl KitchenSink {
|
1064 1219 | #[new]
|
1065 1220 | pub fn new(
|
1066 1221 | blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
1067 1222 | boolean: ::std::option::Option<bool>,
|
1068 1223 | double: ::std::option::Option<f64>,
|
1069 1224 | empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
|
1181 1336 | /// :type typing.Optional\[str\]:
|
1182 1337 | #[allow(missing_docs)] // documentation missing in model
|
1183 1338 | pub value: ::std::option::Option<::std::string::String>,
|
1184 1339 | }
|
1185 1340 | impl StructWithJsonName {
|
1186 1341 | #[allow(missing_docs)] // documentation missing in model
|
1187 1342 | pub fn value(&self) -> ::std::option::Option<&str> {
|
1188 1343 | self.value.as_deref()
|
1189 1344 | }
|
1190 1345 | }
|
1346 + | impl ::std::fmt::Display for StructWithJsonName {
|
1347 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1348 + | ::std::write!(f, "StructWithJsonName {{")?;
|
1349 + | if let ::std::option::Option::Some(inner) = &self.value {
|
1350 + | ::std::write!(f, "value=Some({})", inner)?;
|
1351 + | } else {
|
1352 + | ::std::write!(f, "value=None")?;
|
1353 + | }
|
1354 + | ::std::write!(f, "}}")
|
1355 + | }
|
1356 + | }
|
1191 1357 | #[allow(clippy::new_without_default)]
|
1192 1358 | #[allow(clippy::too_many_arguments)]
|
1193 1359 | #[::pyo3::pymethods]
|
1194 1360 | impl StructWithJsonName {
|
1195 1361 | #[new]
|
1196 1362 | pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
|
1197 1363 | Self { value }
|
1198 1364 | }
|
1199 1365 | fn __repr__(&self) -> String {
|
1200 1366 | format!("{self:?}")
|
1201 1367 | }
|
1202 1368 | fn __str__(&self) -> String {
|
1203 1369 | format!("{self:?}")
|
1204 1370 | }
|
1205 1371 | }
|
1206 1372 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructWithJsonName> {
|
1207 1373 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1208 1374 | ob.extract::<StructWithJsonName>().map(Box::new)
|
1209 1375 | }
|
1210 1376 | }
|
1211 1377 |
|
1212 1378 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructWithJsonName> {
|
1213 1379 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1214 1380 | (*self).into_py(py)
|
1215 1381 | }
|
1216 1382 | }
|
1217 1383 | impl crate::constrained::Constrained for crate::model::StructWithJsonName {
|
1218 1384 | type Unconstrained = crate::model::struct_with_json_name_internal::Builder;
|
1219 1385 | }
|
1220 1386 | impl StructWithJsonName {
|
1221 1387 | /// Creates a new builder-style object to manufacture [`StructWithJsonName`](crate::model::StructWithJsonName).
|
1222 1388 | pub fn builder() -> crate::model::struct_with_json_name::Builder {
|
1223 1389 | crate::model::struct_with_json_name::Builder::default()
|
1224 1390 | }
|
1225 1391 | }
|
1226 1392 |
|
1227 1393 | #[::pyo3::pyclass]
|
1228 1394 | /// :param value typing.Optional\[str\]:
|
1229 1395 | /// :rtype None:
|
1230 1396 | #[allow(missing_docs)] // documentation missing in model
|
1231 1397 | #[derive(
|
1232 1398 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1233 1399 | )]
|
1234 1400 | pub struct SimpleStruct {
|
1235 1401 | #[pyo3(get, set)]
|
1236 1402 | /// :type typing.Optional\[str\]:
|
1237 1403 | #[allow(missing_docs)] // documentation missing in model
|
1238 1404 | pub value: ::std::option::Option<::std::string::String>,
|
1239 1405 | }
|
1240 1406 | impl SimpleStruct {
|
1241 1407 | #[allow(missing_docs)] // documentation missing in model
|
1242 1408 | pub fn value(&self) -> ::std::option::Option<&str> {
|
1243 1409 | self.value.as_deref()
|
1244 1410 | }
|
1245 1411 | }
|
1412 + | impl ::std::fmt::Display for SimpleStruct {
|
1413 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1414 + | ::std::write!(f, "SimpleStruct {{")?;
|
1415 + | if let ::std::option::Option::Some(inner) = &self.value {
|
1416 + | ::std::write!(f, "value=Some({})", inner)?;
|
1417 + | } else {
|
1418 + | ::std::write!(f, "value=None")?;
|
1419 + | }
|
1420 + | ::std::write!(f, "}}")
|
1421 + | }
|
1422 + | }
|
1246 1423 | #[allow(clippy::new_without_default)]
|
1247 1424 | #[allow(clippy::too_many_arguments)]
|
1248 1425 | #[::pyo3::pymethods]
|
1249 1426 | impl SimpleStruct {
|
1250 1427 | #[new]
|
1251 1428 | pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
|
1252 1429 | Self { value }
|
1253 1430 | }
|
1254 1431 | fn __repr__(&self) -> String {
|
1255 1432 | format!("{self:?}")
|
1256 1433 | }
|
1257 1434 | fn __str__(&self) -> String {
|
1258 1435 | format!("{self:?}")
|
1259 1436 | }
|
1260 1437 | }
|
1261 1438 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<SimpleStruct> {
|
1262 1439 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1263 1440 | ob.extract::<SimpleStruct>().map(Box::new)
|
1264 1441 | }
|
1265 1442 | }
|
1266 1443 |
|
1267 1444 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<SimpleStruct> {
|
1268 1445 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1269 1446 | (*self).into_py(py)
|
1270 1447 | }
|
1271 1448 | }
|
1272 1449 | impl crate::constrained::Constrained for crate::model::SimpleStruct {
|
1273 1450 | type Unconstrained = crate::model::simple_struct_internal::Builder;
|
1274 1451 | }
|
1275 1452 | impl SimpleStruct {
|
1276 1453 | /// Creates a new builder-style object to manufacture [`SimpleStruct`](crate::model::SimpleStruct).
|
1277 1454 | pub fn builder() -> crate::model::simple_struct::Builder {
|
1278 1455 | crate::model::simple_struct::Builder::default()
|
1279 1456 | }
|
1280 1457 | }
|
1281 1458 |
|
1282 1459 | #[::pyo3::pyclass]
|
1283 1460 | /// :rtype None:
|
1284 1461 | #[allow(missing_docs)] // documentation missing in model
|
1285 1462 | #[derive(
|
1286 1463 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1287 1464 | )]
|
1288 1465 | pub struct EmptyStruct {}
|
1466 + | impl ::std::fmt::Display for EmptyStruct {
|
1467 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1468 + | ::std::write!(f, "EmptyStruct {{")?;
|
1469 + | ::std::write!(f, "}}")
|
1470 + | }
|
1471 + | }
|
1289 1472 | #[allow(clippy::new_without_default)]
|
1290 1473 | #[allow(clippy::too_many_arguments)]
|
1291 1474 | #[::pyo3::pymethods]
|
1292 1475 | impl EmptyStruct {
|
1293 1476 | #[new]
|
1294 1477 | pub fn new() -> Self {
|
1295 1478 | Self {}
|
1296 1479 | }
|
1297 1480 | fn __repr__(&self) -> String {
|
1298 1481 | format!("{self:?}")
|