standardbots 2.20250128.38__py3-none-any.whl → 2.20250417.1__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.

@@ -165,6 +165,8 @@ def serialize_arm_position_update_failure_event_kind(data: Union[ArmPositionUpda
165
165
  return ArmPositionUpdateFailureEventKind(data).value
166
166
 
167
167
  class ArmPositionUpdateKindEnum(Enum):
168
+ Creating = "creating"
169
+ """Enum Creating = `creating`"""
168
170
  Success = "success"
169
171
  """Enum Success = `success`"""
170
172
  Failure = "failure"
@@ -175,6 +177,20 @@ class ArmPositionUpdateKindEnum(Enum):
175
177
  """Enum Position = `position`"""
176
178
  Planning = "planning"
177
179
  """Enum Planning = `planning`"""
180
+ BeginMotion = "begin_motion"
181
+ """Enum BeginMotion = `begin_motion`"""
182
+ RequestingPlan = "requesting_plan"
183
+ """Enum RequestingPlan = `requesting_plan`"""
184
+ Waypoint = "waypoint"
185
+ """Enum Waypoint = `waypoint`"""
186
+ WaypointReached = "waypoint_reached"
187
+ """Enum WaypointReached = `waypoint_reached`"""
188
+ Pause = "pause"
189
+ """Enum Pause = `pause`"""
190
+ Resume = "resume"
191
+ """Enum Resume = `resume`"""
192
+ Complete = "complete"
193
+ """Enum Complete = `complete`"""
178
194
 
179
195
  def parse_arm_position_update_kind_enum(data: object) -> ArmPositionUpdateKindEnum:
180
196
  return ArmPositionUpdateKindEnum(data)
@@ -551,6 +567,51 @@ def serialize_camera_settings(data: CameraSettings) -> object:
551
567
  "autoWhiteBalance": None if data.autoWhiteBalance is None else serialize_bool(data.autoWhiteBalance),
552
568
  }
553
569
 
570
+ @dataclass
571
+ class CameraStatus:
572
+ """Current camera status."""
573
+ connected: Union[bool, None] = None
574
+ message: Union[str, None] = None
575
+
576
+ def validate_connected(self, value: bool) -> Tuple[bool, str]:
577
+ if value is None:
578
+ return [True, ""]
579
+
580
+ if not isinstance(value, bool):
581
+ return [False, "connected must be of type bool for CameraStatus, got " + type(value).__name__]
582
+
583
+ return [True, ""]
584
+
585
+ def validate_message(self, value: str) -> Tuple[bool, str]:
586
+ if value is None:
587
+ return [True, ""]
588
+
589
+ if not isinstance(value, str):
590
+ return [False, "message must be of type str for CameraStatus, got " + type(value).__name__]
591
+
592
+ return [True, ""]
593
+
594
+ def __post_init__(self):
595
+ # Type check incoming model - raise error if invalid (required or wrong type)
596
+ is_valid, error_str = self.validate_connected(self.connected)
597
+ if not is_valid:
598
+ raise TypeError(error_str)
599
+ is_valid, error_str = self.validate_message(self.message)
600
+ if not is_valid:
601
+ raise TypeError(error_str)
602
+
603
+ def parse_camera_status(data: object):
604
+ return CameraStatus(
605
+ connected=parse_bool(data["connected"]) if "connected" in data and data.get("connected") is not None else None,
606
+ message=parse_str(data["message"]) if "message" in data and data.get("message") is not None else None,
607
+ )
608
+
609
+ def serialize_camera_status(data: CameraStatus) -> object:
610
+ return {
611
+ "connected": None if data.connected is None else serialize_bool(data.connected),
612
+ "message": None if data.message is None else serialize_str(data.message),
613
+ }
614
+
554
615
  @dataclass
555
616
  class CartesianPose:
556
617
  """Cartesian pose
@@ -1089,6 +1150,16 @@ class ErrorEnum(Enum):
1089
1150
  """Space specified was invalid or not found"""
1090
1151
  InvalidParameters = "invalid_parameters"
1091
1152
  """Parameters are invalid"""
1153
+ RoutineDoesNotExist = "routine_does_not_exist"
1154
+ """Routine does not exist"""
1155
+ CannotPlayRoutine = "cannot_play_routine"
1156
+ """Routine is not in the correct state to play"""
1157
+ RoutineMustBePlaying = "routine_must_be_playing"
1158
+ """Routine must be playing"""
1159
+ CannotChangeRosState = "cannot_change_ros_state"
1160
+ """Cannot change ROS state"""
1161
+ IoSafeguardError = "io_safeguard_error"
1162
+ """Cannot change IO state because of safeguard"""
1092
1163
 
1093
1164
  def parse_error_enum(data: object) -> ErrorEnum:
1094
1165
  return ErrorEnum(data)
@@ -1443,10 +1514,10 @@ def serialize_joint_state_disturbance(data: JointStateDisturbance) -> object:
1443
1514
  }
1444
1515
 
1445
1516
  class LinearGripDirectionEnum(Enum):
1446
- Inward = "inward"
1447
- """Move gripper inward to grip. Measure grip position based on interior of gripper fingers and exterior of object"""
1448
- Outward = "outward"
1449
- """Grip gripper outward to grip. Measure grip position based on exterior of gripper fingers and interior of object"""
1517
+ Internal = "internal"
1518
+ """Grip object on the inside of gripper fingers. Measure grip position based on interior of gripper fingers and exterior of object"""
1519
+ External = "external"
1520
+ """Grip object on the outside of gripper fingers. Measure grip position based on exterior of gripper fingers and interior of object"""
1450
1521
 
1451
1522
  def parse_linear_grip_direction_enum(data: object) -> LinearGripDirectionEnum:
1452
1523
  return LinearGripDirectionEnum(data)
@@ -1539,10 +1610,10 @@ def serialize_on_robot_3_fg_15_control_kind_enum(data: Union[OnRobot3FG15Control
1539
1610
  return OnRobot3FG15ControlKindEnum(data).value
1540
1611
 
1541
1612
  class OnRobotGripKindEnum(Enum):
1542
- Inward = "inward"
1543
- """Enum Inward = `inward`"""
1544
- Outward = "outward"
1545
- """Enum Outward = `outward`"""
1613
+ Internal = "internal"
1614
+ """Enum Internal = `internal`"""
1615
+ External = "external"
1616
+ """Enum External = `external`"""
1546
1617
 
1547
1618
  def parse_on_robot_grip_kind_enum(data: object) -> OnRobotGripKindEnum:
1548
1619
  return OnRobotGripKindEnum(data)
@@ -1815,6 +1886,66 @@ def serialize_pagination(data: Pagination) -> object:
1815
1886
  "offset": None if data.offset is None else serialize_i_64(data.offset),
1816
1887
  }
1817
1888
 
1889
+ @dataclass
1890
+ class PayloadStateRequest:
1891
+ """Request to set the robot payload"""
1892
+ mass: Union[float, None] = None
1893
+
1894
+ def validate_mass(self, value: float) -> Tuple[bool, str]:
1895
+ if value is None:
1896
+ return [True, ""]
1897
+
1898
+ if not isinstance(value, float):
1899
+ return [False, "mass must be of type float for PayloadStateRequest, got " + type(value).__name__]
1900
+
1901
+ return [True, ""]
1902
+
1903
+ def __post_init__(self):
1904
+ # Type check incoming model - raise error if invalid (required or wrong type)
1905
+ is_valid, error_str = self.validate_mass(self.mass)
1906
+ if not is_valid:
1907
+ raise TypeError(error_str)
1908
+
1909
+ def parse_payload_state_request(data: object):
1910
+ return PayloadStateRequest(
1911
+ mass=parse_f_64(data["mass"]) if "mass" in data and data.get("mass") is not None else None,
1912
+ )
1913
+
1914
+ def serialize_payload_state_request(data: PayloadStateRequest) -> object:
1915
+ return {
1916
+ "mass": None if data.mass is None else serialize_f_64(data.mass),
1917
+ }
1918
+
1919
+ @dataclass
1920
+ class PayloadStateResponse:
1921
+ """Response containing the current payload state"""
1922
+ mass: Union[float, None] = None
1923
+
1924
+ def validate_mass(self, value: float) -> Tuple[bool, str]:
1925
+ if value is None:
1926
+ return [True, ""]
1927
+
1928
+ if not isinstance(value, float):
1929
+ return [False, "mass must be of type float for PayloadStateResponse, got " + type(value).__name__]
1930
+
1931
+ return [True, ""]
1932
+
1933
+ def __post_init__(self):
1934
+ # Type check incoming model - raise error if invalid (required or wrong type)
1935
+ is_valid, error_str = self.validate_mass(self.mass)
1936
+ if not is_valid:
1937
+ raise TypeError(error_str)
1938
+
1939
+ def parse_payload_state_response(data: object):
1940
+ return PayloadStateResponse(
1941
+ mass=parse_f_64(data["mass"]) if "mass" in data and data.get("mass") is not None else None,
1942
+ )
1943
+
1944
+ def serialize_payload_state_response(data: PayloadStateResponse) -> object:
1945
+ return {
1946
+ "mass": None if data.mass is None else serialize_f_64(data.mass),
1947
+ }
1948
+
1818
1949
  @dataclass
1819
1950
  class Plane:
1820
1951
  """Plane in 3D space"""
@@ -2086,6 +2217,22 @@ def serialize_quaternion(data: Quaternion) -> object:
2086
2217
  "w": None if data.w is None else serialize_f_64(data.w),
2087
2218
  }
2088
2219
 
2220
+ class RecorderStatus(Enum):
2221
+ NotRecording = "not_recording"
2222
+ """Enum NotRecording = `not_recording`"""
2223
+ Recording = "recording"
2224
+ """Enum Recording = `recording`"""
2225
+ Error = "error"
2226
+ """Enum Error = `error`"""
2227
+ Complete = "complete"
2228
+ """Enum Complete = `complete`"""
2229
+
2230
+ def parse_recorder_status(data: object) -> RecorderStatus:
2231
+ return RecorderStatus(data)
2232
+
2233
+ def serialize_recorder_status(data: Union[RecorderStatus, str]) -> object:
2234
+ return RecorderStatus(data).value
2235
+
2089
2236
  class RecoveryTypeEnum(Enum):
2090
2237
  Recoverable = "Recoverable"
2091
2238
  """Enum Recoverable = `Recoverable`"""
@@ -2351,6 +2498,66 @@ def serialize_runtime_variable(data: RuntimeVariable) -> object:
2351
2498
  "value": None if data.value is None else serialize_str(data.value),
2352
2499
  }
2353
2500
 
2501
+ @dataclass
2502
+ class SaveRecordingRequest:
2503
+ """Request to save recording to marvin"""
2504
+ recordingId: Union[str, None] = None
2505
+ startTimestamp: Union[int, None] = None
2506
+ endTimestamp: Union[int, None] = None
2507
+
2508
+ def validate_recordingId(self, value: str) -> Tuple[bool, str]:
2509
+ if value is None:
2510
+ return [True, ""]
2511
+
2512
+ if not isinstance(value, str):
2513
+ return [False, "recordingId must be of type str for SaveRecordingRequest, got " + type(value).__name__]
2514
+
2515
+ return [True, ""]
2516
+
2517
+ def validate_startTimestamp(self, value: int) -> Tuple[bool, str]:
2518
+ if value is None:
2519
+ return [True, ""]
2520
+
2521
+ if not isinstance(value, int):
2522
+ return [False, "startTimestamp must be of type int for SaveRecordingRequest, got " + type(value).__name__]
2523
+
2524
+ return [True, ""]
2525
+
2526
+ def validate_endTimestamp(self, value: int) -> Tuple[bool, str]:
2527
+ if value is None:
2528
+ return [True, ""]
2529
+
2530
+ if not isinstance(value, int):
2531
+ return [False, "endTimestamp must be of type int for SaveRecordingRequest, got " + type(value).__name__]
2532
+
2533
+ return [True, ""]
2534
+
2535
+ def __post_init__(self):
2536
+ # Type check incoming model - raise error if invalid (required or wrong type)
2537
+ is_valid, error_str = self.validate_recordingId(self.recordingId)
2538
+ if not is_valid:
2539
+ raise TypeError(error_str)
2540
+ is_valid, error_str = self.validate_startTimestamp(self.startTimestamp)
2541
+ if not is_valid:
2542
+ raise TypeError(error_str)
2543
+ is_valid, error_str = self.validate_endTimestamp(self.endTimestamp)
2544
+ if not is_valid:
2545
+ raise TypeError(error_str)
2546
+
2547
+ def parse_save_recording_request(data: object):
2548
+ return SaveRecordingRequest(
2549
+ recordingId=parse_str(data["recordingId"]) if "recordingId" in data and data.get("recordingId") is not None else None,
2550
+ startTimestamp=parse_u_64(data["startTimestamp"]) if "startTimestamp" in data and data.get("startTimestamp") is not None else None,
2551
+ endTimestamp=parse_u_64(data["endTimestamp"]) if "endTimestamp" in data and data.get("endTimestamp") is not None else None,
2552
+ )
2553
+
2554
+ def serialize_save_recording_request(data: SaveRecordingRequest) -> object:
2555
+ return {
2556
+ "recordingId": None if data.recordingId is None else serialize_str(data.recordingId),
2557
+ "startTimestamp": None if data.startTimestamp is None else serialize_u_64(data.startTimestamp),
2558
+ "endTimestamp": None if data.endTimestamp is None else serialize_u_64(data.endTimestamp),
2559
+ }
2560
+
2354
2561
  class SchunkEGxControlKindEnum(Enum):
2355
2562
  Move = "move"
2356
2563
  """Move gripper to target grip diameter"""
@@ -2451,6 +2658,51 @@ def serialize_sensor(data: Sensor) -> object:
2451
2658
  "equipmentId": None if data.equipmentId is None else serialize_str(data.equipmentId),
2452
2659
  }
2453
2660
 
2661
+ @dataclass
2662
+ class SetRatioControlRequest:
2663
+ """Request to set ratio control parameters"""
2664
+ enabled: Union[bool, None] = None
2665
+ value: Union[float, None] = None
2666
+
2667
+ def validate_enabled(self, value: bool) -> Tuple[bool, str]:
2668
+ if value is None:
2669
+ return [True, ""]
2670
+
2671
+ if not isinstance(value, bool):
2672
+ return [False, "enabled must be of type bool for SetRatioControlRequest, got " + type(value).__name__]
2673
+
2674
+ return [True, ""]
2675
+
2676
+ def validate_value(self, value: float) -> Tuple[bool, str]:
2677
+ if value is None:
2678
+ return [True, ""]
2679
+
2680
+ if not isinstance(value, float):
2681
+ return [False, "value must be of type float for SetRatioControlRequest, got " + type(value).__name__]
2682
+
2683
+ return [True, ""]
2684
+
2685
+ def __post_init__(self):
2686
+ # Type check incoming model - raise error if invalid (required or wrong type)
2687
+ is_valid, error_str = self.validate_enabled(self.enabled)
2688
+ if not is_valid:
2689
+ raise TypeError(error_str)
2690
+ is_valid, error_str = self.validate_value(self.value)
2691
+ if not is_valid:
2692
+ raise TypeError(error_str)
2693
+
2694
+ def parse_set_ratio_control_request(data: object):
2695
+ return SetRatioControlRequest(
2696
+ enabled=parse_bool(data["enabled"]) if "enabled" in data and data.get("enabled") is not None else None,
2697
+ value=parse_f_64(data["value"]) if "value" in data and data.get("value") is not None else None,
2698
+ )
2699
+
2700
+ def serialize_set_ratio_control_request(data: SetRatioControlRequest) -> object:
2701
+ return {
2702
+ "enabled": None if data.enabled is None else serialize_bool(data.enabled),
2703
+ "value": None if data.value is None else serialize_f_64(data.value),
2704
+ }
2705
+
2454
2706
  SkillsList = List[str]
2455
2707
 
2456
2708
  def parse_skills_list(data: object) -> SkillsList:
@@ -2489,6 +2741,36 @@ def serialize_speech_to_text_request(data: SpeechToTextRequest) -> object:
2489
2741
  "encoded_audio_data": None if data.encoded_audio_data is None else serialize_str(data.encoded_audio_data),
2490
2742
  }
2491
2743
 
2744
+ @dataclass
2745
+ class StartRecordingRequest:
2746
+ """Request to start recording movement and camera data"""
2747
+ startTime: Union[str, None] = None
2748
+
2749
+ def validate_startTime(self, value: str) -> Tuple[bool, str]:
2750
+ if value is None:
2751
+ return [True, ""]
2752
+
2753
+ if not isinstance(value, str):
2754
+ return [False, "startTime must be of type str for StartRecordingRequest, got " + type(value).__name__]
2755
+
2756
+ return [True, ""]
2757
+
2758
+ def __post_init__(self):
2759
+ # Type check incoming model - raise error if invalid (required or wrong type)
2760
+ is_valid, error_str = self.validate_startTime(self.startTime)
2761
+ if not is_valid:
2762
+ raise TypeError(error_str)
2763
+
2764
+ def parse_start_recording_request(data: object):
2765
+ return StartRecordingRequest(
2766
+ startTime=parse_str(data["startTime"]) if "startTime" in data and data.get("startTime") is not None else None,
2767
+ )
2768
+
2769
+ def serialize_start_recording_request(data: StartRecordingRequest) -> object:
2770
+ return {
2771
+ "startTime": None if data.startTime is None else serialize_str(data.startTime),
2772
+ }
2773
+
2492
2774
  class StatusHealthEnum(Enum):
2493
2775
  Ok = "ok"
2494
2776
  """Enum Ok = `ok`"""
@@ -2548,6 +2830,152 @@ def serialize_status_version_data(data: StatusVersionData) -> object:
2548
2830
  "name": None if data.name is None else serialize_str(data.name),
2549
2831
  }
2550
2832
 
2833
+ @dataclass
2834
+ class StopRecordingRequest:
2835
+ """Request to stop recording movement and camera data"""
2836
+ delete: Union[bool, None] = None
2837
+
2838
+ def validate_delete(self, value: bool) -> Tuple[bool, str]:
2839
+ if value is None:
2840
+ return [True, ""]
2841
+
2842
+ if not isinstance(value, bool):
2843
+ return [False, "delete must be of type bool for StopRecordingRequest, got " + type(value).__name__]
2844
+
2845
+ return [True, ""]
2846
+
2847
+ def __post_init__(self):
2848
+ # Type check incoming model - raise error if invalid (required or wrong type)
2849
+ is_valid, error_str = self.validate_delete(self.delete)
2850
+ if not is_valid:
2851
+ raise TypeError(error_str)
2852
+
2853
+ def parse_stop_recording_request(data: object):
2854
+ return StopRecordingRequest(
2855
+ delete=parse_bool(data["delete"]) if "delete" in data and data.get("delete") is not None else None,
2856
+ )
2857
+
2858
+ def serialize_stop_recording_request(data: StopRecordingRequest) -> object:
2859
+ return {
2860
+ "delete": None if data.delete is None else serialize_bool(data.delete),
2861
+ }
2862
+
2863
+ StringArray = List[str]
2864
+
2865
+ def parse_string_array(data: object) -> StringArray:
2866
+ return [parse_str(item) for item in data]
2867
+
2868
+ def serialize_string_array(data: StringArray) -> List[object]:
2869
+ return [serialize_str(item) for item in data]
2870
+
2871
+ class TeleopStatus(Enum):
2872
+ WaitForTeleop = "wait_for_teleop"
2873
+ """Enum WaitForTeleop = `wait_for_teleop`"""
2874
+ Teleop = "teleop"
2875
+ """Enum Teleop = `teleop`"""
2876
+ Stopping = "stopping"
2877
+ """Enum Stopping = `stopping`"""
2878
+ Stopped = "stopped"
2879
+ """Enum Stopped = `stopped`"""
2880
+ Error = "error"
2881
+ """Enum Error = `error`"""
2882
+
2883
+ def parse_teleop_status(data: object) -> TeleopStatus:
2884
+ return TeleopStatus(data)
2885
+
2886
+ def serialize_teleop_status(data: Union[TeleopStatus, str]) -> object:
2887
+ return TeleopStatus(data).value
2888
+
2889
+ @dataclass
2890
+ class ToggleRecorderBotRequest:
2891
+ """Request to enable or disable a secondary bot"""
2892
+ botId: Union[str, None] = None
2893
+ enabled: Union[bool, None] = None
2894
+
2895
+ def validate_botId(self, value: str) -> Tuple[bool, str]:
2896
+ if value is None:
2897
+ return [True, ""]
2898
+
2899
+ if not isinstance(value, str):
2900
+ return [False, "botId must be of type str for ToggleRecorderBotRequest, got " + type(value).__name__]
2901
+
2902
+ return [True, ""]
2903
+
2904
+ def validate_enabled(self, value: bool) -> Tuple[bool, str]:
2905
+ if value is None:
2906
+ return [True, ""]
2907
+
2908
+ if not isinstance(value, bool):
2909
+ return [False, "enabled must be of type bool for ToggleRecorderBotRequest, got " + type(value).__name__]
2910
+
2911
+ return [True, ""]
2912
+
2913
+ def __post_init__(self):
2914
+ # Type check incoming model - raise error if invalid (required or wrong type)
2915
+ is_valid, error_str = self.validate_botId(self.botId)
2916
+ if not is_valid:
2917
+ raise TypeError(error_str)
2918
+ is_valid, error_str = self.validate_enabled(self.enabled)
2919
+ if not is_valid:
2920
+ raise TypeError(error_str)
2921
+
2922
+ def parse_toggle_recorder_bot_request(data: object):
2923
+ return ToggleRecorderBotRequest(
2924
+ botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
2925
+ enabled=parse_bool(data["enabled"]) if "enabled" in data and data.get("enabled") is not None else None,
2926
+ )
2927
+
2928
+ def serialize_toggle_recorder_bot_request(data: ToggleRecorderBotRequest) -> object:
2929
+ return {
2930
+ "botId": None if data.botId is None else serialize_str(data.botId),
2931
+ "enabled": None if data.enabled is None else serialize_bool(data.enabled),
2932
+ }
2933
+
2934
+ @dataclass
2935
+ class ToggleTeleopBotRequest:
2936
+ """Request to enable or disable a secondary bot"""
2937
+ botId: Union[str, None] = None
2938
+ enabled: Union[bool, None] = None
2939
+
2940
+ def validate_botId(self, value: str) -> Tuple[bool, str]:
2941
+ if value is None:
2942
+ return [True, ""]
2943
+
2944
+ if not isinstance(value, str):
2945
+ return [False, "botId must be of type str for ToggleTeleopBotRequest, got " + type(value).__name__]
2946
+
2947
+ return [True, ""]
2948
+
2949
+ def validate_enabled(self, value: bool) -> Tuple[bool, str]:
2950
+ if value is None:
2951
+ return [True, ""]
2952
+
2953
+ if not isinstance(value, bool):
2954
+ return [False, "enabled must be of type bool for ToggleTeleopBotRequest, got " + type(value).__name__]
2955
+
2956
+ return [True, ""]
2957
+
2958
+ def __post_init__(self):
2959
+ # Type check incoming model - raise error if invalid (required or wrong type)
2960
+ is_valid, error_str = self.validate_botId(self.botId)
2961
+ if not is_valid:
2962
+ raise TypeError(error_str)
2963
+ is_valid, error_str = self.validate_enabled(self.enabled)
2964
+ if not is_valid:
2965
+ raise TypeError(error_str)
2966
+
2967
+ def parse_toggle_teleop_bot_request(data: object):
2968
+ return ToggleTeleopBotRequest(
2969
+ botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
2970
+ enabled=parse_bool(data["enabled"]) if "enabled" in data and data.get("enabled") is not None else None,
2971
+ )
2972
+
2973
+ def serialize_toggle_teleop_bot_request(data: ToggleTeleopBotRequest) -> object:
2974
+ return {
2975
+ "botId": None if data.botId is None else serialize_str(data.botId),
2976
+ "enabled": None if data.enabled is None else serialize_bool(data.enabled),
2977
+ }
2978
+
2551
2979
  @dataclass
2552
2980
  class TriggerFaultRequest:
2553
2981
  """Request to trigger an user fault for routine.
@@ -2694,46 +3122,16 @@ def serialize_brakes_state(data: BrakesState) -> object:
2694
3122
  }
