standardbots 2.0.0.dev1744991656__py3-none-any.whl → 2.0.0.dev1744991699__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 +547 -0
- standardbots/auto_generated/models.py +1099 -10
- {standardbots-2.0.0.dev1744991656.dist-info → standardbots-2.0.0.dev1744991699.dist-info}/METADATA +1 -1
- standardbots-2.0.0.dev1744991699.dist-info/RECORD +12 -0
- tests/fixtures/client_fixt.py +0 -2
- tests/fixtures/robot_fixt.py +31 -0
- tests/fixtures/routines_fixt.py +23 -0
- standardbots-2.0.0.dev1744991656.dist-info/RECORD +0 -11
- {standardbots-2.0.0.dev1744991656.dist-info → standardbots-2.0.0.dev1744991699.dist-info}/WHEEL +0 -0
- {standardbots-2.0.0.dev1744991656.dist-info → standardbots-2.0.0.dev1744991699.dist-info}/top_level.txt +0 -0
|
@@ -1870,6 +1870,66 @@ def serialize_pagination(data: Pagination) -> object:
|
|
|
1870
1870
|
"offset": None if data.offset is None else serialize_i_64(data.offset),
|
|
1871
1871
|
}
|
|
1872
1872
|
|
|
1873
|
+
@dataclass
|
|
1874
|
+
class PayloadStateRequest:
|
|
1875
|
+
"""Request to set the robot payload"""
|
|
1876
|
+
mass: Union[float, None] = None
|
|
1877
|
+
|
|
1878
|
+
def validate_mass(self, value: float) -> Tuple[bool, str]:
|
|
1879
|
+
if value is None:
|
|
1880
|
+
return [True, ""]
|
|
1881
|
+
|
|
1882
|
+
if not isinstance(value, float):
|
|
1883
|
+
return [False, "mass must be of type float for PayloadStateRequest, got " + type(value).__name__]
|
|
1884
|
+
|
|
1885
|
+
return [True, ""]
|
|
1886
|
+
|
|
1887
|
+
def __post_init__(self):
|
|
1888
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
1889
|
+
is_valid, error_str = self.validate_mass(self.mass)
|
|
1890
|
+
if not is_valid:
|
|
1891
|
+
raise TypeError(error_str)
|
|
1892
|
+
|
|
1893
|
+
def parse_payload_state_request(data: object):
|
|
1894
|
+
return PayloadStateRequest(
|
|
1895
|
+
mass=parse_f_64(data["mass"]) if "mass" in data and data.get("mass") is not None else None,
|
|
1896
|
+
)
|
|
1897
|
+
|
|
1898
|
+
def serialize_payload_state_request(data: PayloadStateRequest) -> object:
|
|
1899
|
+
return {
|
|
1900
|
+
"mass": None if data.mass is None else serialize_f_64(data.mass),
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
@dataclass
|
|
1904
|
+
class PayloadStateResponse:
|
|
1905
|
+
"""Response containing the current payload state"""
|
|
1906
|
+
mass: Union[float, None] = None
|
|
1907
|
+
|
|
1908
|
+
def validate_mass(self, value: float) -> Tuple[bool, str]:
|
|
1909
|
+
if value is None:
|
|
1910
|
+
return [True, ""]
|
|
1911
|
+
|
|
1912
|
+
if not isinstance(value, float):
|
|
1913
|
+
return [False, "mass must be of type float for PayloadStateResponse, got " + type(value).__name__]
|
|
1914
|
+
|
|
1915
|
+
return [True, ""]
|
|
1916
|
+
|
|
1917
|
+
def __post_init__(self):
|
|
1918
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
1919
|
+
is_valid, error_str = self.validate_mass(self.mass)
|
|
1920
|
+
if not is_valid:
|
|
1921
|
+
raise TypeError(error_str)
|
|
1922
|
+
|
|
1923
|
+
def parse_payload_state_response(data: object):
|
|
1924
|
+
return PayloadStateResponse(
|
|
1925
|
+
mass=parse_f_64(data["mass"]) if "mass" in data and data.get("mass") is not None else None,
|
|
1926
|
+
)
|
|
1927
|
+
|
|
1928
|
+
def serialize_payload_state_response(data: PayloadStateResponse) -> object:
|
|
1929
|
+
return {
|
|
1930
|
+
"mass": None if data.mass is None else serialize_f_64(data.mass),
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1873
1933
|
@dataclass
|
|
1874
1934
|
class Plane:
|
|
1875
1935
|
"""Plane in 3D space"""
|
|
@@ -2141,6 +2201,22 @@ def serialize_quaternion(data: Quaternion) -> object:
|
|
|
2141
2201
|
"w": None if data.w is None else serialize_f_64(data.w),
|
|
2142
2202
|
}
|
|
2143
2203
|
|
|
2204
|
+
class RecorderStatus(Enum):
|
|
2205
|
+
NotRecording = "not_recording"
|
|
2206
|
+
"""Enum NotRecording = `not_recording`"""
|
|
2207
|
+
Recording = "recording"
|
|
2208
|
+
"""Enum Recording = `recording`"""
|
|
2209
|
+
Error = "error"
|
|
2210
|
+
"""Enum Error = `error`"""
|
|
2211
|
+
Complete = "complete"
|
|
2212
|
+
"""Enum Complete = `complete`"""
|
|
2213
|
+
|
|
2214
|
+
def parse_recorder_status(data: object) -> RecorderStatus:
|
|
2215
|
+
return RecorderStatus(data)
|
|
2216
|
+
|
|
2217
|
+
def serialize_recorder_status(data: Union[RecorderStatus, str]) -> object:
|
|
2218
|
+
return RecorderStatus(data).value
|
|
2219
|
+
|
|
2144
2220
|
class RecoveryTypeEnum(Enum):
|
|
2145
2221
|
Recoverable = "Recoverable"
|
|
2146
2222
|
"""Enum Recoverable = `Recoverable`"""
|
|
@@ -2406,6 +2482,66 @@ def serialize_runtime_variable(data: RuntimeVariable) -> object:
|
|
|
2406
2482
|
"value": None if data.value is None else serialize_str(data.value),
|
|
2407
2483
|
}
|
|
2408
2484
|
|
|
2485
|
+
@dataclass
|
|
2486
|
+
class SaveRecordingRequest:
|
|
2487
|
+
"""Request to save recording to marvin"""
|
|
2488
|
+
recordingId: Union[str, None] = None
|
|
2489
|
+
startTimestamp: Union[int, None] = None
|
|
2490
|
+
endTimestamp: Union[int, None] = None
|
|
2491
|
+
|
|
2492
|
+
def validate_recordingId(self, value: str) -> Tuple[bool, str]:
|
|
2493
|
+
if value is None:
|
|
2494
|
+
return [True, ""]
|
|
2495
|
+
|
|
2496
|
+
if not isinstance(value, str):
|
|
2497
|
+
return [False, "recordingId must be of type str for SaveRecordingRequest, got " + type(value).__name__]
|
|
2498
|
+
|
|
2499
|
+
return [True, ""]
|
|
2500
|
+
|
|
2501
|
+
def validate_startTimestamp(self, value: int) -> Tuple[bool, str]:
|
|
2502
|
+
if value is None:
|
|
2503
|
+
return [True, ""]
|
|
2504
|
+
|
|
2505
|
+
if not isinstance(value, int):
|
|
2506
|
+
return [False, "startTimestamp must be of type int for SaveRecordingRequest, got " + type(value).__name__]
|
|
2507
|
+
|
|
2508
|
+
return [True, ""]
|
|
2509
|
+
|
|
2510
|
+
def validate_endTimestamp(self, value: int) -> Tuple[bool, str]:
|
|
2511
|
+
if value is None:
|
|
2512
|
+
return [True, ""]
|
|
2513
|
+
|
|
2514
|
+
if not isinstance(value, int):
|
|
2515
|
+
return [False, "endTimestamp must be of type int for SaveRecordingRequest, got " + type(value).__name__]
|
|
2516
|
+
|
|
2517
|
+
return [True, ""]
|
|
2518
|
+
|
|
2519
|
+
def __post_init__(self):
|
|
2520
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
2521
|
+
is_valid, error_str = self.validate_recordingId(self.recordingId)
|
|
2522
|
+
if not is_valid:
|
|
2523
|
+
raise TypeError(error_str)
|
|
2524
|
+
is_valid, error_str = self.validate_startTimestamp(self.startTimestamp)
|
|
2525
|
+
if not is_valid:
|
|
2526
|
+
raise TypeError(error_str)
|
|
2527
|
+
is_valid, error_str = self.validate_endTimestamp(self.endTimestamp)
|
|
2528
|
+
if not is_valid:
|
|
2529
|
+
raise TypeError(error_str)
|
|
2530
|
+
|
|
2531
|
+
def parse_save_recording_request(data: object):
|
|
2532
|
+
return SaveRecordingRequest(
|
|
2533
|
+
recordingId=parse_str(data["recordingId"]) if "recordingId" in data and data.get("recordingId") is not None else None,
|
|
2534
|
+
startTimestamp=parse_u_64(data["startTimestamp"]) if "startTimestamp" in data and data.get("startTimestamp") is not None else None,
|
|
2535
|
+
endTimestamp=parse_u_64(data["endTimestamp"]) if "endTimestamp" in data and data.get("endTimestamp") is not None else None,
|
|
2536
|
+
)
|
|
2537
|
+
|
|
2538
|
+
def serialize_save_recording_request(data: SaveRecordingRequest) -> object:
|
|
2539
|
+
return {
|
|
2540
|
+
"recordingId": None if data.recordingId is None else serialize_str(data.recordingId),
|
|
2541
|
+
"startTimestamp": None if data.startTimestamp is None else serialize_u_64(data.startTimestamp),
|
|
2542
|
+
"endTimestamp": None if data.endTimestamp is None else serialize_u_64(data.endTimestamp),
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2409
2545
|
class SchunkEGxControlKindEnum(Enum):
|
|
2410
2546
|
Move = "move"
|
|
2411
2547
|
"""Move gripper to target grip diameter"""
|
|
@@ -2544,6 +2680,36 @@ def serialize_speech_to_text_request(data: SpeechToTextRequest) -> object:
|
|
|
2544
2680
|
"encoded_audio_data": None if data.encoded_audio_data is None else serialize_str(data.encoded_audio_data),
|
|
2545
2681
|
}
|
|
2546
2682
|
|
|
2683
|
+
@dataclass
|
|
2684
|
+
class StartRecordingRequest:
|
|
2685
|
+
"""Request to start recording movement and camera data"""
|
|
2686
|
+
startTime: Union[str, None] = None
|
|
2687
|
+
|
|
2688
|
+
def validate_startTime(self, value: str) -> Tuple[bool, str]:
|
|
2689
|
+
if value is None:
|
|
2690
|
+
return [True, ""]
|
|
2691
|
+
|
|
2692
|
+
if not isinstance(value, str):
|
|
2693
|
+
return [False, "startTime must be of type str for StartRecordingRequest, got " + type(value).__name__]
|
|
2694
|
+
|
|
2695
|
+
return [True, ""]
|
|
2696
|
+
|
|
2697
|
+
def __post_init__(self):
|
|
2698
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
2699
|
+
is_valid, error_str = self.validate_startTime(self.startTime)
|
|
2700
|
+
if not is_valid:
|
|
2701
|
+
raise TypeError(error_str)
|
|
2702
|
+
|
|
2703
|
+
def parse_start_recording_request(data: object):
|
|
2704
|
+
return StartRecordingRequest(
|
|
2705
|
+
startTime=parse_str(data["startTime"]) if "startTime" in data and data.get("startTime") is not None else None,
|
|
2706
|
+
)
|
|
2707
|
+
|
|
2708
|
+
def serialize_start_recording_request(data: StartRecordingRequest) -> object:
|
|
2709
|
+
return {
|
|
2710
|
+
"startTime": None if data.startTime is None else serialize_str(data.startTime),
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2547
2713
|
class StatusHealthEnum(Enum):
|
|
2548
2714
|
Ok = "ok"
|
|
2549
2715
|
"""Enum Ok = `ok`"""
|
|
@@ -2603,6 +2769,148 @@ def serialize_status_version_data(data: StatusVersionData) -> object:
|
|
|
2603
2769
|
"name": None if data.name is None else serialize_str(data.name),
|
|
2604
2770
|
}
|
|
2605
2771
|
|
|
2772
|
+
@dataclass
|
|
2773
|
+
class StopRecordingRequest:
|
|
2774
|
+
"""Request to stop recording movement and camera data"""
|
|
2775
|
+
delete: Union[bool, None] = None
|
|
2776
|
+
|
|
2777
|
+
def validate_delete(self, value: bool) -> Tuple[bool, str]:
|
|
2778
|
+
if value is None:
|
|
2779
|
+
return [True, ""]
|
|
2780
|
+
|
|
2781
|
+
if not isinstance(value, bool):
|
|
2782
|
+
return [False, "delete must be of type bool for StopRecordingRequest, got " + type(value).__name__]
|
|
2783
|
+
|
|
2784
|
+
return [True, ""]
|
|
2785
|
+
|
|
2786
|
+
def __post_init__(self):
|
|
2787
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
2788
|
+
is_valid, error_str = self.validate_delete(self.delete)
|
|
2789
|
+
if not is_valid:
|
|
2790
|
+
raise TypeError(error_str)
|
|
2791
|
+
|
|
2792
|
+
def parse_stop_recording_request(data: object):
|
|
2793
|
+
return StopRecordingRequest(
|
|
2794
|
+
delete=parse_bool(data["delete"]) if "delete" in data and data.get("delete") is not None else None,
|
|
2795
|
+
)
|
|
2796
|
+
|
|
2797
|
+
def serialize_stop_recording_request(data: StopRecordingRequest) -> object:
|
|
2798
|
+
return {
|
|
2799
|
+
"delete": None if data.delete is None else serialize_bool(data.delete),
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
StringArray = List[str]
|
|
2803
|
+
|
|
2804
|
+
def parse_string_array(data: object) -> StringArray:
|
|
2805
|
+
return [parse_str(item) for item in data]
|
|
2806
|
+
|
|
2807
|
+
def serialize_string_array(data: StringArray) -> List[object]:
|
|
2808
|
+
return [serialize_str(item) for item in data]
|
|
2809
|
+
|
|
2810
|
+
class TeleopStatus(Enum):
|
|
2811
|
+
Active = "active"
|
|
2812
|
+
"""Enum Active = `active`"""
|
|
2813
|
+
Inactive = "inactive"
|
|
2814
|
+
"""Enum Inactive = `inactive`"""
|
|
2815
|
+
Error = "error"
|
|
2816
|
+
"""Enum Error = `error`"""
|
|
2817
|
+
|
|
2818
|
+
def parse_teleop_status(data: object) -> TeleopStatus:
|
|
2819
|
+
return TeleopStatus(data)
|
|
2820
|
+
|
|
2821
|
+
def serialize_teleop_status(data: Union[TeleopStatus, str]) -> object:
|
|
2822
|
+
return TeleopStatus(data).value
|
|
2823
|
+
|
|
2824
|
+
@dataclass
|
|
2825
|
+
class ToggleRecorderBotRequest:
|
|
2826
|
+
"""Request to enable or disable a secondary bot"""
|
|
2827
|
+
botId: Union[str, None] = None
|
|
2828
|
+
enabled: Union[bool, None] = None
|
|
2829
|
+
|
|
2830
|
+
def validate_botId(self, value: str) -> Tuple[bool, str]:
|
|
2831
|
+
if value is None:
|
|
2832
|
+
return [True, ""]
|
|
2833
|
+
|
|
2834
|
+
if not isinstance(value, str):
|
|
2835
|
+
return [False, "botId must be of type str for ToggleRecorderBotRequest, got " + type(value).__name__]
|
|
2836
|
+
|
|
2837
|
+
return [True, ""]
|
|
2838
|
+
|
|
2839
|
+
def validate_enabled(self, value: bool) -> Tuple[bool, str]:
|
|
2840
|
+
if value is None:
|
|
2841
|
+
return [True, ""]
|
|
2842
|
+
|
|
2843
|
+
if not isinstance(value, bool):
|
|
2844
|
+
return [False, "enabled must be of type bool for ToggleRecorderBotRequest, got " + type(value).__name__]
|
|
2845
|
+
|
|
2846
|
+
return [True, ""]
|
|
2847
|
+
|
|
2848
|
+
def __post_init__(self):
|
|
2849
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
2850
|
+
is_valid, error_str = self.validate_botId(self.botId)
|
|
2851
|
+
if not is_valid:
|
|
2852
|
+
raise TypeError(error_str)
|
|
2853
|
+
is_valid, error_str = self.validate_enabled(self.enabled)
|
|
2854
|
+
if not is_valid:
|
|
2855
|
+
raise TypeError(error_str)
|
|
2856
|
+
|
|
2857
|
+
def parse_toggle_recorder_bot_request(data: object):
|
|
2858
|
+
return ToggleRecorderBotRequest(
|
|
2859
|
+
botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
|
|
2860
|
+
enabled=parse_bool(data["enabled"]) if "enabled" in data and data.get("enabled") is not None else None,
|
|
2861
|
+
)
|
|
2862
|
+
|
|
2863
|
+
def serialize_toggle_recorder_bot_request(data: ToggleRecorderBotRequest) -> object:
|
|
2864
|
+
return {
|
|
2865
|
+
"botId": None if data.botId is None else serialize_str(data.botId),
|
|
2866
|
+
"enabled": None if data.enabled is None else serialize_bool(data.enabled),
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
@dataclass
|
|
2870
|
+
class ToggleTeleopBotRequest:
|
|
2871
|
+
"""Request to enable or disable a secondary bot"""
|
|
2872
|
+
botId: Union[str, None] = None
|
|
2873
|
+
enabled: Union[bool, None] = None
|
|
2874
|
+
|
|
2875
|
+
def validate_botId(self, value: str) -> Tuple[bool, str]:
|
|
2876
|
+
if value is None:
|
|
2877
|
+
return [True, ""]
|
|
2878
|
+
|
|
2879
|
+
if not isinstance(value, str):
|
|
2880
|
+
return [False, "botId must be of type str for ToggleTeleopBotRequest, got " + type(value).__name__]
|
|
2881
|
+
|
|
2882
|
+
return [True, ""]
|
|
2883
|
+
|
|
2884
|
+
def validate_enabled(self, value: bool) -> Tuple[bool, str]:
|
|
2885
|
+
if value is None:
|
|
2886
|
+
return [True, ""]
|
|
2887
|
+
|
|
2888
|
+
if not isinstance(value, bool):
|
|
2889
|
+
return [False, "enabled must be of type bool for ToggleTeleopBotRequest, got " + type(value).__name__]
|
|
2890
|
+
|
|
2891
|
+
return [True, ""]
|
|
2892
|
+
|
|
2893
|
+
def __post_init__(self):
|
|
2894
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
2895
|
+
is_valid, error_str = self.validate_botId(self.botId)
|
|
2896
|
+
if not is_valid:
|
|
2897
|
+
raise TypeError(error_str)
|
|
2898
|
+
is_valid, error_str = self.validate_enabled(self.enabled)
|
|
2899
|
+
if not is_valid:
|
|
2900
|
+
raise TypeError(error_str)
|
|
2901
|
+
|
|
2902
|
+
def parse_toggle_teleop_bot_request(data: object):
|
|
2903
|
+
return ToggleTeleopBotRequest(
|
|
2904
|
+
botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
|
|
2905
|
+
enabled=parse_bool(data["enabled"]) if "enabled" in data and data.get("enabled") is not None else None,
|
|
2906
|
+
)
|
|
2907
|
+
|
|
2908
|
+
def serialize_toggle_teleop_bot_request(data: ToggleTeleopBotRequest) -> object:
|
|
2909
|
+
return {
|
|
2910
|
+
"botId": None if data.botId is None else serialize_str(data.botId),
|
|
2911
|
+
"enabled": None if data.enabled is None else serialize_bool(data.enabled),
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2606
2914
|
@dataclass
|
|
2607
2915
|
class TriggerFaultRequest:
|
|
2608
2916
|
"""Request to trigger an user fault for routine.
|
|
@@ -4754,6 +5062,96 @@ def serialize_orientation(data: Orientation) -> object:
|
|
|
4754
5062
|
"quaternion": None if data.quaternion is None else serialize_quaternion(data.quaternion),
|
|
4755
5063
|
}
|
|
4756
5064
|
|
|
5065
|
+
@dataclass
|
|
5066
|
+
class RecorderBotDetails:
|
|
5067
|
+
"""Details of the bot"""
|
|
5068
|
+
botId: Union[str, None] = None
|
|
5069
|
+
alias: Union[str, None] = None
|
|
5070
|
+
isSecondary: Union[bool, None] = None
|
|
5071
|
+
isEnabled: Union[bool, None] = None
|
|
5072
|
+
status: Union[RecorderStatus, None] = None
|
|
5073
|
+
|
|
5074
|
+
def validate_botId(self, value: str) -> Tuple[bool, str]:
|
|
5075
|
+
if value is None:
|
|
5076
|
+
return [True, ""]
|
|
5077
|
+
|
|
5078
|
+
if not isinstance(value, str):
|
|
5079
|
+
return [False, "botId must be of type str for RecorderBotDetails, got " + type(value).__name__]
|
|
5080
|
+
|
|
5081
|
+
return [True, ""]
|
|
5082
|
+
|
|
5083
|
+
def validate_alias(self, value: str) -> Tuple[bool, str]:
|
|
5084
|
+
if value is None:
|
|
5085
|
+
return [True, ""]
|
|
5086
|
+
|
|
5087
|
+
if not isinstance(value, str):
|
|
5088
|
+
return [False, "alias must be of type str for RecorderBotDetails, got " + type(value).__name__]
|
|
5089
|
+
|
|
5090
|
+
return [True, ""]
|
|
5091
|
+
|
|
5092
|
+
def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
|
|
5093
|
+
if value is None:
|
|
5094
|
+
return [True, ""]
|
|
5095
|
+
|
|
5096
|
+
if not isinstance(value, bool):
|
|
5097
|
+
return [False, "isSecondary must be of type bool for RecorderBotDetails, got " + type(value).__name__]
|
|
5098
|
+
|
|
5099
|
+
return [True, ""]
|
|
5100
|
+
|
|
5101
|
+
def validate_isEnabled(self, value: bool) -> Tuple[bool, str]:
|
|
5102
|
+
if value is None:
|
|
5103
|
+
return [True, ""]
|
|
5104
|
+
|
|
5105
|
+
if not isinstance(value, bool):
|
|
5106
|
+
return [False, "isEnabled must be of type bool for RecorderBotDetails, got " + type(value).__name__]
|
|
5107
|
+
|
|
5108
|
+
return [True, ""]
|
|
5109
|
+
|
|
5110
|
+
def validate_status(self, value: RecorderStatus) -> Tuple[bool, str]:
|
|
5111
|
+
if value is None:
|
|
5112
|
+
return [True, ""]
|
|
5113
|
+
|
|
5114
|
+
if not ((isinstance(value, str) and RecorderStatus in ['not_recording', 'recording', 'error', 'complete']) or isinstance(value, RecorderStatus)):
|
|
5115
|
+
return [False, "status must be of type RecorderStatus for RecorderBotDetails, got " + type(value).__name__]
|
|
5116
|
+
|
|
5117
|
+
return [True, ""]
|
|
5118
|
+
|
|
5119
|
+
def __post_init__(self):
|
|
5120
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5121
|
+
is_valid, error_str = self.validate_botId(self.botId)
|
|
5122
|
+
if not is_valid:
|
|
5123
|
+
raise TypeError(error_str)
|
|
5124
|
+
is_valid, error_str = self.validate_alias(self.alias)
|
|
5125
|
+
if not is_valid:
|
|
5126
|
+
raise TypeError(error_str)
|
|
5127
|
+
is_valid, error_str = self.validate_isSecondary(self.isSecondary)
|
|
5128
|
+
if not is_valid:
|
|
5129
|
+
raise TypeError(error_str)
|
|
5130
|
+
is_valid, error_str = self.validate_isEnabled(self.isEnabled)
|
|
5131
|
+
if not is_valid:
|
|
5132
|
+
raise TypeError(error_str)
|
|
5133
|
+
is_valid, error_str = self.validate_status(self.status)
|
|
5134
|
+
if not is_valid:
|
|
5135
|
+
raise TypeError(error_str)
|
|
5136
|
+
|
|
5137
|
+
def parse_recorder_bot_details(data: object):
|
|
5138
|
+
return RecorderBotDetails(
|
|
5139
|
+
botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
|
|
5140
|
+
alias=parse_str(data["alias"]) if "alias" in data and data.get("alias") is not None else None,
|
|
5141
|
+
isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
|
|
5142
|
+
isEnabled=parse_bool(data["isEnabled"]) if "isEnabled" in data and data.get("isEnabled") is not None else None,
|
|
5143
|
+
status=parse_recorder_status(data["status"]) if "status" in data and data.get("status") is not None else None,
|
|
5144
|
+
)
|
|
5145
|
+
|
|
5146
|
+
def serialize_recorder_bot_details(data: RecorderBotDetails) -> object:
|
|
5147
|
+
return {
|
|
5148
|
+
"botId": None if data.botId is None else serialize_str(data.botId),
|
|
5149
|
+
"alias": None if data.alias is None else serialize_str(data.alias),
|
|
5150
|
+
"isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
|
|
5151
|
+
"isEnabled": None if data.isEnabled is None else serialize_bool(data.isEnabled),
|
|
5152
|
+
"status": None if data.status is None else serialize_recorder_status(data.status),
|
|
5153
|
+
}
|
|
5154
|
+
|
|
4757
5155
|
@dataclass
|
|
4758
5156
|
class FailureStateDetails:
|
|
4759
5157
|
"""Failure state details."""
|
|
@@ -5153,22 +5551,157 @@ def serialize_status_health_response(data: StatusHealthResponse) -> object:
|
|
|
5153
5551
|
}
|
|
5154
5552
|
|
|
5155
5553
|
@dataclass
|
|
5156
|
-
class
|
|
5157
|
-
"""
|
|
5158
|
-
|
|
5159
|
-
|
|
5554
|
+
class SaveRecordingResponse:
|
|
5555
|
+
"""Response to save recording to marvin app"""
|
|
5556
|
+
uploadId: Union[str, None] = None
|
|
5557
|
+
errors: Union[StringArray, None] = None
|
|
5160
5558
|
|
|
5161
|
-
def
|
|
5559
|
+
def validate_uploadId(self, value: str) -> Tuple[bool, str]:
|
|
5162
5560
|
if value is None:
|
|
5163
|
-
return [
|
|
5561
|
+
return [True, ""]
|
|
5164
5562
|
|
|
5165
|
-
if not
|
|
5166
|
-
return [False, "
|
|
5563
|
+
if not isinstance(value, str):
|
|
5564
|
+
return [False, "uploadId must be of type str for SaveRecordingResponse, got " + type(value).__name__]
|
|
5167
5565
|
|
|
5168
5566
|
return [True, ""]
|
|
5169
5567
|
|
|
5170
|
-
def
|
|
5171
|
-
|
|
5568
|
+
def validate_errors(self, value: StringArray) -> Tuple[bool, str]:
|
|
5569
|
+
if value is None:
|
|
5570
|
+
return [True, ""]
|
|
5571
|
+
|
|
5572
|
+
if not (isinstance(value, list) and all(isinstance(x, str) for x in value)):
|
|
5573
|
+
return [False, "errors must be of type StringArray for SaveRecordingResponse, got " + type(value).__name__]
|
|
5574
|
+
|
|
5575
|
+
return [True, ""]
|
|
5576
|
+
|
|
5577
|
+
def __post_init__(self):
|
|
5578
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5579
|
+
is_valid, error_str = self.validate_uploadId(self.uploadId)
|
|
5580
|
+
if not is_valid:
|
|
5581
|
+
raise TypeError(error_str)
|
|
5582
|
+
is_valid, error_str = self.validate_errors(self.errors)
|
|
5583
|
+
if not is_valid:
|
|
5584
|
+
raise TypeError(error_str)
|
|
5585
|
+
|
|
5586
|
+
def parse_save_recording_response(data: object):
|
|
5587
|
+
return SaveRecordingResponse(
|
|
5588
|
+
uploadId=parse_str(data["uploadId"]) if "uploadId" in data and data.get("uploadId") is not None else None,
|
|
5589
|
+
errors=parse_string_array(data["errors"]) if "errors" in data and data.get("errors") is not None else None,
|
|
5590
|
+
)
|
|
5591
|
+
|
|
5592
|
+
def serialize_save_recording_response(data: SaveRecordingResponse) -> object:
|
|
5593
|
+
return {
|
|
5594
|
+
"uploadId": None if data.uploadId is None else serialize_str(data.uploadId),
|
|
5595
|
+
"errors": None if data.errors is None else serialize_string_array(data.errors),
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
@dataclass
|
|
5599
|
+
class BotTeleopDetails:
|
|
5600
|
+
"""Details of the bot"""
|
|
5601
|
+
botId: Union[str, None] = None
|
|
5602
|
+
alias: Union[str, None] = None
|
|
5603
|
+
isSecondary: Union[bool, None] = None
|
|
5604
|
+
isEnabled: Union[bool, None] = None
|
|
5605
|
+
status: Union[TeleopStatus, None] = None
|
|
5606
|
+
|
|
5607
|
+
def validate_botId(self, value: str) -> Tuple[bool, str]:
|
|
5608
|
+
if value is None:
|
|
5609
|
+
return [True, ""]
|
|
5610
|
+
|
|
5611
|
+
if not isinstance(value, str):
|
|
5612
|
+
return [False, "botId must be of type str for BotTeleopDetails, got " + type(value).__name__]
|
|
5613
|
+
|
|
5614
|
+
return [True, ""]
|
|
5615
|
+
|
|
5616
|
+
def validate_alias(self, value: str) -> Tuple[bool, str]:
|
|
5617
|
+
if value is None:
|
|
5618
|
+
return [True, ""]
|
|
5619
|
+
|
|
5620
|
+
if not isinstance(value, str):
|
|
5621
|
+
return [False, "alias must be of type str for BotTeleopDetails, got " + type(value).__name__]
|
|
5622
|
+
|
|
5623
|
+
return [True, ""]
|
|
5624
|
+
|
|
5625
|
+
def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
|
|
5626
|
+
if value is None:
|
|
5627
|
+
return [True, ""]
|
|
5628
|
+
|
|
5629
|
+
if not isinstance(value, bool):
|
|
5630
|
+
return [False, "isSecondary must be of type bool for BotTeleopDetails, got " + type(value).__name__]
|
|
5631
|
+
|
|
5632
|
+
return [True, ""]
|
|
5633
|
+
|
|
5634
|
+
def validate_isEnabled(self, value: bool) -> Tuple[bool, str]:
|
|
5635
|
+
if value is None:
|
|
5636
|
+
return [True, ""]
|
|
5637
|
+
|
|
5638
|
+
if not isinstance(value, bool):
|
|
5639
|
+
return [False, "isEnabled must be of type bool for BotTeleopDetails, got " + type(value).__name__]
|
|
5640
|
+
|
|
5641
|
+
return [True, ""]
|
|
5642
|
+
|
|
5643
|
+
def validate_status(self, value: TeleopStatus) -> Tuple[bool, str]:
|
|
5644
|
+
if value is None:
|
|
5645
|
+
return [True, ""]
|
|
5646
|
+
|
|
5647
|
+
if not ((isinstance(value, str) and TeleopStatus in ['active', 'inactive', 'error']) or isinstance(value, TeleopStatus)):
|
|
5648
|
+
return [False, "status must be of type TeleopStatus for BotTeleopDetails, got " + type(value).__name__]
|
|
5649
|
+
|
|
5650
|
+
return [True, ""]
|
|
5651
|
+
|
|
5652
|
+
def __post_init__(self):
|
|
5653
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5654
|
+
is_valid, error_str = self.validate_botId(self.botId)
|
|
5655
|
+
if not is_valid:
|
|
5656
|
+
raise TypeError(error_str)
|
|
5657
|
+
is_valid, error_str = self.validate_alias(self.alias)
|
|
5658
|
+
if not is_valid:
|
|
5659
|
+
raise TypeError(error_str)
|
|
5660
|
+
is_valid, error_str = self.validate_isSecondary(self.isSecondary)
|
|
5661
|
+
if not is_valid:
|
|
5662
|
+
raise TypeError(error_str)
|
|
5663
|
+
is_valid, error_str = self.validate_isEnabled(self.isEnabled)
|
|
5664
|
+
if not is_valid:
|
|
5665
|
+
raise TypeError(error_str)
|
|
5666
|
+
is_valid, error_str = self.validate_status(self.status)
|
|
5667
|
+
if not is_valid:
|
|
5668
|
+
raise TypeError(error_str)
|
|
5669
|
+
|
|
5670
|
+
def parse_bot_teleop_details(data: object):
|
|
5671
|
+
return BotTeleopDetails(
|
|
5672
|
+
botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
|
|
5673
|
+
alias=parse_str(data["alias"]) if "alias" in data and data.get("alias") is not None else None,
|
|
5674
|
+
isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
|
|
5675
|
+
isEnabled=parse_bool(data["isEnabled"]) if "isEnabled" in data and data.get("isEnabled") is not None else None,
|
|
5676
|
+
status=parse_teleop_status(data["status"]) if "status" in data and data.get("status") is not None else None,
|
|
5677
|
+
)
|
|
5678
|
+
|
|
5679
|
+
def serialize_bot_teleop_details(data: BotTeleopDetails) -> object:
|
|
5680
|
+
return {
|
|
5681
|
+
"botId": None if data.botId is None else serialize_str(data.botId),
|
|
5682
|
+
"alias": None if data.alias is None else serialize_str(data.alias),
|
|
5683
|
+
"isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
|
|
5684
|
+
"isEnabled": None if data.isEnabled is None else serialize_bool(data.isEnabled),
|
|
5685
|
+
"status": None if data.status is None else serialize_teleop_status(data.status),
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
|
+
@dataclass
|
|
5689
|
+
class ArmPositionUpdateRequestResponseEventStreamDetails:
|
|
5690
|
+
"""Specify how the response should be sent
|
|
5691
|
+
"""
|
|
5692
|
+
subscriptions: Union[ArmPositionUpdateRequestResponseEventStreamSubscriptionsList, None] = None
|
|
5693
|
+
|
|
5694
|
+
def validate_subscriptions(self, value: ArmPositionUpdateRequestResponseEventStreamSubscriptionsList) -> Tuple[bool, str]:
|
|
5695
|
+
if value is None:
|
|
5696
|
+
return [False, "subscriptions is required for ArmPositionUpdateRequestResponseEventStreamDetails"]
|
|
5697
|
+
|
|
5698
|
+
if not (isinstance(value, list) and all(((isinstance(x, str) and ArmPositionUpdateRequestResponseEventStreamSubscriptionKindEnum in ['all', 'events', 'positions']) or isinstance(x, ArmPositionUpdateRequestResponseEventStreamSubscriptionKindEnum)) for x in value)):
|
|
5699
|
+
return [False, "subscriptions must be of type ArmPositionUpdateRequestResponseEventStreamSubscriptionsList for ArmPositionUpdateRequestResponseEventStreamDetails, got " + type(value).__name__]
|
|
5700
|
+
|
|
5701
|
+
return [True, ""]
|
|
5702
|
+
|
|
5703
|
+
def __post_init__(self):
|
|
5704
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
5172
5705
|
is_valid, error_str = self.validate_subscriptions(self.subscriptions)
|
|
5173
5706
|
if not is_valid:
|
|
5174
5707
|
raise TypeError(error_str)
|
|
@@ -5690,6 +6223,51 @@ def serialize_schunk_e_gx_gripper_command_request(data: SchunkEGxGripperCommandR
|
|
|
5690
6223
|
"control_kind": serialize_schunk_e_gx_control_kind_enum(data.control_kind),
|
|
5691
6224
|
}
|
|
5692
6225
|
|
|
6226
|
+
@dataclass
|
|
6227
|
+
class OffsetConfig:
|
|
6228
|
+
"""Config of the offset"""
|
|
6229
|
+
position: Union[Position, None] = None
|
|
6230
|
+
orientation: Union[Quaternion, None] = None
|
|
6231
|
+
|
|
6232
|
+
def validate_position(self, value: Position) -> Tuple[bool, str]:
|
|
6233
|
+
if value is None:
|
|
6234
|
+
return [True, ""]
|
|
6235
|
+
|
|
6236
|
+
if not isinstance(value, Position):
|
|
6237
|
+
return [False, "position must be of type Position for OffsetConfig, got " + type(value).__name__]
|
|
6238
|
+
|
|
6239
|
+
return [True, ""]
|
|
6240
|
+
|
|
6241
|
+
def validate_orientation(self, value: Quaternion) -> Tuple[bool, str]:
|
|
6242
|
+
if value is None:
|
|
6243
|
+
return [True, ""]
|
|
6244
|
+
|
|
6245
|
+
if not isinstance(value, Quaternion):
|
|
6246
|
+
return [False, "orientation must be of type Quaternion for OffsetConfig, got " + type(value).__name__]
|
|
6247
|
+
|
|
6248
|
+
return [True, ""]
|
|
6249
|
+
|
|
6250
|
+
def __post_init__(self):
|
|
6251
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
6252
|
+
is_valid, error_str = self.validate_position(self.position)
|
|
6253
|
+
if not is_valid:
|
|
6254
|
+
raise TypeError(error_str)
|
|
6255
|
+
is_valid, error_str = self.validate_orientation(self.orientation)
|
|
6256
|
+
if not is_valid:
|
|
6257
|
+
raise TypeError(error_str)
|
|
6258
|
+
|
|
6259
|
+
def parse_offset_config(data: object):
|
|
6260
|
+
return OffsetConfig(
|
|
6261
|
+
position=parse_position(data["position"]) if "position" in data and data.get("position") is not None else None,
|
|
6262
|
+
orientation=parse_quaternion(data["orientation"]) if "orientation" in data and data.get("orientation") is not None else None,
|
|
6263
|
+
)
|
|
6264
|
+
|
|
6265
|
+
def serialize_offset_config(data: OffsetConfig) -> object:
|
|
6266
|
+
return {
|
|
6267
|
+
"position": None if data.position is None else serialize_position(data.position),
|
|
6268
|
+
"orientation": None if data.orientation is None else serialize_quaternion(data.orientation),
|
|
6269
|
+
}
|
|
6270
|
+
|
|
5693
6271
|
@dataclass
|
|
5694
6272
|
class GripperConfiguration:
|
|
5695
6273
|
"""Configuration of gripper, also known as End Effector"""
|
|
@@ -5968,6 +6546,14 @@ def serialize_position_and_orientation(data: PositionAndOrientation) -> object:
|
|
|
5968
6546
|
"orientation": serialize_orientation(data.orientation),
|
|
5969
6547
|
}
|
|
5970
6548
|
|
|
6549
|
+
RecorderBotDetailsList = List[RecorderBotDetails]
|
|
6550
|
+
|
|
6551
|
+
def parse_recorder_bot_details_list(data: object) -> RecorderBotDetailsList:
|
|
6552
|
+
return [parse_recorder_bot_details(item) for item in data]
|
|
6553
|
+
|
|
6554
|
+
def serialize_recorder_bot_details_list(data: RecorderBotDetailsList) -> List[object]:
|
|
6555
|
+
return [serialize_recorder_bot_details(item) for item in data]
|
|
6556
|
+
|
|
5971
6557
|
@dataclass
|
|
5972
6558
|
class FailureStateResponse:
|
|
5973
6559
|
"""Failure state response informs user of how and whether the robot may be recovered."""
|
|
@@ -6058,6 +6644,14 @@ def serialize_sensors_configuration(data: SensorsConfiguration) -> object:
|
|
|
6058
6644
|
"sensors": None if data.sensors is None else serialize_sensors_list(data.sensors),
|
|
6059
6645
|
}
|
|
6060
6646
|
|
|
6647
|
+
BotTeleopDetailsList = List[BotTeleopDetails]
|
|
6648
|
+
|
|
6649
|
+
def parse_bot_teleop_details_list(data: object) -> BotTeleopDetailsList:
|
|
6650
|
+
return [parse_bot_teleop_details(item) for item in data]
|
|
6651
|
+
|
|
6652
|
+
def serialize_bot_teleop_details_list(data: BotTeleopDetailsList) -> List[object]:
|
|
6653
|
+
return [serialize_bot_teleop_details(item) for item in data]
|
|
6654
|
+
|
|
6061
6655
|
@dataclass
|
|
6062
6656
|
class ArmPositionUpdateRequestResponseFormat:
|
|
6063
6657
|
"""Specify how the response should be sent
|
|
@@ -6436,6 +7030,141 @@ def parse_position_and_orientation_list(data: object) -> PositionAndOrientationL
|
|
|
6436
7030
|
def serialize_position_and_orientation_list(data: PositionAndOrientationList) -> List[object]:
|
|
6437
7031
|
return [serialize_position_and_orientation(item) for item in data]
|
|
6438
7032
|
|
|
7033
|
+
@dataclass
|
|
7034
|
+
class RecorderConfig:
|
|
7035
|
+
"""Config of the recorder"""
|
|
7036
|
+
isSecondary: Union[bool, None] = None
|
|
7037
|
+
userId: Union[str, None] = None
|
|
7038
|
+
taskId: Union[str, None] = None
|
|
7039
|
+
bots: Union[RecorderBotDetailsList, None] = None
|
|
7040
|
+
offset: Union[OffsetConfig, None] = None
|
|
7041
|
+
|
|
7042
|
+
def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
|
|
7043
|
+
if value is None:
|
|
7044
|
+
return [True, ""]
|
|
7045
|
+
|
|
7046
|
+
if not isinstance(value, bool):
|
|
7047
|
+
return [False, "isSecondary must be of type bool for RecorderConfig, got " + type(value).__name__]
|
|
7048
|
+
|
|
7049
|
+
return [True, ""]
|
|
7050
|
+
|
|
7051
|
+
def validate_userId(self, value: str) -> Tuple[bool, str]:
|
|
7052
|
+
if value is None:
|
|
7053
|
+
return [True, ""]
|
|
7054
|
+
|
|
7055
|
+
if not isinstance(value, str):
|
|
7056
|
+
return [False, "userId must be of type str for RecorderConfig, got " + type(value).__name__]
|
|
7057
|
+
|
|
7058
|
+
return [True, ""]
|
|
7059
|
+
|
|
7060
|
+
def validate_taskId(self, value: str) -> Tuple[bool, str]:
|
|
7061
|
+
if value is None:
|
|
7062
|
+
return [True, ""]
|
|
7063
|
+
|
|
7064
|
+
if not isinstance(value, str):
|
|
7065
|
+
return [False, "taskId must be of type str for RecorderConfig, got " + type(value).__name__]
|
|
7066
|
+
|
|
7067
|
+
return [True, ""]
|
|
7068
|
+
|
|
7069
|
+
def validate_bots(self, value: RecorderBotDetailsList) -> Tuple[bool, str]:
|
|
7070
|
+
if value is None:
|
|
7071
|
+
return [True, ""]
|
|
7072
|
+
|
|
7073
|
+
if not (isinstance(value, list) and all(isinstance(x, RecorderBotDetails) for x in value)):
|
|
7074
|
+
return [False, "bots must be of type RecorderBotDetailsList for RecorderConfig, got " + type(value).__name__]
|
|
7075
|
+
|
|
7076
|
+
return [True, ""]
|
|
7077
|
+
|
|
7078
|
+
def validate_offset(self, value: OffsetConfig) -> Tuple[bool, str]:
|
|
7079
|
+
if value is None:
|
|
7080
|
+
return [True, ""]
|
|
7081
|
+
|
|
7082
|
+
if not isinstance(value, OffsetConfig):
|
|
7083
|
+
return [False, "offset must be of type OffsetConfig for RecorderConfig, got " + type(value).__name__]
|
|
7084
|
+
|
|
7085
|
+
return [True, ""]
|
|
7086
|
+
|
|
7087
|
+
def __post_init__(self):
|
|
7088
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7089
|
+
is_valid, error_str = self.validate_isSecondary(self.isSecondary)
|
|
7090
|
+
if not is_valid:
|
|
7091
|
+
raise TypeError(error_str)
|
|
7092
|
+
is_valid, error_str = self.validate_userId(self.userId)
|
|
7093
|
+
if not is_valid:
|
|
7094
|
+
raise TypeError(error_str)
|
|
7095
|
+
is_valid, error_str = self.validate_taskId(self.taskId)
|
|
7096
|
+
if not is_valid:
|
|
7097
|
+
raise TypeError(error_str)
|
|
7098
|
+
is_valid, error_str = self.validate_bots(self.bots)
|
|
7099
|
+
if not is_valid:
|
|
7100
|
+
raise TypeError(error_str)
|
|
7101
|
+
is_valid, error_str = self.validate_offset(self.offset)
|
|
7102
|
+
if not is_valid:
|
|
7103
|
+
raise TypeError(error_str)
|
|
7104
|
+
|
|
7105
|
+
def parse_recorder_config(data: object):
|
|
7106
|
+
return RecorderConfig(
|
|
7107
|
+
isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
|
|
7108
|
+
userId=parse_str(data["userId"]) if "userId" in data and data.get("userId") is not None else None,
|
|
7109
|
+
taskId=parse_str(data["taskId"]) if "taskId" in data and data.get("taskId") is not None else None,
|
|
7110
|
+
bots=parse_recorder_bot_details_list(data["bots"]) if "bots" in data and data.get("bots") is not None else None,
|
|
7111
|
+
offset=parse_offset_config(data["offset"]) if "offset" in data and data.get("offset") is not None else None,
|
|
7112
|
+
)
|
|
7113
|
+
|
|
7114
|
+
def serialize_recorder_config(data: RecorderConfig) -> object:
|
|
7115
|
+
return {
|
|
7116
|
+
"isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
|
|
7117
|
+
"userId": None if data.userId is None else serialize_str(data.userId),
|
|
7118
|
+
"taskId": None if data.taskId is None else serialize_str(data.taskId),
|
|
7119
|
+
"bots": None if data.bots is None else serialize_recorder_bot_details_list(data.bots),
|
|
7120
|
+
"offset": None if data.offset is None else serialize_offset_config(data.offset),
|
|
7121
|
+
}
|
|
7122
|
+
|
|
7123
|
+
@dataclass
|
|
7124
|
+
class TeleopConfig:
|
|
7125
|
+
"""Config of the teleop"""
|
|
7126
|
+
isSecondary: Union[bool, None] = None
|
|
7127
|
+
bots: Union[BotTeleopDetailsList, None] = None
|
|
7128
|
+
|
|
7129
|
+
def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
|
|
7130
|
+
if value is None:
|
|
7131
|
+
return [True, ""]
|
|
7132
|
+
|
|
7133
|
+
if not isinstance(value, bool):
|
|
7134
|
+
return [False, "isSecondary must be of type bool for TeleopConfig, got " + type(value).__name__]
|
|
7135
|
+
|
|
7136
|
+
return [True, ""]
|
|
7137
|
+
|
|
7138
|
+
def validate_bots(self, value: BotTeleopDetailsList) -> Tuple[bool, str]:
|
|
7139
|
+
if value is None:
|
|
7140
|
+
return [True, ""]
|
|
7141
|
+
|
|
7142
|
+
if not (isinstance(value, list) and all(isinstance(x, BotTeleopDetails) for x in value)):
|
|
7143
|
+
return [False, "bots must be of type BotTeleopDetailsList for TeleopConfig, got " + type(value).__name__]
|
|
7144
|
+
|
|
7145
|
+
return [True, ""]
|
|
7146
|
+
|
|
7147
|
+
def __post_init__(self):
|
|
7148
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7149
|
+
is_valid, error_str = self.validate_isSecondary(self.isSecondary)
|
|
7150
|
+
if not is_valid:
|
|
7151
|
+
raise TypeError(error_str)
|
|
7152
|
+
is_valid, error_str = self.validate_bots(self.bots)
|
|
7153
|
+
if not is_valid:
|
|
7154
|
+
raise TypeError(error_str)
|
|
7155
|
+
|
|
7156
|
+
def parse_teleop_config(data: object):
|
|
7157
|
+
return TeleopConfig(
|
|
7158
|
+
isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
|
|
7159
|
+
bots=parse_bot_teleop_details_list(data["bots"]) if "bots" in data and data.get("bots") is not None else None,
|
|
7160
|
+
)
|
|
7161
|
+
|
|
7162
|
+
def serialize_teleop_config(data: TeleopConfig) -> object:
|
|
7163
|
+
return {
|
|
7164
|
+
"isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
|
|
7165
|
+
"bots": None if data.bots is None else serialize_bot_teleop_details_list(data.bots),
|
|
7166
|
+
}
|
|
7167
|
+
|
|
6439
7168
|
@dataclass
|
|
6440
7169
|
class RoutinesPaginatedResponse:
|
|
6441
7170
|
"""Paginated response containing routine data"""
|
|
@@ -6684,6 +7413,126 @@ def serialize_arm_position_update_request(data: ArmPositionUpdateRequest) -> obj
|
|
|
6684
7413
|
"speed_profile": None if data.speed_profile is None else serialize_speed_profile(data.speed_profile),
|
|
6685
7414
|
}
|
|
6686
7415
|
|
|
7416
|
+
@dataclass
|
|
7417
|
+
class RecorderState:
|
|
7418
|
+
"""State of the recorder"""
|
|
7419
|
+
config: Union[RecorderConfig, None] = None
|
|
7420
|
+
startTime: Union[str, None] = None
|
|
7421
|
+
recordingTime: Union[int, None] = None
|
|
7422
|
+
status: Union[RecorderStatus, None] = None
|
|
7423
|
+
|
|
7424
|
+
def validate_config(self, value: RecorderConfig) -> Tuple[bool, str]:
|
|
7425
|
+
if value is None:
|
|
7426
|
+
return [True, ""]
|
|
7427
|
+
|
|
7428
|
+
if not isinstance(value, RecorderConfig):
|
|
7429
|
+
return [False, "config must be of type RecorderConfig for RecorderState, got " + type(value).__name__]
|
|
7430
|
+
|
|
7431
|
+
return [True, ""]
|
|
7432
|
+
|
|
7433
|
+
def validate_startTime(self, value: str) -> Tuple[bool, str]:
|
|
7434
|
+
if value is None:
|
|
7435
|
+
return [True, ""]
|
|
7436
|
+
|
|
7437
|
+
if not isinstance(value, str):
|
|
7438
|
+
return [False, "startTime must be of type str for RecorderState, got " + type(value).__name__]
|
|
7439
|
+
|
|
7440
|
+
return [True, ""]
|
|
7441
|
+
|
|
7442
|
+
def validate_recordingTime(self, value: int) -> Tuple[bool, str]:
|
|
7443
|
+
if value is None:
|
|
7444
|
+
return [True, ""]
|
|
7445
|
+
|
|
7446
|
+
if not isinstance(value, int):
|
|
7447
|
+
return [False, "recordingTime must be of type int for RecorderState, got " + type(value).__name__]
|
|
7448
|
+
|
|
7449
|
+
return [True, ""]
|
|
7450
|
+
|
|
7451
|
+
def validate_status(self, value: RecorderStatus) -> Tuple[bool, str]:
|
|
7452
|
+
if value is None:
|
|
7453
|
+
return [True, ""]
|
|
7454
|
+
|
|
7455
|
+
if not ((isinstance(value, str) and RecorderStatus in ['not_recording', 'recording', 'error', 'complete']) or isinstance(value, RecorderStatus)):
|
|
7456
|
+
return [False, "status must be of type RecorderStatus for RecorderState, got " + type(value).__name__]
|
|
7457
|
+
|
|
7458
|
+
return [True, ""]
|
|
7459
|
+
|
|
7460
|
+
def __post_init__(self):
|
|
7461
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7462
|
+
is_valid, error_str = self.validate_config(self.config)
|
|
7463
|
+
if not is_valid:
|
|
7464
|
+
raise TypeError(error_str)
|
|
7465
|
+
is_valid, error_str = self.validate_startTime(self.startTime)
|
|
7466
|
+
if not is_valid:
|
|
7467
|
+
raise TypeError(error_str)
|
|
7468
|
+
is_valid, error_str = self.validate_recordingTime(self.recordingTime)
|
|
7469
|
+
if not is_valid:
|
|
7470
|
+
raise TypeError(error_str)
|
|
7471
|
+
is_valid, error_str = self.validate_status(self.status)
|
|
7472
|
+
if not is_valid:
|
|
7473
|
+
raise TypeError(error_str)
|
|
7474
|
+
|
|
7475
|
+
def parse_recorder_state(data: object):
|
|
7476
|
+
return RecorderState(
|
|
7477
|
+
config=parse_recorder_config(data["config"]) if "config" in data and data.get("config") is not None else None,
|
|
7478
|
+
startTime=parse_str(data["startTime"]) if "startTime" in data and data.get("startTime") is not None else None,
|
|
7479
|
+
recordingTime=parse_u_64(data["recordingTime"]) if "recordingTime" in data and data.get("recordingTime") is not None else None,
|
|
7480
|
+
status=parse_recorder_status(data["status"]) if "status" in data and data.get("status") is not None else None,
|
|
7481
|
+
)
|
|
7482
|
+
|
|
7483
|
+
def serialize_recorder_state(data: RecorderState) -> object:
|
|
7484
|
+
return {
|
|
7485
|
+
"config": None if data.config is None else serialize_recorder_config(data.config),
|
|
7486
|
+
"startTime": None if data.startTime is None else serialize_str(data.startTime),
|
|
7487
|
+
"recordingTime": None if data.recordingTime is None else serialize_u_64(data.recordingTime),
|
|
7488
|
+
"status": None if data.status is None else serialize_recorder_status(data.status),
|
|
7489
|
+
}
|
|
7490
|
+
|
|
7491
|
+
@dataclass
|
|
7492
|
+
class TeleopState:
|
|
7493
|
+
"""State of the teleop"""
|
|
7494
|
+
config: Union[TeleopConfig, None] = None
|
|
7495
|
+
status: Union[TeleopStatus, None] = None
|
|
7496
|
+
|
|
7497
|
+
def validate_config(self, value: TeleopConfig) -> Tuple[bool, str]:
|
|
7498
|
+
if value is None:
|
|
7499
|
+
return [True, ""]
|
|
7500
|
+
|
|
7501
|
+
if not isinstance(value, TeleopConfig):
|
|
7502
|
+
return [False, "config must be of type TeleopConfig for TeleopState, got " + type(value).__name__]
|
|
7503
|
+
|
|
7504
|
+
return [True, ""]
|
|
7505
|
+
|
|
7506
|
+
def validate_status(self, value: TeleopStatus) -> Tuple[bool, str]:
|
|
7507
|
+
if value is None:
|
|
7508
|
+
return [True, ""]
|
|
7509
|
+
|
|
7510
|
+
if not ((isinstance(value, str) and TeleopStatus in ['active', 'inactive', 'error']) or isinstance(value, TeleopStatus)):
|
|
7511
|
+
return [False, "status must be of type TeleopStatus for TeleopState, got " + type(value).__name__]
|
|
7512
|
+
|
|
7513
|
+
return [True, ""]
|
|
7514
|
+
|
|
7515
|
+
def __post_init__(self):
|
|
7516
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7517
|
+
is_valid, error_str = self.validate_config(self.config)
|
|
7518
|
+
if not is_valid:
|
|
7519
|
+
raise TypeError(error_str)
|
|
7520
|
+
is_valid, error_str = self.validate_status(self.status)
|
|
7521
|
+
if not is_valid:
|
|
7522
|
+
raise TypeError(error_str)
|
|
7523
|
+
|
|
7524
|
+
def parse_teleop_state(data: object):
|
|
7525
|
+
return TeleopState(
|
|
7526
|
+
config=parse_teleop_config(data["config"]) if "config" in data and data.get("config") is not None else None,
|
|
7527
|
+
status=parse_teleop_status(data["status"]) if "status" in data and data.get("status") is not None else None,
|
|
7528
|
+
)
|
|
7529
|
+
|
|
7530
|
+
def serialize_teleop_state(data: TeleopState) -> object:
|
|
7531
|
+
return {
|
|
7532
|
+
"config": None if data.config is None else serialize_teleop_config(data.config),
|
|
7533
|
+
"status": None if data.status is None else serialize_teleop_status(data.status),
|
|
7534
|
+
}
|
|
7535
|
+
|
|
6687
7536
|
@dataclass
|
|
6688
7537
|
class SpacesPaginatedResponse:
|
|
6689
7538
|
"""Paginated response containing space data"""
|
|
@@ -6722,3 +7571,243 @@ def parse_arm_position_update_event_stream(data: object) -> ArmPositionUpdateEve
|
|
|
6722
7571
|
def serialize_arm_position_update_event_stream(data: ArmPositionUpdateEventStream) -> List[object]:
|
|
6723
7572
|
return [serialize_arm_position_update_event(item) for item in data]
|
|
6724
7573
|
|
|
7574
|
+
@dataclass
|
|
7575
|
+
class StartRecordingResponse:
|
|
7576
|
+
"""Response to start recording movement and camera data"""
|
|
7577
|
+
success: Union[bool, None] = None
|
|
7578
|
+
state: Union[RecorderState, None] = None
|
|
7579
|
+
|
|
7580
|
+
def validate_success(self, value: bool) -> Tuple[bool, str]:
|
|
7581
|
+
if value is None:
|
|
7582
|
+
return [True, ""]
|
|
7583
|
+
|
|
7584
|
+
if not isinstance(value, bool):
|
|
7585
|
+
return [False, "success must be of type bool for StartRecordingResponse, got " + type(value).__name__]
|
|
7586
|
+
|
|
7587
|
+
return [True, ""]
|
|
7588
|
+
|
|
7589
|
+
def validate_state(self, value: RecorderState) -> Tuple[bool, str]:
|
|
7590
|
+
if value is None:
|
|
7591
|
+
return [True, ""]
|
|
7592
|
+
|
|
7593
|
+
if not isinstance(value, RecorderState):
|
|
7594
|
+
return [False, "state must be of type RecorderState for StartRecordingResponse, got " + type(value).__name__]
|
|
7595
|
+
|
|
7596
|
+
return [True, ""]
|
|
7597
|
+
|
|
7598
|
+
def __post_init__(self):
|
|
7599
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7600
|
+
is_valid, error_str = self.validate_success(self.success)
|
|
7601
|
+
if not is_valid:
|
|
7602
|
+
raise TypeError(error_str)
|
|
7603
|
+
is_valid, error_str = self.validate_state(self.state)
|
|
7604
|
+
if not is_valid:
|
|
7605
|
+
raise TypeError(error_str)
|
|
7606
|
+
|
|
7607
|
+
def parse_start_recording_response(data: object):
|
|
7608
|
+
return StartRecordingResponse(
|
|
7609
|
+
success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
|
|
7610
|
+
state=parse_recorder_state(data["state"]) if "state" in data and data.get("state") is not None else None,
|
|
7611
|
+
)
|
|
7612
|
+
|
|
7613
|
+
def serialize_start_recording_response(data: StartRecordingResponse) -> object:
|
|
7614
|
+
return {
|
|
7615
|
+
"success": None if data.success is None else serialize_bool(data.success),
|
|
7616
|
+
"state": None if data.state is None else serialize_recorder_state(data.state),
|
|
7617
|
+
}
|
|
7618
|
+
|
|
7619
|
+
@dataclass
|
|
7620
|
+
class StopRecordingResponse:
|
|
7621
|
+
"""Response to stop recording movement and camera data"""
|
|
7622
|
+
state: Union[RecorderState, None] = None
|
|
7623
|
+
startTimestamp: Union[str, None] = None
|
|
7624
|
+
endTimestamp: Union[str, None] = None
|
|
7625
|
+
|
|
7626
|
+
def validate_state(self, value: RecorderState) -> Tuple[bool, str]:
|
|
7627
|
+
if value is None:
|
|
7628
|
+
return [True, ""]
|
|
7629
|
+
|
|
7630
|
+
if not isinstance(value, RecorderState):
|
|
7631
|
+
return [False, "state must be of type RecorderState for StopRecordingResponse, got " + type(value).__name__]
|
|
7632
|
+
|
|
7633
|
+
return [True, ""]
|
|
7634
|
+
|
|
7635
|
+
def validate_startTimestamp(self, value: str) -> Tuple[bool, str]:
|
|
7636
|
+
if value is None:
|
|
7637
|
+
return [True, ""]
|
|
7638
|
+
|
|
7639
|
+
if not isinstance(value, str):
|
|
7640
|
+
return [False, "startTimestamp must be of type str for StopRecordingResponse, got " + type(value).__name__]
|
|
7641
|
+
|
|
7642
|
+
return [True, ""]
|
|
7643
|
+
|
|
7644
|
+
def validate_endTimestamp(self, value: str) -> Tuple[bool, str]:
|
|
7645
|
+
if value is None:
|
|
7646
|
+
return [True, ""]
|
|
7647
|
+
|
|
7648
|
+
if not isinstance(value, str):
|
|
7649
|
+
return [False, "endTimestamp must be of type str for StopRecordingResponse, got " + type(value).__name__]
|
|
7650
|
+
|
|
7651
|
+
return [True, ""]
|
|
7652
|
+
|
|
7653
|
+
def __post_init__(self):
|
|
7654
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7655
|
+
is_valid, error_str = self.validate_state(self.state)
|
|
7656
|
+
if not is_valid:
|
|
7657
|
+
raise TypeError(error_str)
|
|
7658
|
+
is_valid, error_str = self.validate_startTimestamp(self.startTimestamp)
|
|
7659
|
+
if not is_valid:
|
|
7660
|
+
raise TypeError(error_str)
|
|
7661
|
+
is_valid, error_str = self.validate_endTimestamp(self.endTimestamp)
|
|
7662
|
+
if not is_valid:
|
|
7663
|
+
raise TypeError(error_str)
|
|
7664
|
+
|
|
7665
|
+
def parse_stop_recording_response(data: object):
|
|
7666
|
+
return StopRecordingResponse(
|
|
7667
|
+
state=parse_recorder_state(data["state"]) if "state" in data and data.get("state") is not None else None,
|
|
7668
|
+
startTimestamp=parse_str(data["startTimestamp"]) if "startTimestamp" in data and data.get("startTimestamp") is not None else None,
|
|
7669
|
+
endTimestamp=parse_str(data["endTimestamp"]) if "endTimestamp" in data and data.get("endTimestamp") is not None else None,
|
|
7670
|
+
)
|
|
7671
|
+
|
|
7672
|
+
def serialize_stop_recording_response(data: StopRecordingResponse) -> object:
|
|
7673
|
+
return {
|
|
7674
|
+
"state": None if data.state is None else serialize_recorder_state(data.state),
|
|
7675
|
+
"startTimestamp": None if data.startTimestamp is None else serialize_str(data.startTimestamp),
|
|
7676
|
+
"endTimestamp": None if data.endTimestamp is None else serialize_str(data.endTimestamp),
|
|
7677
|
+
}
|
|
7678
|
+
|
|
7679
|
+
@dataclass
|
|
7680
|
+
class UpdateRecordingResponse:
|
|
7681
|
+
"""Response to update recording configuration"""
|
|
7682
|
+
success: Union[bool, None] = None
|
|
7683
|
+
state: Union[RecorderState, None] = None
|
|
7684
|
+
errors: Union[StringArray, None] = None
|
|
7685
|
+
|
|
7686
|
+
def validate_success(self, value: bool) -> Tuple[bool, str]:
|
|
7687
|
+
if value is None:
|
|
7688
|
+
return [True, ""]
|
|
7689
|
+
|
|
7690
|
+
if not isinstance(value, bool):
|
|
7691
|
+
return [False, "success must be of type bool for UpdateRecordingResponse, got " + type(value).__name__]
|
|
7692
|
+
|
|
7693
|
+
return [True, ""]
|
|
7694
|
+
|
|
7695
|
+
def validate_state(self, value: RecorderState) -> Tuple[bool, str]:
|
|
7696
|
+
if value is None:
|
|
7697
|
+
return [True, ""]
|
|
7698
|
+
|
|
7699
|
+
if not isinstance(value, RecorderState):
|
|
7700
|
+
return [False, "state must be of type RecorderState for UpdateRecordingResponse, got " + type(value).__name__]
|
|
7701
|
+
|
|
7702
|
+
return [True, ""]
|
|
7703
|
+
|
|
7704
|
+
def validate_errors(self, value: StringArray) -> Tuple[bool, str]:
|
|
7705
|
+
if value is None:
|
|
7706
|
+
return [True, ""]
|
|
7707
|
+
|
|
7708
|
+
if not (isinstance(value, list) and all(isinstance(x, str) for x in value)):
|
|
7709
|
+
return [False, "errors must be of type StringArray for UpdateRecordingResponse, got " + type(value).__name__]
|
|
7710
|
+
|
|
7711
|
+
return [True, ""]
|
|
7712
|
+
|
|
7713
|
+
def __post_init__(self):
|
|
7714
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7715
|
+
is_valid, error_str = self.validate_success(self.success)
|
|
7716
|
+
if not is_valid:
|
|
7717
|
+
raise TypeError(error_str)
|
|
7718
|
+
is_valid, error_str = self.validate_state(self.state)
|
|
7719
|
+
if not is_valid:
|
|
7720
|
+
raise TypeError(error_str)
|
|
7721
|
+
is_valid, error_str = self.validate_errors(self.errors)
|
|
7722
|
+
if not is_valid:
|
|
7723
|
+
raise TypeError(error_str)
|
|
7724
|
+
|
|
7725
|
+
def parse_update_recording_response(data: object):
|
|
7726
|
+
return UpdateRecordingResponse(
|
|
7727
|
+
success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
|
|
7728
|
+
state=parse_recorder_state(data["state"]) if "state" in data and data.get("state") is not None else None,
|
|
7729
|
+
errors=parse_string_array(data["errors"]) if "errors" in data and data.get("errors") is not None else None,
|
|
7730
|
+
)
|
|
7731
|
+
|
|
7732
|
+
def serialize_update_recording_response(data: UpdateRecordingResponse) -> object:
|
|
7733
|
+
return {
|
|
7734
|
+
"success": None if data.success is None else serialize_bool(data.success),
|
|
7735
|
+
"state": None if data.state is None else serialize_recorder_state(data.state),
|
|
7736
|
+
"errors": None if data.errors is None else serialize_string_array(data.errors),
|
|
7737
|
+
}
|
|
7738
|
+
|
|
7739
|
+
@dataclass
|
|
7740
|
+
class StartTeleopResponse:
|
|
7741
|
+
"""Response to start teleoperation"""
|
|
7742
|
+
success: Union[bool, None] = None
|
|
7743
|
+
state: Union[TeleopState, None] = None
|
|
7744
|
+
|
|
7745
|
+
def validate_success(self, value: bool) -> Tuple[bool, str]:
|
|
7746
|
+
if value is None:
|
|
7747
|
+
return [True, ""]
|
|
7748
|
+
|
|
7749
|
+
if not isinstance(value, bool):
|
|
7750
|
+
return [False, "success must be of type bool for StartTeleopResponse, got " + type(value).__name__]
|
|
7751
|
+
|
|
7752
|
+
return [True, ""]
|
|
7753
|
+
|
|
7754
|
+
def validate_state(self, value: TeleopState) -> Tuple[bool, str]:
|
|
7755
|
+
if value is None:
|
|
7756
|
+
return [True, ""]
|
|
7757
|
+
|
|
7758
|
+
if not isinstance(value, TeleopState):
|
|
7759
|
+
return [False, "state must be of type TeleopState for StartTeleopResponse, got " + type(value).__name__]
|
|
7760
|
+
|
|
7761
|
+
return [True, ""]
|
|
7762
|
+
|
|
7763
|
+
def __post_init__(self):
|
|
7764
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7765
|
+
is_valid, error_str = self.validate_success(self.success)
|
|
7766
|
+
if not is_valid:
|
|
7767
|
+
raise TypeError(error_str)
|
|
7768
|
+
is_valid, error_str = self.validate_state(self.state)
|
|
7769
|
+
if not is_valid:
|
|
7770
|
+
raise TypeError(error_str)
|
|
7771
|
+
|
|
7772
|
+
def parse_start_teleop_response(data: object):
|
|
7773
|
+
return StartTeleopResponse(
|
|
7774
|
+
success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
|
|
7775
|
+
state=parse_teleop_state(data["state"]) if "state" in data and data.get("state") is not None else None,
|
|
7776
|
+
)
|
|
7777
|
+
|
|
7778
|
+
def serialize_start_teleop_response(data: StartTeleopResponse) -> object:
|
|
7779
|
+
return {
|
|
7780
|
+
"success": None if data.success is None else serialize_bool(data.success),
|
|
7781
|
+
"state": None if data.state is None else serialize_teleop_state(data.state),
|
|
7782
|
+
}
|
|
7783
|
+
|
|
7784
|
+
@dataclass
|
|
7785
|
+
class StopTeleopResponse:
|
|
7786
|
+
"""Response to stop teleoperation"""
|
|
7787
|
+
state: Union[TeleopState, None] = None
|
|
7788
|
+
|
|
7789
|
+
def validate_state(self, value: TeleopState) -> Tuple[bool, str]:
|
|
7790
|
+
if value is None:
|
|
7791
|
+
return [True, ""]
|
|
7792
|
+
|
|
7793
|
+
if not isinstance(value, TeleopState):
|
|
7794
|
+
return [False, "state must be of type TeleopState for StopTeleopResponse, got " + type(value).__name__]
|
|
7795
|
+
|
|
7796
|
+
return [True, ""]
|
|
7797
|
+
|
|
7798
|
+
def __post_init__(self):
|
|
7799
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
7800
|
+
is_valid, error_str = self.validate_state(self.state)
|
|
7801
|
+
if not is_valid:
|
|
7802
|
+
raise TypeError(error_str)
|
|
7803
|
+
|
|
7804
|
+
def parse_stop_teleop_response(data: object):
|
|
7805
|
+
return StopTeleopResponse(
|
|
7806
|
+
state=parse_teleop_state(data["state"]) if "state" in data and data.get("state") is not None else None,
|
|
7807
|
+
)
|
|
7808
|
+
|
|
7809
|
+
def serialize_stop_teleop_response(data: StopTeleopResponse) -> object:
|
|
7810
|
+
return {
|
|
7811
|
+
"state": None if data.state is None else serialize_teleop_state(data.state),
|
|
7812
|
+
}
|
|
7813
|
+
|