standardbots 2.20231204.22__py3-none-any.whl → 2.20231218.2__py3-none-any.whl
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.
Potentially problematic release.
This version of standardbots might be problematic. Click here for more details.
- standardbots/auto_generated/apis.py +1 -1
- standardbots/auto_generated/models.py +60 -0
- {standardbots-2.20231204.22.dist-info → standardbots-2.20231218.2.dist-info}/METADATA +1 -1
- standardbots-2.20231218.2.dist-info/RECORD +8 -0
- standardbots-2.20231204.22.dist-info/RECORD +0 -8
- {standardbots-2.20231204.22.dist-info → standardbots-2.20231218.2.dist-info}/WHEEL +0 -0
- {standardbots-2.20231204.22.dist-info → standardbots-2.20231218.2.dist-info}/top_level.txt +0 -0
|
@@ -703,6 +703,51 @@ def parse_status_health_enum(data: object) -> StatusHealthEnum:
|
|
|
703
703
|
def serialize_status_health_enum(data: Union[StatusHealthEnum, str]) -> object:
|
|
704
704
|
return StatusHealthEnum(data).value
|
|
705
705
|
|
|
706
|
+
@dataclass
|
|
707
|
+
class StatusVersionData:
|
|
708
|
+
"""Version Data"""
|
|
709
|
+
id: Union[str, None] = None
|
|
710
|
+
name: Union[str, None] = None
|
|
711
|
+
|
|
712
|
+
def validate_id(self, value: str) -> Tuple[bool, str]:
|
|
713
|
+
if value is None:
|
|
714
|
+
return [True, ""]
|
|
715
|
+
|
|
716
|
+
if not isinstance(value, str):
|
|
717
|
+
return [False, "id must be of type str for StatusVersionData, got " + type(value).__name__]
|
|
718
|
+
|
|
719
|
+
return [True, ""]
|
|
720
|
+
|
|
721
|
+
def validate_name(self, value: str) -> Tuple[bool, str]:
|
|
722
|
+
if value is None:
|
|
723
|
+
return [True, ""]
|
|
724
|
+
|
|
725
|
+
if not isinstance(value, str):
|
|
726
|
+
return [False, "name must be of type str for StatusVersionData, got " + type(value).__name__]
|
|
727
|
+
|
|
728
|
+
return [True, ""]
|
|
729
|
+
|
|
730
|
+
def __post_init__(self):
|
|
731
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
732
|
+
is_valid, error_str = self.validate_id(self.id)
|
|
733
|
+
if not is_valid:
|
|
734
|
+
raise TypeError(error_str)
|
|
735
|
+
is_valid, error_str = self.validate_name(self.name)
|
|
736
|
+
if not is_valid:
|
|
737
|
+
raise TypeError(error_str)
|
|
738
|
+
|
|
739
|
+
def parse_status_version_data(data: object):
|
|
740
|
+
return StatusVersionData(
|
|
741
|
+
id=parse_str(data["id"]) if "id" in data else None,
|
|
742
|
+
name=parse_str(data["name"]) if "name" in data else None,
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
def serialize_status_version_data(data: StatusVersionData) -> object:
|
|
746
|
+
return {
|
|
747
|
+
"id": None if data.id is None else serialize_str(data.id),
|
|
748
|
+
"name": None if data.name is None else serialize_str(data.name),
|
|
749
|
+
}
|
|
750
|
+
|
|
706
751
|
@dataclass
|
|
707
752
|
class ArmPositionUpdateFailureEvent:
|
|
708
753
|
"""Move robot event when movement failed"""
|
|
@@ -1199,6 +1244,7 @@ def serialize_play_routine_request(data: PlayRoutineRequest) -> object:
|
|
|
1199
1244
|
class StatusHealthResponse:
|
|
1200
1245
|
"""Status Health Response"""
|
|
1201
1246
|
health: Union[StatusHealthEnum, None] = None
|
|
1247
|
+
build: Union[StatusVersionData, None] = None
|
|
1202
1248
|
|
|
1203
1249
|
def validate_health(self, value: StatusHealthEnum) -> Tuple[bool, str]:
|
|
1204
1250
|
if value is None:
|
|
@@ -1209,20 +1255,34 @@ class StatusHealthResponse:
|
|
|
1209
1255
|
|
|
1210
1256
|
return [True, ""]
|
|
1211
1257
|
|
|
1258
|
+
def validate_build(self, value: StatusVersionData) -> Tuple[bool, str]:
|
|
1259
|
+
if value is None:
|
|
1260
|
+
return [True, ""]
|
|
1261
|
+
|
|
1262
|
+
if not isinstance(value, StatusVersionData):
|
|
1263
|
+
return [False, "build must be of type StatusVersionData for StatusHealthResponse, got " + type(value).__name__]
|
|
1264
|
+
|
|
1265
|
+
return [True, ""]
|
|
1266
|
+
|
|
1212
1267
|
def __post_init__(self):
|
|
1213
1268
|
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
1214
1269
|
is_valid, error_str = self.validate_health(self.health)
|
|
1215
1270
|
if not is_valid:
|
|
1216
1271
|
raise TypeError(error_str)
|
|
1272
|
+
is_valid, error_str = self.validate_build(self.build)
|
|
1273
|
+
if not is_valid:
|
|
1274
|
+
raise TypeError(error_str)
|
|
1217
1275
|
|
|
1218
1276
|
def parse_status_health_response(data: object):
|
|
1219
1277
|
return StatusHealthResponse(
|
|
1220
1278
|
health=parse_status_health_enum(data["health"]) if "health" in data else None,
|
|
1279
|
+
build=parse_status_version_data(data["build"]) if "build" in data else None,
|
|
1221
1280
|
)
|
|
1222
1281
|
|
|
1223
1282
|
def serialize_status_health_response(data: StatusHealthResponse) -> object:
|
|
1224
1283
|
return {
|
|
1225
1284
|
"health": None if data.health is None else serialize_status_health_enum(data.health),
|
|
1285
|
+
"build": None if data.build is None else serialize_status_version_data(data.build),
|
|
1226
1286
|
}
|
|
1227
1287
|
|
|
1228
1288
|
@dataclass
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
standardbots/__init__.py,sha256=PT6Z2HPama2fb6SaNhF3J1skpYABQWGgDzKEtQY6BDM,29
|
|
2
|
+
standardbots/auto_generated/__init__.py,sha256=VAagcHj0dIrqiorgYQuKWE9d1VCbXiPdHwmRfXBP11Q,76
|
|
3
|
+
standardbots/auto_generated/apis.py,sha256=43ag9wVATskNYolgE0WKI-dyrExiEtN6qHGBWz4JSPs,26083
|
|
4
|
+
standardbots/auto_generated/models.py,sha256=QTtyqHAKgxmzT1pFKSSze43_j8U7QQTra8aVrjr-NJk,79951
|
|
5
|
+
standardbots-2.20231218.2.dist-info/METADATA,sha256=2zsShaPu-JgwGFFsEx-RoD7Exvy1df1Da9ajkwD65dQ,412
|
|
6
|
+
standardbots-2.20231218.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
+
standardbots-2.20231218.2.dist-info/top_level.txt,sha256=8Cb2uu5PLn7ayueFHSdWnFlKJzvSezDEKTHiup_bxH0,13
|
|
8
|
+
standardbots-2.20231218.2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
standardbots/__init__.py,sha256=PT6Z2HPama2fb6SaNhF3J1skpYABQWGgDzKEtQY6BDM,29
|
|
2
|
-
standardbots/auto_generated/__init__.py,sha256=VAagcHj0dIrqiorgYQuKWE9d1VCbXiPdHwmRfXBP11Q,76
|
|
3
|
-
standardbots/auto_generated/apis.py,sha256=VyddqPgqpQfNAMyFHhLXHhR9G78mPcTkdDW8t9i-LqA,26076
|
|
4
|
-
standardbots/auto_generated/models.py,sha256=MVXgHLvi6Kwe2e6tdNKmXAFCnEdGhcGsnSFv3Sk8eK8,77925
|
|
5
|
-
standardbots-2.20231204.22.dist-info/METADATA,sha256=0winaKBWpvFeHfRFZRGpzKa34nthyiElJzhHkWemj9I,413
|
|
6
|
-
standardbots-2.20231204.22.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
-
standardbots-2.20231204.22.dist-info/top_level.txt,sha256=8Cb2uu5PLn7ayueFHSdWnFlKJzvSezDEKTHiup_bxH0,13
|
|
8
|
-
standardbots-2.20231204.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|