2695
3123
 
2696
3124
  @dataclass
2697
- class CameraIntrinsicsResponse:
2698
- """Response with intrinsic parameters of the camera."""
2699
- intrinsics: Union[CameraIntrinsics, None] = None
3125
+ class CameraFrameRequest:
3126
+ """Request for a single camera frame. In JPEG format."""
3127
+ camera_settings: Union[CameraSettings, None] = None
2700
3128
 
2701
- def validate_intrinsics(self, value: CameraIntrinsics) -> Tuple[bool, str]:
3129
+ def validate_camera_settings(self, value: CameraSettings) -> Tuple[bool, str]:
2702
3130
  if value is None:
2703
3131
  return [True, ""]
2704
3132
 
2705
- if not isinstance(value, CameraIntrinsics):
2706
- return [False, "intrinsics must be of type CameraIntrinsics for CameraIntrinsicsResponse, got " + type(value).__name__]
2707
-
2708
- return [True, ""]
2709
-
2710
- def __post_init__(self):
2711
- # Type check incoming model - raise error if invalid (required or wrong type)
2712
- is_valid, error_str = self.validate_intrinsics(self.intrinsics)
2713
- if not is_valid:
2714
- raise TypeError(error_str)
2715
-
2716
- def parse_camera_intrinsics_response(data: object):
2717
- return CameraIntrinsicsResponse(
2718
- intrinsics=parse_camera_intrinsics(data["intrinsics"]) if "intrinsics" in data and data.get("intrinsics") is not None else None,
2719
- )
2720
-
2721
- def serialize_camera_intrinsics_response(data: CameraIntrinsicsResponse) -> object:
2722
- return {
2723
- "intrinsics": None if data.intrinsics is None else serialize_camera_intrinsics(data.intrinsics),
2724
- }
2725
-
2726
- @dataclass
2727
- class CameraFrameRequest:
2728
- """Request for a single camera frame. In JPEG format."""
2729
- camera_settings: Union[CameraSettings, None] = None
2730
-
2731
- def validate_camera_settings(self, value: CameraSettings) -> Tuple[bool, str]:
2732
- if value is None:
2733
- return [True, ""]
2734
-
2735
- if not isinstance(value, CameraSettings):
2736
- return [False, "camera_settings must be of type CameraSettings for CameraFrameRequest, got " + type(value).__name__]
3133
+ if not isinstance(value, CameraSettings):
3134
+ return [False, "camera_settings must be of type CameraSettings for CameraFrameRequest, got " + type(value).__name__]
2737
3135
 
