samsara-api 3.0.0__py3-none-any.whl → 4.0.0__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.
Files changed (1371) hide show
  1. samsara/__init__.py +7438 -2443
  2. samsara/addresses/__init__.py +31 -1
  3. samsara/addresses/client.py +19 -12
  4. samsara/addresses/raw_client.py +13 -16
  5. samsara/addresses/types/__init__.py +32 -2
  6. samsara/addresses/types/create_address_request_address_types_item.py +9 -1
  7. samsara/addresses/types/update_address_request_address_types_item.py +9 -1
  8. samsara/alerts/__init__.py +29 -3
  9. samsara/alerts/client.py +811 -8
  10. samsara/alerts/raw_client.py +1837 -0
  11. samsara/alerts/types/__init__.py +34 -0
  12. samsara/alerts/types/get_configurations_request_status.py +5 -0
  13. samsara/assets/__init__.py +40 -9
  14. samsara/assets/client.py +710 -23
  15. samsara/assets/raw_client.py +673 -6
  16. samsara/assets/types/__init__.py +38 -5
  17. samsara/attributes/__init__.py +50 -16
  18. samsara/attributes/client.py +82 -96
  19. samsara/attributes/raw_client.py +57 -104
  20. samsara/attributes/types/__init__.py +48 -14
  21. samsara/attributes/types/create_attribute_request_attribute_type.py +3 -1
  22. samsara/attributes/types/create_attribute_request_unit.py +42 -0
  23. samsara/attributes/types/delete_attribute_request_entity_type.py +5 -0
  24. samsara/attributes/types/get_attribute_request_entity_type.py +5 -0
  25. samsara/attributes/types/get_attributes_by_entity_type_request_entity_type.py +5 -0
  26. samsara/attributes/types/update_attribute_request_attribute_type.py +3 -1
  27. samsara/beta_ap_is/__init__.py +70 -0
  28. samsara/beta_ap_is/client.py +7119 -0
  29. samsara/beta_ap_is/raw_client.py +16518 -0
  30. samsara/beta_ap_is/types/__init__.py +70 -0
  31. samsara/beta_ap_is/types/functions_start_function_run_request_body_params_override.py +21 -0
  32. samsara/beta_ap_is/types/get_assets_inputs_request_type.py +27 -0
  33. samsara/beta_ap_is/types/get_driver_efficiency_request_driver_activation_status.py +5 -0
  34. samsara/beta_ap_is/types/get_hos_eld_events_request_driver_activation_status.py +5 -0
  35. samsara/beta_ap_is/types/get_jobs_request_status.py +5 -0
  36. samsara/beta_ap_is/types/get_qualification_records_stream_request_entity_type.py +5 -0
  37. samsara/beta_ap_is/types/get_qualification_types_request_entity_type.py +5 -0
  38. samsara/beta_ap_is/types/get_tag_group_safety_scores_request_score_type.py +5 -0
  39. samsara/beta_ap_is/types/get_tag_safety_scores_request_score_type.py +5 -0
  40. samsara/beta_ap_is/types/get_trips_request_completion_status.py +5 -0
  41. samsara/beta_ap_is/types/get_trips_request_query_by.py +5 -0
  42. samsara/carrier_proposed_assignments/client.py +38 -39
  43. samsara/carrier_proposed_assignments/raw_client.py +23 -61
  44. samsara/client.py +950 -152
  45. samsara/coaching/__init__.py +0 -3
  46. samsara/coaching/client.py +442 -8
  47. samsara/coaching/raw_client.py +1043 -0
  48. samsara/contacts/client.py +48 -51
  49. samsara/contacts/raw_client.py +29 -61
  50. samsara/core/__init__.py +76 -21
  51. samsara/core/client_wrapper.py +20 -10
  52. samsara/core/force_multipart.py +4 -2
  53. samsara/core/http_response.py +1 -1
  54. samsara/core/pagination.py +1 -1
  55. samsara/core/pydantic_utilities.py +7 -4
  56. samsara/documents/__init__.py +29 -3
  57. samsara/documents/client.py +294 -44
  58. samsara/documents/raw_client.py +503 -53
  59. samsara/documents/types/__init__.py +30 -1
  60. samsara/driver_qr_codes/client.py +306 -0
  61. samsara/driver_qr_codes/raw_client.py +928 -0
  62. samsara/driver_vehicle_assignments/__init__.py +32 -2
  63. samsara/driver_vehicle_assignments/client.py +47 -35
  64. samsara/driver_vehicle_assignments/raw_client.py +19 -19
  65. samsara/driver_vehicle_assignments/types/__init__.py +33 -3
  66. samsara/driver_vehicle_assignments/types/get_driver_vehicle_assignments_request_assignment_type.py +10 -0
  67. samsara/driver_vehicle_assignments/types/get_driver_vehicle_assignments_request_filter_by.py +5 -0
  68. samsara/drivers/__init__.py +38 -11
  69. samsara/drivers/client.py +139 -20
  70. samsara/drivers/raw_client.py +111 -6
  71. samsara/drivers/types/__init__.py +36 -4
  72. samsara/equipment/__init__.py +39 -7
  73. samsara/equipment/client.py +1001 -62
  74. samsara/equipment/raw_client.py +1010 -70
  75. samsara/equipment/types/__init__.py +44 -0
  76. samsara/equipment/types/get_equipment_stats_feed_request_types_item.py +19 -0
  77. samsara/equipment/types/get_equipment_stats_history_request_types_item.py +19 -0
  78. samsara/equipment/types/get_equipment_stats_request_types_item.py +19 -0
  79. samsara/errors/__init__.py +46 -9
  80. samsara/fleet/__init__.py +34 -0
  81. samsara/fleet/attributes/client.py +101 -0
  82. samsara/fleet/attributes/raw_client.py +74 -0
  83. samsara/fleet/client.py +63 -0
  84. samsara/fleet/raw_client.py +13 -0
  85. samsara/forms/__init__.py +30 -0
  86. samsara/forms/client.py +815 -2
  87. samsara/forms/raw_client.py +2091 -15
  88. samsara/forms/types/__init__.py +38 -0
  89. samsara/fuel_and_energy/__init__.py +46 -0
  90. samsara/fuel_and_energy/client.py +960 -0
  91. samsara/fuel_and_energy/raw_client.py +1925 -0
  92. samsara/fuel_and_energy/types/__init__.py +48 -0
  93. samsara/fuel_and_energy/types/fuel_purchase_post_fuel_purchase_request_body_fuel_grade.py +7 -0
  94. samsara/fuel_and_energy/types/get_fuel_energy_vehicle_reports_request_energy_type.py +5 -0
  95. samsara/gateways/client.py +29 -35
  96. samsara/gateways/raw_client.py +14 -45
  97. samsara/hours_of_service/__init__.py +34 -0
  98. samsara/hours_of_service/client.py +1002 -0
  99. samsara/hours_of_service/raw_client.py +1381 -0
  100. samsara/hours_of_service/types/__init__.py +36 -0
  101. samsara/hours_of_service/types/get_hos_daily_logs_request_driver_activation_status.py +5 -0
  102. samsara/hubs/client.py +1073 -0
  103. samsara/hubs/raw_client.py +2106 -0
  104. samsara/idling/__init__.py +29 -2
  105. samsara/idling/client.py +36 -30
  106. samsara/idling/raw_client.py +18 -72
  107. samsara/idling/types/__init__.py +29 -2
  108. samsara/idling/types/get_idling_events_request_pto_state.py +5 -0
  109. samsara/ifta/__init__.py +50 -2
  110. samsara/ifta/client.py +634 -3
  111. samsara/ifta/raw_client.py +1432 -0
  112. samsara/ifta/types/__init__.py +53 -0
  113. samsara/ifta/types/get_ifta_jurisdiction_reports_request_fuel_type.py +25 -0
  114. samsara/ifta/types/get_ifta_jurisdiction_reports_request_month.py +21 -0
  115. samsara/ifta/types/get_ifta_jurisdiction_reports_request_quarter.py +5 -0
  116. samsara/ifta/types/get_ifta_vehicle_reports_request_fuel_type.py +25 -0
  117. samsara/ifta/types/get_ifta_vehicle_reports_request_month.py +21 -0
  118. samsara/ifta/types/get_ifta_vehicle_reports_request_quarter.py +5 -0
  119. samsara/industrial/client.py +2167 -0
  120. samsara/industrial/raw_client.py +2463 -0
  121. samsara/issues/__init__.py +28 -1
  122. samsara/issues/client.py +39 -35
  123. samsara/issues/raw_client.py +24 -53
  124. samsara/issues/types/__init__.py +30 -1
  125. samsara/legacy/client.py +21 -95
  126. samsara/legacy/raw_client.py +25 -304
  127. samsara/legacy_ap_is/__init__.py +34 -0
  128. samsara/legacy_ap_is/client.py +879 -0
  129. samsara/legacy_ap_is/raw_client.py +1433 -0
  130. samsara/legacy_ap_is/types/__init__.py +38 -0
  131. samsara/legacy_ap_is/types/get_drivers_vehicle_assignments_request_driver_activation_status.py +7 -0
  132. samsara/live_sharing_links/__init__.py +37 -0
  133. samsara/live_sharing_links/client.py +548 -0
  134. samsara/live_sharing_links/raw_client.py +1389 -0
  135. samsara/live_sharing_links/types/__init__.py +40 -0
  136. samsara/live_sharing_links/types/get_live_sharing_links_request_type.py +7 -0
  137. samsara/location_and_speed/client.py +236 -0
  138. samsara/location_and_speed/raw_client.py +414 -0
  139. samsara/maintenance/__init__.py +30 -20
  140. samsara/maintenance/client.py +1198 -8
  141. samsara/maintenance/raw_client.py +2249 -0
  142. samsara/maintenance/types/__init__.py +34 -0
  143. samsara/media/__init__.py +52 -0
  144. samsara/media/client.py +500 -0
  145. samsara/media/raw_client.py +1082 -0
  146. samsara/media/types/__init__.py +54 -0
  147. samsara/media/types/list_uploaded_media_request_inputs_item.py +7 -0
  148. samsara/media/types/list_uploaded_media_request_media_types_item.py +5 -0
  149. samsara/media/types/list_uploaded_media_request_trigger_reasons_item.py +17 -0
  150. samsara/media/types/media_retrieval_post_media_retrieval_request_body_inputs_item.py +7 -0
  151. samsara/messages/client.py +272 -0
  152. samsara/messages/raw_client.py +273 -0
  153. samsara/organization_info/client.py +112 -0
  154. samsara/organization_info/raw_client.py +101 -0
  155. samsara/plans/client.py +312 -0
  156. samsara/plans/raw_client.py +700 -0
  157. samsara/preview_ap_is/client.py +367 -0
  158. samsara/preview_ap_is/raw_client.py +956 -0
  159. samsara/routes/__init__.py +0 -3
  160. samsara/routes/client.py +459 -50
  161. samsara/routes/raw_client.py +913 -140
  162. samsara/safety/client.py +662 -0
  163. samsara/safety/raw_client.py +869 -0
  164. samsara/sensors/__init__.py +34 -0
  165. samsara/sensors/client.py +680 -0
  166. samsara/sensors/raw_client.py +746 -0
  167. samsara/sensors/types/__init__.py +34 -0
  168. samsara/sensors/types/inline_object_6_fill_missing.py +5 -0
  169. samsara/settings/__init__.py +0 -3
  170. samsara/settings/client.py +579 -13
  171. samsara/settings/raw_client.py +1655 -0
  172. samsara/speeding_intervals/__init__.py +29 -2
  173. samsara/speeding_intervals/client.py +20 -28
  174. samsara/speeding_intervals/raw_client.py +16 -58
  175. samsara/speeding_intervals/types/__init__.py +31 -2
  176. samsara/speeding_intervals/types/get_speeding_intervals_request_query_by.py +5 -0
  177. samsara/tachograph_eu_only/client.py +494 -0
  178. samsara/tachograph_eu_only/raw_client.py +475 -0
  179. samsara/tags/client.py +53 -58
  180. samsara/tags/raw_client.py +29 -63
  181. samsara/trailer_assignments/client.py +331 -0
  182. samsara/trailer_assignments/raw_client.py +313 -0
  183. samsara/trailers/client.py +47 -47
  184. samsara/trailers/raw_client.py +18 -53
  185. samsara/trips/__init__.py +0 -3
  186. samsara/trips/client.py +55 -111
  187. samsara/trips/raw_client.py +58 -349
  188. samsara/types/__init__.py +10049 -4134
  189. samsara/types/address.py +5 -5
  190. samsara/types/address_address_types_item.py +9 -1
  191. samsara/types/address_external_ids.py +21 -0
  192. samsara/types/aemp_equipment_get_aemp_equipment_list_bad_gateway_error_response_body.py +33 -0
  193. samsara/types/aemp_equipment_get_aemp_equipment_list_gateway_timeout_error_response_body.py +33 -0
  194. samsara/types/aemp_equipment_get_aemp_equipment_list_internal_server_error_response_body.py +33 -0
  195. samsara/types/aemp_equipment_get_aemp_equipment_list_method_not_allowed_error_response_body.py +33 -0
  196. samsara/types/aemp_equipment_get_aemp_equipment_list_not_found_error_response_body.py +33 -0
  197. samsara/types/aemp_equipment_get_aemp_equipment_list_not_implemented_error_response_body.py +33 -0
  198. samsara/types/aemp_equipment_get_aemp_equipment_list_response_body.py +22 -0
  199. samsara/types/aemp_equipment_get_aemp_equipment_list_service_unavailable_error_response_body.py +33 -0
  200. samsara/types/aemp_equipment_get_aemp_equipment_list_too_many_requests_error_response_body.py +33 -0
  201. samsara/types/aemp_equipment_get_aemp_equipment_list_unauthorized_error_response_body.py +33 -0
  202. samsara/types/aemp_equipment_with_additional_fields_response_body.py +48 -0
  203. samsara/types/aemp_fleet_list_response_body.py +49 -0
  204. samsara/types/aemp_link_response_body.py +31 -0
  205. samsara/types/anticipation_brake_event_count.py +3 -0
  206. samsara/types/appointment_window_request_body.py +34 -0
  207. samsara/types/appointment_window_response_body.py +34 -0
  208. samsara/types/asset_data_input.py +45 -0
  209. samsara/types/asset_data_input_last_point.py +28 -0
  210. samsara/types/asset_data_output.py +45 -0
  211. samsara/types/asset_data_outputs_patch_asset_data_outputs_bad_gateway_error_response_body.py +33 -0
  212. samsara/types/asset_data_outputs_patch_asset_data_outputs_gateway_timeout_error_response_body.py +33 -0
  213. samsara/types/asset_data_outputs_patch_asset_data_outputs_internal_server_error_response_body.py +33 -0
  214. samsara/types/asset_data_outputs_patch_asset_data_outputs_method_not_allowed_error_response_body.py +33 -0
  215. samsara/types/asset_data_outputs_patch_asset_data_outputs_not_found_error_response_body.py +33 -0
  216. samsara/types/asset_data_outputs_patch_asset_data_outputs_not_implemented_error_response_body.py +33 -0
  217. samsara/types/asset_data_outputs_patch_asset_data_outputs_response_body.py +23 -0
  218. samsara/types/asset_data_outputs_patch_asset_data_outputs_service_unavailable_error_response_body.py +33 -0
  219. samsara/types/asset_data_outputs_patch_asset_data_outputs_too_many_requests_error_response_body.py +33 -0
  220. samsara/types/asset_data_outputs_patch_asset_data_outputs_unauthorized_error_response_body.py +33 -0
  221. samsara/types/asset_location.py +35 -0
  222. samsara/types/asset_name.py +3 -0
  223. samsara/types/asset_response.py +71 -0
  224. samsara/types/asset_response_body.py +7 -0
  225. samsara/types/asset_response_location_data_input.py +26 -0
  226. samsara/types/asset_response_parent_asset.py +26 -0
  227. samsara/types/asset_response_running_status_data_input.py +26 -0
  228. samsara/types/assets_location_link_request_config_object.py +39 -0
  229. samsara/types/assets_location_link_response_config_object_response_body.py +40 -0
  230. samsara/types/attribute.py +10 -12
  231. samsara/types/attribute_attribute_type.py +3 -1
  232. samsara/types/attribute_entity.py +3 -3
  233. samsara/types/attribute_unit.py +42 -0
  234. samsara/types/base_route_response_object_response_body.py +7 -0
  235. samsara/types/coasting_duration_ms.py +3 -0
  236. samsara/types/continuous_reading_alert_threshold_response_body.py +1 -1
  237. samsara/types/continuous_reading_alert_threshold_response_body_unit.py +15 -0
  238. samsara/types/create_driver_auth_token_response_response_body.py +33 -0
  239. samsara/types/cruise_control_duration_ms.py +3 -0
  240. samsara/types/cumulative_operating_hours_response_body.py +35 -0
  241. samsara/types/custom_metadata.py +5 -0
  242. samsara/types/data_input_list_response.py +26 -0
  243. samsara/types/data_input_response.py +19 -0
  244. samsara/types/data_input_response_all_of.py +59 -0
  245. samsara/types/data_input_snapshot.py +19 -0
  246. samsara/types/data_input_snapshot_all_of.py +40 -0
  247. samsara/types/data_input_snapshot_response.py +26 -0
  248. samsara/types/data_input_tiny_response.py +52 -0
  249. samsara/types/data_inputs_tiny_response.py +26 -0
  250. samsara/types/def_remaining_response_body.py +35 -0
  251. samsara/types/detection_log_asset_object_response_body.py +43 -0
  252. samsara/types/detection_log_detection_object_response_body.py +65 -0
  253. samsara/types/detection_log_detection_object_response_body_trigger_detection_label.py +33 -0
  254. samsara/types/detection_log_driver_object_response_body.py +52 -0
  255. samsara/types/detection_log_get_detections_bad_gateway_error_response_body.py +33 -0
  256. samsara/types/detection_log_get_detections_gateway_timeout_error_response_body.py +33 -0
  257. samsara/types/detection_log_get_detections_internal_server_error_response_body.py +33 -0
  258. samsara/types/detection_log_get_detections_method_not_allowed_error_response_body.py +33 -0
  259. samsara/types/detection_log_get_detections_not_found_error_response_body.py +33 -0
  260. samsara/types/detection_log_get_detections_not_implemented_error_response_body.py +33 -0
  261. samsara/types/detection_log_get_detections_response_body.py +26 -0
  262. samsara/types/detection_log_get_detections_service_unavailable_error_response_body.py +33 -0
  263. samsara/types/detection_log_get_detections_too_many_requests_error_response_body.py +33 -0
  264. samsara/types/detection_log_get_detections_unauthorized_error_response_body.py +33 -0
  265. samsara/types/detection_log_safety_event_object_response_body.py +39 -0
  266. samsara/types/detection_log_safety_event_object_response_body_inbox_filter_reason.py +21 -0
  267. samsara/types/device_response_response_body.py +1 -1
  268. samsara/types/device_response_response_body_model.py +5 -0
  269. samsara/types/distance_driven_meters.py +3 -0
  270. samsara/types/distance_response_body.py +42 -0
  271. samsara/types/drive_time_duration_ms.py +3 -0
  272. samsara/types/driver.py +8 -0
  273. samsara/types/driver_app_sign_in_response_body.py +6 -0
  274. samsara/types/driver_efficiencies_response.py +26 -0
  275. samsara/types/driver_efficiencies_response_data.py +42 -0
  276. samsara/types/driver_efficiency.py +79 -0
  277. samsara/types/driver_efficiency_data_object_response_body.py +84 -0
  278. samsara/types/driver_efficiency_difficulty_score_data_object_response_body.py +44 -0
  279. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_bad_gateway_error_response_body.py +33 -0
  280. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_gateway_timeout_error_response_body.py +33 -0
  281. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_internal_server_error_response_body.py +33 -0
  282. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_method_not_allowed_error_response_body.py +33 -0
  283. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_not_found_error_response_body.py +33 -0
  284. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_not_implemented_error_response_body.py +33 -0
  285. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_response_body.py +28 -0
  286. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_service_unavailable_error_response_body.py +33 -0
  287. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_too_many_requests_error_response_body.py +33 -0
  288. samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_unauthorized_error_response_body.py +33 -0
  289. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_bad_gateway_error_response_body.py +33 -0
  290. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_gateway_timeout_error_response_body.py +33 -0
  291. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_internal_server_error_response_body.py +33 -0
  292. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_method_not_allowed_error_response_body.py +33 -0
  293. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_not_found_error_response_body.py +33 -0
  294. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_not_implemented_error_response_body.py +33 -0
  295. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_response_body.py +28 -0
  296. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_service_unavailable_error_response_body.py +33 -0
  297. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_too_many_requests_error_response_body.py +33 -0
  298. samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_unauthorized_error_response_body.py +33 -0
  299. samsara/types/driver_efficiency_percentage_data_object_response_body.py +84 -0
  300. samsara/types/driver_efficiency_raw_data_object_response_body.py +119 -0
  301. samsara/types/driver_has_vehicle_unpinning_enabled.py +3 -0
  302. samsara/types/driver_profile_image_base_64.py +3 -0
  303. samsara/types/driver_profile_image_url.py +3 -0
  304. samsara/types/driver_safety_score_response_body.py +59 -0
  305. samsara/types/drivers_auth_token_create_driver_auth_token_bad_gateway_error_response_body.py +33 -0
  306. samsara/types/drivers_auth_token_create_driver_auth_token_gateway_timeout_error_response_body.py +33 -0
  307. samsara/types/drivers_auth_token_create_driver_auth_token_internal_server_error_response_body.py +33 -0
  308. samsara/types/drivers_auth_token_create_driver_auth_token_method_not_allowed_error_response_body.py +33 -0
  309. samsara/types/drivers_auth_token_create_driver_auth_token_not_found_error_response_body.py +33 -0
  310. samsara/types/drivers_auth_token_create_driver_auth_token_not_implemented_error_response_body.py +33 -0
  311. samsara/types/drivers_auth_token_create_driver_auth_token_response_body.py +20 -0
  312. samsara/types/drivers_auth_token_create_driver_auth_token_service_unavailable_error_response_body.py +33 -0
  313. samsara/types/drivers_auth_token_create_driver_auth_token_too_many_requests_error_response_body.py +33 -0
  314. samsara/types/drivers_auth_token_create_driver_auth_token_unauthorized_error_response_body.py +33 -0
  315. samsara/types/engine_immobilizer_update_engine_immobilizer_state_bad_gateway_error_response_body.py +33 -0
  316. samsara/types/engine_immobilizer_update_engine_immobilizer_state_gateway_timeout_error_response_body.py +33 -0
  317. samsara/types/engine_immobilizer_update_engine_immobilizer_state_internal_server_error_response_body.py +33 -0
  318. samsara/types/engine_immobilizer_update_engine_immobilizer_state_method_not_allowed_error_response_body.py +33 -0
  319. samsara/types/engine_immobilizer_update_engine_immobilizer_state_not_found_error_response_body.py +33 -0
  320. samsara/types/engine_immobilizer_update_engine_immobilizer_state_not_implemented_error_response_body.py +33 -0
  321. samsara/types/engine_immobilizer_update_engine_immobilizer_state_service_unavailable_error_response_body.py +33 -0
  322. samsara/types/engine_immobilizer_update_engine_immobilizer_state_too_many_requests_error_response_body.py +33 -0
  323. samsara/types/engine_immobilizer_update_engine_immobilizer_state_unauthorized_error_response_body.py +33 -0
  324. samsara/types/engine_status_response_body.py +35 -0
  325. samsara/types/equipment_header_with_additional_fields_response_body.py +63 -0
  326. samsara/types/equipment_patch_equipment_bad_gateway_error_response_body.py +33 -0
  327. samsara/types/equipment_patch_equipment_gateway_timeout_error_response_body.py +33 -0
  328. samsara/types/equipment_patch_equipment_internal_server_error_response_body.py +33 -0
  329. samsara/types/equipment_patch_equipment_method_not_allowed_error_response_body.py +33 -0
  330. samsara/types/equipment_patch_equipment_not_found_error_response_body.py +33 -0
  331. samsara/types/equipment_patch_equipment_not_implemented_error_response_body.py +33 -0
  332. samsara/types/equipment_patch_equipment_response_body.py +20 -0
  333. samsara/types/equipment_patch_equipment_service_unavailable_error_response_body.py +33 -0
  334. samsara/types/equipment_patch_equipment_too_many_requests_error_response_body.py +33 -0
  335. samsara/types/equipment_patch_equipment_unauthorized_error_response_body.py +33 -0
  336. samsara/types/equipment_with_attributes_response_object_response_body.py +68 -0
  337. samsara/types/extended_driver_tiny_response.py +46 -0
  338. samsara/types/extended_driver_tiny_response_external_ids.py +21 -0
  339. samsara/types/fft_spectra_data_point.py +30 -0
  340. samsara/types/fft_spectra_data_point_fft_spectra.py +41 -0
  341. samsara/types/fleet_device_object_response_body.py +31 -0
  342. samsara/types/form_submission_request_media_item_object_request_body.py +33 -0
  343. samsara/types/form_submission_request_media_value_object_request_body.py +31 -0
  344. samsara/types/form_submission_request_signature_value_object_request_body.py +24 -0
  345. samsara/types/form_template_response_object_response_body.py +10 -0
  346. samsara/types/form_template_response_object_response_body_form_category.py +7 -0
  347. samsara/types/form_updated_response_body.py +24 -0
  348. samsara/types/fuel_consumed_ml.py +3 -0
  349. samsara/types/fuel_remaining_response_body.py +35 -0
  350. samsara/types/functions_start_function_run_bad_gateway_error_response_body.py +33 -0
  351. samsara/types/functions_start_function_run_gateway_timeout_error_response_body.py +33 -0
  352. samsara/types/functions_start_function_run_internal_server_error_response_body.py +33 -0
  353. samsara/types/functions_start_function_run_method_not_allowed_error_response_body.py +33 -0
  354. samsara/types/functions_start_function_run_not_found_error_response_body.py +33 -0
  355. samsara/types/functions_start_function_run_not_implemented_error_response_body.py +33 -0
  356. samsara/types/functions_start_function_run_response_body.py +20 -0
  357. samsara/types/functions_start_function_run_service_unavailable_error_response_body.py +33 -0
  358. samsara/types/functions_start_function_run_too_many_requests_error_response_body.py +33 -0
  359. samsara/types/functions_start_function_run_unauthorized_error_response_body.py +33 -0
  360. samsara/types/gateway_details_response_response_body.py +1 -1
  361. samsara/types/gateway_details_response_response_body_gateway_battery_state.py +3 -1
  362. samsara/types/goa_attribute_tiny.py +47 -0
  363. samsara/types/goa_form_tiny_response_response_body.py +26 -0
  364. samsara/types/goa_issue_tiny_response_response_body.py +26 -0
  365. samsara/types/green_band_driving_duration_ms.py +3 -0
  366. samsara/types/harsh_event_trigger_details_object_request_body_types_item.py +2 -0
  367. samsara/types/harsh_event_trigger_details_object_response_body_types_item.py +2 -0
  368. samsara/types/health_response_response_body.py +11 -1
  369. samsara/types/health_response_response_body_recommended_action.py +10 -0
  370. samsara/types/high_torque_ms.py +3 -0
  371. samsara/types/hos_daily_logs_update_shipping_docs_bad_gateway_error_response_body.py +33 -0
  372. samsara/types/hos_daily_logs_update_shipping_docs_gateway_timeout_error_response_body.py +33 -0
  373. samsara/types/hos_daily_logs_update_shipping_docs_internal_server_error_response_body.py +33 -0
  374. samsara/types/hos_daily_logs_update_shipping_docs_method_not_allowed_error_response_body.py +33 -0
  375. samsara/types/hos_daily_logs_update_shipping_docs_not_found_error_response_body.py +33 -0
  376. samsara/types/hos_daily_logs_update_shipping_docs_not_implemented_error_response_body.py +33 -0
  377. samsara/types/hos_daily_logs_update_shipping_docs_response_body.py +20 -0
  378. samsara/types/hos_daily_logs_update_shipping_docs_service_unavailable_error_response_body.py +33 -0
  379. samsara/types/hos_daily_logs_update_shipping_docs_too_many_requests_error_response_body.py +33 -0
  380. samsara/types/hos_daily_logs_update_shipping_docs_unauthorized_error_response_body.py +33 -0
  381. samsara/types/hos_drivers_eld_event_object_response_body.py +54 -0
  382. samsara/types/hos_drivers_eld_event_object_response_body_driver_activation_status.py +7 -0
  383. samsara/types/hos_eld_event_location_object_response_body.py +46 -0
  384. samsara/types/hos_eld_event_object_response_body.py +98 -0
  385. samsara/types/hos_eld_event_object_response_body_malfunction_diagnostic_code.py +7 -0
  386. samsara/types/hos_eld_event_remark_object_response_body.py +36 -0
  387. samsara/types/hos_eld_events_get_hos_eld_events_bad_gateway_error_response_body.py +33 -0
  388. samsara/types/hos_eld_events_get_hos_eld_events_gateway_timeout_error_response_body.py +33 -0
  389. samsara/types/hos_eld_events_get_hos_eld_events_internal_server_error_response_body.py +33 -0
  390. samsara/types/hos_eld_events_get_hos_eld_events_method_not_allowed_error_response_body.py +33 -0
  391. samsara/types/hos_eld_events_get_hos_eld_events_not_found_error_response_body.py +33 -0
  392. samsara/types/hos_eld_events_get_hos_eld_events_not_implemented_error_response_body.py +33 -0
  393. samsara/types/hos_eld_events_get_hos_eld_events_response_body.py +26 -0
  394. samsara/types/hos_eld_events_get_hos_eld_events_service_unavailable_error_response_body.py +33 -0
  395. samsara/types/hos_eld_events_get_hos_eld_events_too_many_requests_error_response_body.py +33 -0
  396. samsara/types/hos_eld_events_get_hos_eld_events_unauthorized_error_response_body.py +33 -0
  397. samsara/types/hub_capacities_list_hub_capacities_bad_gateway_error_response_body.py +33 -0
  398. samsara/types/hub_capacities_list_hub_capacities_gateway_timeout_error_response_body.py +33 -0
  399. samsara/types/hub_capacities_list_hub_capacities_internal_server_error_response_body.py +33 -0
  400. samsara/types/hub_capacities_list_hub_capacities_method_not_allowed_error_response_body.py +33 -0
  401. samsara/types/hub_capacities_list_hub_capacities_not_found_error_response_body.py +33 -0
  402. samsara/types/hub_capacities_list_hub_capacities_not_implemented_error_response_body.py +33 -0
  403. samsara/types/hub_capacities_list_hub_capacities_response_body.py +26 -0
  404. samsara/types/hub_capacities_list_hub_capacities_service_unavailable_error_response_body.py +33 -0
  405. samsara/types/hub_capacities_list_hub_capacities_too_many_requests_error_response_body.py +33 -0
  406. samsara/types/hub_capacities_list_hub_capacities_unauthorized_error_response_body.py +33 -0
  407. samsara/types/hub_capacity_object_response_body.py +54 -0
  408. samsara/types/hub_location_created_object_response_body.py +105 -0
  409. samsara/types/hub_location_input_object_request_body.py +94 -0
  410. samsara/types/hub_location_object_response_body.py +105 -0
  411. samsara/types/hub_location_service_window_input_request_body.py +38 -0
  412. samsara/types/hub_location_updated_object_response_body.py +105 -0
  413. samsara/types/hub_locations_create_hub_locations_bad_gateway_error_response_body.py +33 -0
  414. samsara/types/hub_locations_create_hub_locations_gateway_timeout_error_response_body.py +33 -0
  415. samsara/types/hub_locations_create_hub_locations_internal_server_error_response_body.py +33 -0
  416. samsara/types/hub_locations_create_hub_locations_method_not_allowed_error_response_body.py +33 -0
  417. samsara/types/hub_locations_create_hub_locations_not_found_error_response_body.py +33 -0
  418. samsara/types/hub_locations_create_hub_locations_not_implemented_error_response_body.py +33 -0
  419. samsara/types/hub_locations_create_hub_locations_response_body.py +23 -0
  420. samsara/types/hub_locations_create_hub_locations_service_unavailable_error_response_body.py +33 -0
  421. samsara/types/hub_locations_create_hub_locations_too_many_requests_error_response_body.py +33 -0
  422. samsara/types/hub_locations_create_hub_locations_unauthorized_error_response_body.py +33 -0
  423. samsara/types/hub_locations_list_hub_locations_bad_gateway_error_response_body.py +33 -0
  424. samsara/types/hub_locations_list_hub_locations_gateway_timeout_error_response_body.py +33 -0
  425. samsara/types/hub_locations_list_hub_locations_internal_server_error_response_body.py +33 -0
  426. samsara/types/hub_locations_list_hub_locations_method_not_allowed_error_response_body.py +33 -0
  427. samsara/types/hub_locations_list_hub_locations_not_found_error_response_body.py +33 -0
  428. samsara/types/hub_locations_list_hub_locations_not_implemented_error_response_body.py +33 -0
  429. samsara/types/hub_locations_list_hub_locations_response_body.py +26 -0
  430. samsara/types/hub_locations_list_hub_locations_service_unavailable_error_response_body.py +33 -0
  431. samsara/types/hub_locations_list_hub_locations_too_many_requests_error_response_body.py +33 -0
  432. samsara/types/hub_locations_list_hub_locations_unauthorized_error_response_body.py +33 -0
  433. samsara/types/hub_locations_update_hub_location_bad_gateway_error_response_body.py +33 -0
  434. samsara/types/hub_locations_update_hub_location_gateway_timeout_error_response_body.py +33 -0
  435. samsara/types/hub_locations_update_hub_location_internal_server_error_response_body.py +33 -0
  436. samsara/types/hub_locations_update_hub_location_method_not_allowed_error_response_body.py +33 -0
  437. samsara/types/hub_locations_update_hub_location_not_found_error_response_body.py +33 -0
  438. samsara/types/hub_locations_update_hub_location_not_implemented_error_response_body.py +33 -0
  439. samsara/types/hub_locations_update_hub_location_response_body.py +20 -0
  440. samsara/types/hub_locations_update_hub_location_service_unavailable_error_response_body.py +33 -0
  441. samsara/types/hub_locations_update_hub_location_too_many_requests_error_response_body.py +33 -0
  442. samsara/types/hub_locations_update_hub_location_unauthorized_error_response_body.py +33 -0
  443. samsara/types/hub_object_response_body.py +49 -0
  444. samsara/types/hub_plan_routes_list_hub_plan_routes_bad_gateway_error_response_body.py +33 -0
  445. samsara/types/hub_plan_routes_list_hub_plan_routes_gateway_timeout_error_response_body.py +33 -0
  446. samsara/types/hub_plan_routes_list_hub_plan_routes_internal_server_error_response_body.py +33 -0
  447. samsara/types/hub_plan_routes_list_hub_plan_routes_method_not_allowed_error_response_body.py +33 -0
  448. samsara/types/hub_plan_routes_list_hub_plan_routes_not_found_error_response_body.py +33 -0
  449. samsara/types/hub_plan_routes_list_hub_plan_routes_not_implemented_error_response_body.py +33 -0
  450. samsara/types/hub_plan_routes_list_hub_plan_routes_response_body.py +26 -0
  451. samsara/types/hub_plan_routes_list_hub_plan_routes_service_unavailable_error_response_body.py +33 -0
  452. samsara/types/hub_plan_routes_list_hub_plan_routes_too_many_requests_error_response_body.py +33 -0
  453. samsara/types/hub_plan_routes_list_hub_plan_routes_unauthorized_error_response_body.py +33 -0
  454. samsara/types/hub_plans_create_hub_plan_bad_gateway_error_response_body.py +33 -0
  455. samsara/types/hub_plans_create_hub_plan_gateway_timeout_error_response_body.py +33 -0
  456. samsara/types/hub_plans_create_hub_plan_internal_server_error_response_body.py +33 -0
  457. samsara/types/hub_plans_create_hub_plan_method_not_allowed_error_response_body.py +33 -0
  458. samsara/types/hub_plans_create_hub_plan_not_found_error_response_body.py +33 -0
  459. samsara/types/hub_plans_create_hub_plan_not_implemented_error_response_body.py +33 -0
  460. samsara/types/hub_plans_create_hub_plan_response_body.py +20 -0
  461. samsara/types/hub_plans_create_hub_plan_service_unavailable_error_response_body.py +33 -0
  462. samsara/types/hub_plans_create_hub_plan_too_many_requests_error_response_body.py +33 -0
  463. samsara/types/hub_plans_create_hub_plan_unauthorized_error_response_body.py +33 -0
  464. samsara/types/hub_plans_list_hub_plans_bad_gateway_error_response_body.py +33 -0
  465. samsara/types/hub_plans_list_hub_plans_gateway_timeout_error_response_body.py +33 -0
  466. samsara/types/hub_plans_list_hub_plans_internal_server_error_response_body.py +33 -0
  467. samsara/types/hub_plans_list_hub_plans_method_not_allowed_error_response_body.py +33 -0
  468. samsara/types/hub_plans_list_hub_plans_not_found_error_response_body.py +33 -0
  469. samsara/types/hub_plans_list_hub_plans_not_implemented_error_response_body.py +33 -0
  470. samsara/types/hub_plans_list_hub_plans_response_body.py +26 -0
  471. samsara/types/hub_plans_list_hub_plans_service_unavailable_error_response_body.py +33 -0
  472. samsara/types/hub_plans_list_hub_plans_too_many_requests_error_response_body.py +33 -0
  473. samsara/types/hub_plans_list_hub_plans_unauthorized_error_response_body.py +33 -0
  474. samsara/types/hub_skill_object_response_body.py +49 -0
  475. samsara/types/hub_skills_list_hub_skills_bad_gateway_error_response_body.py +33 -0
  476. samsara/types/hub_skills_list_hub_skills_gateway_timeout_error_response_body.py +33 -0
  477. samsara/types/hub_skills_list_hub_skills_internal_server_error_response_body.py +33 -0
  478. samsara/types/hub_skills_list_hub_skills_method_not_allowed_error_response_body.py +33 -0
  479. samsara/types/hub_skills_list_hub_skills_not_found_error_response_body.py +33 -0
  480. samsara/types/hub_skills_list_hub_skills_not_implemented_error_response_body.py +33 -0
  481. samsara/types/hub_skills_list_hub_skills_response_body.py +26 -0
  482. samsara/types/hub_skills_list_hub_skills_service_unavailable_error_response_body.py +33 -0
  483. samsara/types/hub_skills_list_hub_skills_too_many_requests_error_response_body.py +33 -0
  484. samsara/types/hub_skills_list_hub_skills_unauthorized_error_response_body.py +33 -0
  485. samsara/types/hubs_list_hubs_bad_gateway_error_response_body.py +33 -0
  486. samsara/types/hubs_list_hubs_gateway_timeout_error_response_body.py +33 -0
  487. samsara/types/hubs_list_hubs_internal_server_error_response_body.py +33 -0
  488. samsara/types/hubs_list_hubs_method_not_allowed_error_response_body.py +33 -0
  489. samsara/types/hubs_list_hubs_not_found_error_response_body.py +33 -0
  490. samsara/types/hubs_list_hubs_not_implemented_error_response_body.py +33 -0
  491. samsara/types/hubs_list_hubs_response_body.py +26 -0
  492. samsara/types/hubs_list_hubs_service_unavailable_error_response_body.py +33 -0
  493. samsara/types/hubs_list_hubs_too_many_requests_error_response_body.py +33 -0
  494. samsara/types/hubs_list_hubs_unauthorized_error_response_body.py +33 -0
  495. samsara/types/idle_time_duration_ms.py +3 -0
  496. samsara/types/idling_event_object_response_body.py +1 -1
  497. samsara/types/idling_event_object_response_body_address_type.py +2 -0
  498. samsara/types/industrial_asset_object_response_body.py +31 -0
  499. samsara/types/inline_response_200.py +20 -0
  500. samsara/types/inline_response_2001.py +20 -0
  501. samsara/types/inline_response_2002.py +22 -0
  502. samsara/types/inline_response_2003.py +22 -0
  503. samsara/types/inline_response_2004.py +20 -0
  504. samsara/types/inline_response_2007.py +22 -0
  505. samsara/types/inline_response_2008.py +20 -0
  506. samsara/types/inline_response_2009.py +20 -0
  507. samsara/types/j_1939_d_1_status_data_point.py +29 -0
  508. samsara/types/j_1939_d_1_status_data_point_value.py +34 -0
  509. samsara/types/job_location_response_object_response_body.py +41 -0
  510. samsara/types/job_response_object_response_body.py +106 -0
  511. samsara/types/job_response_object_response_body_status.py +5 -0
  512. samsara/types/jobs_create_job_bad_gateway_error_response_body.py +33 -0
  513. samsara/types/jobs_create_job_gateway_timeout_error_response_body.py +33 -0
  514. samsara/types/jobs_create_job_internal_server_error_response_body.py +33 -0
  515. samsara/types/jobs_create_job_method_not_allowed_error_response_body.py +33 -0
  516. samsara/types/jobs_create_job_not_found_error_response_body.py +33 -0
  517. samsara/types/jobs_create_job_not_implemented_error_response_body.py +33 -0
  518. samsara/types/jobs_create_job_response_body.py +31 -0
  519. samsara/types/jobs_create_job_service_unavailable_error_response_body.py +33 -0
  520. samsara/types/jobs_create_job_too_many_requests_error_response_body.py +33 -0
  521. samsara/types/jobs_create_job_unauthorized_error_response_body.py +33 -0
  522. samsara/types/jobs_delete_job_bad_gateway_error_response_body.py +33 -0
  523. samsara/types/jobs_delete_job_gateway_timeout_error_response_body.py +33 -0
  524. samsara/types/jobs_delete_job_internal_server_error_response_body.py +33 -0
  525. samsara/types/jobs_delete_job_method_not_allowed_error_response_body.py +33 -0
  526. samsara/types/jobs_delete_job_not_found_error_response_body.py +33 -0
  527. samsara/types/jobs_delete_job_not_implemented_error_response_body.py +33 -0
  528. samsara/types/jobs_delete_job_response_body.py +29 -0
  529. samsara/types/jobs_delete_job_service_unavailable_error_response_body.py +33 -0
  530. samsara/types/jobs_delete_job_too_many_requests_error_response_body.py +33 -0
  531. samsara/types/jobs_delete_job_unauthorized_error_response_body.py +33 -0
  532. samsara/types/jobs_get_jobs_bad_gateway_error_response_body.py +33 -0
  533. samsara/types/jobs_get_jobs_gateway_timeout_error_response_body.py +33 -0
  534. samsara/types/jobs_get_jobs_internal_server_error_response_body.py +33 -0
  535. samsara/types/jobs_get_jobs_method_not_allowed_error_response_body.py +33 -0
  536. samsara/types/jobs_get_jobs_not_found_error_response_body.py +33 -0
  537. samsara/types/jobs_get_jobs_not_implemented_error_response_body.py +33 -0
  538. samsara/types/jobs_get_jobs_response_body.py +37 -0
  539. samsara/types/jobs_get_jobs_service_unavailable_error_response_body.py +33 -0
  540. samsara/types/jobs_get_jobs_too_many_requests_error_response_body.py +33 -0
  541. samsara/types/jobs_get_jobs_unauthorized_error_response_body.py +33 -0
  542. samsara/types/jobs_patch_job_bad_gateway_error_response_body.py +33 -0
  543. samsara/types/jobs_patch_job_gateway_timeout_error_response_body.py +33 -0
  544. samsara/types/jobs_patch_job_internal_server_error_response_body.py +33 -0
  545. samsara/types/jobs_patch_job_method_not_allowed_error_response_body.py +33 -0
  546. samsara/types/jobs_patch_job_not_found_error_response_body.py +33 -0
  547. samsara/types/jobs_patch_job_not_implemented_error_response_body.py +33 -0
  548. samsara/types/jobs_patch_job_response_body.py +31 -0
  549. samsara/types/jobs_patch_job_service_unavailable_error_response_body.py +33 -0
  550. samsara/types/jobs_patch_job_too_many_requests_error_response_body.py +33 -0
  551. samsara/types/jobs_patch_job_unauthorized_error_response_body.py +33 -0
  552. samsara/types/latitude.py +3 -0
  553. samsara/types/list_hub_capacities_response_pagination_response_body.py +35 -0
  554. samsara/types/list_hub_locations_response_pagination_response_body.py +35 -0
  555. samsara/types/list_hub_plan_routes_response_pagination_response_body.py +35 -0
  556. samsara/types/list_hub_plans_response_pagination_response_body.py +35 -0
  557. samsara/types/list_hub_skills_response_pagination_response_body.py +35 -0
  558. samsara/types/list_hubs_response_pagination_response_body.py +35 -0
  559. samsara/types/list_industrial_assets_response.py +22 -0
  560. samsara/types/live_sharing_link_full_response_object_response_body.py +5 -2
  561. samsara/types/location_data_point.py +30 -0
  562. samsara/types/location_data_point_gps_location.py +57 -0
  563. samsara/types/location_data_point_gps_location_place.py +60 -0
  564. samsara/types/location_object_request_body_address_types_item.py +2 -0
  565. samsara/types/location_object_response_body_address_types_item.py +2 -0
  566. samsara/types/location_response_body.py +42 -0
  567. samsara/types/location_type.py +5 -0
  568. samsara/types/longitude.py +3 -0
  569. samsara/types/media_object_response_body.py +10 -2
  570. samsara/types/media_object_response_body_camera_role.py +28 -0
  571. samsara/types/media_object_response_body_input.py +3 -1
  572. samsara/types/media_object_response_body_status.py +3 -1
  573. samsara/types/number_data_point.py +28 -0
  574. samsara/types/order_input_object_request_body.py +59 -0
  575. samsara/types/order_object_response_body.py +75 -0
  576. samsara/types/order_quantity_input_request_body.py +33 -0
  577. samsara/types/order_quantity_response_body.py +33 -0
  578. samsara/types/order_task_object_response_body.py +54 -0
  579. samsara/types/order_task_request_body.py +67 -0
  580. samsara/types/order_task_request_body_position.py +5 -0
  581. samsara/types/order_task_response_body.py +67 -0
  582. samsara/types/order_task_response_body_position.py +5 -0
  583. samsara/types/order_task_skill_object_response_body.py +31 -0
  584. samsara/types/over_speed_ms.py +3 -0
  585. samsara/types/parent_id.py +3 -0
  586. samsara/types/part_instance_input_object_request_body.py +45 -0
  587. samsara/types/part_instance_object_response_body.py +45 -0
  588. samsara/types/patch_asset_data_outputs_single_response_response_body.py +40 -0
  589. samsara/types/patch_job_object_request_body.py +89 -0
  590. samsara/types/patch_job_objectjob_location_request_object_request_body.py +41 -0
  591. samsara/types/patch_shipping_docs_response_body_response_body.py +93 -0
  592. samsara/types/plan_object_response_body.py +49 -0
  593. samsara/types/plan_orders_create_plan_orders_bad_gateway_error_response_body.py +33 -0
  594. samsara/types/plan_orders_create_plan_orders_gateway_timeout_error_response_body.py +33 -0
  595. samsara/types/plan_orders_create_plan_orders_internal_server_error_response_body.py +33 -0
  596. samsara/types/plan_orders_create_plan_orders_method_not_allowed_error_response_body.py +33 -0
  597. samsara/types/plan_orders_create_plan_orders_not_found_error_response_body.py +33 -0
  598. samsara/types/plan_orders_create_plan_orders_not_implemented_error_response_body.py +33 -0
  599. samsara/types/plan_orders_create_plan_orders_response_body.py +23 -0
  600. samsara/types/plan_orders_create_plan_orders_service_unavailable_error_response_body.py +33 -0
  601. samsara/types/plan_orders_create_plan_orders_too_many_requests_error_response_body.py +33 -0
  602. samsara/types/plan_orders_create_plan_orders_unauthorized_error_response_body.py +33 -0
  603. samsara/types/post_fuel_purchase_request_body_discount_request_body.py +34 -0
  604. samsara/types/post_fuel_purchase_request_body_discount_request_body_currency.py +7 -0
  605. samsara/types/post_job_object_request_body.py +85 -0
  606. samsara/types/post_job_objectjob_location_request_object_request_body.py +41 -0
  607. samsara/types/power_take_off_duration_ms.py +3 -0
  608. samsara/types/qualification_field_input_object_response_body.py +75 -0
  609. samsara/types/qualification_field_input_object_response_body_type.py +8 -0
  610. samsara/types/qualification_owner_object_response_body.py +43 -0
  611. samsara/types/qualification_owner_object_response_body_entity_type.py +5 -0
  612. samsara/types/qualification_owner_request_object_request_body.py +38 -0
  613. samsara/types/qualification_owner_request_object_request_body_entity_type.py +5 -0
  614. samsara/types/qualification_record_request_field_input_object_request_body.py +77 -0
  615. samsara/types/qualification_record_request_field_input_object_request_body_type.py +8 -0
  616. samsara/types/qualification_record_response_object_response_body.py +84 -0
  617. samsara/types/qualification_record_response_object_response_body_record_status.py +7 -0
  618. samsara/types/qualification_type_reference_object_response_body.py +40 -0
  619. samsara/types/qualification_type_request_object_request_body.py +26 -0
  620. samsara/types/qualification_type_response_object_response_body.py +69 -0
  621. samsara/types/qualification_type_response_object_response_body_entity_type.py +5 -0
  622. samsara/types/qualifications_archive_qualification_record_bad_gateway_error_response_body.py +33 -0
  623. samsara/types/qualifications_archive_qualification_record_gateway_timeout_error_response_body.py +33 -0
  624. samsara/types/qualifications_archive_qualification_record_internal_server_error_response_body.py +33 -0
  625. samsara/types/qualifications_archive_qualification_record_method_not_allowed_error_response_body.py +33 -0
  626. samsara/types/qualifications_archive_qualification_record_not_found_error_response_body.py +33 -0
  627. samsara/types/qualifications_archive_qualification_record_not_implemented_error_response_body.py +33 -0
  628. samsara/types/qualifications_archive_qualification_record_service_unavailable_error_response_body.py +33 -0
  629. samsara/types/qualifications_archive_qualification_record_too_many_requests_error_response_body.py +33 -0
  630. samsara/types/qualifications_archive_qualification_record_unauthorized_error_response_body.py +33 -0
  631. samsara/types/qualifications_delete_qualification_record_bad_gateway_error_response_body.py +33 -0
  632. samsara/types/qualifications_delete_qualification_record_gateway_timeout_error_response_body.py +33 -0
  633. samsara/types/qualifications_delete_qualification_record_internal_server_error_response_body.py +33 -0
  634. samsara/types/qualifications_delete_qualification_record_method_not_allowed_error_response_body.py +33 -0
  635. samsara/types/qualifications_delete_qualification_record_not_found_error_response_body.py +33 -0
  636. samsara/types/qualifications_delete_qualification_record_not_implemented_error_response_body.py +33 -0
  637. samsara/types/qualifications_delete_qualification_record_service_unavailable_error_response_body.py +33 -0
  638. samsara/types/qualifications_delete_qualification_record_too_many_requests_error_response_body.py +33 -0
  639. samsara/types/qualifications_delete_qualification_record_unauthorized_error_response_body.py +33 -0
  640. samsara/types/qualifications_get_qualification_records_bad_gateway_error_response_body.py +33 -0
  641. samsara/types/qualifications_get_qualification_records_gateway_timeout_error_response_body.py +33 -0
  642. samsara/types/qualifications_get_qualification_records_internal_server_error_response_body.py +33 -0
  643. samsara/types/qualifications_get_qualification_records_method_not_allowed_error_response_body.py +33 -0
  644. samsara/types/qualifications_get_qualification_records_not_found_error_response_body.py +33 -0
  645. samsara/types/qualifications_get_qualification_records_not_implemented_error_response_body.py +33 -0
  646. samsara/types/qualifications_get_qualification_records_response_body.py +23 -0
  647. samsara/types/qualifications_get_qualification_records_service_unavailable_error_response_body.py +33 -0
  648. samsara/types/qualifications_get_qualification_records_stream_bad_gateway_error_response_body.py +33 -0
  649. samsara/types/qualifications_get_qualification_records_stream_gateway_timeout_error_response_body.py +33 -0
  650. samsara/types/qualifications_get_qualification_records_stream_internal_server_error_response_body.py +33 -0
  651. samsara/types/qualifications_get_qualification_records_stream_method_not_allowed_error_response_body.py +33 -0
  652. samsara/types/qualifications_get_qualification_records_stream_not_found_error_response_body.py +33 -0
  653. samsara/types/qualifications_get_qualification_records_stream_not_implemented_error_response_body.py +33 -0
  654. samsara/types/qualifications_get_qualification_records_stream_response_body.py +26 -0
  655. samsara/types/qualifications_get_qualification_records_stream_service_unavailable_error_response_body.py +33 -0
  656. samsara/types/qualifications_get_qualification_records_stream_too_many_requests_error_response_body.py +33 -0
  657. samsara/types/qualifications_get_qualification_records_stream_unauthorized_error_response_body.py +33 -0
  658. samsara/types/qualifications_get_qualification_records_too_many_requests_error_response_body.py +33 -0
  659. samsara/types/qualifications_get_qualification_records_unauthorized_error_response_body.py +33 -0
  660. samsara/types/qualifications_get_qualification_types_bad_gateway_error_response_body.py +33 -0
  661. samsara/types/qualifications_get_qualification_types_gateway_timeout_error_response_body.py +33 -0
  662. samsara/types/qualifications_get_qualification_types_internal_server_error_response_body.py +33 -0
  663. samsara/types/qualifications_get_qualification_types_method_not_allowed_error_response_body.py +33 -0
  664. samsara/types/qualifications_get_qualification_types_not_found_error_response_body.py +33 -0
  665. samsara/types/qualifications_get_qualification_types_not_implemented_error_response_body.py +33 -0
  666. samsara/types/qualifications_get_qualification_types_response_body.py +26 -0
  667. samsara/types/qualifications_get_qualification_types_service_unavailable_error_response_body.py +33 -0
  668. samsara/types/qualifications_get_qualification_types_too_many_requests_error_response_body.py +33 -0
  669. samsara/types/qualifications_get_qualification_types_unauthorized_error_response_body.py +33 -0
  670. samsara/types/qualifications_patch_qualification_record_bad_gateway_error_response_body.py +33 -0
  671. samsara/types/qualifications_patch_qualification_record_gateway_timeout_error_response_body.py +33 -0
  672. samsara/types/qualifications_patch_qualification_record_internal_server_error_response_body.py +33 -0
  673. samsara/types/qualifications_patch_qualification_record_method_not_allowed_error_response_body.py +33 -0
  674. samsara/types/qualifications_patch_qualification_record_not_found_error_response_body.py +33 -0
  675. samsara/types/qualifications_patch_qualification_record_not_implemented_error_response_body.py +33 -0
  676. samsara/types/qualifications_patch_qualification_record_response_body.py +20 -0
  677. samsara/types/qualifications_patch_qualification_record_service_unavailable_error_response_body.py +33 -0
  678. samsara/types/qualifications_patch_qualification_record_too_many_requests_error_response_body.py +33 -0
  679. samsara/types/qualifications_patch_qualification_record_unauthorized_error_response_body.py +33 -0
  680. samsara/types/qualifications_post_qualification_record_bad_gateway_error_response_body.py +33 -0
  681. samsara/types/qualifications_post_qualification_record_gateway_timeout_error_response_body.py +33 -0
  682. samsara/types/qualifications_post_qualification_record_internal_server_error_response_body.py +33 -0
  683. samsara/types/qualifications_post_qualification_record_method_not_allowed_error_response_body.py +33 -0
  684. samsara/types/qualifications_post_qualification_record_not_found_error_response_body.py +33 -0
  685. samsara/types/qualifications_post_qualification_record_not_implemented_error_response_body.py +33 -0
  686. samsara/types/qualifications_post_qualification_record_response_body.py +20 -0
  687. samsara/types/qualifications_post_qualification_record_service_unavailable_error_response_body.py +33 -0
  688. samsara/types/qualifications_post_qualification_record_too_many_requests_error_response_body.py +33 -0
  689. samsara/types/qualifications_post_qualification_record_unauthorized_error_response_body.py +33 -0
  690. samsara/types/qualifications_unarchive_qualification_record_bad_gateway_error_response_body.py +33 -0
  691. samsara/types/qualifications_unarchive_qualification_record_gateway_timeout_error_response_body.py +33 -0
  692. samsara/types/qualifications_unarchive_qualification_record_internal_server_error_response_body.py +33 -0
  693. samsara/types/qualifications_unarchive_qualification_record_method_not_allowed_error_response_body.py +33 -0
  694. samsara/types/qualifications_unarchive_qualification_record_not_found_error_response_body.py +33 -0
  695. samsara/types/qualifications_unarchive_qualification_record_not_implemented_error_response_body.py +33 -0
  696. samsara/types/qualifications_unarchive_qualification_record_service_unavailable_error_response_body.py +33 -0
  697. samsara/types/qualifications_unarchive_qualification_record_too_many_requests_error_response_body.py +33 -0
  698. samsara/types/qualifications_unarchive_qualification_record_unauthorized_error_response_body.py +33 -0
  699. samsara/types/quantity_object_response_body.py +33 -0
  700. samsara/types/reading_datapoint_request_body.py +50 -0
  701. samsara/types/reading_definition_response_body.py +5 -0
  702. samsara/types/reading_trigger_continuous_value_object_request_body.py +1 -1
  703. samsara/types/reading_trigger_continuous_value_object_request_body_unit.py +15 -0
  704. samsara/types/reading_trigger_continuous_value_object_response_body.py +1 -1
  705. samsara/types/reading_trigger_continuous_value_object_response_body_unit.py +15 -0
  706. samsara/types/readings_post_readings_bad_gateway_error_response_body.py +33 -0
  707. samsara/types/readings_post_readings_gateway_timeout_error_response_body.py +33 -0
  708. samsara/types/readings_post_readings_internal_server_error_response_body.py +33 -0
  709. samsara/types/readings_post_readings_method_not_allowed_error_response_body.py +33 -0
  710. samsara/types/readings_post_readings_not_found_error_response_body.py +33 -0
  711. samsara/types/readings_post_readings_not_implemented_error_response_body.py +33 -0
  712. samsara/types/readings_post_readings_service_unavailable_error_response_body.py +33 -0
  713. samsara/types/readings_post_readings_too_many_requests_error_response_body.py +33 -0
  714. samsara/types/readings_post_readings_unauthorized_error_response_body.py +33 -0
  715. samsara/types/reverse_geo_object_response_body.py +30 -0
  716. samsara/types/route_object_response_body.py +124 -0
  717. samsara/types/route_stop_object_response_body.py +71 -0
  718. samsara/types/routes_single_use_address_object_request_body.py +9 -0
  719. samsara/types/routes_single_use_address_object_response_body.py +9 -0
  720. samsara/types/routes_stop_response_object_response_body.py +12 -0
  721. samsara/types/safety_event_behavior_labels_response_body.py +1 -1
  722. samsara/types/safety_event_behavior_labels_response_body_type.py +1 -0
  723. samsara/types/safety_event_dismissal_reason_response_body.py +32 -0
  724. samsara/types/safety_event_dismissal_reason_response_body_code.py +7 -0
  725. samsara/types/safety_event_v_2_asset_object_response_body.py +63 -0
  726. samsara/types/safety_event_v_2_asset_object_response_body_type.py +7 -0
  727. samsara/types/safety_event_v_2_behavior_labels_response_body.py +33 -0
  728. samsara/types/safety_event_v_2_behavior_labels_response_body_label.py +64 -0
  729. samsara/types/safety_event_v_2_behavior_labels_response_body_source.py +5 -0
  730. samsara/types/safety_event_v_2_context_labels_response_body.py +38 -0
  731. samsara/types/safety_event_v_2_driver_object_response_body.py +52 -0
  732. samsara/types/safety_event_v_2_object_response_body.py +134 -0
  733. samsara/types/safety_event_v_2_object_response_body_event_state.py +10 -0
  734. samsara/types/safety_events_v_2_get_safety_events_v_2_bad_gateway_error_response_body.py +33 -0
  735. samsara/types/safety_events_v_2_get_safety_events_v_2_gateway_timeout_error_response_body.py +33 -0
  736. samsara/types/safety_events_v_2_get_safety_events_v_2_internal_server_error_response_body.py +33 -0
  737. samsara/types/safety_events_v_2_get_safety_events_v_2_method_not_allowed_error_response_body.py +33 -0
  738. samsara/types/safety_events_v_2_get_safety_events_v_2_not_found_error_response_body.py +33 -0
  739. samsara/types/safety_events_v_2_get_safety_events_v_2_not_implemented_error_response_body.py +33 -0
  740. samsara/types/safety_events_v_2_get_safety_events_v_2_response_body.py +26 -0
  741. samsara/types/safety_events_v_2_get_safety_events_v_2_service_unavailable_error_response_body.py +33 -0
  742. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_bad_gateway_error_response_body.py +33 -0
  743. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_gateway_timeout_error_response_body.py +33 -0
  744. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_internal_server_error_response_body.py +33 -0
  745. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_method_not_allowed_error_response_body.py +33 -0
  746. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_not_found_error_response_body.py +33 -0
  747. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_not_implemented_error_response_body.py +33 -0
  748. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_response_body.py +26 -0
  749. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_service_unavailable_error_response_body.py +33 -0
  750. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_too_many_requests_error_response_body.py +33 -0
  751. samsara/types/safety_events_v_2_get_safety_events_v_2_stream_unauthorized_error_response_body.py +33 -0
  752. samsara/types/safety_events_v_2_get_safety_events_v_2_too_many_requests_error_response_body.py +33 -0
  753. samsara/types/safety_events_v_2_get_safety_events_v_2_unauthorized_error_response_body.py +33 -0
  754. samsara/types/safety_score_behavior_object_response_body.py +41 -0
  755. samsara/types/safety_score_behavior_object_response_body_behavior_type.py +34 -0
  756. samsara/types/safety_score_speeding_object_response_body.py +43 -0
  757. samsara/types/safety_score_speeding_object_response_body_speeding_type.py +7 -0
  758. samsara/types/safety_scores_get_driver_safety_score_trips_bad_gateway_error_response_body.py +33 -0
  759. samsara/types/safety_scores_get_driver_safety_score_trips_gateway_timeout_error_response_body.py +33 -0
  760. samsara/types/safety_scores_get_driver_safety_score_trips_internal_server_error_response_body.py +33 -0
  761. samsara/types/safety_scores_get_driver_safety_score_trips_method_not_allowed_error_response_body.py +33 -0
  762. samsara/types/safety_scores_get_driver_safety_score_trips_not_found_error_response_body.py +33 -0
  763. samsara/types/safety_scores_get_driver_safety_score_trips_not_implemented_error_response_body.py +33 -0
  764. samsara/types/safety_scores_get_driver_safety_score_trips_response_body.py +26 -0
  765. samsara/types/safety_scores_get_driver_safety_score_trips_service_unavailable_error_response_body.py +33 -0
  766. samsara/types/safety_scores_get_driver_safety_score_trips_too_many_requests_error_response_body.py +33 -0
  767. samsara/types/safety_scores_get_driver_safety_score_trips_unauthorized_error_response_body.py +33 -0
  768. samsara/types/safety_scores_get_driver_safety_scores_bad_gateway_error_response_body.py +33 -0
  769. samsara/types/safety_scores_get_driver_safety_scores_gateway_timeout_error_response_body.py +33 -0
  770. samsara/types/safety_scores_get_driver_safety_scores_internal_server_error_response_body.py +33 -0
  771. samsara/types/safety_scores_get_driver_safety_scores_method_not_allowed_error_response_body.py +33 -0
  772. samsara/types/safety_scores_get_driver_safety_scores_not_found_error_response_body.py +33 -0
  773. samsara/types/safety_scores_get_driver_safety_scores_not_implemented_error_response_body.py +33 -0
  774. samsara/types/safety_scores_get_driver_safety_scores_response_body.py +26 -0
  775. samsara/types/safety_scores_get_driver_safety_scores_service_unavailable_error_response_body.py +33 -0
  776. samsara/types/safety_scores_get_driver_safety_scores_too_many_requests_error_response_body.py +33 -0
  777. samsara/types/safety_scores_get_driver_safety_scores_unauthorized_error_response_body.py +33 -0
  778. samsara/types/safety_scores_get_tag_group_safety_scores_bad_gateway_error_response_body.py +33 -0
  779. samsara/types/safety_scores_get_tag_group_safety_scores_gateway_timeout_error_response_body.py +33 -0
  780. samsara/types/safety_scores_get_tag_group_safety_scores_internal_server_error_response_body.py +33 -0
  781. samsara/types/safety_scores_get_tag_group_safety_scores_method_not_allowed_error_response_body.py +33 -0
  782. samsara/types/safety_scores_get_tag_group_safety_scores_not_found_error_response_body.py +33 -0
  783. samsara/types/safety_scores_get_tag_group_safety_scores_not_implemented_error_response_body.py +33 -0
  784. samsara/types/safety_scores_get_tag_group_safety_scores_response_body.py +20 -0
  785. samsara/types/safety_scores_get_tag_group_safety_scores_service_unavailable_error_response_body.py +33 -0
  786. samsara/types/safety_scores_get_tag_group_safety_scores_too_many_requests_error_response_body.py +33 -0
  787. samsara/types/safety_scores_get_tag_group_safety_scores_unauthorized_error_response_body.py +33 -0
  788. samsara/types/safety_scores_get_tag_safety_scores_bad_gateway_error_response_body.py +33 -0
  789. samsara/types/safety_scores_get_tag_safety_scores_gateway_timeout_error_response_body.py +33 -0
  790. samsara/types/safety_scores_get_tag_safety_scores_internal_server_error_response_body.py +33 -0
  791. samsara/types/safety_scores_get_tag_safety_scores_method_not_allowed_error_response_body.py +33 -0
  792. samsara/types/safety_scores_get_tag_safety_scores_not_found_error_response_body.py +33 -0
  793. samsara/types/safety_scores_get_tag_safety_scores_not_implemented_error_response_body.py +33 -0
  794. samsara/types/safety_scores_get_tag_safety_scores_response_body.py +26 -0
  795. samsara/types/safety_scores_get_tag_safety_scores_service_unavailable_error_response_body.py +33 -0
  796. samsara/types/safety_scores_get_tag_safety_scores_too_many_requests_error_response_body.py +33 -0
  797. samsara/types/safety_scores_get_tag_safety_scores_unauthorized_error_response_body.py +33 -0
  798. samsara/types/safety_scores_get_vehicle_safety_score_trips_bad_gateway_error_response_body.py +33 -0
  799. samsara/types/safety_scores_get_vehicle_safety_score_trips_gateway_timeout_error_response_body.py +33 -0
  800. samsara/types/safety_scores_get_vehicle_safety_score_trips_internal_server_error_response_body.py +33 -0
  801. samsara/types/safety_scores_get_vehicle_safety_score_trips_method_not_allowed_error_response_body.py +33 -0
  802. samsara/types/safety_scores_get_vehicle_safety_score_trips_not_found_error_response_body.py +33 -0
  803. samsara/types/safety_scores_get_vehicle_safety_score_trips_not_implemented_error_response_body.py +33 -0
  804. samsara/types/safety_scores_get_vehicle_safety_score_trips_response_body.py +26 -0
  805. samsara/types/safety_scores_get_vehicle_safety_score_trips_service_unavailable_error_response_body.py +33 -0
  806. samsara/types/safety_scores_get_vehicle_safety_score_trips_too_many_requests_error_response_body.py +33 -0
  807. samsara/types/safety_scores_get_vehicle_safety_score_trips_unauthorized_error_response_body.py +33 -0
  808. samsara/types/safety_scores_get_vehicle_safety_scores_bad_gateway_error_response_body.py +33 -0
  809. samsara/types/safety_scores_get_vehicle_safety_scores_gateway_timeout_error_response_body.py +33 -0
  810. samsara/types/safety_scores_get_vehicle_safety_scores_internal_server_error_response_body.py +33 -0
  811. samsara/types/safety_scores_get_vehicle_safety_scores_method_not_allowed_error_response_body.py +33 -0
  812. samsara/types/safety_scores_get_vehicle_safety_scores_not_found_error_response_body.py +33 -0
  813. samsara/types/safety_scores_get_vehicle_safety_scores_not_implemented_error_response_body.py +33 -0
  814. samsara/types/safety_scores_get_vehicle_safety_scores_response_body.py +26 -0
  815. samsara/types/safety_scores_get_vehicle_safety_scores_service_unavailable_error_response_body.py +33 -0
  816. samsara/types/safety_scores_get_vehicle_safety_scores_too_many_requests_error_response_body.py +33 -0
  817. samsara/types/safety_scores_get_vehicle_safety_scores_unauthorized_error_response_body.py +33 -0
  818. samsara/types/service_task_instance_input_object_request_body.py +6 -0
  819. samsara/types/service_task_instance_object_response_body.py +6 -0
  820. samsara/types/service_window_object_response_body.py +38 -0
  821. samsara/types/single_driver_efficiency_by_driver_data_object_response_body.py +47 -0
  822. samsara/types/single_driver_efficiency_by_vehicle_data_object_response_body.py +46 -0
  823. samsara/types/single_use_location_object_response_body.py +36 -0
  824. samsara/types/skill_object_response_body.py +31 -0
  825. samsara/types/standard_delete_response.py +3 -0
  826. samsara/types/start_function_run_response_body_response_body.py +28 -0
  827. samsara/types/string_data_point.py +28 -0
  828. samsara/types/tag_group_safety_score_response_body.py +54 -0
  829. samsara/types/tag_ids.py +5 -0
  830. samsara/types/tag_safety_score_response_body.py +59 -0
  831. samsara/types/tire_fault_code_details_object_request_body_specific_tire_fault_codes_item.py +2 -0
  832. samsara/types/tire_fault_code_details_object_response_body_specific_tire_fault_codes_item.py +2 -0
  833. samsara/types/total_brake_event_count.py +3 -0
  834. samsara/types/trailer_stat_decoration_response_body.py +145 -0
  835. samsara/types/trailer_stat_gps_odometer_meters_type_response_body.py +31 -0
  836. samsara/types/trailer_stat_gps_odometer_meters_with_decorations_type_response_body.py +33 -0
  837. samsara/types/trailer_stat_gps_type_response_body.py +56 -0
  838. samsara/types/trailer_stat_gps_with_decorations_type_response_body.py +58 -0
  839. samsara/types/trailer_stat_reefer_alarm_response_body.py +39 -0
  840. samsara/types/trailer_stat_reefer_alarm_type_response_body.py +32 -0
  841. samsara/types/trailer_stat_reefer_alarm_with_decorations_type_response_body.py +34 -0
  842. samsara/types/trailer_stat_reefer_ambient_air_temperature_milli_c_type_response_body.py +31 -0
  843. samsara/types/trailer_stat_reefer_ambient_air_temperature_with_decorations_type_response_body.py +33 -0
  844. samsara/types/trailer_stat_reefer_door_state_zone_1_type_response_body.py +34 -0
  845. samsara/types/trailer_stat_reefer_door_state_zone_1_type_response_body_value.py +5 -0
  846. samsara/types/trailer_stat_reefer_door_state_zone_1_with_decorations_type_response_body.py +36 -0
  847. samsara/types/trailer_stat_reefer_door_state_zone_1_with_decorations_type_response_body_value.py +7 -0
  848. samsara/types/trailer_stat_reefer_door_state_zone_2_type_response_body.py +34 -0
  849. samsara/types/trailer_stat_reefer_door_state_zone_2_type_response_body_value.py +5 -0
  850. samsara/types/trailer_stat_reefer_door_state_zone_2_with_decorations_type_response_body.py +36 -0
  851. samsara/types/trailer_stat_reefer_door_state_zone_2_with_decorations_type_response_body_value.py +7 -0
  852. samsara/types/trailer_stat_reefer_door_state_zone_3_type_response_body.py +34 -0
  853. samsara/types/trailer_stat_reefer_door_state_zone_3_type_response_body_value.py +5 -0
  854. samsara/types/trailer_stat_reefer_door_state_zone_3_with_decorations_type_response_body.py +36 -0
  855. samsara/types/trailer_stat_reefer_door_state_zone_3_with_decorations_type_response_body_value.py +7 -0
  856. samsara/types/trailer_stat_reefer_fuel_percent_type_response_body.py +31 -0
  857. samsara/types/trailer_stat_reefer_fuel_percent_with_decorations_type_response_body.py +33 -0
  858. samsara/types/trailer_stat_reefer_obd_engine_seconds_type_response_body.py +31 -0
  859. samsara/types/trailer_stat_reefer_obd_engine_seconds_with_decorations_type_response_body.py +33 -0
  860. samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_1_type_response_body.py +31 -0
  861. samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_1_with_decorations_type_response_body.py +33 -0
  862. samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_2_type_response_body.py +31 -0
  863. samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_2_with_decorations_type_response_body.py +33 -0
  864. samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_3_type_response_body.py +31 -0
  865. samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_3_with_decorations_type_response_body.py +33 -0
  866. samsara/types/trailer_stat_reefer_run_mode_type_response_body.py +31 -0
  867. samsara/types/trailer_stat_reefer_run_mode_with_decorations_type_response_body.py +33 -0
  868. samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_1_type_response_body.py +31 -0
  869. samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_1_with_decorations_type_response_body.py +33 -0
  870. samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_2_type_response_body.py +31 -0
  871. samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_2_with_decorations_type_response_body.py +33 -0
  872. samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_3_type_response_body.py +31 -0
  873. samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_3_with_decorations_type_response_body.py +33 -0
  874. samsara/types/trailer_stat_reefer_state_type_response_body.py +40 -0
  875. samsara/types/trailer_stat_reefer_state_with_decorations_type_response_body.py +42 -0
  876. samsara/types/trailer_stat_reefer_state_zone_1_type_response_body.py +40 -0
  877. samsara/types/trailer_stat_reefer_state_zone_1_with_decorations_type_response_body.py +42 -0
  878. samsara/types/trailer_stat_reefer_state_zone_2_type_response_body.py +40 -0
  879. samsara/types/trailer_stat_reefer_state_zone_2_with_decorations_type_response_body.py +42 -0
  880. samsara/types/trailer_stat_reefer_state_zone_3_type_response_body.py +40 -0
  881. samsara/types/trailer_stat_reefer_state_zone_3_with_decorations_type_response_body.py +42 -0
  882. samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_1_type_response_body.py +31 -0
  883. samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_1_with_decorations_type_response_body.py +33 -0
  884. samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_2_type_response_body.py +31 -0
  885. samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_2_with_decorations_type_response_body.py +33 -0
  886. samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_3_type_response_body.py +31 -0
  887. samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_3_with_decorations_type_response_body.py +33 -0
  888. samsara/types/trailer_stats_get_trailer_stats_feed_bad_gateway_error_response_body.py +33 -0
  889. samsara/types/trailer_stats_get_trailer_stats_feed_gateway_timeout_error_response_body.py +33 -0
  890. samsara/types/trailer_stats_get_trailer_stats_feed_internal_server_error_response_body.py +33 -0
  891. samsara/types/trailer_stats_get_trailer_stats_feed_method_not_allowed_error_response_body.py +33 -0
  892. samsara/types/trailer_stats_get_trailer_stats_feed_not_found_error_response_body.py +33 -0
  893. samsara/types/trailer_stats_get_trailer_stats_feed_not_implemented_error_response_body.py +33 -0
  894. samsara/types/trailer_stats_get_trailer_stats_feed_response_body.py +26 -0
  895. samsara/types/trailer_stats_get_trailer_stats_feed_service_unavailable_error_response_body.py +33 -0
  896. samsara/types/trailer_stats_get_trailer_stats_feed_too_many_requests_error_response_body.py +33 -0
  897. samsara/types/trailer_stats_get_trailer_stats_feed_unauthorized_error_response_body.py +33 -0
  898. samsara/types/trailer_stats_get_trailer_stats_history_bad_gateway_error_response_body.py +33 -0
  899. samsara/types/trailer_stats_get_trailer_stats_history_gateway_timeout_error_response_body.py +33 -0
  900. samsara/types/trailer_stats_get_trailer_stats_history_internal_server_error_response_body.py +33 -0
  901. samsara/types/trailer_stats_get_trailer_stats_history_method_not_allowed_error_response_body.py +33 -0
  902. samsara/types/trailer_stats_get_trailer_stats_history_not_found_error_response_body.py +33 -0
  903. samsara/types/trailer_stats_get_trailer_stats_history_not_implemented_error_response_body.py +33 -0
  904. samsara/types/trailer_stats_get_trailer_stats_history_response_body.py +26 -0
  905. samsara/types/trailer_stats_get_trailer_stats_history_service_unavailable_error_response_body.py +33 -0
  906. samsara/types/trailer_stats_get_trailer_stats_history_too_many_requests_error_response_body.py +33 -0
  907. samsara/types/trailer_stats_get_trailer_stats_history_unauthorized_error_response_body.py +33 -0
  908. samsara/types/trailer_stats_get_trailer_stats_snapshot_bad_gateway_error_response_body.py +33 -0
  909. samsara/types/trailer_stats_get_trailer_stats_snapshot_gateway_timeout_error_response_body.py +33 -0
  910. samsara/types/trailer_stats_get_trailer_stats_snapshot_internal_server_error_response_body.py +33 -0
  911. samsara/types/trailer_stats_get_trailer_stats_snapshot_method_not_allowed_error_response_body.py +33 -0
  912. samsara/types/trailer_stats_get_trailer_stats_snapshot_not_found_error_response_body.py +33 -0
  913. samsara/types/trailer_stats_get_trailer_stats_snapshot_not_implemented_error_response_body.py +33 -0
  914. samsara/types/trailer_stats_get_trailer_stats_snapshot_response_body.py +26 -0
  915. samsara/types/trailer_stats_get_trailer_stats_snapshot_service_unavailable_error_response_body.py +33 -0
  916. samsara/types/trailer_stats_get_trailer_stats_snapshot_too_many_requests_error_response_body.py +33 -0
  917. samsara/types/trailer_stats_get_trailer_stats_snapshot_unauthorized_error_response_body.py +33 -0
  918. samsara/types/trailer_stats_object_response_body.py +281 -0
  919. samsara/types/trailer_stats_snapshot_object_response_body.py +155 -0
  920. samsara/types/trips_breakdown_response_body.py +67 -0
  921. samsara/types/unit_response_body.py +2 -2
  922. samsara/types/unit_response_body_base_unit.py +15 -0
  923. samsara/types/unit_response_body_measurement_type.py +4 -0
  924. samsara/types/update_engine_immobilizer_relay_state_request_body_request_body.py +36 -0
  925. samsara/types/update_engine_immobilizer_relay_state_request_body_request_body_id.py +5 -0
  926. samsara/types/update_hub_location_request_body_request_body.py +93 -0
  927. samsara/types/uploaded_media_object_response_body.py +9 -1
  928. samsara/types/uploaded_media_object_response_body_camera_role.py +28 -0
  929. samsara/types/uploaded_media_object_response_body_input.py +2 -1
  930. samsara/types/v_1_asset.py +56 -0
  931. samsara/types/v_1_asset_cable.py +30 -0
  932. samsara/types/v_1_asset_current_location.py +52 -0
  933. samsara/types/v_1_asset_current_locations_response.py +55 -0
  934. samsara/types/v_1_asset_location_response.py +7 -0
  935. samsara/types/v_1_asset_location_response_item.py +50 -0
  936. samsara/types/v_1_asset_reefer_response.py +45 -0
  937. samsara/types/v_1_asset_reefer_response_reefer_stats.py +67 -0
  938. samsara/types/v_1_asset_reefer_response_reefer_stats_alarms.py +43 -0
  939. samsara/types/v_1_asset_reefer_response_reefer_stats_alarms_1.py +28 -0
  940. samsara/types/v_1_asset_reefer_response_reefer_stats_engine_hours.py +33 -0
  941. samsara/types/v_1_asset_reefer_response_reefer_stats_fuel_percentage.py +33 -0
  942. samsara/types/v_1_asset_reefer_response_reefer_stats_power_status.py +31 -0
  943. samsara/types/v_1_asset_reefer_response_reefer_stats_return_air_temp.py +33 -0
  944. samsara/types/v_1_asset_reefer_response_reefer_stats_set_point.py +33 -0
  945. samsara/types/v_1_assets_reefer.py +45 -0
  946. samsara/types/v_1_assets_reefer_reefer_stats.py +91 -0
  947. samsara/types/v_1_assets_reefer_reefer_stats_ambient_air_temperature.py +33 -0
  948. samsara/types/v_1_assets_reefer_reefer_stats_discharge_air_temperature.py +33 -0
  949. samsara/types/v_1_assets_reefer_reefer_stats_power_status.py +32 -0
  950. samsara/types/v_1_assets_reefer_reefer_stats_power_status_status.py +7 -0
  951. samsara/types/v_1_cargo_response.py +33 -0
  952. samsara/types/v_1_cargo_response_sensors.py +64 -0
  953. samsara/types/v_1_door_response.py +33 -0
  954. samsara/types/v_1_door_response_sensors.py +57 -0
  955. samsara/types/v_1_driver_safety_score_response.py +104 -0
  956. samsara/types/v_1_hos_authentication_logs_response.py +25 -0
  957. samsara/types/v_1_hos_authentication_logs_response_authentication_logs.py +55 -0
  958. samsara/types/v_1_humidity_response.py +33 -0
  959. samsara/types/v_1_humidity_response_sensors.py +55 -0
  960. samsara/types/v_1_machine.py +36 -0
  961. samsara/types/v_1_machine_history_response.py +24 -0
  962. samsara/types/v_1_machine_history_response_machines.py +33 -0
  963. samsara/types/v_1_machine_history_response_vibrations.py +24 -0
  964. samsara/types/v_1_pagination.py +39 -0
  965. samsara/types/v_1_programs_for_the_camera_response.py +7 -0
  966. samsara/types/v_1_programs_for_the_camera_response_item.py +22 -0
  967. samsara/types/v_1_safety_report_harsh_event.py +44 -0
  968. samsara/types/v_1_sensor.py +40 -0
  969. samsara/types/v_1_sensor_history_response.py +24 -0
  970. samsara/types/v_1_sensor_history_response_results.py +31 -0
  971. samsara/types/v_1_sensors_history_series.py +34 -0
  972. samsara/types/v_1_sensors_history_series_field.py +25 -0
  973. samsara/types/v_1_temperature_response.py +33 -0
  974. samsara/types/v_1_temperature_response_sensors.py +71 -0
  975. samsara/types/v_1_trailer_assignment_response.py +40 -0
  976. samsara/types/v_1_trailer_assignments_response.py +19 -0
  977. samsara/types/v_1_trailer_assignments_response_all_of.py +24 -0
  978. samsara/types/v_1_trailer_base.py +27 -0
  979. samsara/types/v_1_trip_response.py +24 -0
  980. samsara/types/v_1_trip_response_end_address.py +36 -0
  981. samsara/types/v_1_trip_response_end_coordinates.py +24 -0
  982. samsara/types/v_1_trip_response_start_address.py +36 -0
  983. samsara/types/v_1_trip_response_start_coordinates.py +24 -0
  984. samsara/types/v_1_trip_response_trips.py +119 -0
  985. samsara/types/v_1_vehicle_harsh_event_response.py +64 -0
  986. samsara/types/v_1_vehicle_harsh_event_response_location.py +32 -0
  987. samsara/types/v_1_vehicle_maintenance.py +33 -0
  988. samsara/types/v_1_vehicle_maintenance_j_1939.py +36 -0
  989. samsara/types/v_1_vehicle_maintenance_j_1939_check_engine_light.py +28 -0
  990. samsara/types/v_1_vehicle_maintenance_j_1939_diagnostic_trouble_codes.py +26 -0
  991. samsara/types/v_1_vehicle_maintenance_passenger.py +38 -0
  992. samsara/types/v_1_vehicle_maintenance_passenger_check_engine_light.py +25 -0
  993. samsara/types/v_1_vehicle_maintenance_passenger_diagnostic_trouble_codes.py +23 -0
  994. samsara/types/v_1_vehicle_safety_score_response.py +104 -0
  995. samsara/types/v_1_vision_cameras_response.py +7 -0
  996. samsara/types/v_1_vision_cameras_response_item.py +24 -0
  997. samsara/types/v_1_vision_run_by_camera_response.py +35 -0
  998. samsara/types/v_1_vision_run_by_camera_response_inspection_results.py +26 -0
  999. samsara/types/v_1_vision_run_by_camera_response_program.py +20 -0
  1000. samsara/types/v_1_vision_run_by_camera_response_run_summary.py +24 -0
  1001. samsara/types/v_1_vision_runs_by_camera_and_program_response.py +30 -0
  1002. samsara/types/v_1_vision_runs_by_camera_response.py +7 -0
  1003. samsara/types/v_1_vision_runs_by_camera_response_item.py +29 -0
  1004. samsara/types/v_1_vision_runs_by_camera_response_item_program.py +20 -0
  1005. samsara/types/v_1_vision_runs_by_camera_response_item_report_metadata.py +24 -0
  1006. samsara/types/v_1_vision_runs_response.py +24 -0
  1007. samsara/types/v_1_vision_runs_response_report_metadata.py +51 -0
  1008. samsara/types/v_1_vision_runs_response_vision_runs.py +28 -0
  1009. samsara/types/v_1_vision_step_results.py +7 -0
  1010. samsara/types/v_1_vision_step_results_item.py +68 -0
  1011. samsara/types/v_1_vision_step_results_item_angle_check.py +48 -0
  1012. samsara/types/v_1_vision_step_results_item_angle_check_angle_configured.py +24 -0
  1013. samsara/types/v_1_vision_step_results_item_barcode_item.py +23 -0
  1014. samsara/types/v_1_vision_step_results_item_boolean_logic.py +21 -0
  1015. samsara/types/v_1_vision_step_results_item_boolean_logic_steps_item.py +20 -0
  1016. samsara/types/v_1_vision_step_results_item_caliper.py +85 -0
  1017. samsara/types/v_1_vision_step_results_item_caliper_angle_range.py +24 -0
  1018. samsara/types/v_1_vision_step_results_item_caliper_contrast_range.py +24 -0
  1019. samsara/types/v_1_vision_step_results_item_caliper_filter_polarity.py +7 -0
  1020. samsara/types/v_1_vision_step_results_item_caliper_sharpness_range.py +24 -0
  1021. samsara/types/v_1_vision_step_results_item_caliper_straightness_range.py +24 -0
  1022. samsara/types/v_1_vision_step_results_item_contour.py +47 -0
  1023. samsara/types/v_1_vision_step_results_item_distance.py +87 -0
  1024. samsara/types/v_1_vision_step_results_item_expiration_date.py +23 -0
  1025. samsara/types/v_1_vision_step_results_item_find_copies.py +52 -0
  1026. samsara/types/v_1_vision_step_results_item_find_edge.py +86 -0
  1027. samsara/types/v_1_vision_step_results_item_find_edge_angle_range.py +24 -0
  1028. samsara/types/v_1_vision_step_results_item_find_edge_contrast_range.py +24 -0
  1029. samsara/types/v_1_vision_step_results_item_find_edge_sharpness_range.py +24 -0
  1030. samsara/types/v_1_vision_step_results_item_find_edge_straightness_range.py +24 -0
  1031. samsara/types/v_1_vision_step_results_item_find_shapes.py +23 -0
  1032. samsara/types/v_1_vision_step_results_item_fixture.py +24 -0
  1033. samsara/types/v_1_vision_step_results_item_fixture_coordinates.py +20 -0
  1034. samsara/types/v_1_vision_step_results_item_label_match.py +20 -0
  1035. samsara/types/v_1_vision_step_results_item_presence_absence.py +55 -0
  1036. samsara/types/v_1_vision_step_results_item_presence_absence_blue_range.py +20 -0
  1037. samsara/types/v_1_vision_step_results_item_presence_absence_grayscale_range.py +20 -0
  1038. samsara/types/v_1_vision_step_results_item_presence_absence_green_range.py +20 -0
  1039. samsara/types/v_1_vision_step_results_item_presence_absence_hue_range.py +20 -0
  1040. samsara/types/v_1_vision_step_results_item_presence_absence_red_range.py +20 -0
  1041. samsara/types/v_1_vision_step_results_item_presence_absence_saturation_range.py +20 -0
  1042. samsara/types/v_1_vision_step_results_item_presence_absence_value_range.py +20 -0
  1043. samsara/types/v_1_vision_step_results_item_text_match.py +22 -0
  1044. samsara/types/vehicle_fault_code_details_object_request_body.py +7 -0
  1045. samsara/types/vehicle_fault_code_details_object_response_body.py +7 -0
  1046. samsara/types/vehicle_safety_score_response_body.py +59 -0
  1047. samsara/types/vehicle_stats_decorations.py +9 -0
  1048. samsara/types/vehicle_stats_decorations_fuel_consumed_milliliters.py +20 -0
  1049. samsara/types/vehicle_stats_decorations_idling_duration_milliseconds.py +20 -0
  1050. samsara/types/vehicle_stats_fuel_consumed_milliliters.py +28 -0
  1051. samsara/types/vehicle_stats_fuel_consumed_milliliters_value.py +3 -0
  1052. samsara/types/vehicle_stats_fuel_consumed_milliliters_with_decoration.py +30 -0
  1053. samsara/types/vehicle_stats_idling_duration_milliseconds.py +28 -0
  1054. samsara/types/vehicle_stats_idling_duration_milliseconds_value.py +3 -0
  1055. samsara/types/vehicle_stats_idling_duration_milliseconds_with_decoration.py +30 -0
  1056. samsara/types/vehicle_stats_list_response_data.py +20 -0
  1057. samsara/types/vehicle_stats_response_data.py +8 -0
  1058. samsara/types/vehicle_stats_synthetic_engine_seconds.py +1 -1
  1059. samsara/types/vehicle_summary.py +68 -0
  1060. samsara/types/vehicles_lock_lock_vehicle_bad_gateway_error_response_body.py +33 -0
  1061. samsara/types/vehicles_lock_lock_vehicle_gateway_timeout_error_response_body.py +33 -0
  1062. samsara/types/vehicles_lock_lock_vehicle_internal_server_error_response_body.py +33 -0
  1063. samsara/types/vehicles_lock_lock_vehicle_method_not_allowed_error_response_body.py +33 -0
  1064. samsara/types/vehicles_lock_lock_vehicle_not_found_error_response_body.py +33 -0
  1065. samsara/types/vehicles_lock_lock_vehicle_not_implemented_error_response_body.py +33 -0
  1066. samsara/types/vehicles_lock_lock_vehicle_service_unavailable_error_response_body.py +33 -0
  1067. samsara/types/vehicles_lock_lock_vehicle_too_many_requests_error_response_body.py +33 -0
  1068. samsara/types/vehicles_lock_lock_vehicle_unauthorized_error_response_body.py +33 -0
  1069. samsara/types/vehicles_lock_unlock_vehicle_bad_gateway_error_response_body.py +33 -0
  1070. samsara/types/vehicles_lock_unlock_vehicle_gateway_timeout_error_response_body.py +33 -0
  1071. samsara/types/vehicles_lock_unlock_vehicle_internal_server_error_response_body.py +33 -0
  1072. samsara/types/vehicles_lock_unlock_vehicle_method_not_allowed_error_response_body.py +33 -0
  1073. samsara/types/vehicles_lock_unlock_vehicle_not_found_error_response_body.py +33 -0
  1074. samsara/types/vehicles_lock_unlock_vehicle_not_implemented_error_response_body.py +33 -0
  1075. samsara/types/vehicles_lock_unlock_vehicle_service_unavailable_error_response_body.py +33 -0
  1076. samsara/types/vehicles_lock_unlock_vehicle_too_many_requests_error_response_body.py +33 -0
  1077. samsara/types/vehicles_lock_unlock_vehicle_unauthorized_error_response_body.py +33 -0
  1078. samsara/types/webhook_response_response_body_event_types_item.py +2 -0
  1079. samsara/types/webhooks_get_webhook_response_body_event_types_item.py +2 -0
  1080. samsara/types/webhooks_patch_webhook_response_body_event_types_item.py +2 -0
  1081. samsara/types/webhooks_post_webhooks_response_body_event_types_item.py +2 -0
  1082. samsara/types/work_order_object_response_body.py +21 -0
  1083. samsara/types/work_order_tax_create_object_request_body.py +33 -0
  1084. samsara/types/workflow_incident_details_object_response_body.py +4 -0
  1085. samsara/users/__init__.py +28 -1
  1086. samsara/users/client.py +147 -51
  1087. samsara/users/raw_client.py +138 -61
  1088. samsara/users/types/__init__.py +32 -2
  1089. samsara/vehicle_locations/client.py +485 -0
  1090. samsara/vehicle_locations/raw_client.py +472 -0
  1091. samsara/vehicle_stats/__init__.py +52 -0
  1092. samsara/vehicle_stats/client.py +1092 -0
  1093. samsara/vehicle_stats/raw_client.py +1091 -0
  1094. samsara/vehicle_stats/types/__init__.py +50 -0
  1095. samsara/vehicle_stats/types/get_vehicle_stats_feed_request_decorations_item.py +57 -0
  1096. samsara/vehicle_stats/types/get_vehicle_stats_feed_request_types_item.py +71 -0
  1097. samsara/vehicle_stats/types/get_vehicle_stats_history_request_decorations_item.py +57 -0
  1098. samsara/vehicle_stats/types/get_vehicle_stats_history_request_types_item.py +71 -0
  1099. samsara/vehicle_stats/types/get_vehicle_stats_request_types_item.py +71 -0
  1100. samsara/vehicles/__init__.py +58 -32
  1101. samsara/vehicles/client.py +20 -17
  1102. samsara/vehicles/raw_client.py +2 -2
  1103. samsara/vehicles/types/__init__.py +56 -14
  1104. samsara/webhooks/__init__.py +36 -5
  1105. samsara/webhooks/client.py +47 -47
  1106. samsara/webhooks/raw_client.py +18 -51
  1107. samsara/webhooks/types/__init__.py +34 -3
  1108. samsara/webhooks/types/webhooks_post_webhooks_request_body_event_types_item.py +2 -0
  1109. samsara/work_orders/__init__.py +55 -0
  1110. samsara/work_orders/client.py +995 -0
  1111. samsara/work_orders/raw_client.py +2258 -0
  1112. samsara/work_orders/types/__init__.py +53 -0
  1113. samsara/work_orders/types/stream_work_orders_request_work_order_statuses_item.py +18 -0
  1114. samsara_api-4.0.0.dist-info/METADATA +238 -0
  1115. samsara_api-4.0.0.dist-info/RECORD +3387 -0
  1116. samsara/alerts/configurations/__init__.py +0 -7
  1117. samsara/alerts/configurations/client.py +0 -720
  1118. samsara/alerts/configurations/raw_client.py +0 -1552
  1119. samsara/alerts/configurations/types/__init__.py +0 -7
  1120. samsara/alerts/configurations/types/configurations_list_request_status.py +0 -5
  1121. samsara/alerts/incidents/client.py +0 -180
  1122. samsara/alerts/incidents/raw_client.py +0 -396
  1123. samsara/assets/location_and_speed/client.py +0 -226
  1124. samsara/assets/location_and_speed/raw_client.py +0 -458
  1125. samsara/attributes/types/attributes_delete_request_entity_type.py +0 -5
  1126. samsara/attributes/types/attributes_get_request_entity_type.py +0 -5
  1127. samsara/attributes/types/attributes_list_request_entity_type.py +0 -5
  1128. samsara/attributes/types/create_attribute_request_attribute_value_quantity.py +0 -5
  1129. samsara/attributes/types/update_attribute_request_attribute_value_quantity.py +0 -5
  1130. samsara/auth/__init__.py +0 -8
  1131. samsara/auth/client.py +0 -39
  1132. samsara/auth/raw_client.py +0 -13
  1133. samsara/auth/tokens/__init__.py +0 -7
  1134. samsara/auth/tokens/client.py +0 -185
  1135. samsara/auth/tokens/raw_client.py +0 -210
  1136. samsara/auth/tokens/types/__init__.py +0 -7
  1137. samsara/auth/tokens/types/create_tokens_response.py +0 -23
  1138. samsara/cameras/__init__.py +0 -13
  1139. samsara/cameras/client.py +0 -39
  1140. samsara/cameras/media/__init__.py +0 -19
  1141. samsara/cameras/media/client.py +0 -232
  1142. samsara/cameras/media/raw_client.py +0 -417
  1143. samsara/cameras/media/retrieval/__init__.py +0 -13
  1144. samsara/cameras/media/retrieval/client.py +0 -286
  1145. samsara/cameras/media/retrieval/raw_client.py +0 -686
  1146. samsara/cameras/media/retrieval/types/__init__.py +0 -15
  1147. samsara/cameras/media/retrieval/types/media_retrieval_post_media_retrieval_request_body_inputs_item.py +0 -7
  1148. samsara/cameras/media/types/__init__.py +0 -9
  1149. samsara/cameras/media/types/media_list_request_inputs_item.py +0 -7
  1150. samsara/cameras/media/types/media_list_request_media_types_item.py +0 -5
  1151. samsara/cameras/media/types/media_list_request_trigger_reasons_item.py +0 -17
  1152. samsara/cameras/raw_client.py +0 -13
  1153. samsara/coaching/driver_coach_assignments/client.py +0 -285
  1154. samsara/coaching/driver_coach_assignments/raw_client.py +0 -716
  1155. samsara/coaching/sessions/client.py +0 -228
  1156. samsara/coaching/sessions/raw_client.py +0 -448
  1157. samsara/defect_types/client.py +0 -156
  1158. samsara/defect_types/raw_client.py +0 -384
  1159. samsara/defects/client.py +0 -583
  1160. samsara/defects/raw_client.py +0 -1028
  1161. samsara/devices/client.py +0 -190
  1162. samsara/devices/raw_client.py +0 -412
  1163. samsara/document_types/client.py +0 -134
  1164. samsara/document_types/raw_client.py +0 -354
  1165. samsara/documents/pdfs/client.py +0 -206
  1166. samsara/documents/pdfs/raw_client.py +0 -212
  1167. samsara/driver_trailer_assignments/client.py +0 -389
  1168. samsara/driver_trailer_assignments/raw_client.py +0 -1044
  1169. samsara/driver_vehicle_assignments/types/driver_vehicle_assignments_get_request_assignment_type.py +0 -10
  1170. samsara/driver_vehicle_assignments/types/driver_vehicle_assignments_get_request_filter_by.py +0 -5
  1171. samsara/drivers/qr_codes/client.py +0 -304
  1172. samsara/drivers/qr_codes/raw_client.py +0 -926
  1173. samsara/drivers/vehicle_assignments/__init__.py +0 -7
  1174. samsara/drivers/vehicle_assignments/client.py +0 -201
  1175. samsara/drivers/vehicle_assignments/raw_client.py +0 -397
  1176. samsara/drivers/vehicle_assignments/types/__init__.py +0 -9
  1177. samsara/drivers/vehicle_assignments/types/vehicle_assignments_list_request_driver_activation_status.py +0 -5
  1178. samsara/dvirs/__init__.py +0 -7
  1179. samsara/dvirs/client.py +0 -775
  1180. samsara/dvirs/raw_client.py +0 -1223
  1181. samsara/dvirs/types/__init__.py +0 -7
  1182. samsara/equipment/locations/client.py +0 -467
  1183. samsara/equipment/locations/raw_client.py +0 -543
  1184. samsara/equipment/stats/__init__.py +0 -7
  1185. samsara/equipment/stats/client.py +0 -602
  1186. samsara/equipment/stats/raw_client.py +0 -684
  1187. samsara/equipment/stats/types/__init__.py +0 -9
  1188. samsara/equipment/stats/types/stats_feed_request_types_item.py +0 -19
  1189. samsara/equipment/stats/types/stats_history_request_types_item.py +0 -19
  1190. samsara/equipment/stats/types/stats_list_request_types_item.py +0 -19
  1191. samsara/form_submissions/__init__.py +0 -8
  1192. samsara/form_submissions/client.py +0 -669
  1193. samsara/form_submissions/pdf_exports/client.py +0 -221
  1194. samsara/form_submissions/pdf_exports/raw_client.py +0 -627
  1195. samsara/form_submissions/raw_client.py +0 -1550
  1196. samsara/form_submissions/types/__init__.py +0 -9
  1197. samsara/fuel_purchases/__init__.py +0 -7
  1198. samsara/fuel_purchases/client.py +0 -219
  1199. samsara/fuel_purchases/raw_client.py +0 -410
  1200. samsara/fuel_purchases/types/__init__.py +0 -9
  1201. samsara/hos/__init__.py +0 -7
  1202. samsara/hos/client.py +0 -695
  1203. samsara/hos/raw_client.py +0 -1177
  1204. samsara/hos/types/__init__.py +0 -7
  1205. samsara/hos/types/hos_daily_logs_request_driver_activation_status.py +0 -5
  1206. samsara/idling/types/idling_list_request_pto_state.py +0 -5
  1207. samsara/ifta/csv/__init__.py +0 -4
  1208. samsara/ifta/csv/client.py +0 -274
  1209. samsara/ifta/csv/raw_client.py +0 -675
  1210. samsara/inputs/__init__.py +0 -7
  1211. samsara/inputs/client.py +0 -223
  1212. samsara/inputs/raw_client.py +0 -445
  1213. samsara/inputs/types/__init__.py +0 -7
  1214. samsara/inputs/types/inputs_stream_request_type.py +0 -27
  1215. samsara/live_shares/__init__.py +0 -7
  1216. samsara/live_shares/client.py +0 -544
  1217. samsara/live_shares/raw_client.py +0 -1418
  1218. samsara/live_shares/types/__init__.py +0 -10
  1219. samsara/live_shares/types/live_shares_list_request_type.py +0 -7
  1220. samsara/maintenance/service_tasks/__init__.py +0 -4
  1221. samsara/maintenance/service_tasks/client.py +0 -322
  1222. samsara/maintenance/service_tasks/raw_client.py +0 -529
  1223. samsara/maintenance/work_orders/__init__.py +0 -21
  1224. samsara/maintenance/work_orders/client.py +0 -867
  1225. samsara/maintenance/work_orders/raw_client.py +0 -1980
  1226. samsara/maintenance/work_orders/types/__init__.py +0 -19
  1227. samsara/maintenance/work_orders/types/work_orders_stream_request_work_order_statuses_item.py +0 -18
  1228. samsara/me/__init__.py +0 -4
  1229. samsara/me/client.py +0 -108
  1230. samsara/me/raw_client.py +0 -99
  1231. samsara/readings/__init__.py +0 -4
  1232. samsara/readings/client.py +0 -524
  1233. samsara/readings/raw_client.py +0 -1214
  1234. samsara/reports/__init__.py +0 -7
  1235. samsara/reports/client.py +0 -49
  1236. samsara/reports/drivers/__init__.py +0 -7
  1237. samsara/reports/drivers/client.py +0 -39
  1238. samsara/reports/drivers/fuel_energy/__init__.py +0 -4
  1239. samsara/reports/drivers/fuel_energy/client.py +0 -194
  1240. samsara/reports/drivers/fuel_energy/raw_client.py +0 -384
  1241. samsara/reports/drivers/raw_client.py +0 -13
  1242. samsara/reports/ifta/__init__.py +0 -18
  1243. samsara/reports/ifta/client.py +0 -44
  1244. samsara/reports/ifta/jurisdiction/__init__.py +0 -7
  1245. samsara/reports/ifta/jurisdiction/client.py +0 -217
  1246. samsara/reports/ifta/jurisdiction/raw_client.py +0 -409
  1247. samsara/reports/ifta/jurisdiction/types/__init__.py +0 -9
  1248. samsara/reports/ifta/jurisdiction/types/jurisdiction_get_request_fuel_type.py +0 -25
  1249. samsara/reports/ifta/jurisdiction/types/jurisdiction_get_request_month.py +0 -21
  1250. samsara/reports/ifta/jurisdiction/types/jurisdiction_get_request_quarter.py +0 -5
  1251. samsara/reports/ifta/raw_client.py +0 -13
  1252. samsara/reports/ifta/vehicle/__init__.py +0 -7
  1253. samsara/reports/ifta/vehicle/client.py +0 -227
  1254. samsara/reports/ifta/vehicle/raw_client.py +0 -419
  1255. samsara/reports/ifta/vehicle/types/__init__.py +0 -9
  1256. samsara/reports/ifta/vehicle/types/vehicle_list_request_fuel_type.py +0 -25
  1257. samsara/reports/ifta/vehicle/types/vehicle_list_request_month.py +0 -21
  1258. samsara/reports/ifta/vehicle/types/vehicle_list_request_quarter.py +0 -5
  1259. samsara/reports/raw_client.py +0 -13
  1260. samsara/reports/vehicles/__init__.py +0 -8
  1261. samsara/reports/vehicles/client.py +0 -44
  1262. samsara/reports/vehicles/fuel_energy/__init__.py +0 -7
  1263. samsara/reports/vehicles/fuel_energy/client.py +0 -205
  1264. samsara/reports/vehicles/fuel_energy/raw_client.py +0 -395
  1265. samsara/reports/vehicles/fuel_energy/types/__init__.py +0 -7
  1266. samsara/reports/vehicles/fuel_energy/types/fuel_energy_list_request_energy_type.py +0 -5
  1267. samsara/reports/vehicles/idling/__init__.py +0 -4
  1268. samsara/reports/vehicles/idling/client.py +0 -236
  1269. samsara/reports/vehicles/idling/raw_client.py +0 -462
  1270. samsara/reports/vehicles/raw_client.py +0 -13
  1271. samsara/routes/audit_logs/__init__.py +0 -4
  1272. samsara/routes/audit_logs/client.py +0 -146
  1273. samsara/routes/audit_logs/raw_client.py +0 -350
  1274. samsara/safety_events/__init__.py +0 -7
  1275. samsara/safety_events/audit_logs/__init__.py +0 -4
  1276. samsara/safety_events/audit_logs/client.py +0 -160
  1277. samsara/safety_events/audit_logs/raw_client.py +0 -386
  1278. samsara/safety_events/client.py +0 -199
  1279. samsara/safety_events/raw_client.py +0 -207
  1280. samsara/settings/compliance/__init__.py +0 -4
  1281. samsara/settings/compliance/client.py +0 -308
  1282. samsara/settings/compliance/raw_client.py +0 -718
  1283. samsara/settings/driver_app/__init__.py +0 -4
  1284. samsara/settings/driver_app/client.py +0 -270
  1285. samsara/settings/driver_app/raw_client.py +0 -697
  1286. samsara/settings/safety/__init__.py +0 -4
  1287. samsara/settings/safety/client.py +0 -118
  1288. samsara/settings/safety/raw_client.py +0 -314
  1289. samsara/speeding_intervals/types/speeding_intervals_stream_request_query_by.py +0 -5
  1290. samsara/tachograph/__init__.py +0 -7
  1291. samsara/tachograph/client.py +0 -44
  1292. samsara/tachograph/driver/__init__.py +0 -4
  1293. samsara/tachograph/driver/client.py +0 -337
  1294. samsara/tachograph/driver/raw_client.py +0 -322
  1295. samsara/tachograph/raw_client.py +0 -13
  1296. samsara/tachograph/vehicles/__init__.py +0 -4
  1297. samsara/tachograph/vehicles/client.py +0 -190
  1298. samsara/tachograph/vehicles/raw_client.py +0 -173
  1299. samsara/training_assignments/__init__.py +0 -4
  1300. samsara/training_assignments/client.py +0 -520
  1301. samsara/training_assignments/raw_client.py +0 -1326
  1302. samsara/training_courses/__init__.py +0 -4
  1303. samsara/training_courses/client.py +0 -178
  1304. samsara/training_courses/raw_client.py +0 -398
  1305. samsara/trips/types/__init__.py +0 -8
  1306. samsara/trips/types/trips_stream_request_completion_status.py +0 -5
  1307. samsara/trips/types/trips_stream_request_query_by.py +0 -5
  1308. samsara/types/alert_event.py +0 -74
  1309. samsara/types/alert_event_alert_condition_id.py +0 -40
  1310. samsara/types/alert_event_device.py +0 -37
  1311. samsara/types/alert_event_driver.py +0 -27
  1312. samsara/types/alert_event_dvir.py +0 -52
  1313. samsara/types/alert_event_dvir_defects_item.py +0 -44
  1314. samsara/types/alert_event_dvir_driver.py +0 -27
  1315. samsara/types/alert_event_dvir_inspection_type.py +0 -7
  1316. samsara/types/alert_event_dvir_safety_status.py +0 -5
  1317. samsara/types/alert_event_dvir_trailer.py +0 -27
  1318. samsara/types/alert_event_dvir_vehicle.py +0 -27
  1319. samsara/types/assets_location_link_config_object.py +0 -31
  1320. samsara/types/assets_location_link_config_object_response_body.py +0 -33
  1321. samsara/types/attribute_attribute_value_quantity.py +0 -5
  1322. samsara/types/external_ids.py +0 -5
  1323. samsara/types/webhook_event.py +0 -37
  1324. samsara/user_roles/__init__.py +0 -4
  1325. samsara/user_roles/client.py +0 -142
  1326. samsara/user_roles/raw_client.py +0 -159
  1327. samsara/v_1_messages/__init__.py +0 -4
  1328. samsara/v_1_messages/client.py +0 -258
  1329. samsara/v_1_messages/raw_client.py +0 -273
  1330. samsara/vehicles/immobilizer/__init__.py +0 -4
  1331. samsara/vehicles/immobilizer/client.py +0 -182
  1332. samsara/vehicles/immobilizer/raw_client.py +0 -398
  1333. samsara/vehicles/locations/__init__.py +0 -4
  1334. samsara/vehicles/locations/client.py +0 -501
  1335. samsara/vehicles/locations/raw_client.py +0 -579
  1336. samsara/vehicles/stats/__init__.py +0 -19
  1337. samsara/vehicles/stats/client.py +0 -1076
  1338. samsara/vehicles/stats/raw_client.py +0 -1164
  1339. samsara/vehicles/stats/types/__init__.py +0 -17
  1340. samsara/vehicles/stats/types/stats_feed_request_decorations_item.py +0 -54
  1341. samsara/vehicles/stats/types/stats_feed_request_types_item.py +0 -68
  1342. samsara/vehicles/stats/types/stats_history_request_decorations_item.py +0 -54
  1343. samsara/vehicles/stats/types/stats_history_request_types_item.py +0 -68
  1344. samsara/vehicles/stats/types/stats_list_request_types_item.py +0 -68
  1345. samsara_api-3.0.0.dist-info/METADATA +0 -238
  1346. samsara_api-3.0.0.dist-info/RECORD +0 -2664
  1347. /samsara/{alerts/incidents → driver_qr_codes}/__init__.py +0 -0
  1348. /samsara/{assets/location_and_speed → fleet/attributes}/__init__.py +0 -0
  1349. /samsara/{form_submissions → forms}/types/form_submissions_patch_form_submission_request_body_status.py +0 -0
  1350. /samsara/{fuel_purchases → fuel_and_energy}/types/fuel_purchase_post_fuel_purchase_request_body_ifta_fuel_type.py +0 -0
  1351. /samsara/{coaching/driver_coach_assignments → hubs}/__init__.py +0 -0
  1352. /samsara/{coaching/sessions → industrial}/__init__.py +0 -0
  1353. /samsara/{live_shares → live_sharing_links}/types/live_sharing_links_create_live_sharing_link_request_body_type.py +0 -0
  1354. /samsara/{defect_types → location_and_speed}/__init__.py +0 -0
  1355. /samsara/{dvirs → maintenance}/types/create_dvir_request_safety_status.py +0 -0
  1356. /samsara/{cameras/media/retrieval → media}/types/media_retrieval_post_media_retrieval_request_body_media_type.py +0 -0
  1357. /samsara/{defects → messages}/__init__.py +0 -0
  1358. /samsara/{devices → organization_info}/__init__.py +0 -0
  1359. /samsara/{document_types → plans}/__init__.py +0 -0
  1360. /samsara/{documents/pdfs → preview_ap_is}/__init__.py +0 -0
  1361. /samsara/{driver_trailer_assignments → safety}/__init__.py +0 -0
  1362. /samsara/{drivers/qr_codes → tachograph_eu_only}/__init__.py +0 -0
  1363. /samsara/{equipment/locations → trailer_assignments}/__init__.py +0 -0
  1364. /samsara/{form_submissions/pdf_exports → vehicle_locations}/__init__.py +0 -0
  1365. /samsara/{maintenance/work_orders → work_orders}/types/work_orders_patch_work_orders_request_body_category.py +0 -0
  1366. /samsara/{maintenance/work_orders → work_orders}/types/work_orders_patch_work_orders_request_body_priority.py +0 -0
  1367. /samsara/{maintenance/work_orders → work_orders}/types/work_orders_patch_work_orders_request_body_status.py +0 -0
  1368. /samsara/{maintenance/work_orders → work_orders}/types/work_orders_post_work_orders_request_body_category.py +0 -0
  1369. /samsara/{maintenance/work_orders → work_orders}/types/work_orders_post_work_orders_request_body_priority.py +0 -0
  1370. {samsara_api-3.0.0.dist-info → samsara_api-4.0.0.dist-info}/LICENSE +0 -0
  1371. {samsara_api-3.0.0.dist-info → samsara_api-4.0.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,2258 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+ from json.decoder import JSONDecodeError
6
+
7
+ from ..core.api_error import ApiError
8
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
+ from ..core.http_response import AsyncHttpResponse, HttpResponse
10
+ from ..core.pydantic_utilities import parse_obj_as
11
+ from ..core.request_options import RequestOptions
12
+ from ..core.serialization import convert_and_respect_annotation_metadata
13
+ from ..errors.bad_gateway_error import BadGatewayError
14
+ from ..errors.gateway_timeout_error import GatewayTimeoutError
15
+ from ..errors.internal_server_error import InternalServerError
16
+ from ..errors.method_not_allowed_error import MethodNotAllowedError
17
+ from ..errors.not_found_error import NotFoundError
18
+ from ..errors.not_implemented_error import NotImplementedError
19
+ from ..errors.service_unavailable_error import ServiceUnavailableError
20
+ from ..errors.too_many_requests_error import TooManyRequestsError
21
+ from ..errors.unauthorized_error import UnauthorizedError
22
+ from ..types.service_task_instance_input_object_request_body import ServiceTaskInstanceInputObjectRequestBody
23
+ from ..types.work_order_discount_object_request_body import WorkOrderDiscountObjectRequestBody
24
+ from ..types.work_order_item_object_request_body import WorkOrderItemObjectRequestBody
25
+ from ..types.work_order_tax_create_object_request_body import WorkOrderTaxCreateObjectRequestBody
26
+ from ..types.work_order_tax_object_request_body import WorkOrderTaxObjectRequestBody
27
+ from ..types.work_orders_get_service_tasks_response_body import WorkOrdersGetServiceTasksResponseBody
28
+ from ..types.work_orders_get_work_orders_response_body import WorkOrdersGetWorkOrdersResponseBody
29
+ from ..types.work_orders_patch_work_orders_response_body import WorkOrdersPatchWorkOrdersResponseBody
30
+ from ..types.work_orders_post_work_orders_response_body import WorkOrdersPostWorkOrdersResponseBody
31
+ from ..types.work_orders_stream_work_orders_response_body import WorkOrdersStreamWorkOrdersResponseBody
32
+ from .types.stream_work_orders_request_work_order_statuses_item import StreamWorkOrdersRequestWorkOrderStatusesItem
33
+ from .types.work_orders_patch_work_orders_request_body_category import WorkOrdersPatchWorkOrdersRequestBodyCategory
34
+ from .types.work_orders_patch_work_orders_request_body_priority import WorkOrdersPatchWorkOrdersRequestBodyPriority
35
+ from .types.work_orders_patch_work_orders_request_body_status import WorkOrdersPatchWorkOrdersRequestBodyStatus
36
+ from .types.work_orders_post_work_orders_request_body_category import WorkOrdersPostWorkOrdersRequestBodyCategory
37
+ from .types.work_orders_post_work_orders_request_body_priority import WorkOrdersPostWorkOrdersRequestBodyPriority
38
+
39
+ # this is used as the default value for optional parameters
40
+ OMIT = typing.cast(typing.Any, ...)
41
+
42
+
43
+ class RawWorkOrdersClient:
44
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
45
+ self._client_wrapper = client_wrapper
46
+
47
+ def get_service_tasks(
48
+ self,
49
+ *,
50
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
51
+ include_archived: typing.Optional[bool] = None,
52
+ after: typing.Optional[str] = None,
53
+ request_options: typing.Optional[RequestOptions] = None,
54
+ ) -> HttpResponse[WorkOrdersGetServiceTasksResponseBody]:
55
+ """
56
+ Gets service tasks.
57
+
58
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
59
+
60
+ To use this endpoint, select **Read Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
61
+
62
+
63
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
64
+
65
+ Parameters
66
+ ----------
67
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
68
+ Filter by the IDs. If not provided, won't filter by id.
69
+
70
+ include_archived : typing.Optional[bool]
71
+ Include archived service task definitions.
72
+
73
+ after : typing.Optional[str]
74
+ If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
75
+
76
+ request_options : typing.Optional[RequestOptions]
77
+ Request-specific configuration.
78
+
79
+ Returns
80
+ -------
81
+ HttpResponse[WorkOrdersGetServiceTasksResponseBody]
82
+ OK response.
83
+ """
84
+ _response = self._client_wrapper.httpx_client.request(
85
+ "maintenance/service-tasks",
86
+ method="GET",
87
+ params={
88
+ "ids": ids,
89
+ "includeArchived": include_archived,
90
+ "after": after,
91
+ },
92
+ request_options=request_options,
93
+ )
94
+ try:
95
+ if 200 <= _response.status_code < 300:
96
+ _data = typing.cast(
97
+ WorkOrdersGetServiceTasksResponseBody,
98
+ parse_obj_as(
99
+ type_=WorkOrdersGetServiceTasksResponseBody, # type: ignore
100
+ object_=_response.json(),
101
+ ),
102
+ )
103
+ return HttpResponse(response=_response, data=_data)
104
+ if _response.status_code == 401:
105
+ raise UnauthorizedError(
106
+ headers=dict(_response.headers),
107
+ body=typing.cast(
108
+ typing.Optional[typing.Any],
109
+ parse_obj_as(
110
+ type_=typing.Optional[typing.Any], # type: ignore
111
+ object_=_response.json(),
112
+ ),
113
+ ),
114
+ )
115
+ if _response.status_code == 404:
116
+ raise NotFoundError(
117
+ headers=dict(_response.headers),
118
+ body=typing.cast(
119
+ typing.Optional[typing.Any],
120
+ parse_obj_as(
121
+ type_=typing.Optional[typing.Any], # type: ignore
122
+ object_=_response.json(),
123
+ ),
124
+ ),
125
+ )
126
+ if _response.status_code == 405:
127
+ raise MethodNotAllowedError(
128
+ headers=dict(_response.headers),
129
+ body=typing.cast(
130
+ typing.Optional[typing.Any],
131
+ parse_obj_as(
132
+ type_=typing.Optional[typing.Any], # type: ignore
133
+ object_=_response.json(),
134
+ ),
135
+ ),
136
+ )
137
+ if _response.status_code == 429:
138
+ raise TooManyRequestsError(
139
+ headers=dict(_response.headers),
140
+ body=typing.cast(
141
+ typing.Optional[typing.Any],
142
+ parse_obj_as(
143
+ type_=typing.Optional[typing.Any], # type: ignore
144
+ object_=_response.json(),
145
+ ),
146
+ ),
147
+ )
148
+ if _response.status_code == 500:
149
+ raise InternalServerError(
150
+ headers=dict(_response.headers),
151
+ body=typing.cast(
152
+ typing.Optional[typing.Any],
153
+ parse_obj_as(
154
+ type_=typing.Optional[typing.Any], # type: ignore
155
+ object_=_response.json(),
156
+ ),
157
+ ),
158
+ )
159
+ if _response.status_code == 501:
160
+ raise NotImplementedError(
161
+ headers=dict(_response.headers),
162
+ body=typing.cast(
163
+ typing.Optional[typing.Any],
164
+ parse_obj_as(
165
+ type_=typing.Optional[typing.Any], # type: ignore
166
+ object_=_response.json(),
167
+ ),
168
+ ),
169
+ )
170
+ if _response.status_code == 502:
171
+ raise BadGatewayError(
172
+ headers=dict(_response.headers),
173
+ body=typing.cast(
174
+ typing.Optional[typing.Any],
175
+ parse_obj_as(
176
+ type_=typing.Optional[typing.Any], # type: ignore
177
+ object_=_response.json(),
178
+ ),
179
+ ),
180
+ )
181
+ if _response.status_code == 503:
182
+ raise ServiceUnavailableError(
183
+ headers=dict(_response.headers),
184
+ body=typing.cast(
185
+ typing.Optional[typing.Any],
186
+ parse_obj_as(
187
+ type_=typing.Optional[typing.Any], # type: ignore
188
+ object_=_response.json(),
189
+ ),
190
+ ),
191
+ )
192
+ if _response.status_code == 504:
193
+ raise GatewayTimeoutError(
194
+ headers=dict(_response.headers),
195
+ body=typing.cast(
196
+ typing.Optional[typing.Any],
197
+ parse_obj_as(
198
+ type_=typing.Optional[typing.Any], # type: ignore
199
+ object_=_response.json(),
200
+ ),
201
+ ),
202
+ )
203
+ _response_json = _response.json()
204
+ except JSONDecodeError:
205
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
206
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
207
+
208
+ def get_work_orders(
209
+ self,
210
+ *,
211
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
212
+ after: typing.Optional[str] = None,
213
+ request_options: typing.Optional[RequestOptions] = None,
214
+ ) -> HttpResponse[WorkOrdersGetWorkOrdersResponseBody]:
215
+ """
216
+ Gets work orders.
217
+
218
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
219
+
220
+ To use this endpoint, select **Read Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
221
+
222
+
223
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
224
+
225
+ Parameters
226
+ ----------
227
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
228
+ Filter by the IDs. Up to 100 ids. Returns all if no ids are provided.
229
+
230
+ after : typing.Optional[str]
231
+ If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
232
+
233
+ request_options : typing.Optional[RequestOptions]
234
+ Request-specific configuration.
235
+
236
+ Returns
237
+ -------
238
+ HttpResponse[WorkOrdersGetWorkOrdersResponseBody]
239
+ OK response.
240
+ """
241
+ _response = self._client_wrapper.httpx_client.request(
242
+ "maintenance/work-orders",
243
+ method="GET",
244
+ params={
245
+ "ids": ids,
246
+ "after": after,
247
+ },
248
+ request_options=request_options,
249
+ )
250
+ try:
251
+ if 200 <= _response.status_code < 300:
252
+ _data = typing.cast(
253
+ WorkOrdersGetWorkOrdersResponseBody,
254
+ parse_obj_as(
255
+ type_=WorkOrdersGetWorkOrdersResponseBody, # type: ignore
256
+ object_=_response.json(),
257
+ ),
258
+ )
259
+ return HttpResponse(response=_response, data=_data)
260
+ if _response.status_code == 401:
261
+ raise UnauthorizedError(
262
+ headers=dict(_response.headers),
263
+ body=typing.cast(
264
+ typing.Optional[typing.Any],
265
+ parse_obj_as(
266
+ type_=typing.Optional[typing.Any], # type: ignore
267
+ object_=_response.json(),
268
+ ),
269
+ ),
270
+ )
271
+ if _response.status_code == 404:
272
+ raise NotFoundError(
273
+ headers=dict(_response.headers),
274
+ body=typing.cast(
275
+ typing.Optional[typing.Any],
276
+ parse_obj_as(
277
+ type_=typing.Optional[typing.Any], # type: ignore
278
+ object_=_response.json(),
279
+ ),
280
+ ),
281
+ )
282
+ if _response.status_code == 405:
283
+ raise MethodNotAllowedError(
284
+ headers=dict(_response.headers),
285
+ body=typing.cast(
286
+ typing.Optional[typing.Any],
287
+ parse_obj_as(
288
+ type_=typing.Optional[typing.Any], # type: ignore
289
+ object_=_response.json(),
290
+ ),
291
+ ),
292
+ )
293
+ if _response.status_code == 429:
294
+ raise TooManyRequestsError(
295
+ headers=dict(_response.headers),
296
+ body=typing.cast(
297
+ typing.Optional[typing.Any],
298
+ parse_obj_as(
299
+ type_=typing.Optional[typing.Any], # type: ignore
300
+ object_=_response.json(),
301
+ ),
302
+ ),
303
+ )
304
+ if _response.status_code == 500:
305
+ raise InternalServerError(
306
+ headers=dict(_response.headers),
307
+ body=typing.cast(
308
+ typing.Optional[typing.Any],
309
+ parse_obj_as(
310
+ type_=typing.Optional[typing.Any], # type: ignore
311
+ object_=_response.json(),
312
+ ),
313
+ ),
314
+ )
315
+ if _response.status_code == 501:
316
+ raise NotImplementedError(
317
+ headers=dict(_response.headers),
318
+ body=typing.cast(
319
+ typing.Optional[typing.Any],
320
+ parse_obj_as(
321
+ type_=typing.Optional[typing.Any], # type: ignore
322
+ object_=_response.json(),
323
+ ),
324
+ ),
325
+ )
326
+ if _response.status_code == 502:
327
+ raise BadGatewayError(
328
+ headers=dict(_response.headers),
329
+ body=typing.cast(
330
+ typing.Optional[typing.Any],
331
+ parse_obj_as(
332
+ type_=typing.Optional[typing.Any], # type: ignore
333
+ object_=_response.json(),
334
+ ),
335
+ ),
336
+ )
337
+ if _response.status_code == 503:
338
+ raise ServiceUnavailableError(
339
+ headers=dict(_response.headers),
340
+ body=typing.cast(
341
+ typing.Optional[typing.Any],
342
+ parse_obj_as(
343
+ type_=typing.Optional[typing.Any], # type: ignore
344
+ object_=_response.json(),
345
+ ),
346
+ ),
347
+ )
348
+ if _response.status_code == 504:
349
+ raise GatewayTimeoutError(
350
+ headers=dict(_response.headers),
351
+ body=typing.cast(
352
+ typing.Optional[typing.Any],
353
+ parse_obj_as(
354
+ type_=typing.Optional[typing.Any], # type: ignore
355
+ object_=_response.json(),
356
+ ),
357
+ ),
358
+ )
359
+ _response_json = _response.json()
360
+ except JSONDecodeError:
361
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
362
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
363
+
364
+ def post_work_orders(
365
+ self,
366
+ *,
367
+ asset_id: str,
368
+ assigned_user_id: typing.Optional[str] = OMIT,
369
+ category: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyCategory] = OMIT,
370
+ description: typing.Optional[str] = OMIT,
371
+ discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
372
+ due_at_time: typing.Optional[dt.datetime] = OMIT,
373
+ engine_hours: typing.Optional[int] = OMIT,
374
+ items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
375
+ odometer_meters: typing.Optional[int] = OMIT,
376
+ priority: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority] = OMIT,
377
+ service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
378
+ tax: typing.Optional[WorkOrderTaxCreateObjectRequestBody] = OMIT,
379
+ request_options: typing.Optional[RequestOptions] = None,
380
+ ) -> HttpResponse[WorkOrdersPostWorkOrdersResponseBody]:
381
+ """
382
+ Creates a work order.
383
+
384
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
385
+
386
+ To use this endpoint, select **Write Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
387
+
388
+
389
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
390
+
391
+ Parameters
392
+ ----------
393
+ asset_id : str
394
+ The ID of the asset.
395
+
396
+ assigned_user_id : typing.Optional[str]
397
+ The ID of the assigned mechanic.
398
+
399
+ category : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyCategory]
400
+ The category of the work order Valid values: `Annual`, `Corrective`, `Damage Repair`, `Preventive`, `Recall`, `Unspecified`
401
+
402
+ description : typing.Optional[str]
403
+ A description of what needs to be fixed.
404
+
405
+ discount : typing.Optional[WorkOrderDiscountObjectRequestBody]
406
+
407
+ due_at_time : typing.Optional[dt.datetime]
408
+ The due date of the work order in RFC 3339 format.
409
+
410
+ engine_hours : typing.Optional[int]
411
+ The engine hours at the time of the work order. Will default to current asset reading if unset.
412
+
413
+ items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
414
+ Items related to the work order.
415
+
416
+ odometer_meters : typing.Optional[int]
417
+ The odometer reading at the time of the work order. Will default to current asset reading if unset.
418
+
419
+ priority : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority]
420
+ The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
421
+
422
+ service_task_instances : typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]]
423
+ Service Tasks for the work order.
424
+
425
+ tax : typing.Optional[WorkOrderTaxCreateObjectRequestBody]
426
+
427
+ request_options : typing.Optional[RequestOptions]
428
+ Request-specific configuration.
429
+
430
+ Returns
431
+ -------
432
+ HttpResponse[WorkOrdersPostWorkOrdersResponseBody]
433
+ OK response.
434
+ """
435
+ _response = self._client_wrapper.httpx_client.request(
436
+ "maintenance/work-orders",
437
+ method="POST",
438
+ json={
439
+ "assetId": asset_id,
440
+ "assignedUserId": assigned_user_id,
441
+ "category": category,
442
+ "description": description,
443
+ "discount": convert_and_respect_annotation_metadata(
444
+ object_=discount, annotation=WorkOrderDiscountObjectRequestBody, direction="write"
445
+ ),
446
+ "dueAtTime": due_at_time,
447
+ "engineHours": engine_hours,
448
+ "items": convert_and_respect_annotation_metadata(
449
+ object_=items, annotation=typing.Sequence[WorkOrderItemObjectRequestBody], direction="write"
450
+ ),
451
+ "odometerMeters": odometer_meters,
452
+ "priority": priority,
453
+ "serviceTaskInstances": convert_and_respect_annotation_metadata(
454
+ object_=service_task_instances,
455
+ annotation=typing.Sequence[ServiceTaskInstanceInputObjectRequestBody],
456
+ direction="write",
457
+ ),
458
+ "tax": convert_and_respect_annotation_metadata(
459
+ object_=tax, annotation=WorkOrderTaxCreateObjectRequestBody, direction="write"
460
+ ),
461
+ },
462
+ headers={
463
+ "content-type": "application/json",
464
+ },
465
+ request_options=request_options,
466
+ omit=OMIT,
467
+ )
468
+ try:
469
+ if 200 <= _response.status_code < 300:
470
+ _data = typing.cast(
471
+ WorkOrdersPostWorkOrdersResponseBody,
472
+ parse_obj_as(
473
+ type_=WorkOrdersPostWorkOrdersResponseBody, # type: ignore
474
+ object_=_response.json(),
475
+ ),
476
+ )
477
+ return HttpResponse(response=_response, data=_data)
478
+ if _response.status_code == 401:
479
+ raise UnauthorizedError(
480
+ headers=dict(_response.headers),
481
+ body=typing.cast(
482
+ typing.Optional[typing.Any],
483
+ parse_obj_as(
484
+ type_=typing.Optional[typing.Any], # type: ignore
485
+ object_=_response.json(),
486
+ ),
487
+ ),
488
+ )
489
+ if _response.status_code == 404:
490
+ raise NotFoundError(
491
+ headers=dict(_response.headers),
492
+ body=typing.cast(
493
+ typing.Optional[typing.Any],
494
+ parse_obj_as(
495
+ type_=typing.Optional[typing.Any], # type: ignore
496
+ object_=_response.json(),
497
+ ),
498
+ ),
499
+ )
500
+ if _response.status_code == 405:
501
+ raise MethodNotAllowedError(
502
+ headers=dict(_response.headers),
503
+ body=typing.cast(
504
+ typing.Optional[typing.Any],
505
+ parse_obj_as(
506
+ type_=typing.Optional[typing.Any], # type: ignore
507
+ object_=_response.json(),
508
+ ),
509
+ ),
510
+ )
511
+ if _response.status_code == 429:
512
+ raise TooManyRequestsError(
513
+ headers=dict(_response.headers),
514
+ body=typing.cast(
515
+ typing.Optional[typing.Any],
516
+ parse_obj_as(
517
+ type_=typing.Optional[typing.Any], # type: ignore
518
+ object_=_response.json(),
519
+ ),
520
+ ),
521
+ )
522
+ if _response.status_code == 500:
523
+ raise InternalServerError(
524
+ headers=dict(_response.headers),
525
+ body=typing.cast(
526
+ typing.Optional[typing.Any],
527
+ parse_obj_as(
528
+ type_=typing.Optional[typing.Any], # type: ignore
529
+ object_=_response.json(),
530
+ ),
531
+ ),
532
+ )
533
+ if _response.status_code == 501:
534
+ raise NotImplementedError(
535
+ headers=dict(_response.headers),
536
+ body=typing.cast(
537
+ typing.Optional[typing.Any],
538
+ parse_obj_as(
539
+ type_=typing.Optional[typing.Any], # type: ignore
540
+ object_=_response.json(),
541
+ ),
542
+ ),
543
+ )
544
+ if _response.status_code == 502:
545
+ raise BadGatewayError(
546
+ headers=dict(_response.headers),
547
+ body=typing.cast(
548
+ typing.Optional[typing.Any],
549
+ parse_obj_as(
550
+ type_=typing.Optional[typing.Any], # type: ignore
551
+ object_=_response.json(),
552
+ ),
553
+ ),
554
+ )
555
+ if _response.status_code == 503:
556
+ raise ServiceUnavailableError(
557
+ headers=dict(_response.headers),
558
+ body=typing.cast(
559
+ typing.Optional[typing.Any],
560
+ parse_obj_as(
561
+ type_=typing.Optional[typing.Any], # type: ignore
562
+ object_=_response.json(),
563
+ ),
564
+ ),
565
+ )
566
+ if _response.status_code == 504:
567
+ raise GatewayTimeoutError(
568
+ headers=dict(_response.headers),
569
+ body=typing.cast(
570
+ typing.Optional[typing.Any],
571
+ parse_obj_as(
572
+ type_=typing.Optional[typing.Any], # type: ignore
573
+ object_=_response.json(),
574
+ ),
575
+ ),
576
+ )
577
+ _response_json = _response.json()
578
+ except JSONDecodeError:
579
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
580
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
581
+
582
+ def delete_work_orders(
583
+ self, *, id: str, request_options: typing.Optional[RequestOptions] = None
584
+ ) -> HttpResponse[None]:
585
+ """
586
+ Deletes a work order.
587
+
588
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
589
+
590
+ To use this endpoint, select **Write Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
591
+
592
+
593
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
594
+
595
+ Parameters
596
+ ----------
597
+ id : str
598
+ The unique id of the work order.
599
+
600
+ request_options : typing.Optional[RequestOptions]
601
+ Request-specific configuration.
602
+
603
+ Returns
604
+ -------
605
+ HttpResponse[None]
606
+ """
607
+ _response = self._client_wrapper.httpx_client.request(
608
+ "maintenance/work-orders",
609
+ method="DELETE",
610
+ params={
611
+ "id": id,
612
+ },
613
+ request_options=request_options,
614
+ )
615
+ try:
616
+ if 200 <= _response.status_code < 300:
617
+ return HttpResponse(response=_response, data=None)
618
+ if _response.status_code == 401:
619
+ raise UnauthorizedError(
620
+ headers=dict(_response.headers),
621
+ body=typing.cast(
622
+ typing.Optional[typing.Any],
623
+ parse_obj_as(
624
+ type_=typing.Optional[typing.Any], # type: ignore
625
+ object_=_response.json(),
626
+ ),
627
+ ),
628
+ )
629
+ if _response.status_code == 404:
630
+ raise NotFoundError(
631
+ headers=dict(_response.headers),
632
+ body=typing.cast(
633
+ typing.Optional[typing.Any],
634
+ parse_obj_as(
635
+ type_=typing.Optional[typing.Any], # type: ignore
636
+ object_=_response.json(),
637
+ ),
638
+ ),
639
+ )
640
+ if _response.status_code == 405:
641
+ raise MethodNotAllowedError(
642
+ headers=dict(_response.headers),
643
+ body=typing.cast(
644
+ typing.Optional[typing.Any],
645
+ parse_obj_as(
646
+ type_=typing.Optional[typing.Any], # type: ignore
647
+ object_=_response.json(),
648
+ ),
649
+ ),
650
+ )
651
+ if _response.status_code == 429:
652
+ raise TooManyRequestsError(
653
+ headers=dict(_response.headers),
654
+ body=typing.cast(
655
+ typing.Optional[typing.Any],
656
+ parse_obj_as(
657
+ type_=typing.Optional[typing.Any], # type: ignore
658
+ object_=_response.json(),
659
+ ),
660
+ ),
661
+ )
662
+ if _response.status_code == 500:
663
+ raise InternalServerError(
664
+ headers=dict(_response.headers),
665
+ body=typing.cast(
666
+ typing.Optional[typing.Any],
667
+ parse_obj_as(
668
+ type_=typing.Optional[typing.Any], # type: ignore
669
+ object_=_response.json(),
670
+ ),
671
+ ),
672
+ )
673
+ if _response.status_code == 501:
674
+ raise NotImplementedError(
675
+ headers=dict(_response.headers),
676
+ body=typing.cast(
677
+ typing.Optional[typing.Any],
678
+ parse_obj_as(
679
+ type_=typing.Optional[typing.Any], # type: ignore
680
+ object_=_response.json(),
681
+ ),
682
+ ),
683
+ )
684
+ if _response.status_code == 502:
685
+ raise BadGatewayError(
686
+ headers=dict(_response.headers),
687
+ body=typing.cast(
688
+ typing.Optional[typing.Any],
689
+ parse_obj_as(
690
+ type_=typing.Optional[typing.Any], # type: ignore
691
+ object_=_response.json(),
692
+ ),
693
+ ),
694
+ )
695
+ if _response.status_code == 503:
696
+ raise ServiceUnavailableError(
697
+ headers=dict(_response.headers),
698
+ body=typing.cast(
699
+ typing.Optional[typing.Any],
700
+ parse_obj_as(
701
+ type_=typing.Optional[typing.Any], # type: ignore
702
+ object_=_response.json(),
703
+ ),
704
+ ),
705
+ )
706
+ if _response.status_code == 504:
707
+ raise GatewayTimeoutError(
708
+ headers=dict(_response.headers),
709
+ body=typing.cast(
710
+ typing.Optional[typing.Any],
711
+ parse_obj_as(
712
+ type_=typing.Optional[typing.Any], # type: ignore
713
+ object_=_response.json(),
714
+ ),
715
+ ),
716
+ )
717
+ _response_json = _response.json()
718
+ except JSONDecodeError:
719
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
720
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
721
+
722
+ def patch_work_orders(
723
+ self,
724
+ *,
725
+ id: str,
726
+ assigned_user_id: typing.Optional[str] = OMIT,
727
+ category: typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyCategory] = OMIT,
728
+ closing_notes: typing.Optional[str] = OMIT,
729
+ completed_at_time: typing.Optional[dt.datetime] = OMIT,
730
+ description: typing.Optional[str] = OMIT,
731
+ discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
732
+ due_at_time: typing.Optional[dt.datetime] = OMIT,
733
+ engine_hours: typing.Optional[int] = OMIT,
734
+ invoice_number: typing.Optional[str] = OMIT,
735
+ items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
736
+ odometer_meters: typing.Optional[int] = OMIT,
737
+ po_number: typing.Optional[str] = OMIT,
738
+ priority: typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyPriority] = OMIT,
739
+ service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
740
+ status: typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyStatus] = OMIT,
741
+ tax: typing.Optional[WorkOrderTaxObjectRequestBody] = OMIT,
742
+ vendor_uuid: typing.Optional[str] = OMIT,
743
+ request_options: typing.Optional[RequestOptions] = None,
744
+ ) -> HttpResponse[WorkOrdersPatchWorkOrdersResponseBody]:
745
+ """
746
+ Updates a work order.
747
+
748
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
749
+
750
+ To use this endpoint, select **Write Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
751
+
752
+
753
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
754
+
755
+ Parameters
756
+ ----------
757
+ id : str
758
+ The unique id of the work order.
759
+
760
+ assigned_user_id : typing.Optional[str]
761
+ The ID of the assigned mechanic.
762
+
763
+ category : typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyCategory]
764
+ The category of the work order Valid values: `Annual`, `Corrective`, `Damage Repair`, `Preventive`, `Recall`, `Unspecified`
765
+
766
+ closing_notes : typing.Optional[str]
767
+ Notes on the work order.
768
+
769
+ completed_at_time : typing.Optional[dt.datetime]
770
+ The time the work order was completed in RFC 3339 format. Is automatically set when the status changes and this field is not provided.
771
+
772
+ description : typing.Optional[str]
773
+ A description of what needs to be fixed.
774
+
775
+ discount : typing.Optional[WorkOrderDiscountObjectRequestBody]
776
+
777
+ due_at_time : typing.Optional[dt.datetime]
778
+ The due date of the work order in RFC 3339 format.
779
+
780
+ engine_hours : typing.Optional[int]
781
+ The engine hours at the time of the work order. Will default to current asset reading if unset.
782
+
783
+ invoice_number : typing.Optional[str]
784
+ The invoice number for the work order.
785
+
786
+ items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
787
+ Items related to the work order.
788
+
789
+ odometer_meters : typing.Optional[int]
790
+ The odometer reading at the time of the work order. Will default to current asset reading if unset.
791
+
792
+ po_number : typing.Optional[str]
793
+ The purchase order number for the work order.
794
+
795
+ priority : typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyPriority]
796
+ The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
797
+
798
+ service_task_instances : typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]]
799
+ Service Tasks for the work order.
800
+
801
+ status : typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyStatus]
802
+ The status of the work order Valid values: `Assigned`, `Cancelled`, `Closed`, `Completed`, `In Progress`, `On Hold`, `Open`, `Pending Approval`, `Pending Parts`
803
+
804
+ tax : typing.Optional[WorkOrderTaxObjectRequestBody]
805
+
806
+ vendor_uuid : typing.Optional[str]
807
+ The vendor UUID for the work order.
808
+
809
+ request_options : typing.Optional[RequestOptions]
810
+ Request-specific configuration.
811
+
812
+ Returns
813
+ -------
814
+ HttpResponse[WorkOrdersPatchWorkOrdersResponseBody]
815
+ OK response.
816
+ """
817
+ _response = self._client_wrapper.httpx_client.request(
818
+ "maintenance/work-orders",
819
+ method="PATCH",
820
+ json={
821
+ "assignedUserId": assigned_user_id,
822
+ "category": category,
823
+ "closingNotes": closing_notes,
824
+ "completedAtTime": completed_at_time,
825
+ "description": description,
826
+ "discount": convert_and_respect_annotation_metadata(
827
+ object_=discount, annotation=WorkOrderDiscountObjectRequestBody, direction="write"
828
+ ),
829
+ "dueAtTime": due_at_time,
830
+ "engineHours": engine_hours,
831
+ "id": id,
832
+ "invoiceNumber": invoice_number,
833
+ "items": convert_and_respect_annotation_metadata(
834
+ object_=items, annotation=typing.Sequence[WorkOrderItemObjectRequestBody], direction="write"
835
+ ),
836
+ "odometerMeters": odometer_meters,
837
+ "poNumber": po_number,
838
+ "priority": priority,
839
+ "serviceTaskInstances": convert_and_respect_annotation_metadata(
840
+ object_=service_task_instances,
841
+ annotation=typing.Sequence[ServiceTaskInstanceInputObjectRequestBody],
842
+ direction="write",
843
+ ),
844
+ "status": status,
845
+ "tax": convert_and_respect_annotation_metadata(
846
+ object_=tax, annotation=WorkOrderTaxObjectRequestBody, direction="write"
847
+ ),
848
+ "vendorUuid": vendor_uuid,
849
+ },
850
+ headers={
851
+ "content-type": "application/json",
852
+ },
853
+ request_options=request_options,
854
+ omit=OMIT,
855
+ )
856
+ try:
857
+ if 200 <= _response.status_code < 300:
858
+ _data = typing.cast(
859
+ WorkOrdersPatchWorkOrdersResponseBody,
860
+ parse_obj_as(
861
+ type_=WorkOrdersPatchWorkOrdersResponseBody, # type: ignore
862
+ object_=_response.json(),
863
+ ),
864
+ )
865
+ return HttpResponse(response=_response, data=_data)
866
+ if _response.status_code == 401:
867
+ raise UnauthorizedError(
868
+ headers=dict(_response.headers),
869
+ body=typing.cast(
870
+ typing.Optional[typing.Any],
871
+ parse_obj_as(
872
+ type_=typing.Optional[typing.Any], # type: ignore
873
+ object_=_response.json(),
874
+ ),
875
+ ),
876
+ )
877
+ if _response.status_code == 404:
878
+ raise NotFoundError(
879
+ headers=dict(_response.headers),
880
+ body=typing.cast(
881
+ typing.Optional[typing.Any],
882
+ parse_obj_as(
883
+ type_=typing.Optional[typing.Any], # type: ignore
884
+ object_=_response.json(),
885
+ ),
886
+ ),
887
+ )
888
+ if _response.status_code == 405:
889
+ raise MethodNotAllowedError(
890
+ headers=dict(_response.headers),
891
+ body=typing.cast(
892
+ typing.Optional[typing.Any],
893
+ parse_obj_as(
894
+ type_=typing.Optional[typing.Any], # type: ignore
895
+ object_=_response.json(),
896
+ ),
897
+ ),
898
+ )
899
+ if _response.status_code == 429:
900
+ raise TooManyRequestsError(
901
+ headers=dict(_response.headers),
902
+ body=typing.cast(
903
+ typing.Optional[typing.Any],
904
+ parse_obj_as(
905
+ type_=typing.Optional[typing.Any], # type: ignore
906
+ object_=_response.json(),
907
+ ),
908
+ ),
909
+ )
910
+ if _response.status_code == 500:
911
+ raise InternalServerError(
912
+ headers=dict(_response.headers),
913
+ body=typing.cast(
914
+ typing.Optional[typing.Any],
915
+ parse_obj_as(
916
+ type_=typing.Optional[typing.Any], # type: ignore
917
+ object_=_response.json(),
918
+ ),
919
+ ),
920
+ )
921
+ if _response.status_code == 501:
922
+ raise NotImplementedError(
923
+ headers=dict(_response.headers),
924
+ body=typing.cast(
925
+ typing.Optional[typing.Any],
926
+ parse_obj_as(
927
+ type_=typing.Optional[typing.Any], # type: ignore
928
+ object_=_response.json(),
929
+ ),
930
+ ),
931
+ )
932
+ if _response.status_code == 502:
933
+ raise BadGatewayError(
934
+ headers=dict(_response.headers),
935
+ body=typing.cast(
936
+ typing.Optional[typing.Any],
937
+ parse_obj_as(
938
+ type_=typing.Optional[typing.Any], # type: ignore
939
+ object_=_response.json(),
940
+ ),
941
+ ),
942
+ )
943
+ if _response.status_code == 503:
944
+ raise ServiceUnavailableError(
945
+ headers=dict(_response.headers),
946
+ body=typing.cast(
947
+ typing.Optional[typing.Any],
948
+ parse_obj_as(
949
+ type_=typing.Optional[typing.Any], # type: ignore
950
+ object_=_response.json(),
951
+ ),
952
+ ),
953
+ )
954
+ if _response.status_code == 504:
955
+ raise GatewayTimeoutError(
956
+ headers=dict(_response.headers),
957
+ body=typing.cast(
958
+ typing.Optional[typing.Any],
959
+ parse_obj_as(
960
+ type_=typing.Optional[typing.Any], # type: ignore
961
+ object_=_response.json(),
962
+ ),
963
+ ),
964
+ )
965
+ _response_json = _response.json()
966
+ except JSONDecodeError:
967
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
968
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
969
+
970
+ def stream_work_orders(
971
+ self,
972
+ *,
973
+ start_time: str,
974
+ after: typing.Optional[str] = None,
975
+ end_time: typing.Optional[str] = None,
976
+ work_order_statuses: typing.Optional[
977
+ typing.Union[
978
+ StreamWorkOrdersRequestWorkOrderStatusesItem,
979
+ typing.Sequence[StreamWorkOrdersRequestWorkOrderStatusesItem],
980
+ ]
981
+ ] = None,
982
+ asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
983
+ assigned_user_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
984
+ request_options: typing.Optional[RequestOptions] = None,
985
+ ) -> HttpResponse[WorkOrdersStreamWorkOrdersResponseBody]:
986
+ """
987
+ Stream work orders.
988
+
989
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
990
+
991
+ To use this endpoint, select **Read Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
992
+
993
+
994
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
995
+
996
+ Parameters
997
+ ----------
998
+ start_time : str
999
+ A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
1000
+
1001
+ after : typing.Optional[str]
1002
+ If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
1003
+
1004
+ end_time : typing.Optional[str]
1005
+ An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
1006
+
1007
+ work_order_statuses : typing.Optional[typing.Union[StreamWorkOrdersRequestWorkOrderStatusesItem, typing.Sequence[StreamWorkOrdersRequestWorkOrderStatusesItem]]]
1008
+ Work Order status filter.
1009
+
1010
+ asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1011
+ Work Order asset id filter. Up to 50 ids.
1012
+
1013
+ assigned_user_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1014
+ Work Order assigned user id filter. Up to 50 ids.
1015
+
1016
+ request_options : typing.Optional[RequestOptions]
1017
+ Request-specific configuration.
1018
+
1019
+ Returns
1020
+ -------
1021
+ HttpResponse[WorkOrdersStreamWorkOrdersResponseBody]
1022
+ OK response.
1023
+ """
1024
+ _response = self._client_wrapper.httpx_client.request(
1025
+ "maintenance/work-orders/stream",
1026
+ method="GET",
1027
+ params={
1028
+ "after": after,
1029
+ "startTime": start_time,
1030
+ "endTime": end_time,
1031
+ "workOrderStatuses": work_order_statuses,
1032
+ "assetIds": asset_ids,
1033
+ "assignedUserIds": assigned_user_ids,
1034
+ },
1035
+ request_options=request_options,
1036
+ )
1037
+ try:
1038
+ if 200 <= _response.status_code < 300:
1039
+ _data = typing.cast(
1040
+ WorkOrdersStreamWorkOrdersResponseBody,
1041
+ parse_obj_as(
1042
+ type_=WorkOrdersStreamWorkOrdersResponseBody, # type: ignore
1043
+ object_=_response.json(),
1044
+ ),
1045
+ )
1046
+ return HttpResponse(response=_response, data=_data)
1047
+ if _response.status_code == 401:
1048
+ raise UnauthorizedError(
1049
+ headers=dict(_response.headers),
1050
+ body=typing.cast(
1051
+ typing.Optional[typing.Any],
1052
+ parse_obj_as(
1053
+ type_=typing.Optional[typing.Any], # type: ignore
1054
+ object_=_response.json(),
1055
+ ),
1056
+ ),
1057
+ )
1058
+ if _response.status_code == 404:
1059
+ raise NotFoundError(
1060
+ headers=dict(_response.headers),
1061
+ body=typing.cast(
1062
+ typing.Optional[typing.Any],
1063
+ parse_obj_as(
1064
+ type_=typing.Optional[typing.Any], # type: ignore
1065
+ object_=_response.json(),
1066
+ ),
1067
+ ),
1068
+ )
1069
+ if _response.status_code == 405:
1070
+ raise MethodNotAllowedError(
1071
+ headers=dict(_response.headers),
1072
+ body=typing.cast(
1073
+ typing.Optional[typing.Any],
1074
+ parse_obj_as(
1075
+ type_=typing.Optional[typing.Any], # type: ignore
1076
+ object_=_response.json(),
1077
+ ),
1078
+ ),
1079
+ )
1080
+ if _response.status_code == 429:
1081
+ raise TooManyRequestsError(
1082
+ headers=dict(_response.headers),
1083
+ body=typing.cast(
1084
+ typing.Optional[typing.Any],
1085
+ parse_obj_as(
1086
+ type_=typing.Optional[typing.Any], # type: ignore
1087
+ object_=_response.json(),
1088
+ ),
1089
+ ),
1090
+ )
1091
+ if _response.status_code == 500:
1092
+ raise InternalServerError(
1093
+ headers=dict(_response.headers),
1094
+ body=typing.cast(
1095
+ typing.Optional[typing.Any],
1096
+ parse_obj_as(
1097
+ type_=typing.Optional[typing.Any], # type: ignore
1098
+ object_=_response.json(),
1099
+ ),
1100
+ ),
1101
+ )
1102
+ if _response.status_code == 501:
1103
+ raise NotImplementedError(
1104
+ headers=dict(_response.headers),
1105
+ body=typing.cast(
1106
+ typing.Optional[typing.Any],
1107
+ parse_obj_as(
1108
+ type_=typing.Optional[typing.Any], # type: ignore
1109
+ object_=_response.json(),
1110
+ ),
1111
+ ),
1112
+ )
1113
+ if _response.status_code == 502:
1114
+ raise BadGatewayError(
1115
+ headers=dict(_response.headers),
1116
+ body=typing.cast(
1117
+ typing.Optional[typing.Any],
1118
+ parse_obj_as(
1119
+ type_=typing.Optional[typing.Any], # type: ignore
1120
+ object_=_response.json(),
1121
+ ),
1122
+ ),
1123
+ )
1124
+ if _response.status_code == 503:
1125
+ raise ServiceUnavailableError(
1126
+ headers=dict(_response.headers),
1127
+ body=typing.cast(
1128
+ typing.Optional[typing.Any],
1129
+ parse_obj_as(
1130
+ type_=typing.Optional[typing.Any], # type: ignore
1131
+ object_=_response.json(),
1132
+ ),
1133
+ ),
1134
+ )
1135
+ if _response.status_code == 504:
1136
+ raise GatewayTimeoutError(
1137
+ headers=dict(_response.headers),
1138
+ body=typing.cast(
1139
+ typing.Optional[typing.Any],
1140
+ parse_obj_as(
1141
+ type_=typing.Optional[typing.Any], # type: ignore
1142
+ object_=_response.json(),
1143
+ ),
1144
+ ),
1145
+ )
1146
+ _response_json = _response.json()
1147
+ except JSONDecodeError:
1148
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1149
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1150
+
1151
+
1152
+ class AsyncRawWorkOrdersClient:
1153
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
1154
+ self._client_wrapper = client_wrapper
1155
+
1156
+ async def get_service_tasks(
1157
+ self,
1158
+ *,
1159
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1160
+ include_archived: typing.Optional[bool] = None,
1161
+ after: typing.Optional[str] = None,
1162
+ request_options: typing.Optional[RequestOptions] = None,
1163
+ ) -> AsyncHttpResponse[WorkOrdersGetServiceTasksResponseBody]:
1164
+ """
1165
+ Gets service tasks.
1166
+
1167
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1168
+
1169
+ To use this endpoint, select **Read Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
1170
+
1171
+
1172
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
1173
+
1174
+ Parameters
1175
+ ----------
1176
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1177
+ Filter by the IDs. If not provided, won't filter by id.
1178
+
1179
+ include_archived : typing.Optional[bool]
1180
+ Include archived service task definitions.
1181
+
1182
+ after : typing.Optional[str]
1183
+ If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
1184
+
1185
+ request_options : typing.Optional[RequestOptions]
1186
+ Request-specific configuration.
1187
+
1188
+ Returns
1189
+ -------
1190
+ AsyncHttpResponse[WorkOrdersGetServiceTasksResponseBody]
1191
+ OK response.
1192
+ """
1193
+ _response = await self._client_wrapper.httpx_client.request(
1194
+ "maintenance/service-tasks",
1195
+ method="GET",
1196
+ params={
1197
+ "ids": ids,
1198
+ "includeArchived": include_archived,
1199
+ "after": after,
1200
+ },
1201
+ request_options=request_options,
1202
+ )
1203
+ try:
1204
+ if 200 <= _response.status_code < 300:
1205
+ _data = typing.cast(
1206
+ WorkOrdersGetServiceTasksResponseBody,
1207
+ parse_obj_as(
1208
+ type_=WorkOrdersGetServiceTasksResponseBody, # type: ignore
1209
+ object_=_response.json(),
1210
+ ),
1211
+ )
1212
+ return AsyncHttpResponse(response=_response, data=_data)
1213
+ if _response.status_code == 401:
1214
+ raise UnauthorizedError(
1215
+ headers=dict(_response.headers),
1216
+ body=typing.cast(
1217
+ typing.Optional[typing.Any],
1218
+ parse_obj_as(
1219
+ type_=typing.Optional[typing.Any], # type: ignore
1220
+ object_=_response.json(),
1221
+ ),
1222
+ ),
1223
+ )
1224
+ if _response.status_code == 404:
1225
+ raise NotFoundError(
1226
+ headers=dict(_response.headers),
1227
+ body=typing.cast(
1228
+ typing.Optional[typing.Any],
1229
+ parse_obj_as(
1230
+ type_=typing.Optional[typing.Any], # type: ignore
1231
+ object_=_response.json(),
1232
+ ),
1233
+ ),
1234
+ )
1235
+ if _response.status_code == 405:
1236
+ raise MethodNotAllowedError(
1237
+ headers=dict(_response.headers),
1238
+ body=typing.cast(
1239
+ typing.Optional[typing.Any],
1240
+ parse_obj_as(
1241
+ type_=typing.Optional[typing.Any], # type: ignore
1242
+ object_=_response.json(),
1243
+ ),
1244
+ ),
1245
+ )
1246
+ if _response.status_code == 429:
1247
+ raise TooManyRequestsError(
1248
+ headers=dict(_response.headers),
1249
+ body=typing.cast(
1250
+ typing.Optional[typing.Any],
1251
+ parse_obj_as(
1252
+ type_=typing.Optional[typing.Any], # type: ignore
1253
+ object_=_response.json(),
1254
+ ),
1255
+ ),
1256
+ )
1257
+ if _response.status_code == 500:
1258
+ raise InternalServerError(
1259
+ headers=dict(_response.headers),
1260
+ body=typing.cast(
1261
+ typing.Optional[typing.Any],
1262
+ parse_obj_as(
1263
+ type_=typing.Optional[typing.Any], # type: ignore
1264
+ object_=_response.json(),
1265
+ ),
1266
+ ),
1267
+ )
1268
+ if _response.status_code == 501:
1269
+ raise NotImplementedError(
1270
+ headers=dict(_response.headers),
1271
+ body=typing.cast(
1272
+ typing.Optional[typing.Any],
1273
+ parse_obj_as(
1274
+ type_=typing.Optional[typing.Any], # type: ignore
1275
+ object_=_response.json(),
1276
+ ),
1277
+ ),
1278
+ )
1279
+ if _response.status_code == 502:
1280
+ raise BadGatewayError(
1281
+ headers=dict(_response.headers),
1282
+ body=typing.cast(
1283
+ typing.Optional[typing.Any],
1284
+ parse_obj_as(
1285
+ type_=typing.Optional[typing.Any], # type: ignore
1286
+ object_=_response.json(),
1287
+ ),
1288
+ ),
1289
+ )
1290
+ if _response.status_code == 503:
1291
+ raise ServiceUnavailableError(
1292
+ headers=dict(_response.headers),
1293
+ body=typing.cast(
1294
+ typing.Optional[typing.Any],
1295
+ parse_obj_as(
1296
+ type_=typing.Optional[typing.Any], # type: ignore
1297
+ object_=_response.json(),
1298
+ ),
1299
+ ),
1300
+ )
1301
+ if _response.status_code == 504:
1302
+ raise GatewayTimeoutError(
1303
+ headers=dict(_response.headers),
1304
+ body=typing.cast(
1305
+ typing.Optional[typing.Any],
1306
+ parse_obj_as(
1307
+ type_=typing.Optional[typing.Any], # type: ignore
1308
+ object_=_response.json(),
1309
+ ),
1310
+ ),
1311
+ )
1312
+ _response_json = _response.json()
1313
+ except JSONDecodeError:
1314
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1315
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1316
+
1317
+ async def get_work_orders(
1318
+ self,
1319
+ *,
1320
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1321
+ after: typing.Optional[str] = None,
1322
+ request_options: typing.Optional[RequestOptions] = None,
1323
+ ) -> AsyncHttpResponse[WorkOrdersGetWorkOrdersResponseBody]:
1324
+ """
1325
+ Gets work orders.
1326
+
1327
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1328
+
1329
+ To use this endpoint, select **Read Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
1330
+
1331
+
1332
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
1333
+
1334
+ Parameters
1335
+ ----------
1336
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1337
+ Filter by the IDs. Up to 100 ids. Returns all if no ids are provided.
1338
+
1339
+ after : typing.Optional[str]
1340
+ If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
1341
+
1342
+ request_options : typing.Optional[RequestOptions]
1343
+ Request-specific configuration.
1344
+
1345
+ Returns
1346
+ -------
1347
+ AsyncHttpResponse[WorkOrdersGetWorkOrdersResponseBody]
1348
+ OK response.
1349
+ """
1350
+ _response = await self._client_wrapper.httpx_client.request(
1351
+ "maintenance/work-orders",
1352
+ method="GET",
1353
+ params={
1354
+ "ids": ids,
1355
+ "after": after,
1356
+ },
1357
+ request_options=request_options,
1358
+ )
1359
+ try:
1360
+ if 200 <= _response.status_code < 300:
1361
+ _data = typing.cast(
1362
+ WorkOrdersGetWorkOrdersResponseBody,
1363
+ parse_obj_as(
1364
+ type_=WorkOrdersGetWorkOrdersResponseBody, # type: ignore
1365
+ object_=_response.json(),
1366
+ ),
1367
+ )
1368
+ return AsyncHttpResponse(response=_response, data=_data)
1369
+ if _response.status_code == 401:
1370
+ raise UnauthorizedError(
1371
+ headers=dict(_response.headers),
1372
+ body=typing.cast(
1373
+ typing.Optional[typing.Any],
1374
+ parse_obj_as(
1375
+ type_=typing.Optional[typing.Any], # type: ignore
1376
+ object_=_response.json(),
1377
+ ),
1378
+ ),
1379
+ )
1380
+ if _response.status_code == 404:
1381
+ raise NotFoundError(
1382
+ headers=dict(_response.headers),
1383
+ body=typing.cast(
1384
+ typing.Optional[typing.Any],
1385
+ parse_obj_as(
1386
+ type_=typing.Optional[typing.Any], # type: ignore
1387
+ object_=_response.json(),
1388
+ ),
1389
+ ),
1390
+ )
1391
+ if _response.status_code == 405:
1392
+ raise MethodNotAllowedError(
1393
+ headers=dict(_response.headers),
1394
+ body=typing.cast(
1395
+ typing.Optional[typing.Any],
1396
+ parse_obj_as(
1397
+ type_=typing.Optional[typing.Any], # type: ignore
1398
+ object_=_response.json(),
1399
+ ),
1400
+ ),
1401
+ )
1402
+ if _response.status_code == 429:
1403
+ raise TooManyRequestsError(
1404
+ headers=dict(_response.headers),
1405
+ body=typing.cast(
1406
+ typing.Optional[typing.Any],
1407
+ parse_obj_as(
1408
+ type_=typing.Optional[typing.Any], # type: ignore
1409
+ object_=_response.json(),
1410
+ ),
1411
+ ),
1412
+ )
1413
+ if _response.status_code == 500:
1414
+ raise InternalServerError(
1415
+ headers=dict(_response.headers),
1416
+ body=typing.cast(
1417
+ typing.Optional[typing.Any],
1418
+ parse_obj_as(
1419
+ type_=typing.Optional[typing.Any], # type: ignore
1420
+ object_=_response.json(),
1421
+ ),
1422
+ ),
1423
+ )
1424
+ if _response.status_code == 501:
1425
+ raise NotImplementedError(
1426
+ headers=dict(_response.headers),
1427
+ body=typing.cast(
1428
+ typing.Optional[typing.Any],
1429
+ parse_obj_as(
1430
+ type_=typing.Optional[typing.Any], # type: ignore
1431
+ object_=_response.json(),
1432
+ ),
1433
+ ),
1434
+ )
1435
+ if _response.status_code == 502:
1436
+ raise BadGatewayError(
1437
+ headers=dict(_response.headers),
1438
+ body=typing.cast(
1439
+ typing.Optional[typing.Any],
1440
+ parse_obj_as(
1441
+ type_=typing.Optional[typing.Any], # type: ignore
1442
+ object_=_response.json(),
1443
+ ),
1444
+ ),
1445
+ )
1446
+ if _response.status_code == 503:
1447
+ raise ServiceUnavailableError(
1448
+ headers=dict(_response.headers),
1449
+ body=typing.cast(
1450
+ typing.Optional[typing.Any],
1451
+ parse_obj_as(
1452
+ type_=typing.Optional[typing.Any], # type: ignore
1453
+ object_=_response.json(),
1454
+ ),
1455
+ ),
1456
+ )
1457
+ if _response.status_code == 504:
1458
+ raise GatewayTimeoutError(
1459
+ headers=dict(_response.headers),
1460
+ body=typing.cast(
1461
+ typing.Optional[typing.Any],
1462
+ parse_obj_as(
1463
+ type_=typing.Optional[typing.Any], # type: ignore
1464
+ object_=_response.json(),
1465
+ ),
1466
+ ),
1467
+ )
1468
+ _response_json = _response.json()
1469
+ except JSONDecodeError:
1470
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1471
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1472
+
1473
+ async def post_work_orders(
1474
+ self,
1475
+ *,
1476
+ asset_id: str,
1477
+ assigned_user_id: typing.Optional[str] = OMIT,
1478
+ category: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyCategory] = OMIT,
1479
+ description: typing.Optional[str] = OMIT,
1480
+ discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
1481
+ due_at_time: typing.Optional[dt.datetime] = OMIT,
1482
+ engine_hours: typing.Optional[int] = OMIT,
1483
+ items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
1484
+ odometer_meters: typing.Optional[int] = OMIT,
1485
+ priority: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority] = OMIT,
1486
+ service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
1487
+ tax: typing.Optional[WorkOrderTaxCreateObjectRequestBody] = OMIT,
1488
+ request_options: typing.Optional[RequestOptions] = None,
1489
+ ) -> AsyncHttpResponse[WorkOrdersPostWorkOrdersResponseBody]:
1490
+ """
1491
+ Creates a work order.
1492
+
1493
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1494
+
1495
+ To use this endpoint, select **Write Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
1496
+
1497
+
1498
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
1499
+
1500
+ Parameters
1501
+ ----------
1502
+ asset_id : str
1503
+ The ID of the asset.
1504
+
1505
+ assigned_user_id : typing.Optional[str]
1506
+ The ID of the assigned mechanic.
1507
+
1508
+ category : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyCategory]
1509
+ The category of the work order Valid values: `Annual`, `Corrective`, `Damage Repair`, `Preventive`, `Recall`, `Unspecified`
1510
+
1511
+ description : typing.Optional[str]
1512
+ A description of what needs to be fixed.
1513
+
1514
+ discount : typing.Optional[WorkOrderDiscountObjectRequestBody]
1515
+
1516
+ due_at_time : typing.Optional[dt.datetime]
1517
+ The due date of the work order in RFC 3339 format.
1518
+
1519
+ engine_hours : typing.Optional[int]
1520
+ The engine hours at the time of the work order. Will default to current asset reading if unset.
1521
+
1522
+ items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
1523
+ Items related to the work order.
1524
+
1525
+ odometer_meters : typing.Optional[int]
1526
+ The odometer reading at the time of the work order. Will default to current asset reading if unset.
1527
+
1528
+ priority : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority]
1529
+ The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
1530
+
1531
+ service_task_instances : typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]]
1532
+ Service Tasks for the work order.
1533
+
1534
+ tax : typing.Optional[WorkOrderTaxCreateObjectRequestBody]
1535
+
1536
+ request_options : typing.Optional[RequestOptions]
1537
+ Request-specific configuration.
1538
+
1539
+ Returns
1540
+ -------
1541
+ AsyncHttpResponse[WorkOrdersPostWorkOrdersResponseBody]
1542
+ OK response.
1543
+ """
1544
+ _response = await self._client_wrapper.httpx_client.request(
1545
+ "maintenance/work-orders",
1546
+ method="POST",
1547
+ json={
1548
+ "assetId": asset_id,
1549
+ "assignedUserId": assigned_user_id,
1550
+ "category": category,
1551
+ "description": description,
1552
+ "discount": convert_and_respect_annotation_metadata(
1553
+ object_=discount, annotation=WorkOrderDiscountObjectRequestBody, direction="write"
1554
+ ),
1555
+ "dueAtTime": due_at_time,
1556
+ "engineHours": engine_hours,
1557
+ "items": convert_and_respect_annotation_metadata(
1558
+ object_=items, annotation=typing.Sequence[WorkOrderItemObjectRequestBody], direction="write"
1559
+ ),
1560
+ "odometerMeters": odometer_meters,
1561
+ "priority": priority,
1562
+ "serviceTaskInstances": convert_and_respect_annotation_metadata(
1563
+ object_=service_task_instances,
1564
+ annotation=typing.Sequence[ServiceTaskInstanceInputObjectRequestBody],
1565
+ direction="write",
1566
+ ),
1567
+ "tax": convert_and_respect_annotation_metadata(
1568
+ object_=tax, annotation=WorkOrderTaxCreateObjectRequestBody, direction="write"
1569
+ ),
1570
+ },
1571
+ headers={
1572
+ "content-type": "application/json",
1573
+ },
1574
+ request_options=request_options,
1575
+ omit=OMIT,
1576
+ )
1577
+ try:
1578
+ if 200 <= _response.status_code < 300:
1579
+ _data = typing.cast(
1580
+ WorkOrdersPostWorkOrdersResponseBody,
1581
+ parse_obj_as(
1582
+ type_=WorkOrdersPostWorkOrdersResponseBody, # type: ignore
1583
+ object_=_response.json(),
1584
+ ),
1585
+ )
1586
+ return AsyncHttpResponse(response=_response, data=_data)
1587
+ if _response.status_code == 401:
1588
+ raise UnauthorizedError(
1589
+ headers=dict(_response.headers),
1590
+ body=typing.cast(
1591
+ typing.Optional[typing.Any],
1592
+ parse_obj_as(
1593
+ type_=typing.Optional[typing.Any], # type: ignore
1594
+ object_=_response.json(),
1595
+ ),
1596
+ ),
1597
+ )
1598
+ if _response.status_code == 404:
1599
+ raise NotFoundError(
1600
+ headers=dict(_response.headers),
1601
+ body=typing.cast(
1602
+ typing.Optional[typing.Any],
1603
+ parse_obj_as(
1604
+ type_=typing.Optional[typing.Any], # type: ignore
1605
+ object_=_response.json(),
1606
+ ),
1607
+ ),
1608
+ )
1609
+ if _response.status_code == 405:
1610
+ raise MethodNotAllowedError(
1611
+ headers=dict(_response.headers),
1612
+ body=typing.cast(
1613
+ typing.Optional[typing.Any],
1614
+ parse_obj_as(
1615
+ type_=typing.Optional[typing.Any], # type: ignore
1616
+ object_=_response.json(),
1617
+ ),
1618
+ ),
1619
+ )
1620
+ if _response.status_code == 429:
1621
+ raise TooManyRequestsError(
1622
+ headers=dict(_response.headers),
1623
+ body=typing.cast(
1624
+ typing.Optional[typing.Any],
1625
+ parse_obj_as(
1626
+ type_=typing.Optional[typing.Any], # type: ignore
1627
+ object_=_response.json(),
1628
+ ),
1629
+ ),
1630
+ )
1631
+ if _response.status_code == 500:
1632
+ raise InternalServerError(
1633
+ headers=dict(_response.headers),
1634
+ body=typing.cast(
1635
+ typing.Optional[typing.Any],
1636
+ parse_obj_as(
1637
+ type_=typing.Optional[typing.Any], # type: ignore
1638
+ object_=_response.json(),
1639
+ ),
1640
+ ),
1641
+ )
1642
+ if _response.status_code == 501:
1643
+ raise NotImplementedError(
1644
+ headers=dict(_response.headers),
1645
+ body=typing.cast(
1646
+ typing.Optional[typing.Any],
1647
+ parse_obj_as(
1648
+ type_=typing.Optional[typing.Any], # type: ignore
1649
+ object_=_response.json(),
1650
+ ),
1651
+ ),
1652
+ )
1653
+ if _response.status_code == 502:
1654
+ raise BadGatewayError(
1655
+ headers=dict(_response.headers),
1656
+ body=typing.cast(
1657
+ typing.Optional[typing.Any],
1658
+ parse_obj_as(
1659
+ type_=typing.Optional[typing.Any], # type: ignore
1660
+ object_=_response.json(),
1661
+ ),
1662
+ ),
1663
+ )
1664
+ if _response.status_code == 503:
1665
+ raise ServiceUnavailableError(
1666
+ headers=dict(_response.headers),
1667
+ body=typing.cast(
1668
+ typing.Optional[typing.Any],
1669
+ parse_obj_as(
1670
+ type_=typing.Optional[typing.Any], # type: ignore
1671
+ object_=_response.json(),
1672
+ ),
1673
+ ),
1674
+ )
1675
+ if _response.status_code == 504:
1676
+ raise GatewayTimeoutError(
1677
+ headers=dict(_response.headers),
1678
+ body=typing.cast(
1679
+ typing.Optional[typing.Any],
1680
+ parse_obj_as(
1681
+ type_=typing.Optional[typing.Any], # type: ignore
1682
+ object_=_response.json(),
1683
+ ),
1684
+ ),
1685
+ )
1686
+ _response_json = _response.json()
1687
+ except JSONDecodeError:
1688
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1689
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1690
+
1691
+ async def delete_work_orders(
1692
+ self, *, id: str, request_options: typing.Optional[RequestOptions] = None
1693
+ ) -> AsyncHttpResponse[None]:
1694
+ """
1695
+ Deletes a work order.
1696
+
1697
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1698
+
1699
+ To use this endpoint, select **Write Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
1700
+
1701
+
1702
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
1703
+
1704
+ Parameters
1705
+ ----------
1706
+ id : str
1707
+ The unique id of the work order.
1708
+
1709
+ request_options : typing.Optional[RequestOptions]
1710
+ Request-specific configuration.
1711
+
1712
+ Returns
1713
+ -------
1714
+ AsyncHttpResponse[None]
1715
+ """
1716
+ _response = await self._client_wrapper.httpx_client.request(
1717
+ "maintenance/work-orders",
1718
+ method="DELETE",
1719
+ params={
1720
+ "id": id,
1721
+ },
1722
+ request_options=request_options,
1723
+ )
1724
+ try:
1725
+ if 200 <= _response.status_code < 300:
1726
+ return AsyncHttpResponse(response=_response, data=None)
1727
+ if _response.status_code == 401:
1728
+ raise UnauthorizedError(
1729
+ headers=dict(_response.headers),
1730
+ body=typing.cast(
1731
+ typing.Optional[typing.Any],
1732
+ parse_obj_as(
1733
+ type_=typing.Optional[typing.Any], # type: ignore
1734
+ object_=_response.json(),
1735
+ ),
1736
+ ),
1737
+ )
1738
+ if _response.status_code == 404:
1739
+ raise NotFoundError(
1740
+ headers=dict(_response.headers),
1741
+ body=typing.cast(
1742
+ typing.Optional[typing.Any],
1743
+ parse_obj_as(
1744
+ type_=typing.Optional[typing.Any], # type: ignore
1745
+ object_=_response.json(),
1746
+ ),
1747
+ ),
1748
+ )
1749
+ if _response.status_code == 405:
1750
+ raise MethodNotAllowedError(
1751
+ headers=dict(_response.headers),
1752
+ body=typing.cast(
1753
+ typing.Optional[typing.Any],
1754
+ parse_obj_as(
1755
+ type_=typing.Optional[typing.Any], # type: ignore
1756
+ object_=_response.json(),
1757
+ ),
1758
+ ),
1759
+ )
1760
+ if _response.status_code == 429:
1761
+ raise TooManyRequestsError(
1762
+ headers=dict(_response.headers),
1763
+ body=typing.cast(
1764
+ typing.Optional[typing.Any],
1765
+ parse_obj_as(
1766
+ type_=typing.Optional[typing.Any], # type: ignore
1767
+ object_=_response.json(),
1768
+ ),
1769
+ ),
1770
+ )
1771
+ if _response.status_code == 500:
1772
+ raise InternalServerError(
1773
+ headers=dict(_response.headers),
1774
+ body=typing.cast(
1775
+ typing.Optional[typing.Any],
1776
+ parse_obj_as(
1777
+ type_=typing.Optional[typing.Any], # type: ignore
1778
+ object_=_response.json(),
1779
+ ),
1780
+ ),
1781
+ )
1782
+ if _response.status_code == 501:
1783
+ raise NotImplementedError(
1784
+ headers=dict(_response.headers),
1785
+ body=typing.cast(
1786
+ typing.Optional[typing.Any],
1787
+ parse_obj_as(
1788
+ type_=typing.Optional[typing.Any], # type: ignore
1789
+ object_=_response.json(),
1790
+ ),
1791
+ ),
1792
+ )
1793
+ if _response.status_code == 502:
1794
+ raise BadGatewayError(
1795
+ headers=dict(_response.headers),
1796
+ body=typing.cast(
1797
+ typing.Optional[typing.Any],
1798
+ parse_obj_as(
1799
+ type_=typing.Optional[typing.Any], # type: ignore
1800
+ object_=_response.json(),
1801
+ ),
1802
+ ),
1803
+ )
1804
+ if _response.status_code == 503:
1805
+ raise ServiceUnavailableError(
1806
+ headers=dict(_response.headers),
1807
+ body=typing.cast(
1808
+ typing.Optional[typing.Any],
1809
+ parse_obj_as(
1810
+ type_=typing.Optional[typing.Any], # type: ignore
1811
+ object_=_response.json(),
1812
+ ),
1813
+ ),
1814
+ )
1815
+ if _response.status_code == 504:
1816
+ raise GatewayTimeoutError(
1817
+ headers=dict(_response.headers),
1818
+ body=typing.cast(
1819
+ typing.Optional[typing.Any],
1820
+ parse_obj_as(
1821
+ type_=typing.Optional[typing.Any], # type: ignore
1822
+ object_=_response.json(),
1823
+ ),
1824
+ ),
1825
+ )
1826
+ _response_json = _response.json()
1827
+ except JSONDecodeError:
1828
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1829
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1830
+
1831
+ async def patch_work_orders(
1832
+ self,
1833
+ *,
1834
+ id: str,
1835
+ assigned_user_id: typing.Optional[str] = OMIT,
1836
+ category: typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyCategory] = OMIT,
1837
+ closing_notes: typing.Optional[str] = OMIT,
1838
+ completed_at_time: typing.Optional[dt.datetime] = OMIT,
1839
+ description: typing.Optional[str] = OMIT,
1840
+ discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
1841
+ due_at_time: typing.Optional[dt.datetime] = OMIT,
1842
+ engine_hours: typing.Optional[int] = OMIT,
1843
+ invoice_number: typing.Optional[str] = OMIT,
1844
+ items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
1845
+ odometer_meters: typing.Optional[int] = OMIT,
1846
+ po_number: typing.Optional[str] = OMIT,
1847
+ priority: typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyPriority] = OMIT,
1848
+ service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
1849
+ status: typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyStatus] = OMIT,
1850
+ tax: typing.Optional[WorkOrderTaxObjectRequestBody] = OMIT,
1851
+ vendor_uuid: typing.Optional[str] = OMIT,
1852
+ request_options: typing.Optional[RequestOptions] = None,
1853
+ ) -> AsyncHttpResponse[WorkOrdersPatchWorkOrdersResponseBody]:
1854
+ """
1855
+ Updates a work order.
1856
+
1857
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1858
+
1859
+ To use this endpoint, select **Write Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
1860
+
1861
+
1862
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
1863
+
1864
+ Parameters
1865
+ ----------
1866
+ id : str
1867
+ The unique id of the work order.
1868
+
1869
+ assigned_user_id : typing.Optional[str]
1870
+ The ID of the assigned mechanic.
1871
+
1872
+ category : typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyCategory]
1873
+ The category of the work order Valid values: `Annual`, `Corrective`, `Damage Repair`, `Preventive`, `Recall`, `Unspecified`
1874
+
1875
+ closing_notes : typing.Optional[str]
1876
+ Notes on the work order.
1877
+
1878
+ completed_at_time : typing.Optional[dt.datetime]
1879
+ The time the work order was completed in RFC 3339 format. Is automatically set when the status changes and this field is not provided.
1880
+
1881
+ description : typing.Optional[str]
1882
+ A description of what needs to be fixed.
1883
+
1884
+ discount : typing.Optional[WorkOrderDiscountObjectRequestBody]
1885
+
1886
+ due_at_time : typing.Optional[dt.datetime]
1887
+ The due date of the work order in RFC 3339 format.
1888
+
1889
+ engine_hours : typing.Optional[int]
1890
+ The engine hours at the time of the work order. Will default to current asset reading if unset.
1891
+
1892
+ invoice_number : typing.Optional[str]
1893
+ The invoice number for the work order.
1894
+
1895
+ items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
1896
+ Items related to the work order.
1897
+
1898
+ odometer_meters : typing.Optional[int]
1899
+ The odometer reading at the time of the work order. Will default to current asset reading if unset.
1900
+
1901
+ po_number : typing.Optional[str]
1902
+ The purchase order number for the work order.
1903
+
1904
+ priority : typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyPriority]
1905
+ The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
1906
+
1907
+ service_task_instances : typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]]
1908
+ Service Tasks for the work order.
1909
+
1910
+ status : typing.Optional[WorkOrdersPatchWorkOrdersRequestBodyStatus]
1911
+ The status of the work order Valid values: `Assigned`, `Cancelled`, `Closed`, `Completed`, `In Progress`, `On Hold`, `Open`, `Pending Approval`, `Pending Parts`
1912
+
1913
+ tax : typing.Optional[WorkOrderTaxObjectRequestBody]
1914
+
1915
+ vendor_uuid : typing.Optional[str]
1916
+ The vendor UUID for the work order.
1917
+
1918
+ request_options : typing.Optional[RequestOptions]
1919
+ Request-specific configuration.
1920
+
1921
+ Returns
1922
+ -------
1923
+ AsyncHttpResponse[WorkOrdersPatchWorkOrdersResponseBody]
1924
+ OK response.
1925
+ """
1926
+ _response = await self._client_wrapper.httpx_client.request(
1927
+ "maintenance/work-orders",
1928
+ method="PATCH",
1929
+ json={
1930
+ "assignedUserId": assigned_user_id,
1931
+ "category": category,
1932
+ "closingNotes": closing_notes,
1933
+ "completedAtTime": completed_at_time,
1934
+ "description": description,
1935
+ "discount": convert_and_respect_annotation_metadata(
1936
+ object_=discount, annotation=WorkOrderDiscountObjectRequestBody, direction="write"
1937
+ ),
1938
+ "dueAtTime": due_at_time,
1939
+ "engineHours": engine_hours,
1940
+ "id": id,
1941
+ "invoiceNumber": invoice_number,
1942
+ "items": convert_and_respect_annotation_metadata(
1943
+ object_=items, annotation=typing.Sequence[WorkOrderItemObjectRequestBody], direction="write"
1944
+ ),
1945
+ "odometerMeters": odometer_meters,
1946
+ "poNumber": po_number,
1947
+ "priority": priority,
1948
+ "serviceTaskInstances": convert_and_respect_annotation_metadata(
1949
+ object_=service_task_instances,
1950
+ annotation=typing.Sequence[ServiceTaskInstanceInputObjectRequestBody],
1951
+ direction="write",
1952
+ ),
1953
+ "status": status,
1954
+ "tax": convert_and_respect_annotation_metadata(
1955
+ object_=tax, annotation=WorkOrderTaxObjectRequestBody, direction="write"
1956
+ ),
1957
+ "vendorUuid": vendor_uuid,
1958
+ },
1959
+ headers={
1960
+ "content-type": "application/json",
1961
+ },
1962
+ request_options=request_options,
1963
+ omit=OMIT,
1964
+ )
1965
+ try:
1966
+ if 200 <= _response.status_code < 300:
1967
+ _data = typing.cast(
1968
+ WorkOrdersPatchWorkOrdersResponseBody,
1969
+ parse_obj_as(
1970
+ type_=WorkOrdersPatchWorkOrdersResponseBody, # type: ignore
1971
+ object_=_response.json(),
1972
+ ),
1973
+ )
1974
+ return AsyncHttpResponse(response=_response, data=_data)
1975
+ if _response.status_code == 401:
1976
+ raise UnauthorizedError(
1977
+ headers=dict(_response.headers),
1978
+ body=typing.cast(
1979
+ typing.Optional[typing.Any],
1980
+ parse_obj_as(
1981
+ type_=typing.Optional[typing.Any], # type: ignore
1982
+ object_=_response.json(),
1983
+ ),
1984
+ ),
1985
+ )
1986
+ if _response.status_code == 404:
1987
+ raise NotFoundError(
1988
+ headers=dict(_response.headers),
1989
+ body=typing.cast(
1990
+ typing.Optional[typing.Any],
1991
+ parse_obj_as(
1992
+ type_=typing.Optional[typing.Any], # type: ignore
1993
+ object_=_response.json(),
1994
+ ),
1995
+ ),
1996
+ )
1997
+ if _response.status_code == 405:
1998
+ raise MethodNotAllowedError(
1999
+ headers=dict(_response.headers),
2000
+ body=typing.cast(
2001
+ typing.Optional[typing.Any],
2002
+ parse_obj_as(
2003
+ type_=typing.Optional[typing.Any], # type: ignore
2004
+ object_=_response.json(),
2005
+ ),
2006
+ ),
2007
+ )
2008
+ if _response.status_code == 429:
2009
+ raise TooManyRequestsError(
2010
+ headers=dict(_response.headers),
2011
+ body=typing.cast(
2012
+ typing.Optional[typing.Any],
2013
+ parse_obj_as(
2014
+ type_=typing.Optional[typing.Any], # type: ignore
2015
+ object_=_response.json(),
2016
+ ),
2017
+ ),
2018
+ )
2019
+ if _response.status_code == 500:
2020
+ raise InternalServerError(
2021
+ headers=dict(_response.headers),
2022
+ body=typing.cast(
2023
+ typing.Optional[typing.Any],
2024
+ parse_obj_as(
2025
+ type_=typing.Optional[typing.Any], # type: ignore
2026
+ object_=_response.json(),
2027
+ ),
2028
+ ),
2029
+ )
2030
+ if _response.status_code == 501:
2031
+ raise NotImplementedError(
2032
+ headers=dict(_response.headers),
2033
+ body=typing.cast(
2034
+ typing.Optional[typing.Any],
2035
+ parse_obj_as(
2036
+ type_=typing.Optional[typing.Any], # type: ignore
2037
+ object_=_response.json(),
2038
+ ),
2039
+ ),
2040
+ )
2041
+ if _response.status_code == 502:
2042
+ raise BadGatewayError(
2043
+ headers=dict(_response.headers),
2044
+ body=typing.cast(
2045
+ typing.Optional[typing.Any],
2046
+ parse_obj_as(
2047
+ type_=typing.Optional[typing.Any], # type: ignore
2048
+ object_=_response.json(),
2049
+ ),
2050
+ ),
2051
+ )
2052
+ if _response.status_code == 503:
2053
+ raise ServiceUnavailableError(
2054
+ headers=dict(_response.headers),
2055
+ body=typing.cast(
2056
+ typing.Optional[typing.Any],
2057
+ parse_obj_as(
2058
+ type_=typing.Optional[typing.Any], # type: ignore
2059
+ object_=_response.json(),
2060
+ ),
2061
+ ),
2062
+ )
2063
+ if _response.status_code == 504:
2064
+ raise GatewayTimeoutError(
2065
+ headers=dict(_response.headers),
2066
+ body=typing.cast(
2067
+ typing.Optional[typing.Any],
2068
+ parse_obj_as(
2069
+ type_=typing.Optional[typing.Any], # type: ignore
2070
+ object_=_response.json(),
2071
+ ),
2072
+ ),
2073
+ )
2074
+ _response_json = _response.json()
2075
+ except JSONDecodeError:
2076
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2077
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2078
+
2079
+ async def stream_work_orders(
2080
+ self,
2081
+ *,
2082
+ start_time: str,
2083
+ after: typing.Optional[str] = None,
2084
+ end_time: typing.Optional[str] = None,
2085
+ work_order_statuses: typing.Optional[
2086
+ typing.Union[
2087
+ StreamWorkOrdersRequestWorkOrderStatusesItem,
2088
+ typing.Sequence[StreamWorkOrdersRequestWorkOrderStatusesItem],
2089
+ ]
2090
+ ] = None,
2091
+ asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
2092
+ assigned_user_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
2093
+ request_options: typing.Optional[RequestOptions] = None,
2094
+ ) -> AsyncHttpResponse[WorkOrdersStreamWorkOrdersResponseBody]:
2095
+ """
2096
+ Stream work orders.
2097
+
2098
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
2099
+
2100
+ To use this endpoint, select **Read Work Orders** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
2101
+
2102
+
2103
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
2104
+
2105
+ Parameters
2106
+ ----------
2107
+ start_time : str
2108
+ A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
2109
+
2110
+ after : typing.Optional[str]
2111
+ If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
2112
+
2113
+ end_time : typing.Optional[str]
2114
+ An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
2115
+
2116
+ work_order_statuses : typing.Optional[typing.Union[StreamWorkOrdersRequestWorkOrderStatusesItem, typing.Sequence[StreamWorkOrdersRequestWorkOrderStatusesItem]]]
2117
+ Work Order status filter.
2118
+
2119
+ asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
2120
+ Work Order asset id filter. Up to 50 ids.
2121
+
2122
+ assigned_user_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
2123
+ Work Order assigned user id filter. Up to 50 ids.
2124
+
2125
+ request_options : typing.Optional[RequestOptions]
2126
+ Request-specific configuration.
2127
+
2128
+ Returns
2129
+ -------
2130
+ AsyncHttpResponse[WorkOrdersStreamWorkOrdersResponseBody]
2131
+ OK response.
2132
+ """
2133
+ _response = await self._client_wrapper.httpx_client.request(
2134
+ "maintenance/work-orders/stream",
2135
+ method="GET",
2136
+ params={
2137
+ "after": after,
2138
+ "startTime": start_time,
2139
+ "endTime": end_time,
2140
+ "workOrderStatuses": work_order_statuses,
2141
+ "assetIds": asset_ids,
2142
+ "assignedUserIds": assigned_user_ids,
2143
+ },
2144
+ request_options=request_options,
2145
+ )
2146
+ try:
2147
+ if 200 <= _response.status_code < 300:
2148
+ _data = typing.cast(
2149
+ WorkOrdersStreamWorkOrdersResponseBody,
2150
+ parse_obj_as(
2151
+ type_=WorkOrdersStreamWorkOrdersResponseBody, # type: ignore
2152
+ object_=_response.json(),
2153
+ ),
2154
+ )
2155
+ return AsyncHttpResponse(response=_response, data=_data)
2156
+ if _response.status_code == 401:
2157
+ raise UnauthorizedError(
2158
+ headers=dict(_response.headers),
2159
+ body=typing.cast(
2160
+ typing.Optional[typing.Any],
2161
+ parse_obj_as(
2162
+ type_=typing.Optional[typing.Any], # type: ignore
2163
+ object_=_response.json(),
2164
+ ),
2165
+ ),
2166
+ )
2167
+ if _response.status_code == 404:
2168
+ raise NotFoundError(
2169
+ headers=dict(_response.headers),
2170
+ body=typing.cast(
2171
+ typing.Optional[typing.Any],
2172
+ parse_obj_as(
2173
+ type_=typing.Optional[typing.Any], # type: ignore
2174
+ object_=_response.json(),
2175
+ ),
2176
+ ),
2177
+ )
2178
+ if _response.status_code == 405:
2179
+ raise MethodNotAllowedError(
2180
+ headers=dict(_response.headers),
2181
+ body=typing.cast(
2182
+ typing.Optional[typing.Any],
2183
+ parse_obj_as(
2184
+ type_=typing.Optional[typing.Any], # type: ignore
2185
+ object_=_response.json(),
2186
+ ),
2187
+ ),
2188
+ )
2189
+ if _response.status_code == 429:
2190
+ raise TooManyRequestsError(
2191
+ headers=dict(_response.headers),
2192
+ body=typing.cast(
2193
+ typing.Optional[typing.Any],
2194
+ parse_obj_as(
2195
+ type_=typing.Optional[typing.Any], # type: ignore
2196
+ object_=_response.json(),
2197
+ ),
2198
+ ),
2199
+ )
2200
+ if _response.status_code == 500:
2201
+ raise InternalServerError(
2202
+ headers=dict(_response.headers),
2203
+ body=typing.cast(
2204
+ typing.Optional[typing.Any],
2205
+ parse_obj_as(
2206
+ type_=typing.Optional[typing.Any], # type: ignore
2207
+ object_=_response.json(),
2208
+ ),
2209
+ ),
2210
+ )
2211
+ if _response.status_code == 501:
2212
+ raise NotImplementedError(
2213
+ headers=dict(_response.headers),
2214
+ body=typing.cast(
2215
+ typing.Optional[typing.Any],
2216
+ parse_obj_as(
2217
+ type_=typing.Optional[typing.Any], # type: ignore
2218
+ object_=_response.json(),
2219
+ ),
2220
+ ),
2221
+ )
2222
+ if _response.status_code == 502:
2223
+ raise BadGatewayError(
2224
+ headers=dict(_response.headers),
2225
+ body=typing.cast(
2226
+ typing.Optional[typing.Any],
2227
+ parse_obj_as(
2228
+ type_=typing.Optional[typing.Any], # type: ignore
2229
+ object_=_response.json(),
2230
+ ),
2231
+ ),
2232
+ )
2233
+ if _response.status_code == 503:
2234
+ raise ServiceUnavailableError(
2235
+ headers=dict(_response.headers),
2236
+ body=typing.cast(
2237
+ typing.Optional[typing.Any],
2238
+ parse_obj_as(
2239
+ type_=typing.Optional[typing.Any], # type: ignore
2240
+ object_=_response.json(),
2241
+ ),
2242
+ ),
2243
+ )
2244
+ if _response.status_code == 504:
2245
+ raise GatewayTimeoutError(
2246
+ headers=dict(_response.headers),
2247
+ body=typing.cast(
2248
+ typing.Optional[typing.Any],
2249
+ parse_obj_as(
2250
+ type_=typing.Optional[typing.Any], # type: ignore
2251
+ object_=_response.json(),
2252
+ ),
2253
+ ),
2254
+ )
2255
+ _response_json = _response.json()
2256
+ except JSONDecodeError:
2257
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2258
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)