2738
3136
  return [True, ""]
2739
3137
 
@@ -3047,7 +3445,7 @@ class ErrorResponse:
3047
3445
  if value is None:
3048
3446
  return [False, "error is required for ErrorResponse"]
3049
3447
 
3050
- if not ((isinstance(value, str) and ErrorEnum in ['authorization_required', 'routine_must_be_running', 'api_control_required', 'robot_brakes_disengage_failed', 'robot_brakes_engage_failed', 'request_failed_validation', 'robot_not_idle', 'brakes_must_be_engaged', 'brakes_must_be_disengaged', 'equipment_no_matching', 'service_initializing', 'camera_disconnected', 'settings_validation_error', 'settings_timeout', 'internal_server_error', 'recovery_error', 'not_found', 'invalid_space_specified', 'invalid_parameters']) or isinstance(value, ErrorEnum)):
3448
+ if not ((isinstance(value, str) and ErrorEnum in ['authorization_required', 'routine_must_be_running', 'api_control_required', 'robot_brakes_disengage_failed', 'robot_brakes_engage_failed', 'request_failed_validation', 'robot_not_idle', 'brakes_must_be_engaged', 'brakes_must_be_disengaged', 'equipment_no_matching', 'service_initializing', 'camera_disconnected', 'settings_validation_error', 'settings_timeout', 'internal_server_error', 'recovery_error', 'not_found', 'invalid_space_specified', 'invalid_parameters', 'routine_does_not_exist', 'cannot_play_routine', 'routine_must_be_playing', 'cannot_change_ros_state', 'io_safeguard_error']) or isinstance(value, ErrorEnum)):
3051
3449
  return [False, "error must be of type ErrorEnum for ErrorResponse, got " + type(value).__name__]
3052
3450
 
3053
3451
  return [True, ""]
@@ -3863,7 +4261,7 @@ class OnRobot2FG14GripperConfiguration:
3863
4261
  if value is None:
3864
4262
  return [True, ""]
3865
4263
 
3866
- if not ((isinstance(value, str) and OnRobotGripKindEnum in ['inward', 'outward']) or isinstance(value, OnRobotGripKindEnum)):
4264
+ if not ((isinstance(value, str) and OnRobotGripKindEnum in ['internal', 'external']) or isinstance(value, OnRobotGripKindEnum)):
3867
4265
  return [False, "grip_kind must be of type OnRobotGripKindEnum for OnRobot2FG14GripperConfiguration, got " + type(value).__name__]
3868
4266
 
3869
4267
  return [True, ""]
@@ -4163,7 +4561,7 @@ class OnRobot2FG7GripperConfiguration:
4163
4561
  if value is None:
4164
4562
  return [True, ""]
4165
4563
 
4166
- if not ((isinstance(value, str) and OnRobotGripKindEnum in ['inward', 'outward']) or isinstance(value, OnRobotGripKindEnum)):
4564
+ if not ((isinstance(value, str) and OnRobotGripKindEnum in ['internal', 'external']) or isinstance(value, OnRobotGripKindEnum)):
4167
4565
  return [False, "grip_kind must be of type OnRobotGripKindEnum for OnRobot2FG7GripperConfiguration, got " + type(value).__name__]
4168
4566
 
4169
4567
  return [True, ""]
@@ -4492,7 +4890,7 @@ class OnRobot3FG15GripperConfiguration:
4492
4890
  if value is None:
4493
4891
  return [True, ""]
4494
4892
 
4495
- if not ((isinstance(value, str) and OnRobotGripKindEnum in ['inward', 'outward']) or isinstance(value, OnRobotGripKindEnum)):
4893
+ if not ((isinstance(value, str) and OnRobotGripKindEnum in ['internal', 'external']) or isinstance(value, OnRobotGripKindEnum)):
4496
4894
  return [False, "grip_kind must be of type OnRobotGripKindEnum for OnRobot3FG15GripperConfiguration, got " + type(value).__name__]
4497
4895
 
4498
4896
  return [True, ""]
@@ -4729,6 +5127,96 @@ def serialize_orientation(data: Orientation) -> object:
4729
5127
  "quaternion": None if data.quaternion is None else serialize_quaternion(data.quaternion),
4730
5128
  }
4731
5129
 
5130
+ @dataclass
5131
+ class RecorderBotDetails:
5132
+ """Details of the bot"""
5133
+ botId: Union[str, None] = None
5134
+ alias: Union[str, None] = None
5135
+ isSecondary: Union[bool, None] = None
5136
+ isEnabled: Union[bool, None] = None
5137
+ status: Union[RecorderStatus, None] = None
5138
+
5139
+ def validate_botId(self, value: str) -> Tuple[bool, str]:
5140
+ if value is None:
5141
+ return [True, ""]
5142
+
5143
+ if not isinstance(value, str):
5144
+ return [False, "botId must be of type str for RecorderBotDetails, got " + type(value).__name__]
5145
+
5146
+ return [True, ""]
5147
+
5148
+ def validate_alias(self, value: str) -> Tuple[bool, str]:
5149
+ if value is None:
5150
+ return [True, ""]
5151
+
5152
+ if not isinstance(value, str):
5153
+ return [False, "alias must be of type str for RecorderBotDetails, got " + type(value).__name__]
5154
+
5155
+ return [True, ""]
5156
+
5157
+ def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
5158
+ if value is None:
5159
+ return [True, ""]
5160
+
5161
+ if not isinstance(value, bool):
5162
+ return [False, "isSecondary must be of type bool for RecorderBotDetails, got " + type(value).__name__]
5163
+
5164
+ return [True, ""]
5165
+
5166
+ def validate_isEnabled(self, value: bool) -> Tuple[bool, str]:
5167
+ if value is None:
5168
+ return [True, ""]
5169
+
5170
+ if not isinstance(value, bool):
5171
+ return [False, "isEnabled must be of type bool for RecorderBotDetails, got " + type(value).__name__]
5172
+
5173
+ return [True, ""]
5174
+
5175
+ def validate_status(self, value: RecorderStatus) -> Tuple[bool, str]:
5176
+ if value is None:
5177
+ return [True, ""]
5178
+
5179
+ if not ((isinstance(value, str) and RecorderStatus in ['not_recording', 'recording', 'error', 'complete']) or isinstance(value, RecorderStatus)):
5180
+ return [False, "status must be of type RecorderStatus for RecorderBotDetails, got " + type(value).__name__]
5181
+
5182
+ return [True, ""]
5183
+
5184
+ def __post_init__(self):
5185
+ # Type check incoming model - raise error if invalid (required or wrong type)
5186
+ is_valid, error_str = self.validate_botId(self.botId)
5187
+ if not is_valid:
5188
+ raise TypeError(error_str)
5189
+ is_valid, error_str = self.validate_alias(self.alias)
5190
+ if not is_valid:
5191
+ raise TypeError(error_str)
5192
+ is_valid, error_str = self.validate_isSecondary(self.isSecondary)
5193
+ if not is_valid:
5194
+ raise TypeError(error_str)
5195
+ is_valid, error_str = self.validate_isEnabled(self.isEnabled)
5196
+ if not is_valid:
5197
+ raise TypeError(error_str)
5198
+ is_valid, error_str = self.validate_status(self.status)
5199
+ if not is_valid:
5200
+ raise TypeError(error_str)
5201
+
5202
+ def parse_recorder_bot_details(data: object):
5203
+ return RecorderBotDetails(
5204
+ botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
5205
+ alias=parse_str(data["alias"]) if "alias" in data and data.get("alias") is not None else None,
5206
+ isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
5207
+ isEnabled=parse_bool(data["isEnabled"]) if "isEnabled" in data and data.get("isEnabled") is not None else None,
5208
+ status=parse_recorder_status(data["status"]) if "status" in data and data.get("status") is not None else None,
5209
+ )
5210
+
5211
+ def serialize_recorder_bot_details(data: RecorderBotDetails) -> object:
5212
+ return {
5213
+ "botId": None if data.botId is None else serialize_str(data.botId),
5214
+ "alias": None if data.alias is None else serialize_str(data.alias),
5215
+ "isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
5216
+ "isEnabled": None if data.isEnabled is None else serialize_bool(data.isEnabled),
5217
+ "status": None if data.status is None else serialize_recorder_status(data.status),
5218
+ }
5219
+
4732
5220
  @dataclass
4733
5221
  class FailureStateDetails:
4734
5222
  """Failure state details."""
@@ -4864,6 +5352,36 @@ def serialize_robot_control_mode(data: RobotControlMode) -> object:
4864
5352
  "kind": None if data.kind is None else serialize_robot_control_mode_enum(data.kind),
4865
5353
  }
4866
5354
 
5355
+ @dataclass
5356
+ class PlayRoutineResponse:
5357
+ """Status response informs user of of robot state"""
5358
+ status: Union[RobotStatusEnum, None] = None
5359
+
5360
+ def validate_status(self, value: RobotStatusEnum) -> Tuple[bool, str]:
5361
+ if value is None:
5362
+ return [True, ""]
5363
+
5364
+ if not ((isinstance(value, str) and RobotStatusEnum in ['Idle', 'RunningAdHocCommand', 'RoutineRunning', 'Antigravity', 'AntigravitySlow', 'Failure', 'Recovering']) or isinstance(value, RobotStatusEnum)):
5365
+ return [False, "status must be of type RobotStatusEnum for PlayRoutineResponse, got " + type(value).__name__]
5366
+
5367
+ return [True, ""]
5368
+
5369
+ def __post_init__(self):
5370
+ # Type check incoming model - raise error if invalid (required or wrong type)
5371
+ is_valid, error_str = self.validate_status(self.status)
5372
+ if not is_valid:
5373
+ raise TypeError(error_str)
5374
+
5375
+ def parse_play_routine_response(data: object):
5376
+ return PlayRoutineResponse(
5377
+ status=parse_robot_status_enum(data["status"]) if "status" in data and data.get("status") is not None else None,
5378
+ )
5379
+
5380
+ def serialize_play_routine_response(data: PlayRoutineResponse) -> object:
5381
+ return {
5382
+ "status": None if data.status is None else serialize_robot_status_enum(data.status),
5383
+ }
5384
+
4867
5385
  @dataclass
4868
5386
  class ROSControlStateResponse:
4869
5387
  """Response to a query for the current state of ROS control."""
@@ -5097,6 +5615,171 @@ def serialize_status_health_response(data: StatusHealthResponse) -> object:
5097
5615
  "build": None if data.build is None else serialize_status_version_data(data.build),
5098
5616
  }
5099
5617
 
5618
+ @dataclass
5619
+ class SaveRecordingResponse:
5620
+ """Response to save recording to marvin app"""
5621
+ uploadId: Union[str, None] = None
5622
+ errors: Union[StringArray, None] = None
5623
+
5624
+ def validate_uploadId(self, value: str) -> Tuple[bool, str]:
5625
+ if value is None:
5626
+ return [True, ""]
5627
+
5628
+ if not isinstance(value, str):
5629
+ return [False, "uploadId must be of type str for SaveRecordingResponse, got " + type(value).__name__]
5630
+
5631
+ return [True, ""]
5632
+
5633
+ def validate_errors(self, value: StringArray) -> Tuple[bool, str]:
5634
+ if value is None:
5635
+ return [True, ""]
5636
+
5637
+ if not (isinstance(value, list) and all(isinstance(x, str) for x in value)):
5638
+ return [False, "errors must be of type StringArray for SaveRecordingResponse, got " + type(value).__name__]
5639
+
5640
+ return [True, ""]
5641
+
5642
+ def __post_init__(self):
5643
+ # Type check incoming model - raise error if invalid (required or wrong type)
5644
+ is_valid, error_str = self.validate_uploadId(self.uploadId)
5645
+ if not is_valid:
5646
+ raise TypeError(error_str)
5647
+ is_valid, error_str = self.validate_errors(self.errors)
5648
+ if not is_valid:
5649
+ raise TypeError(error_str)
5650
+
5651
+ def parse_save_recording_response(data: object):
5652
+ return SaveRecordingResponse(
5653
+ uploadId=parse_str(data["uploadId"]) if "uploadId" in data and data.get("uploadId") is not None else None,
5654
+ errors=parse_string_array(data["errors"]) if "errors" in data and data.get("errors") is not None else None,
5655
+ )
5656
+
5657
+ def serialize_save_recording_response(data: SaveRecordingResponse) -> object:
5658
+ return {
5659
+ "uploadId": None if data.uploadId is None else serialize_str(data.uploadId),
5660
+ "errors": None if data.errors is None else serialize_string_array(data.errors),
5661
+ }
5662
+
5663
+ @dataclass
5664
+ class BotTeleopDetails:
5665
+ """Details of the bot"""
5666
+ botId: Union[str, None] = None
5667
+ alias: Union[str, None] = None
5668
+ url: Union[str, None] = None
5669
+ token: Union[str, None] = None
5670
+ isSecondary: Union[bool, None] = None
5671
+ isEnabled: Union[bool, None] = None
5672
+ status: Union[TeleopStatus, None] = None
5673
+
5674
+ def validate_botId(self, value: str) -> Tuple[bool, str]:
5675
+ if value is None:
5676
+ return [True, ""]
5677
+
5678
+ if not isinstance(value, str):
5679
+ return [False, "botId must be of type str for BotTeleopDetails, got " + type(value).__name__]
5680
+
5681
+ return [True, ""]
5682
+
5683
+ def validate_alias(self, value: str) -> Tuple[bool, str]:
5684
+ if value is None:
5685
+ return [True, ""]
5686
+
5687
+ if not isinstance(value, str):
5688
+ return [False, "alias must be of type str for BotTeleopDetails, got " + type(value).__name__]
5689
+
5690
+ return [True, ""]
5691
+
5692
+ def validate_url(self, value: str) -> Tuple[bool, str]:
5693
+ if value is None:
5694
+ return [True, ""]
5695
+
5696
+ if not isinstance(value, str):
5697
+ return [False, "url must be of type str for BotTeleopDetails, got " + type(value).__name__]
5698
+
5699
+ return [True, ""]
5700
+
5701
+ def validate_token(self, value: str) -> Tuple[bool, str]:
5702
+ if value is None:
5703
+ return [True, ""]
5704
+
5705
+ if not isinstance(value, str):
5706
+ return [False, "token must be of type str for BotTeleopDetails, got " + type(value).__name__]
5707
+
5708
+ return [True, ""]
5709
+
5710
+ def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
5711
+ if value is None:
5712
+ return [True, ""]
5713
+
5714
+ if not isinstance(value, bool):
5715
+ return [False, "isSecondary must be of type bool for BotTeleopDetails, got " + type(value).__name__]
5716
+
5717
+ return [True, ""]
5718
+
5719
+ def validate_isEnabled(self, value: bool) -> Tuple[bool, str]:
5720
+ if value is None:
5721
+ return [True, ""]
5722
+
5723
+ if not isinstance(value, bool):
5724
+ return [False, "isEnabled must be of type bool for BotTeleopDetails, got " + type(value).__name__]
5725
+
5726
+ return [True, ""]
5727
+
5728
+ def validate_status(self, value: TeleopStatus) -> Tuple[bool, str]:
5729
+ if value is None:
5730
+ return [True, ""]
5731
+
5732
+ if not ((isinstance(value, str) and TeleopStatus in ['wait_for_teleop', 'teleop', 'stopping', 'stopped', 'error']) or isinstance(value, TeleopStatus)):
5733
+ return [False, "status must be of type TeleopStatus for BotTeleopDetails, got " + type(value).__name__]
5734
+
5735
+ return [True, ""]
5736
+
5737
+ def __post_init__(self):
5738
+ # Type check incoming model - raise error if invalid (required or wrong type)
5739
+ is_valid, error_str = self.validate_botId(self.botId)
5740
+ if not is_valid:
5741
+ raise TypeError(error_str)
5742
+ is_valid, error_str = self.validate_alias(self.alias)
5743
+ if not is_valid:
5744
+ raise TypeError(error_str)
5745
+ is_valid, error_str = self.validate_url(self.url)
5746
+ if not is_valid:
5747
+ raise TypeError(error_str)
5748
+ is_valid, error_str = self.validate_token(self.token)
5749
+ if not is_valid:
5750
+ raise TypeError(error_str)
5751
+ is_valid, error_str = self.validate_isSecondary(self.isSecondary)
5752
+ if not is_valid:
5753
+ raise TypeError(error_str)
5754
+ is_valid, error_str = self.validate_isEnabled(self.isEnabled)
5755
+ if not is_valid:
5756
+ raise TypeError(error_str)
5757
+ is_valid, error_str = self.validate_status(self.status)
5758
+ if not is_valid:
5759
+ raise TypeError(error_str)
5760
+
5761
+ def parse_bot_teleop_details(data: object):
5762
+ return BotTeleopDetails(
5763
+ botId=parse_str(data["botId"]) if "botId" in data and data.get("botId") is not None else None,
5764
+ alias=parse_str(data["alias"]) if "alias" in data and data.get("alias") is not None else None,
5765
+ url=parse_str(data["url"]) if "url" in data and data.get("url") is not None else None,
5766
+ token=parse_str(data["token"]) if "token" in data and data.get("token") is not None else None,
5767
+ isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
5768
+ isEnabled=parse_bool(data["isEnabled"]) if "isEnabled" in data and data.get("isEnabled") is not None else None,
5769
+ status=parse_teleop_status(data["status"]) if "status" in data and data.get("status") is not None else None,
5770
+ )
5771
+
5772
+ def serialize_bot_teleop_details(data: BotTeleopDetails) -> object:
5773
+ return {
5774
+ "botId": None if data.botId is None else serialize_str(data.botId),
5775
+ "alias": None if data.alias is None else serialize_str(data.alias),
5776
+ "url": None if data.url is None else serialize_str(data.url),
5777
+ "token": None if data.token is None else serialize_str(data.token),
5778
+ "isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
5779
+ "isEnabled": None if data.isEnabled is None else serialize_bool(data.isEnabled),
5780
+ "status": None if data.status is None else serialize_teleop_status(data.status),
5781
+ }
5782
+
5100
5783
  @dataclass
5101
5784
  class ArmPositionUpdateRequestResponseEventStreamDetails:
5102
5785
  """Specify how the response should be sent
@@ -5374,7 +6057,7 @@ class OnRobot2FG14GripperCommandRequest:
5374
6057
  if value is None:
5375
6058
  return [False, "grip_direction is required for OnRobot2FG14GripperCommandRequest"]
5376
6059
 
5377
- if not ((isinstance(value, str) and LinearGripDirectionEnum in ['inward', 'outward']) or isinstance(value, LinearGripDirectionEnum)):
6060
+ if not ((isinstance(value, str) and LinearGripDirectionEnum in ['internal', 'external']) or isinstance(value, LinearGripDirectionEnum)):
5378
6061
  return [False, "grip_direction must be of type LinearGripDirectionEnum for OnRobot2FG14GripperCommandRequest, got " + type(value).__name__]
5379
6062
 
5380
6063
  return [True, ""]
@@ -5450,7 +6133,7 @@ class OnRobot2FG7GripperCommandRequest:
5450
6133
  if value is None:
5451
6134
  return [False, "grip_direction is required for OnRobot2FG7GripperCommandRequest"]
5452
6135
 
5453
- if not ((isinstance(value, str) and LinearGripDirectionEnum in ['inward', 'outward']) or isinstance(value, LinearGripDirectionEnum)):
6136
+ if not ((isinstance(value, str) and LinearGripDirectionEnum in ['internal', 'external']) or isinstance(value, LinearGripDirectionEnum)):
5454
6137
  return [False, "grip_direction must be of type LinearGripDirectionEnum for OnRobot2FG7GripperCommandRequest, got " + type(value).__name__]
5455
6138
 
5456
6139
  return [True, ""]
@@ -5526,7 +6209,7 @@ class OnRobot3FG15GripperCommandRequest:
5526
6209
  if value is None:
5527
6210
  return [False, "grip_direction is required for OnRobot3FG15GripperCommandRequest"]
5528
6211
 
5529
- if not ((isinstance(value, str) and LinearGripDirectionEnum in ['inward', 'outward']) or isinstance(value, LinearGripDirectionEnum)):
6212
+ if not ((isinstance(value, str) and LinearGripDirectionEnum in ['internal', 'external']) or isinstance(value, LinearGripDirectionEnum)):
5530
6213
  return [False, "grip_direction must be of type LinearGripDirectionEnum for OnRobot3FG15GripperCommandRequest, got " + type(value).__name__]
5531
6214
 
5532
6215
  return [True, ""]
@@ -5635,6 +6318,51 @@ def serialize_schunk_e_gx_gripper_command_request(data: SchunkEGxGripperCommandR
5635
6318
  "control_kind": serialize_schunk_e_gx_control_kind_enum(data.control_kind),
5636
6319
  }
5637
6320
 
6321
+ @dataclass
6322
+ class OffsetConfig:
6323
+ """Config of the offset"""
6324
+ position: Union[Position, None] = None
6325
+ orientation: Union[Quaternion, None] = None
6326
+
6327
+ def validate_position(self, value: Position) -> Tuple[bool, str]:
6328
+ if value is None:
6329
+ return [True, ""]
6330
+
6331
+ if not isinstance(value, Position):
6332
+ return [False, "position must be of type Position for OffsetConfig, got " + type(value).__name__]
6333
+
6334
+ return [True, ""]
6335
+
6336
+ def validate_orientation(self, value: Quaternion) -> Tuple[bool, str]:
6337
+ if value is None:
6338
+ return [True, ""]
6339
+
6340
+ if not isinstance(value, Quaternion):
6341
+ return [False, "orientation must be of type Quaternion for OffsetConfig, got " + type(value).__name__]
6342
+
6343
+ return [True, ""]
6344
+
6345
+ def __post_init__(self):
6346
+ # Type check incoming model - raise error if invalid (required or wrong type)
6347
+ is_valid, error_str = self.validate_position(self.position)
6348
+ if not is_valid:
6349
+ raise TypeError(error_str)
6350
+ is_valid, error_str = self.validate_orientation(self.orientation)
6351
+ if not is_valid:
6352
+ raise TypeError(error_str)
6353
+
6354
+ def parse_offset_config(data: object):
6355
+ return OffsetConfig(
6356
+ position=parse_position(data["position"]) if "position" in data and data.get("position") is not None else None,
6357
+ orientation=parse_quaternion(data["orientation"]) if "orientation" in data and data.get("orientation") is not None else None,
6358
+ )
6359
+
6360
+ def serialize_offset_config(data: OffsetConfig) -> object:
6361
+ return {
6362
+ "position": None if data.position is None else serialize_position(data.position),
6363
+ "orientation": None if data.orientation is None else serialize_quaternion(data.orientation),
6364
+ }
6365
+
5638
6366
  @dataclass
5639
6367
  class GripperConfiguration:
5640
6368
  """Configuration of gripper, also known as End Effector"""
@@ -5913,6 +6641,14 @@ def serialize_position_and_orientation(data: PositionAndOrientation) -> object:
5913
6641
  "orientation": serialize_orientation(data.orientation),
5914
6642
  }
5915
6643
 
6644
+ RecorderBotDetailsList = List[RecorderBotDetails]
6645
+
6646
+ def parse_recorder_bot_details_list(data: object) -> RecorderBotDetailsList:
6647
+ return [parse_recorder_bot_details(item) for item in data]
6648
+
6649
+ def serialize_recorder_bot_details_list(data: RecorderBotDetailsList) -> List[object]:
6650
+ return [serialize_recorder_bot_details(item) for item in data]
6651
+
5916
6652
  @dataclass
5917
6653
  class FailureStateResponse:
5918
6654
  """Failure state response informs user of how and whether the robot may be recovered."""
@@ -6003,6 +6739,14 @@ def serialize_sensors_configuration(data: SensorsConfiguration) -> object:
6003
6739
  "sensors": None if data.sensors is None else serialize_sensors_list(data.sensors),
6004
6740
  }
6005
6741
 
6742
+ BotTeleopDetailsList = List[BotTeleopDetails]
6743
+
6744
+ def parse_bot_teleop_details_list(data: object) -> BotTeleopDetailsList:
6745
+ return [parse_bot_teleop_details(item) for item in data]
6746
+
6747
+ def serialize_bot_teleop_details_list(data: BotTeleopDetailsList) -> List[object]:
6748
+ return [serialize_bot_teleop_details(item) for item in data]
6749
+
6006
6750
  @dataclass
6007
6751
  class ArmPositionUpdateRequestResponseFormat:
6008
6752
  """Specify how the response should be sent
@@ -6058,7 +6802,7 @@ def serialize_routines_list(data: RoutinesList) -> List[object]:
6058
6802
  return [serialize_routine(item) for item in data]
6059
6803
 
6060
6804
  @dataclass
6061
- class ActiveCalibrationResponse:
6805
+ class ActiveCalibrationContainer:
6062
6806
  """The response to an active calibration request"""
6063
6807
  calibrationData: Union[CalibrationData, None] = None
6064
6808
 
@@ -6067,7 +6811,7 @@ class ActiveCalibrationResponse:
6067
6811
  return [True, ""]
6068
6812
 
6069
6813
  if not isinstance(value, CalibrationData):
6070
- return [False, "calibrationData must be of type CalibrationData for ActiveCalibrationResponse, got " + type(value).__name__]
6814
+ return [False, "calibrationData must be of type CalibrationData for ActiveCalibrationContainer, got " + type(value).__name__]
6071
6815
 
6072
6816
  return [True, ""]
6073
6817
 
@@ -6077,12 +6821,12 @@ class ActiveCalibrationResponse:
6077
6821
  if not is_valid:
6078
6822
  raise TypeError(error_str)
6079
6823
 
6080
- def parse_active_calibration_response(data: object):
6081
- return ActiveCalibrationResponse(
6824
+ def parse_active_calibration_container(data: object):
6825
+ return ActiveCalibrationContainer(
6082
6826
  calibrationData=parse_calibration_data(data["calibrationData"]) if "calibrationData" in data and data.get("calibrationData") is not None else None,
6083
6827
  )
6084
6828
 
6085
- def serialize_active_calibration_response(data: ActiveCalibrationResponse) -> object:
6829
+ def serialize_active_calibration_container(data: ActiveCalibrationContainer) -> object:
6086
6830
  return {
6087
6831
  "calibrationData": None if data.calibrationData is None else serialize_calibration_data(data.calibrationData),
6088
6832
  }
@@ -6382,9 +7126,144 @@ def serialize_position_and_orientation_list(data: PositionAndOrientationList) ->
6382
7126
  return [serialize_position_and_orientation(item) for item in data]
6383
7127
 
6384
7128
  @dataclass
6385
- class RoutinesPaginatedResponse:
6386
- """Paginated response containing routine data"""
6387
- items: Union[RoutinesList, None] = None
7129
+ class RecorderConfig:
7130
+ """Config of the recorder"""
7131
+ isSecondary: Union[bool, None] = None
7132
+ userId: Union[str, None] = None
7133
+ taskId: Union[str, None] = None
7134
+ bots: Union[RecorderBotDetailsList, None] = None
7135
+ offset: Union[OffsetConfig, None] = None
7136
+
7137
+ def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
7138
+ if value is None:
7139
+ return [True, ""]
7140
+
7141
+ if not isinstance(value, bool):
7142
+ return [False, "isSecondary must be of type bool for RecorderConfig, got " + type(value).__name__]
7143
+
7144
+ return [True, ""]
7145
+
7146
+ def validate_userId(self, value: str) -> Tuple[bool, str]:
7147
+ if value is None:
7148
+ return [True, ""]
7149
+
7150
+ if not isinstance(value, str):
7151
+ return [False, "userId must be of type str for RecorderConfig, got " + type(value).__name__]
7152
+
7153
+ return [True, ""]
7154
+
7155
+ def validate_taskId(self, value: str) -> Tuple[bool, str]:
7156
+ if value is None:
7157
+ return [True, ""]
7158
+
7159
+ if not isinstance(value, str):
7160
+ return [False, "taskId must be of type str for RecorderConfig, got " + type(value).__name__]
7161
+
7162
+ return [True, ""]
7163
+
7164
+ def validate_bots(self, value: RecorderBotDetailsList) -> Tuple[bool, str]:
7165
+ if value is None:
7166
+ return [True, ""]
7167
+
7168
+ if not (isinstance(value, list) and all(isinstance(x, RecorderBotDetails) for x in value)):
7169
+ return [False, "bots must be of type RecorderBotDetailsList for RecorderConfig, got " + type(value).__name__]
7170
+
7171
+ return [True, ""]
7172
+
7173
+ def validate_offset(self, value: OffsetConfig) -> Tuple[bool, str]:
7174
+ if value is None:
7175
+ return [True, ""]
7176
+
7177
+ if not isinstance(value, OffsetConfig):
7178
+ return [False, "offset must be of type OffsetConfig for RecorderConfig, got " + type(value).__name__]
7179
+
7180
+ return [True, ""]
7181
+
7182
+ def __post_init__(self):
7183
+ # Type check incoming model - raise error if invalid (required or wrong type)
7184
+ is_valid, error_str = self.validate_isSecondary(self.isSecondary)
7185
+ if not is_valid:
7186
+ raise TypeError(error_str)
7187
+ is_valid, error_str = self.validate_userId(self.userId)
7188
+ if not is_valid:
7189
+ raise TypeError(error_str)
7190
+ is_valid, error_str = self.validate_taskId(self.taskId)
7191
+ if not is_valid:
7192
+ raise TypeError(error_str)
7193
+ is_valid, error_str = self.validate_bots(self.bots)
7194
+ if not is_valid:
7195
+ raise TypeError(error_str)
7196
+ is_valid, error_str = self.validate_offset(self.offset)
7197
+ if not is_valid:
7198
+ raise TypeError(error_str)
7199
+
7200
+ def parse_recorder_config(data: object):
7201
+ return RecorderConfig(
7202
+ isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
7203
+ userId=parse_str(data["userId"]) if "userId" in data and data.get("userId") is not None else None,
7204
+ taskId=parse_str(data["taskId"]) if "taskId" in data and data.get("taskId") is not None else None,
7205
+ bots=parse_recorder_bot_details_list(data["bots"]) if "bots" in data and data.get("bots") is not None else None,
7206
+ offset=parse_offset_config(data["offset"]) if "offset" in data and data.get("offset") is not None else None,
7207
+ )
7208
+
7209
+ def serialize_recorder_config(data: RecorderConfig) -> object:
7210
+ return {
7211
+ "isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
7212
+ "userId": None if data.userId is None else serialize_str(data.userId),
7213
+ "taskId": None if data.taskId is None else serialize_str(data.taskId),
7214
+ "bots": None if data.bots is None else serialize_recorder_bot_details_list(data.bots),
7215
+ "offset": None if data.offset is None else serialize_offset_config(data.offset),
7216
+ }
7217
+
7218
+ @dataclass
7219
+ class TeleopConfig:
7220
+ """Config of the teleop"""
7221
+ isSecondary: Union[bool, None] = None
7222
+ bots: Union[BotTeleopDetailsList, None] = None
7223
+
7224
+ def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
7225
+ if value is None:
7226
+ return [True, ""]
7227
+
7228
+ if not isinstance(value, bool):
7229
+ return [False, "isSecondary must be of type bool for TeleopConfig, got " + type(value).__name__]
7230
+
7231
+ return [True, ""]
7232
+
7233
+ def validate_bots(self, value: BotTeleopDetailsList) -> Tuple[bool, str]:
7234
+ if value is None:
7235
+ return [True, ""]
7236
+
7237
+ if not (isinstance(value, list) and all(isinstance(x, BotTeleopDetails) for x in value)):
7238
+ return [False, "bots must be of type BotTeleopDetailsList for TeleopConfig, got " + type(value).__name__]
7239
+
7240
+ return [True, ""]
7241
+
7242
+ def __post_init__(self):
7243
+ # Type check incoming model - raise error if invalid (required or wrong type)
7244
+ is_valid, error_str = self.validate_isSecondary(self.isSecondary)
7245
+ if not is_valid:
7246
+ raise TypeError(error_str)
7247
+ is_valid, error_str = self.validate_bots(self.bots)
7248
+ if not is_valid:
7249
+ raise TypeError(error_str)
7250
+
7251
+ def parse_teleop_config(data: object):
7252
+ return TeleopConfig(
7253
+ isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
7254
+ bots=parse_bot_teleop_details_list(data["bots"]) if "bots" in data and data.get("bots") is not None else None,
7255
+ )
7256
+
7257
+ def serialize_teleop_config(data: TeleopConfig) -> object:
7258
+ return {
7259
+ "isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
7260
+ "bots": None if data.bots is None else serialize_bot_teleop_details_list(data.bots),
7261
+ }
7262
+
7263
+ @dataclass
7264
+ class RoutinesPaginatedResponse:
7265
+ """Paginated response containing routine data"""
7266
+ items: Union[RoutinesList, None] = None
6388
7267
  pagination: Union[Pagination, None] = None
6389
7268
 
6390
7269
  def validate_items(self, value: RoutinesList) -> Tuple[bool, str]:
@@ -6446,7 +7325,7 @@ class ArmPositionUpdateEvent:
6446
7325
  if value is None:
6447
7326
  return [True, ""]
6448
7327
 
6449
- if not ((isinstance(value, str) and ArmPositionUpdateKindEnum in ['success', 'failure', 'canceled', 'position', 'planning']) or isinstance(value, ArmPositionUpdateKindEnum)):
7328
+ if not ((isinstance(value, str) and ArmPositionUpdateKindEnum in ['creating', 'success', 'failure', 'canceled', 'position', 'planning', 'begin_motion', 'requesting_plan', 'waypoint', 'waypoint_reached', 'pause', 'resume', 'complete']) or isinstance(value, ArmPositionUpdateKindEnum)):
6450
7329
  return [False, "kind must be of type ArmPositionUpdateKindEnum for ArmPositionUpdateEvent, got " + type(value).__name__]
6451
7330
 
6452
7331
  return [True, ""]
@@ -6509,6 +7388,156 @@ def serialize_arm_position_update_event(data: ArmPositionUpdateEvent) -> object:
6509
7388
  "position": None if data.position is None else serialize_combined_arm_position(data.position),
6510
7389
  }
6511
7390
 
7391
+ @dataclass
7392
+ class ArmPositionUpdateControlledRequest:
7393
+ """Move the robot in a controlled manner (i.e. with a heartbeat)"""
7394
+ heartbeat_interval: Union[int, None] = None
7395
+ expires_after_ms: Union[int, None] = None
7396
+ kind: Union[ArmPositionUpdateRequestKindEnum, None] = None
7397
+ tooltip_positions: Union[PositionAndOrientationList, None] = None
7398
+ tooltip_position: Union[PositionAndOrientation, None] = None
7399
+ joint_rotations: Union[ArmJointRotationsList, None] = None
7400
+ joint_rotation: Union[ArmJointRotations, None] = None
7401
+ movement_kind: Union[MovementKindEnum, None] = None
7402
+ speed_profile: Union[SpeedProfile, None] = None
7403
+
7404
+ def validate_heartbeat_interval(self, value: int) -> Tuple[bool, str]:
7405
+ if value is None:
7406
+ return [True, ""]
7407
+
7408
+ if not isinstance(value, int):
7409
+ return [False, "heartbeat_interval must be of type int for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7410
+
7411
+ return [True, ""]
7412
+
7413
+ def validate_expires_after_ms(self, value: int) -> Tuple[bool, str]:
7414
+ if value is None:
7415
+ return [True, ""]
7416
+
7417
+ if not isinstance(value, int):
7418
+ return [False, "expires_after_ms must be of type int for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7419
+
7420
+ return [True, ""]
7421
+
7422
+ def validate_kind(self, value: ArmPositionUpdateRequestKindEnum) -> Tuple[bool, str]:
7423
+ if value is None:
7424
+ return [False, "kind is required for ArmPositionUpdateControlledRequest"]
7425
+
7426
+ if not ((isinstance(value, str) and ArmPositionUpdateRequestKindEnum in ['tooltip_positions', 'tooltip_position', 'joint_rotations', 'joint_rotation']) or isinstance(value, ArmPositionUpdateRequestKindEnum)):
7427
+ return [False, "kind must be of type ArmPositionUpdateRequestKindEnum for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7428
+
7429
+ return [True, ""]
7430
+
7431
+ def validate_tooltip_positions(self, value: PositionAndOrientationList) -> Tuple[bool, str]:
7432
+ if value is None:
7433
+ return [True, ""]
7434
+
7435
+ if not (isinstance(value, list) and all(isinstance(x, PositionAndOrientation) for x in value)):
7436
+ return [False, "tooltip_positions must be of type PositionAndOrientationList for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7437
+
7438
+ return [True, ""]
7439
+
7440
+ def validate_tooltip_position(self, value: PositionAndOrientation) -> Tuple[bool, str]:
7441
+ if value is None:
7442
+ return [True, ""]
7443
+
7444
+ if not isinstance(value, PositionAndOrientation):
7445
+ return [False, "tooltip_position must be of type PositionAndOrientation for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7446
+
7447
+ return [True, ""]
7448
+
7449
+ def validate_joint_rotations(self, value: ArmJointRotationsList) -> Tuple[bool, str]:
7450
+ if value is None:
7451
+ return [True, ""]
7452
+
7453
+ if not (isinstance(value, list) and all(isinstance(x, ArmJointRotations) for x in value)):
7454
+ return [False, "joint_rotations must be of type ArmJointRotationsList for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7455
+
7456
+ return [True, ""]
7457
+
7458
+ def validate_joint_rotation(self, value: ArmJointRotations) -> Tuple[bool, str]:
7459
+ if value is None:
7460
+ return [True, ""]
7461
+
7462
+ if not isinstance(value, ArmJointRotations):
7463
+ return [False, "joint_rotation must be of type ArmJointRotations for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7464
+
7465
+ return [True, ""]
7466
+
7467
+ def validate_movement_kind(self, value: MovementKindEnum) -> Tuple[bool, str]:
7468
+ if value is None:
7469
+ return [True, ""]
7470
+
7471
+ if not ((isinstance(value, str) and MovementKindEnum in ['joint', 'line']) or isinstance(value, MovementKindEnum)):
7472
+ return [False, "movement_kind must be of type MovementKindEnum for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7473
+
7474
+ return [True, ""]
7475
+
7476
+ def validate_speed_profile(self, value: SpeedProfile) -> Tuple[bool, str]:
7477
+ if value is None:
7478
+ return [True, ""]
7479
+
7480
+ if not isinstance(value, SpeedProfile):
7481
+ return [False, "speed_profile must be of type SpeedProfile for ArmPositionUpdateControlledRequest, got " + type(value).__name__]
7482
+
7483
+ return [True, ""]
7484
+
7485
+ def __post_init__(self):
7486
+ # Type check incoming model - raise error if invalid (required or wrong type)
7487
+ is_valid, error_str = self.validate_heartbeat_interval(self.heartbeat_interval)
7488
+ if not is_valid:
7489
+ raise TypeError(error_str)
7490
+ is_valid, error_str = self.validate_expires_after_ms(self.expires_after_ms)
7491
+ if not is_valid:
7492
+ raise TypeError(error_str)
7493
+ is_valid, error_str = self.validate_kind(self.kind)
7494
+ if not is_valid:
7495
+ raise TypeError(error_str)
7496
+ is_valid, error_str = self.validate_tooltip_positions(self.tooltip_positions)
7497
+ if not is_valid:
7498
+ raise TypeError(error_str)
7499
+ is_valid, error_str = self.validate_tooltip_position(self.tooltip_position)
7500
+ if not is_valid:
7501
+ raise TypeError(error_str)
7502
+ is_valid, error_str = self.validate_joint_rotations(self.joint_rotations)
7503
+ if not is_valid:
7504
+ raise TypeError(error_str)
7505
+ is_valid, error_str = self.validate_joint_rotation(self.joint_rotation)
7506
+ if not is_valid:
7507
+ raise TypeError(error_str)
7508
+ is_valid, error_str = self.validate_movement_kind(self.movement_kind)
7509
+ if not is_valid:
7510
+ raise TypeError(error_str)
7511
+ is_valid, error_str = self.validate_speed_profile(self.speed_profile)
7512
+ if not is_valid:
7513
+ raise TypeError(error_str)
7514
+
7515
+ def parse_arm_position_update_controlled_request(data: object):
7516
+ return ArmPositionUpdateControlledRequest(
7517
+ heartbeat_interval=parse_i_64(data["heartbeat_interval"]) if "heartbeat_interval" in data and data.get("heartbeat_interval") is not None else None,
7518
+ expires_after_ms=parse_i_64(data["expires_after_ms"]) if "expires_after_ms" in data and data.get("expires_after_ms") is not None else None,
7519
+ kind=parse_arm_position_update_request_kind_enum(data["kind"]) if "kind" in data and data.get("kind") is not None else None,
7520
+ tooltip_positions=parse_position_and_orientation_list(data["tooltip_positions"]) if "tooltip_positions" in data and data.get("tooltip_positions") is not None else None,
7521
+ tooltip_position=parse_position_and_orientation(data["tooltip_position"]) if "tooltip_position" in data and data.get("tooltip_position") is not None else None,
7522
+ joint_rotations=parse_arm_joint_rotations_list(data["joint_rotations"]) if "joint_rotations" in data and data.get("joint_rotations") is not None else None,
7523
+ joint_rotation=parse_arm_joint_rotations(data["joint_rotation"]) if "joint_rotation" in data and data.get("joint_rotation") is not None else None,
7524
+ movement_kind=parse_movement_kind_enum(data["movement_kind"]) if "movement_kind" in data and data.get("movement_kind") is not None else None,
7525
+ speed_profile=parse_speed_profile(data["speed_profile"]) if "speed_profile" in data and data.get("speed_profile") is not None else None,
7526
+ )
7527
+
7528
+ def serialize_arm_position_update_controlled_request(data: ArmPositionUpdateControlledRequest) -> object:
7529
+ return {
7530
+ "heartbeat_interval": None if data.heartbeat_interval is None else serialize_i_64(data.heartbeat_interval),
7531
+ "expires_after_ms": None if data.expires_after_ms is None else serialize_i_64(data.expires_after_ms),
7532
+ "kind": serialize_arm_position_update_request_kind_enum(data.kind),
7533
+ "tooltip_positions": None if data.tooltip_positions is None else serialize_position_and_orientation_list(data.tooltip_positions),
7534
+ "tooltip_position": None if data.tooltip_position is None else serialize_position_and_orientation(data.tooltip_position),
7535
+ "joint_rotations": None if data.joint_rotations is None else serialize_arm_joint_rotations_list(data.joint_rotations),
7536
+ "joint_rotation": None if data.joint_rotation is None else serialize_arm_joint_rotations(data.joint_rotation),
7537
+ "movement_kind": None if data.movement_kind is None else serialize_movement_kind_enum(data.movement_kind),
7538
+ "speed_profile": None if data.speed_profile is None else serialize_speed_profile(data.speed_profile),
7539
+ }
7540
+
6512
7541
  @dataclass
6513
7542
  class ArmPositionUpdateRequest:
6514
7543
  """Move the robot"""
@@ -6519,7 +7548,6 @@ class ArmPositionUpdateRequest:
6519
7548
  joint_rotation: Union[ArmJointRotations, None] = None
6520
7549
  movement_kind: Union[MovementKindEnum, None] = None
6521
7550
  speed_profile: Union[SpeedProfile, None] = None
6522
- response: Union[ArmPositionUpdateRequestResponseFormat, None] = None
6523
7551
 
6524
7552
  def validate_kind(self, value: ArmPositionUpdateRequestKindEnum) -> Tuple[bool, str]:
6525
7553
  if value is None:
@@ -6584,15 +7612,6 @@ class ArmPositionUpdateRequest:
6584
7612
 
6585
7613
  return [True, ""]
6586
7614
 
6587
- def validate_response(self, value: ArmPositionUpdateRequestResponseFormat) -> Tuple[bool, str]:
6588
- if value is None:
6589
- return [True, ""]
6590
-
6591
- if not isinstance(value, ArmPositionUpdateRequestResponseFormat):
6592
- return [False, "response must be of type ArmPositionUpdateRequestResponseFormat for ArmPositionUpdateRequest, got " + type(value).__name__]
6593
-
6594
- return [True, ""]
6595
-
6596
7615
  def __post_init__(self):
6597
7616
  # Type check incoming model - raise error if invalid (required or wrong type)
6598
7617
  is_valid, error_str = self.validate_kind(self.kind)
@@ -6616,9 +7635,6 @@ class ArmPositionUpdateRequest:
6616
7635
  is_valid, error_str = self.validate_speed_profile(self.speed_profile)
6617
7636
  if not is_valid:
6618
7637
  raise TypeError(error_str)
6619
- is_valid, error_str = self.validate_response(self.response)
6620
- if not is_valid:
6621
- raise TypeError(error_str)
6622
7638
 
6623
7639
  def parse_arm_position_update_request(data: object):
6624
7640
  return ArmPositionUpdateRequest(
@@ -6629,7 +7645,6 @@ def parse_arm_position_update_request(data: object):
6629
7645
  joint_rotation=parse_arm_joint_rotations(data["joint_rotation"]) if "joint_rotation" in data and data.get("joint_rotation") is not None else None,
6630
7646
  movement_kind=parse_movement_kind_enum(data["movement_kind"]) if "movement_kind" in data and data.get("movement_kind") is not None else None,
6631
7647
  speed_profile=parse_speed_profile(data["speed_profile"]) if "speed_profile" in data and data.get("speed_profile") is not None else None,
6632
- response=parse_arm_position_update_request_response_format(data["response"]) if "response" in data and data.get("response") is not None else None,
6633
7648
  )
6634
7649
 
6635
7650
  def serialize_arm_position_update_request(data: ArmPositionUpdateRequest) -> object:
@@ -6641,7 +7656,141 @@ def serialize_arm_position_update_request(data: ArmPositionUpdateRequest) -> obj
6641
7656
  "joint_rotation": None if data.joint_rotation is None else serialize_arm_joint_rotations(data.joint_rotation),
6642
7657
  "movement_kind": None if data.movement_kind is None else serialize_movement_kind_enum(data.movement_kind),
6643
7658
  "speed_profile": None if data.speed_profile is None else serialize_speed_profile(data.speed_profile),
6644
- "response": None if data.response is None else serialize_arm_position_update_request_response_format(data.response),
7659
+ }
7660
+
7661
+ @dataclass
7662
+ class RecorderState:
7663
+ """State of the recorder"""
7664
+ config: Union[RecorderConfig, None] = None
7665
+ startTime: Union[str, None] = None
7666
+ recordingTime: Union[int, None] = None
7667
+ status: Union[RecorderStatus, None] = None
7668
+
7669
+ def validate_config(self, value: RecorderConfig) -> Tuple[bool, str]:
7670
+ if value is None:
7671
+ return [True, ""]
7672
+
7673
+ if not isinstance(value, RecorderConfig):
7674
+ return [False, "config must be of type RecorderConfig for RecorderState, got " + type(value).__name__]
7675
+
7676
+ return [True, ""]
7677
+
7678
+ def validate_startTime(self, value: str) -> Tuple[bool, str]:
7679
+ if value is None:
7680
+ return [True, ""]
7681
+
7682
+ if not isinstance(value, str):
7683
+ return [False, "startTime must be of type str for RecorderState, got " + type(value).__name__]
7684
+
7685
+ return [True, ""]
7686
+
7687
+ def validate_recordingTime(self, value: int) -> Tuple[bool, str]:
7688
+ if value is None:
7689
+ return [True, ""]
7690
+
7691
+ if not isinstance(value, int):
7692
+ return [False, "recordingTime must be of type int for RecorderState, got " + type(value).__name__]
7693
+
7694
+ return [True, ""]
7695
+
7696
+ def validate_status(self, value: RecorderStatus) -> Tuple[bool, str]:
7697
+ if value is None:
7698
+ return [True, ""]
7699
+
7700
+ if not ((isinstance(value, str) and RecorderStatus in ['not_recording', 'recording', 'error', 'complete']) or isinstance(value, RecorderStatus)):
7701
+ return [False, "status must be of type RecorderStatus for RecorderState, got " + type(value).__name__]
7702
+
7703
+ return [True, ""]
7704
+
7705
+ def __post_init__(self):
7706
+ # Type check incoming model - raise error if invalid (required or wrong type)
7707
+ is_valid, error_str = self.validate_config(self.config)
7708
+ if not is_valid:
7709
+ raise TypeError(error_str)
7710
+ is_valid, error_str = self.validate_startTime(self.startTime)
7711
+ if not is_valid:
7712
+ raise TypeError(error_str)
7713
+ is_valid, error_str = self.validate_recordingTime(self.recordingTime)
7714
+ if not is_valid:
7715
+ raise TypeError(error_str)
7716
+ is_valid, error_str = self.validate_status(self.status)
7717
+ if not is_valid:
7718
+ raise TypeError(error_str)
7719
+
7720
+ def parse_recorder_state(data: object):
7721
+ return RecorderState(
7722
+ config=parse_recorder_config(data["config"]) if "config" in data and data.get("config") is not None else None,
7723
+ startTime=parse_str(data["startTime"]) if "startTime" in data and data.get("startTime") is not None else None,
7724
+ recordingTime=parse_u_64(data["recordingTime"]) if "recordingTime" in data and data.get("recordingTime") is not None else None,
7725
+ status=parse_recorder_status(data["status"]) if "status" in data and data.get("status") is not None else None,
7726
+ )
7727
+
7728
+ def serialize_recorder_state(data: RecorderState) -> object:
7729
+ return {
7730
+ "config": None if data.config is None else serialize_recorder_config(data.config),
7731
+ "startTime": None if data.startTime is None else serialize_str(data.startTime),
7732
+ "recordingTime": None if data.recordingTime is None else serialize_u_64(data.recordingTime),
7733
+ "status": None if data.status is None else serialize_recorder_status(data.status),
7734
+ }
7735
+
7736
+ @dataclass
7737
+ class TeleopState:
7738
+ """State of the teleop"""
7739
+ config: Union[TeleopConfig, None] = None
7740
+ status: Union[TeleopStatus, None] = None
7741
+ botsInSync: Union[bool, None] = None
7742
+
7743
+ def validate_config(self, value: TeleopConfig) -> Tuple[bool, str]:
7744
+ if value is None:
7745
+ return [True, ""]
7746
+
7747
+ if not isinstance(value, TeleopConfig):
7748
+ return [False, "config must be of type TeleopConfig for TeleopState, got " + type(value).__name__]
7749
+
7750
+ return [True, ""]
7751
+
7752
+ def validate_status(self, value: TeleopStatus) -> Tuple[bool, str]:
7753
+ if value is None:
7754
+ return [True, ""]
7755
+
7756
+ if not ((isinstance(value, str) and TeleopStatus in ['wait_for_teleop', 'teleop', 'stopping', 'stopped', 'error']) or isinstance(value, TeleopStatus)):
7757
+ return [False, "status must be of type TeleopStatus for TeleopState, got " + type(value).__name__]
7758
+
7759
+ return [True, ""]
7760
+
7761
+ def validate_botsInSync(self, value: bool) -> Tuple[bool, str]:
7762
+ if value is None:
7763
+ return [True, ""]
7764
+
7765
+ if not isinstance(value, bool):
7766
+ return [False, "botsInSync must be of type bool for TeleopState, got " + type(value).__name__]
7767
+
7768
+ return [True, ""]
7769
+
7770
+ def __post_init__(self):
7771
+ # Type check incoming model - raise error if invalid (required or wrong type)
7772
+ is_valid, error_str = self.validate_config(self.config)
7773
+ if not is_valid:
7774
+ raise TypeError(error_str)
7775
+ is_valid, error_str = self.validate_status(self.status)
7776
+ if not is_valid:
7777
+ raise TypeError(error_str)
7778
+ is_valid, error_str = self.validate_botsInSync(self.botsInSync)
7779
+ if not is_valid:
7780
+ raise TypeError(error_str)
7781
+
7782
+ def parse_teleop_state(data: object):
7783
+ return TeleopState(
7784
+ config=parse_teleop_config(data["config"]) if "config" in data and data.get("config") is not None else None,
7785
+ status=parse_teleop_status(data["status"]) if "status" in data and data.get("status") is not None else None,
7786
+ botsInSync=parse_bool(data["botsInSync"]) if "botsInSync" in data and data.get("botsInSync") is not None else None,
7787
+ )
7788
+
7789
+ def serialize_teleop_state(data: TeleopState) -> object:
7790
+ return {
7791
+ "config": None if data.config is None else serialize_teleop_config(data.config),
7792
+ "status": None if data.status is None else serialize_teleop_status(data.status),
7793
+ "botsInSync": None if data.botsInSync is None else serialize_bool(data.botsInSync),
6645
7794
  }
6646
7795
 
6647
7796
  @dataclass
@@ -6682,3 +7831,348 @@ def parse_arm_position_update_event_stream(data: object) -> ArmPositionUpdateEve
6682
7831
  def serialize_arm_position_update_event_stream(data: ArmPositionUpdateEventStream) -> List[object]:
6683
7832
  return [serialize_arm_position_update_event(item) for item in data]
6684
7833
 
7834
+ @dataclass
7835
+ class SetArmPositionControlledResponse:
7836
+ """Response from the controlled robot movement API"""
7837
+ id: Union[str, None] = None
7838
+ is_active: Union[bool, None] = None
7839
+ expires_at: Union[int, None] = None
7840
+ heartbeat_interval: Union[int, None] = None
7841
+ event: Union[ArmPositionUpdateEvent, None] = None
7842
+
7843
+ def validate_id(self, value: str) -> Tuple[bool, str]:
7844
+ if value is None:
7845
+ return [False, "id is required for SetArmPositionControlledResponse"]
7846
+
7847
+ if not isinstance(value, str):
7848
+ return [False, "id must be of type str for SetArmPositionControlledResponse, got " + type(value).__name__]
7849
+
7850
+ return [True, ""]
7851
+
7852
+ def validate_is_active(self, value: bool) -> Tuple[bool, str]:
7853
+ if value is None:
7854
+ return [False, "is_active is required for SetArmPositionControlledResponse"]
7855
+
7856
+ if not isinstance(value, bool):
7857
+ return [False, "is_active must be of type bool for SetArmPositionControlledResponse, got " + type(value).__name__]
7858
+
7859
+ return [True, ""]
7860
+
7861
+ def validate_expires_at(self, value: int) -> Tuple[bool, str]:
7862
+ if value is None:
7863
+ return [True, ""]
7864
+
7865
+ if not isinstance(value, int):
7866
+ return [False, "expires_at must be of type int for SetArmPositionControlledResponse, got " + type(value).__name__]
7867
+
7868
+ return [True, ""]
7869
+
7870
+ def validate_heartbeat_interval(self, value: int) -> Tuple[bool, str]:
7871
+ if value is None:
7872
+ return [False, "heartbeat_interval is required for SetArmPositionControlledResponse"]
7873
+
7874
+ if not isinstance(value, int):
7875
+ return [False, "heartbeat_interval must be of type int for SetArmPositionControlledResponse, got " + type(value).__name__]
7876
+
7877
+ return [True, ""]
7878
+
7879
+ def validate_event(self, value: ArmPositionUpdateEvent) -> Tuple[bool, str]:
7880
+ if value is None:
7881
+ return [False, "event is required for SetArmPositionControlledResponse"]
7882
+
7883
+ if not isinstance(value, ArmPositionUpdateEvent):
7884
+ return [False, "event must be of type ArmPositionUpdateEvent for SetArmPositionControlledResponse, got " + type(value).__name__]
7885
+
7886
+ return [True, ""]
7887
+
7888
+ def __post_init__(self):
7889
+ # Type check incoming model - raise error if invalid (required or wrong type)
7890
+ is_valid, error_str = self.validate_id(self.id)
7891
+ if not is_valid:
7892
+ raise TypeError(error_str)
7893
+ is_valid, error_str = self.validate_is_active(self.is_active)
7894
+ if not is_valid:
7895
+ raise TypeError(error_str)
7896
+ is_valid, error_str = self.validate_expires_at(self.expires_at)
7897
+ if not is_valid:
7898
+ raise TypeError(error_str)
7899
+ is_valid, error_str = self.validate_heartbeat_interval(self.heartbeat_interval)
7900
+ if not is_valid:
7901
+ raise TypeError(error_str)
7902
+ is_valid, error_str = self.validate_event(self.event)
7903
+ if not is_valid:
7904
+ raise TypeError(error_str)
7905
+
7906
+ def parse_set_arm_position_controlled_response(data: object):
7907
+ return SetArmPositionControlledResponse(
7908
+ id=parse_str(data["id"]) if "id" in data and data.get("id") is not None else None,
7909
+ is_active=parse_bool(data["is_active"]) if "is_active" in data and data.get("is_active") is not None else None,
7910
+ expires_at=parse_i_64(data["expires_at"]) if "expires_at" in data and data.get("expires_at") is not None else None,
7911
+ heartbeat_interval=parse_i_64(data["heartbeat_interval"]) if "heartbeat_interval" in data and data.get("heartbeat_interval") is not None else None,
7912
+ event=parse_arm_position_update_event(data["event"]) if "event" in data and data.get("event") is not None else None,
7913
+ )
7914
+
7915
+ def serialize_set_arm_position_controlled_response(data: SetArmPositionControlledResponse) -> object:
7916
+ return {
7917
+ "id": serialize_str(data.id),
7918
+ "is_active": serialize_bool(data.is_active),
7919
+ "expires_at": None if data.expires_at is None else serialize_i_64(data.expires_at),
7920
+ "heartbeat_interval": serialize_i_64(data.heartbeat_interval),
7921
+ "event": serialize_arm_position_update_event(data.event),
7922
+ }
7923
+
7924
+ @dataclass
7925
+ class StartRecordingResponse:
7926
+ """Response to start recording movement and camera data"""
7927
+ success: Union[bool, None] = None
7928
+ state: Union[RecorderState, None] = None
7929
+
7930
+ def validate_success(self, value: bool) -> Tuple[bool, str]:
7931
+ if value is None:
7932
+ return [True, ""]
7933
+
7934
+ if not isinstance(value, bool):
7935
+ return [False, "success must be of type bool for StartRecordingResponse, got " + type(value).__name__]
7936
+
7937
+ return [True, ""]
7938
+
7939
+ def validate_state(self, value: RecorderState) -> Tuple[bool, str]:
7940
+ if value is None:
7941
+ return [True, ""]
7942
+
7943
+ if not isinstance(value, RecorderState):
7944
+ return [False, "state must be of type RecorderState for StartRecordingResponse, got " + type(value).__name__]
7945
+
7946
+ return [True, ""]
7947
+
7948
+ def __post_init__(self):
7949
+ # Type check incoming model - raise error if invalid (required or wrong type)
7950
+ is_valid, error_str = self.validate_success(self.success)
7951
+ if not is_valid:
7952
+ raise TypeError(error_str)
7953
+ is_valid, error_str = self.validate_state(self.state)
7954
+ if not is_valid:
7955
+ raise TypeError(error_str)
7956
+
7957
+ def parse_start_recording_response(data: object):
7958
+ return StartRecordingResponse(
7959
+ success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
7960
+ state=parse_recorder_state(data["state"]) if "state" in data and data.get("state") is not None else None,
7961
+ )
7962
+
7963
+ def serialize_start_recording_response(data: StartRecordingResponse) -> object:
7964
+ return {
7965
+ "success": None if data.success is None else serialize_bool(data.success),
7966
+ "state": None if data.state is None else serialize_recorder_state(data.state),
7967
+ }
7968
+
7969
+ @dataclass
7970
+ class StopRecordingResponse:
7971
+ """Response to stop recording movement and camera data"""
7972
+ state: Union[RecorderState, None] = None
7973
+ startTimestamp: Union[str, None] = None
7974
+ endTimestamp: Union[str, None] = None
7975
+
7976
+ def validate_state(self, value: RecorderState) -> Tuple[bool, str]:
7977
+ if value is None:
7978
+ return [True, ""]
7979
+
7980
+ if not isinstance(value, RecorderState):
7981
+ return [False, "state must be of type RecorderState for StopRecordingResponse, got " + type(value).__name__]
7982
+
7983
+ return [True, ""]
7984
+
7985
+ def validate_startTimestamp(self, value: str) -> Tuple[bool, str]:
7986
+ if value is None:
7987
+ return [True, ""]
7988
+
7989
+ if not isinstance(value, str):
7990
+ return [False, "startTimestamp must be of type str for StopRecordingResponse, got " + type(value).__name__]
7991
+
7992
+ return [True, ""]
7993
+
7994
+ def validate_endTimestamp(self, value: str) -> Tuple[bool, str]:
7995
+ if value is None:
7996
+ return [True, ""]
7997
+
7998
+ if not isinstance(value, str):
7999
+ return [False, "endTimestamp must be of type str for StopRecordingResponse, got " + type(value).__name__]
8000
+
8001
+ return [True, ""]
8002
+
8003
+ def __post_init__(self):
8004
+ # Type check incoming model - raise error if invalid (required or wrong type)
8005
+ is_valid, error_str = self.validate_state(self.state)
8006
+ if not is_valid:
8007
+ raise TypeError(error_str)
8008
+ is_valid, error_str = self.validate_startTimestamp(self.startTimestamp)
8009
+ if not is_valid:
8010
+ raise TypeError(error_str)
8011
+ is_valid, error_str = self.validate_endTimestamp(self.endTimestamp)
8012
+ if not is_valid:
8013
+ raise TypeError(error_str)
8014
+
8015
+ def parse_stop_recording_response(data: object):
8016
+ return StopRecordingResponse(
8017
+ state=parse_recorder_state(data["state"]) if "state" in data and data.get("state") is not None else None,
8018
+ startTimestamp=parse_str(data["startTimestamp"]) if "startTimestamp" in data and data.get("startTimestamp") is not None else None,
8019
+ endTimestamp=parse_str(data["endTimestamp"]) if "endTimestamp" in data and data.get("endTimestamp") is not None else None,
8020
+ )
8021
+
8022
+ def serialize_stop_recording_response(data: StopRecordingResponse) -> object:
8023
+ return {
8024
+ "state": None if data.state is None else serialize_recorder_state(data.state),
8025
+ "startTimestamp": None if data.startTimestamp is None else serialize_str(data.startTimestamp),
8026
+ "endTimestamp": None if data.endTimestamp is None else serialize_str(data.endTimestamp),
8027
+ }
8028
+
8029
+ @dataclass
8030
+ class UpdateRecordingResponse:
8031
+ """Response to update recording configuration"""
8032
+ success: Union[bool, None] = None
8033
+ state: Union[RecorderState, None] = None
8034
+ errors: Union[StringArray, None] = None
8035
+
8036
+ def validate_success(self, value: bool) -> Tuple[bool, str]:
8037
+ if value is None:
8038
+ return [True, ""]
8039
+
8040
+ if not isinstance(value, bool):
8041
+ return [False, "success must be of type bool for UpdateRecordingResponse, got " + type(value).__name__]
8042
+
8043
+ return [True, ""]
8044
+
8045
+ def validate_state(self, value: RecorderState) -> Tuple[bool, str]:
8046
+ if value is None:
8047
+ return [True, ""]
8048
+
8049
+ if not isinstance(value, RecorderState):
8050
+ return [False, "state must be of type RecorderState for UpdateRecordingResponse, got " + type(value).__name__]
8051
+
8052
+ return [True, ""]
8053
+
8054
+ def validate_errors(self, value: StringArray) -> Tuple[bool, str]:
8055
+ if value is None:
8056
+ return [True, ""]
8057
+
8058
+ if not (isinstance(value, list) and all(isinstance(x, str) for x in value)):
8059
+ return [False, "errors must be of type StringArray for UpdateRecordingResponse, got " + type(value).__name__]
8060
+
8061
+ return [True, ""]
8062
+
8063
+ def __post_init__(self):
8064
+ # Type check incoming model - raise error if invalid (required or wrong type)
8065
+ is_valid, error_str = self.validate_success(self.success)
8066
+ if not is_valid:
8067
+ raise TypeError(error_str)
8068
+ is_valid, error_str = self.validate_state(self.state)
8069
+ if not is_valid:
8070
+ raise TypeError(error_str)
8071
+ is_valid, error_str = self.validate_errors(self.errors)
8072
+ if not is_valid:
8073
+ raise TypeError(error_str)
8074
+
8075
+ def parse_update_recording_response(data: object):
8076
+ return UpdateRecordingResponse(
8077
+ success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
8078
+ state=parse_recorder_state(data["state"]) if "state" in data and data.get("state") is not None else None,
8079
+ errors=parse_string_array(data["errors"]) if "errors" in data and data.get("errors") is not None else None,
8080
+ )
8081
+
8082
+ def serialize_update_recording_response(data: UpdateRecordingResponse) -> object:
8083
+ return {
8084
+ "success": None if data.success is None else serialize_bool(data.success),
8085
+ "state": None if data.state is None else serialize_recorder_state(data.state),
8086
+ "errors": None if data.errors is None else serialize_string_array(data.errors),
8087
+ }
8088
+
8089
+ @dataclass
8090
+ class StartTeleopResponse:
8091
+ """Response to start teleoperation"""
8092
+ success: Union[bool, None] = None
8093
+ state: Union[TeleopState, None] = None
8094
+
8095
+ def validate_success(self, value: bool) -> Tuple[bool, str]:
8096
+ if value is None:
8097
+ return [True, ""]
8098
+
8099
+ if not isinstance(value, bool):
8100
+ return [False, "success must be of type bool for StartTeleopResponse, got " + type(value).__name__]
8101
+
8102
+ return [True, ""]
8103
+
8104
+ def validate_state(self, value: TeleopState) -> Tuple[bool, str]:
8105
+ if value is None:
8106
+ return [True, ""]
8107
+
8108
+ if not isinstance(value, TeleopState):
8109
+ return [False, "state must be of type TeleopState for StartTeleopResponse, got " + type(value).__name__]
8110
+
8111
+ return [True, ""]
8112
+
8113
+ def __post_init__(self):
8114
+ # Type check incoming model - raise error if invalid (required or wrong type)
8115
+ is_valid, error_str = self.validate_success(self.success)
8116
+ if not is_valid:
8117
+ raise TypeError(error_str)
8118
+ is_valid, error_str = self.validate_state(self.state)
8119
+ if not is_valid:
8120
+ raise TypeError(error_str)
8121
+
8122
+ def parse_start_teleop_response(data: object):
8123
+ return StartTeleopResponse(
8124
+ success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
8125
+ state=parse_teleop_state(data["state"]) if "state" in data and data.get("state") is not None else None,
8126
+ )
8127
+
8128
+ def serialize_start_teleop_response(data: StartTeleopResponse) -> object:
8129
+ return {
8130
+ "success": None if data.success is None else serialize_bool(data.success),
8131
+ "state": None if data.state is None else serialize_teleop_state(data.state),
8132
+ }
8133
+
8134
+ @dataclass
8135
+ class StopTeleopResponse:
8136
+ """Response to stop teleoperation"""
8137
+ success: Union[bool, None] = None
8138
+ state: Union[TeleopState, None] = None
8139
+
8140
+ def validate_success(self, value: bool) -> Tuple[bool, str]:
8141
+ if value is None:
8142
+ return [True, ""]
8143
+
8144
+ if not isinstance(value, bool):
8145
+ return [False, "success must be of type bool for StopTeleopResponse, got " + type(value).__name__]
8146
+
8147
+ return [True, ""]
8148
+
8149
+ def validate_state(self, value: TeleopState) -> Tuple[bool, str]:
8150
+ if value is None:
8151
+ return [True, ""]
8152
+
8153
+ if not isinstance(value, TeleopState):
8154
+ return [False, "state must be of type TeleopState for StopTeleopResponse, got " + type(value).__name__]
8155
+
8156
+ return [True, ""]
8157
+
8158
+ def __post_init__(self):
8159
+ # Type check incoming model - raise error if invalid (required or wrong type)
8160
+ is_valid, error_str = self.validate_success(self.success)
8161
+ if not is_valid:
8162
+ raise TypeError(error_str)
8163
+ is_valid, error_str = self.validate_state(self.state)
8164
+ if not is_valid:
8165
+ raise TypeError(error_str)
8166
+
8167
+ def parse_stop_teleop_response(data: object):
8168
+ return StopTeleopResponse(
8169
+ success=parse_bool(data["success"]) if "success" in data and data.get("success") is not None else None,
8170
+ state=parse_teleop_state(data["state"]) if "state" in data and data.get("state") is not None else None,
8171
+ )
8172
+
8173
+ def serialize_stop_teleop_response(data: StopTeleopResponse) -> object:
8174
+ return {
8175
+ "success": None if data.success is None else serialize_bool(data.success),
8176
+ "state": None if data.state is None else serialize_teleop_state(data.state),
8177
+ }
8178
+