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
@@ -1,13 +1,2262 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
3
7
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.http_response import AsyncHttpResponse, HttpResponse
9
+ from ..core.jsonable_encoder import jsonable_encoder
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.defect_response import DefectResponse
23
+ from ..types.dvir_defect_get_defect_response_body import DvirDefectGetDefectResponseBody
24
+ from ..types.dvir_defect_stream_defects_response_body import DvirDefectStreamDefectsResponseBody
25
+ from ..types.dvir_defect_type_get_defect_types_response_body import DvirDefectTypeGetDefectTypesResponseBody
26
+ from ..types.dvir_get_dvir_response_body import DvirGetDvirResponseBody
27
+ from ..types.dvir_get_dvirs_response_body import DvirGetDvirsResponseBody
28
+ from ..types.dvir_response import DvirResponse
29
+ from ..types.inline_response_2004 import InlineResponse2004
30
+ from ..types.resolved_by import ResolvedBy
31
+ from .types.create_dvir_request_safety_status import CreateDvirRequestSafetyStatus
32
+
33
+ # this is used as the default value for optional parameters
34
+ OMIT = typing.cast(typing.Any, ...)
4
35
 
5
36
 
6
37
  class RawMaintenanceClient:
7
38
  def __init__(self, *, client_wrapper: SyncClientWrapper):
8
39
  self._client_wrapper = client_wrapper
9
40
 
41
+ def get_defect_types(
42
+ self,
43
+ *,
44
+ after: typing.Optional[str] = None,
45
+ limit: typing.Optional[int] = None,
46
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
47
+ request_options: typing.Optional[RequestOptions] = None,
48
+ ) -> HttpResponse[DvirDefectTypeGetDefectTypesResponseBody]:
49
+ """
50
+ Get DVIR defect types.
51
+
52
+ <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>).
53
+
54
+ To use this endpoint, select **Read Defect Types** under the Maintenance 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>
55
+
56
+
57
+ **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.
58
+
59
+ Parameters
60
+ ----------
61
+ after : typing.Optional[str]
62
+ 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.
63
+
64
+ limit : typing.Optional[int]
65
+ The limit for how many objects will be in the response. Default and max for this value is 512 objects.
66
+
67
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
68
+ A filter on the data based on this comma-separated list of defect type IDs.
69
+
70
+ request_options : typing.Optional[RequestOptions]
71
+ Request-specific configuration.
72
+
73
+ Returns
74
+ -------
75
+ HttpResponse[DvirDefectTypeGetDefectTypesResponseBody]
76
+ OK response.
77
+ """
78
+ _response = self._client_wrapper.httpx_client.request(
79
+ "defect-types",
80
+ method="GET",
81
+ params={
82
+ "after": after,
83
+ "limit": limit,
84
+ "ids": ids,
85
+ },
86
+ request_options=request_options,
87
+ )
88
+ try:
89
+ if 200 <= _response.status_code < 300:
90
+ _data = typing.cast(
91
+ DvirDefectTypeGetDefectTypesResponseBody,
92
+ parse_obj_as(
93
+ type_=DvirDefectTypeGetDefectTypesResponseBody, # type: ignore
94
+ object_=_response.json(),
95
+ ),
96
+ )
97
+ return HttpResponse(response=_response, data=_data)
98
+ if _response.status_code == 401:
99
+ raise UnauthorizedError(
100
+ headers=dict(_response.headers),
101
+ body=typing.cast(
102
+ typing.Optional[typing.Any],
103
+ parse_obj_as(
104
+ type_=typing.Optional[typing.Any], # type: ignore
105
+ object_=_response.json(),
106
+ ),
107
+ ),
108
+ )
109
+ if _response.status_code == 404:
110
+ raise NotFoundError(
111
+ headers=dict(_response.headers),
112
+ body=typing.cast(
113
+ typing.Optional[typing.Any],
114
+ parse_obj_as(
115
+ type_=typing.Optional[typing.Any], # type: ignore
116
+ object_=_response.json(),
117
+ ),
118
+ ),
119
+ )
120
+ if _response.status_code == 405:
121
+ raise MethodNotAllowedError(
122
+ headers=dict(_response.headers),
123
+ body=typing.cast(
124
+ typing.Optional[typing.Any],
125
+ parse_obj_as(
126
+ type_=typing.Optional[typing.Any], # type: ignore
127
+ object_=_response.json(),
128
+ ),
129
+ ),
130
+ )
131
+ if _response.status_code == 429:
132
+ raise TooManyRequestsError(
133
+ headers=dict(_response.headers),
134
+ body=typing.cast(
135
+ typing.Optional[typing.Any],
136
+ parse_obj_as(
137
+ type_=typing.Optional[typing.Any], # type: ignore
138
+ object_=_response.json(),
139
+ ),
140
+ ),
141
+ )
142
+ if _response.status_code == 500:
143
+ raise InternalServerError(
144
+ headers=dict(_response.headers),
145
+ body=typing.cast(
146
+ typing.Optional[typing.Any],
147
+ parse_obj_as(
148
+ type_=typing.Optional[typing.Any], # type: ignore
149
+ object_=_response.json(),
150
+ ),
151
+ ),
152
+ )
153
+ if _response.status_code == 501:
154
+ raise NotImplementedError(
155
+ headers=dict(_response.headers),
156
+ body=typing.cast(
157
+ typing.Optional[typing.Any],
158
+ parse_obj_as(
159
+ type_=typing.Optional[typing.Any], # type: ignore
160
+ object_=_response.json(),
161
+ ),
162
+ ),
163
+ )
164
+ if _response.status_code == 502:
165
+ raise BadGatewayError(
166
+ headers=dict(_response.headers),
167
+ body=typing.cast(
168
+ typing.Optional[typing.Any],
169
+ parse_obj_as(
170
+ type_=typing.Optional[typing.Any], # type: ignore
171
+ object_=_response.json(),
172
+ ),
173
+ ),
174
+ )
175
+ if _response.status_code == 503:
176
+ raise ServiceUnavailableError(
177
+ headers=dict(_response.headers),
178
+ body=typing.cast(
179
+ typing.Optional[typing.Any],
180
+ parse_obj_as(
181
+ type_=typing.Optional[typing.Any], # type: ignore
182
+ object_=_response.json(),
183
+ ),
184
+ ),
185
+ )
186
+ if _response.status_code == 504:
187
+ raise GatewayTimeoutError(
188
+ headers=dict(_response.headers),
189
+ body=typing.cast(
190
+ typing.Optional[typing.Any],
191
+ parse_obj_as(
192
+ type_=typing.Optional[typing.Any], # type: ignore
193
+ object_=_response.json(),
194
+ ),
195
+ ),
196
+ )
197
+ _response_json = _response.json()
198
+ except JSONDecodeError:
199
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
200
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
201
+
202
+ def stream_defects(
203
+ self,
204
+ *,
205
+ start_time: str,
206
+ after: typing.Optional[str] = None,
207
+ limit: typing.Optional[int] = None,
208
+ end_time: typing.Optional[str] = None,
209
+ include_external_ids: typing.Optional[bool] = None,
210
+ is_resolved: typing.Optional[bool] = None,
211
+ request_options: typing.Optional[RequestOptions] = None,
212
+ ) -> HttpResponse[DvirDefectStreamDefectsResponseBody]:
213
+ """
214
+ Stream DVIR defects.
215
+
216
+ <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>).
217
+
218
+ To use this endpoint, select **Read Defects** under the Maintenance 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>
219
+
220
+
221
+ **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.
222
+
223
+ Parameters
224
+ ----------
225
+ start_time : str
226
+ Required RFC 3339 timestamp to begin the feed or history by `updatedAtTime` at `startTime`.
227
+
228
+ after : typing.Optional[str]
229
+ 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.
230
+
231
+ limit : typing.Optional[int]
232
+ The limit for how many objects will be in the response. Default and max for this value is 200 objects.
233
+
234
+ end_time : typing.Optional[str]
235
+ Optional RFC 3339 timestamp. If not provided then the endpoint behaves as an unending feed of changes.
236
+
237
+ include_external_ids : typing.Optional[bool]
238
+ Optional boolean indicating whether to return external IDs on supported entities
239
+
240
+ is_resolved : typing.Optional[bool]
241
+ Boolean value for whether filter defects by resolved status.
242
+
243
+ request_options : typing.Optional[RequestOptions]
244
+ Request-specific configuration.
245
+
246
+ Returns
247
+ -------
248
+ HttpResponse[DvirDefectStreamDefectsResponseBody]
249
+ OK response.
250
+ """
251
+ _response = self._client_wrapper.httpx_client.request(
252
+ "defects/stream",
253
+ method="GET",
254
+ params={
255
+ "after": after,
256
+ "limit": limit,
257
+ "startTime": start_time,
258
+ "endTime": end_time,
259
+ "includeExternalIds": include_external_ids,
260
+ "isResolved": is_resolved,
261
+ },
262
+ request_options=request_options,
263
+ )
264
+ try:
265
+ if 200 <= _response.status_code < 300:
266
+ _data = typing.cast(
267
+ DvirDefectStreamDefectsResponseBody,
268
+ parse_obj_as(
269
+ type_=DvirDefectStreamDefectsResponseBody, # type: ignore
270
+ object_=_response.json(),
271
+ ),
272
+ )
273
+ return HttpResponse(response=_response, data=_data)
274
+ if _response.status_code == 401:
275
+ raise UnauthorizedError(
276
+ headers=dict(_response.headers),
277
+ body=typing.cast(
278
+ typing.Optional[typing.Any],
279
+ parse_obj_as(
280
+ type_=typing.Optional[typing.Any], # type: ignore
281
+ object_=_response.json(),
282
+ ),
283
+ ),
284
+ )
285
+ if _response.status_code == 404:
286
+ raise NotFoundError(
287
+ headers=dict(_response.headers),
288
+ body=typing.cast(
289
+ typing.Optional[typing.Any],
290
+ parse_obj_as(
291
+ type_=typing.Optional[typing.Any], # type: ignore
292
+ object_=_response.json(),
293
+ ),
294
+ ),
295
+ )
296
+ if _response.status_code == 405:
297
+ raise MethodNotAllowedError(
298
+ headers=dict(_response.headers),
299
+ body=typing.cast(
300
+ typing.Optional[typing.Any],
301
+ parse_obj_as(
302
+ type_=typing.Optional[typing.Any], # type: ignore
303
+ object_=_response.json(),
304
+ ),
305
+ ),
306
+ )
307
+ if _response.status_code == 429:
308
+ raise TooManyRequestsError(
309
+ headers=dict(_response.headers),
310
+ body=typing.cast(
311
+ typing.Optional[typing.Any],
312
+ parse_obj_as(
313
+ type_=typing.Optional[typing.Any], # type: ignore
314
+ object_=_response.json(),
315
+ ),
316
+ ),
317
+ )
318
+ if _response.status_code == 500:
319
+ raise InternalServerError(
320
+ headers=dict(_response.headers),
321
+ body=typing.cast(
322
+ typing.Optional[typing.Any],
323
+ parse_obj_as(
324
+ type_=typing.Optional[typing.Any], # type: ignore
325
+ object_=_response.json(),
326
+ ),
327
+ ),
328
+ )
329
+ if _response.status_code == 501:
330
+ raise NotImplementedError(
331
+ headers=dict(_response.headers),
332
+ body=typing.cast(
333
+ typing.Optional[typing.Any],
334
+ parse_obj_as(
335
+ type_=typing.Optional[typing.Any], # type: ignore
336
+ object_=_response.json(),
337
+ ),
338
+ ),
339
+ )
340
+ if _response.status_code == 502:
341
+ raise BadGatewayError(
342
+ headers=dict(_response.headers),
343
+ body=typing.cast(
344
+ typing.Optional[typing.Any],
345
+ parse_obj_as(
346
+ type_=typing.Optional[typing.Any], # type: ignore
347
+ object_=_response.json(),
348
+ ),
349
+ ),
350
+ )
351
+ if _response.status_code == 503:
352
+ raise ServiceUnavailableError(
353
+ headers=dict(_response.headers),
354
+ body=typing.cast(
355
+ typing.Optional[typing.Any],
356
+ parse_obj_as(
357
+ type_=typing.Optional[typing.Any], # type: ignore
358
+ object_=_response.json(),
359
+ ),
360
+ ),
361
+ )
362
+ if _response.status_code == 504:
363
+ raise GatewayTimeoutError(
364
+ headers=dict(_response.headers),
365
+ body=typing.cast(
366
+ typing.Optional[typing.Any],
367
+ parse_obj_as(
368
+ type_=typing.Optional[typing.Any], # type: ignore
369
+ object_=_response.json(),
370
+ ),
371
+ ),
372
+ )
373
+ _response_json = _response.json()
374
+ except JSONDecodeError:
375
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
376
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
377
+
378
+ def get_defect(
379
+ self,
380
+ id: str,
381
+ *,
382
+ include_external_ids: typing.Optional[bool] = None,
383
+ request_options: typing.Optional[RequestOptions] = None,
384
+ ) -> HttpResponse[DvirDefectGetDefectResponseBody]:
385
+ """
386
+ Get a single DVIR defect by ID.
387
+
388
+ <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
389
+
390
+ To use this endpoint, select **Read Defects** under the Maintenance 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>
391
+
392
+
393
+ **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.
394
+
395
+ Parameters
396
+ ----------
397
+ id : str
398
+ The unique ID of the DVIR defect.
399
+
400
+ include_external_ids : typing.Optional[bool]
401
+ Optional boolean indicating whether to return external IDs on supported entities
402
+
403
+ request_options : typing.Optional[RequestOptions]
404
+ Request-specific configuration.
405
+
406
+ Returns
407
+ -------
408
+ HttpResponse[DvirDefectGetDefectResponseBody]
409
+ OK response.
410
+ """
411
+ _response = self._client_wrapper.httpx_client.request(
412
+ f"defects/{jsonable_encoder(id)}",
413
+ method="GET",
414
+ params={
415
+ "includeExternalIds": include_external_ids,
416
+ },
417
+ request_options=request_options,
418
+ )
419
+ try:
420
+ if 200 <= _response.status_code < 300:
421
+ _data = typing.cast(
422
+ DvirDefectGetDefectResponseBody,
423
+ parse_obj_as(
424
+ type_=DvirDefectGetDefectResponseBody, # type: ignore
425
+ object_=_response.json(),
426
+ ),
427
+ )
428
+ return HttpResponse(response=_response, data=_data)
429
+ if _response.status_code == 401:
430
+ raise UnauthorizedError(
431
+ headers=dict(_response.headers),
432
+ body=typing.cast(
433
+ typing.Optional[typing.Any],
434
+ parse_obj_as(
435
+ type_=typing.Optional[typing.Any], # type: ignore
436
+ object_=_response.json(),
437
+ ),
438
+ ),
439
+ )
440
+ if _response.status_code == 404:
441
+ raise NotFoundError(
442
+ headers=dict(_response.headers),
443
+ body=typing.cast(
444
+ typing.Optional[typing.Any],
445
+ parse_obj_as(
446
+ type_=typing.Optional[typing.Any], # type: ignore
447
+ object_=_response.json(),
448
+ ),
449
+ ),
450
+ )
451
+ if _response.status_code == 405:
452
+ raise MethodNotAllowedError(
453
+ headers=dict(_response.headers),
454
+ body=typing.cast(
455
+ typing.Optional[typing.Any],
456
+ parse_obj_as(
457
+ type_=typing.Optional[typing.Any], # type: ignore
458
+ object_=_response.json(),
459
+ ),
460
+ ),
461
+ )
462
+ if _response.status_code == 429:
463
+ raise TooManyRequestsError(
464
+ headers=dict(_response.headers),
465
+ body=typing.cast(
466
+ typing.Optional[typing.Any],
467
+ parse_obj_as(
468
+ type_=typing.Optional[typing.Any], # type: ignore
469
+ object_=_response.json(),
470
+ ),
471
+ ),
472
+ )
473
+ if _response.status_code == 500:
474
+ raise InternalServerError(
475
+ headers=dict(_response.headers),
476
+ body=typing.cast(
477
+ typing.Optional[typing.Any],
478
+ parse_obj_as(
479
+ type_=typing.Optional[typing.Any], # type: ignore
480
+ object_=_response.json(),
481
+ ),
482
+ ),
483
+ )
484
+ if _response.status_code == 501:
485
+ raise NotImplementedError(
486
+ headers=dict(_response.headers),
487
+ body=typing.cast(
488
+ typing.Optional[typing.Any],
489
+ parse_obj_as(
490
+ type_=typing.Optional[typing.Any], # type: ignore
491
+ object_=_response.json(),
492
+ ),
493
+ ),
494
+ )
495
+ if _response.status_code == 502:
496
+ raise BadGatewayError(
497
+ headers=dict(_response.headers),
498
+ body=typing.cast(
499
+ typing.Optional[typing.Any],
500
+ parse_obj_as(
501
+ type_=typing.Optional[typing.Any], # type: ignore
502
+ object_=_response.json(),
503
+ ),
504
+ ),
505
+ )
506
+ if _response.status_code == 503:
507
+ raise ServiceUnavailableError(
508
+ headers=dict(_response.headers),
509
+ body=typing.cast(
510
+ typing.Optional[typing.Any],
511
+ parse_obj_as(
512
+ type_=typing.Optional[typing.Any], # type: ignore
513
+ object_=_response.json(),
514
+ ),
515
+ ),
516
+ )
517
+ if _response.status_code == 504:
518
+ raise GatewayTimeoutError(
519
+ headers=dict(_response.headers),
520
+ body=typing.cast(
521
+ typing.Optional[typing.Any],
522
+ parse_obj_as(
523
+ type_=typing.Optional[typing.Any], # type: ignore
524
+ object_=_response.json(),
525
+ ),
526
+ ),
527
+ )
528
+ _response_json = _response.json()
529
+ except JSONDecodeError:
530
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
531
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
532
+
533
+ def get_dvirs(
534
+ self,
535
+ *,
536
+ start_time: str,
537
+ after: typing.Optional[str] = None,
538
+ limit: typing.Optional[int] = None,
539
+ include_external_ids: typing.Optional[bool] = None,
540
+ end_time: typing.Optional[str] = None,
541
+ safety_status: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
542
+ request_options: typing.Optional[RequestOptions] = None,
543
+ ) -> HttpResponse[DvirGetDvirsResponseBody]:
544
+ """
545
+ Returns a history/feed of changed DVIRs by updatedAtTime between startTime and endTime parameters. In case of missing `endTime` parameter it will return a never ending stream of data.
546
+
547
+ <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>).
548
+
549
+ To use this endpoint, select **Read DVIRs** under the Maintenance 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>
550
+
551
+
552
+ **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.
553
+
554
+ Parameters
555
+ ----------
556
+ start_time : str
557
+ Required RFC 3339 timestamp to begin the feed or history by `updatedAtTime` at `startTime`.
558
+
559
+ after : typing.Optional[str]
560
+ 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.
561
+
562
+ limit : typing.Optional[int]
563
+ The limit for how many objects will be in the response. Default and max for this value is 200 objects.
564
+
565
+ include_external_ids : typing.Optional[bool]
566
+ Optional boolean indicating whether to return external IDs on supported entities
567
+
568
+ end_time : typing.Optional[str]
569
+ Optional RFC 3339 timestamp. If not provided then the endpoint behaves as an unending feed of changes.
570
+
571
+ safety_status : typing.Optional[typing.Union[str, typing.Sequence[str]]]
572
+ Optional list of safety statuses. Valid values: [safe, unsafe, resolved]
573
+
574
+ request_options : typing.Optional[RequestOptions]
575
+ Request-specific configuration.
576
+
577
+ Returns
578
+ -------
579
+ HttpResponse[DvirGetDvirsResponseBody]
580
+ OK response.
581
+ """
582
+ _response = self._client_wrapper.httpx_client.request(
583
+ "dvirs/stream",
584
+ method="GET",
585
+ params={
586
+ "after": after,
587
+ "limit": limit,
588
+ "includeExternalIds": include_external_ids,
589
+ "startTime": start_time,
590
+ "endTime": end_time,
591
+ "safetyStatus": safety_status,
592
+ },
593
+ request_options=request_options,
594
+ )
595
+ try:
596
+ if 200 <= _response.status_code < 300:
597
+ _data = typing.cast(
598
+ DvirGetDvirsResponseBody,
599
+ parse_obj_as(
600
+ type_=DvirGetDvirsResponseBody, # type: ignore
601
+ object_=_response.json(),
602
+ ),
603
+ )
604
+ return HttpResponse(response=_response, data=_data)
605
+ if _response.status_code == 401:
606
+ raise UnauthorizedError(
607
+ headers=dict(_response.headers),
608
+ body=typing.cast(
609
+ typing.Optional[typing.Any],
610
+ parse_obj_as(
611
+ type_=typing.Optional[typing.Any], # type: ignore
612
+ object_=_response.json(),
613
+ ),
614
+ ),
615
+ )
616
+ if _response.status_code == 404:
617
+ raise NotFoundError(
618
+ headers=dict(_response.headers),
619
+ body=typing.cast(
620
+ typing.Optional[typing.Any],
621
+ parse_obj_as(
622
+ type_=typing.Optional[typing.Any], # type: ignore
623
+ object_=_response.json(),
624
+ ),
625
+ ),
626
+ )
627
+ if _response.status_code == 405:
628
+ raise MethodNotAllowedError(
629
+ headers=dict(_response.headers),
630
+ body=typing.cast(
631
+ typing.Optional[typing.Any],
632
+ parse_obj_as(
633
+ type_=typing.Optional[typing.Any], # type: ignore
634
+ object_=_response.json(),
635
+ ),
636
+ ),
637
+ )
638
+ if _response.status_code == 429:
639
+ raise TooManyRequestsError(
640
+ headers=dict(_response.headers),
641
+ body=typing.cast(
642
+ typing.Optional[typing.Any],
643
+ parse_obj_as(
644
+ type_=typing.Optional[typing.Any], # type: ignore
645
+ object_=_response.json(),
646
+ ),
647
+ ),
648
+ )
649
+ if _response.status_code == 500:
650
+ raise InternalServerError(
651
+ headers=dict(_response.headers),
652
+ body=typing.cast(
653
+ typing.Optional[typing.Any],
654
+ parse_obj_as(
655
+ type_=typing.Optional[typing.Any], # type: ignore
656
+ object_=_response.json(),
657
+ ),
658
+ ),
659
+ )
660
+ if _response.status_code == 501:
661
+ raise NotImplementedError(
662
+ headers=dict(_response.headers),
663
+ body=typing.cast(
664
+ typing.Optional[typing.Any],
665
+ parse_obj_as(
666
+ type_=typing.Optional[typing.Any], # type: ignore
667
+ object_=_response.json(),
668
+ ),
669
+ ),
670
+ )
671
+ if _response.status_code == 502:
672
+ raise BadGatewayError(
673
+ headers=dict(_response.headers),
674
+ body=typing.cast(
675
+ typing.Optional[typing.Any],
676
+ parse_obj_as(
677
+ type_=typing.Optional[typing.Any], # type: ignore
678
+ object_=_response.json(),
679
+ ),
680
+ ),
681
+ )
682
+ if _response.status_code == 503:
683
+ raise ServiceUnavailableError(
684
+ headers=dict(_response.headers),
685
+ body=typing.cast(
686
+ typing.Optional[typing.Any],
687
+ parse_obj_as(
688
+ type_=typing.Optional[typing.Any], # type: ignore
689
+ object_=_response.json(),
690
+ ),
691
+ ),
692
+ )
693
+ if _response.status_code == 504:
694
+ raise GatewayTimeoutError(
695
+ headers=dict(_response.headers),
696
+ body=typing.cast(
697
+ typing.Optional[typing.Any],
698
+ parse_obj_as(
699
+ type_=typing.Optional[typing.Any], # type: ignore
700
+ object_=_response.json(),
701
+ ),
702
+ ),
703
+ )
704
+ _response_json = _response.json()
705
+ except JSONDecodeError:
706
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
707
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
708
+
709
+ def get_dvir(
710
+ self,
711
+ id: str,
712
+ *,
713
+ include_external_ids: typing.Optional[bool] = None,
714
+ request_options: typing.Optional[RequestOptions] = None,
715
+ ) -> HttpResponse[DvirGetDvirResponseBody]:
716
+ """
717
+ Get a single DVIR by ID.
718
+
719
+ <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
720
+
721
+ To use this endpoint, select **Read DVIRs** under the Maintenance 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>
722
+
723
+
724
+ **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.
725
+
726
+ Parameters
727
+ ----------
728
+ id : str
729
+ Id of the DVIR.
730
+
731
+ include_external_ids : typing.Optional[bool]
732
+ Optional boolean indicating whether to return external IDs on supported entities
733
+
734
+ request_options : typing.Optional[RequestOptions]
735
+ Request-specific configuration.
736
+
737
+ Returns
738
+ -------
739
+ HttpResponse[DvirGetDvirResponseBody]
740
+ OK response.
741
+ """
742
+ _response = self._client_wrapper.httpx_client.request(
743
+ f"dvirs/{jsonable_encoder(id)}",
744
+ method="GET",
745
+ params={
746
+ "includeExternalIds": include_external_ids,
747
+ },
748
+ request_options=request_options,
749
+ )
750
+ try:
751
+ if 200 <= _response.status_code < 300:
752
+ _data = typing.cast(
753
+ DvirGetDvirResponseBody,
754
+ parse_obj_as(
755
+ type_=DvirGetDvirResponseBody, # type: ignore
756
+ object_=_response.json(),
757
+ ),
758
+ )
759
+ return HttpResponse(response=_response, data=_data)
760
+ if _response.status_code == 401:
761
+ raise UnauthorizedError(
762
+ headers=dict(_response.headers),
763
+ body=typing.cast(
764
+ typing.Optional[typing.Any],
765
+ parse_obj_as(
766
+ type_=typing.Optional[typing.Any], # type: ignore
767
+ object_=_response.json(),
768
+ ),
769
+ ),
770
+ )
771
+ if _response.status_code == 404:
772
+ raise NotFoundError(
773
+ headers=dict(_response.headers),
774
+ body=typing.cast(
775
+ typing.Optional[typing.Any],
776
+ parse_obj_as(
777
+ type_=typing.Optional[typing.Any], # type: ignore
778
+ object_=_response.json(),
779
+ ),
780
+ ),
781
+ )
782
+ if _response.status_code == 405:
783
+ raise MethodNotAllowedError(
784
+ headers=dict(_response.headers),
785
+ body=typing.cast(
786
+ typing.Optional[typing.Any],
787
+ parse_obj_as(
788
+ type_=typing.Optional[typing.Any], # type: ignore
789
+ object_=_response.json(),
790
+ ),
791
+ ),
792
+ )
793
+ if _response.status_code == 429:
794
+ raise TooManyRequestsError(
795
+ headers=dict(_response.headers),
796
+ body=typing.cast(
797
+ typing.Optional[typing.Any],
798
+ parse_obj_as(
799
+ type_=typing.Optional[typing.Any], # type: ignore
800
+ object_=_response.json(),
801
+ ),
802
+ ),
803
+ )
804
+ if _response.status_code == 500:
805
+ raise InternalServerError(
806
+ headers=dict(_response.headers),
807
+ body=typing.cast(
808
+ typing.Optional[typing.Any],
809
+ parse_obj_as(
810
+ type_=typing.Optional[typing.Any], # type: ignore
811
+ object_=_response.json(),
812
+ ),
813
+ ),
814
+ )
815
+ if _response.status_code == 501:
816
+ raise NotImplementedError(
817
+ headers=dict(_response.headers),
818
+ body=typing.cast(
819
+ typing.Optional[typing.Any],
820
+ parse_obj_as(
821
+ type_=typing.Optional[typing.Any], # type: ignore
822
+ object_=_response.json(),
823
+ ),
824
+ ),
825
+ )
826
+ if _response.status_code == 502:
827
+ raise BadGatewayError(
828
+ headers=dict(_response.headers),
829
+ body=typing.cast(
830
+ typing.Optional[typing.Any],
831
+ parse_obj_as(
832
+ type_=typing.Optional[typing.Any], # type: ignore
833
+ object_=_response.json(),
834
+ ),
835
+ ),
836
+ )
837
+ if _response.status_code == 503:
838
+ raise ServiceUnavailableError(
839
+ headers=dict(_response.headers),
840
+ body=typing.cast(
841
+ typing.Optional[typing.Any],
842
+ parse_obj_as(
843
+ type_=typing.Optional[typing.Any], # type: ignore
844
+ object_=_response.json(),
845
+ ),
846
+ ),
847
+ )
848
+ if _response.status_code == 504:
849
+ raise GatewayTimeoutError(
850
+ headers=dict(_response.headers),
851
+ body=typing.cast(
852
+ typing.Optional[typing.Any],
853
+ parse_obj_as(
854
+ type_=typing.Optional[typing.Any], # type: ignore
855
+ object_=_response.json(),
856
+ ),
857
+ ),
858
+ )
859
+ _response_json = _response.json()
860
+ except JSONDecodeError:
861
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
862
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
863
+
864
+ def update_dvir_defect(
865
+ self,
866
+ id: str,
867
+ *,
868
+ is_resolved: typing.Optional[bool] = OMIT,
869
+ mechanic_notes: typing.Optional[str] = OMIT,
870
+ resolved_at_time: typing.Optional[str] = OMIT,
871
+ resolved_by: typing.Optional[ResolvedBy] = OMIT,
872
+ request_options: typing.Optional[RequestOptions] = None,
873
+ ) -> HttpResponse[DefectResponse]:
874
+ """
875
+ Updates a given defect. Can be used to resolve a defect by marking its `isResolved` field to `true`.
876
+
877
+ **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.
878
+
879
+ To use this endpoint, select **Write Defects** under the Maintenance 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>
880
+
881
+ Parameters
882
+ ----------
883
+ id : str
884
+ ID of the defect.
885
+
886
+ is_resolved : typing.Optional[bool]
887
+ Resolves the defect. Must be `true`.
888
+
889
+ mechanic_notes : typing.Optional[str]
890
+ The mechanics notes on the defect.
891
+
892
+ resolved_at_time : typing.Optional[str]
893
+ Time when defect was resolved. Defaults to now if not provided. UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
894
+
895
+ resolved_by : typing.Optional[ResolvedBy]
896
+
897
+ request_options : typing.Optional[RequestOptions]
898
+ Request-specific configuration.
899
+
900
+ Returns
901
+ -------
902
+ HttpResponse[DefectResponse]
903
+ Return the modified defect entity
904
+ """
905
+ _response = self._client_wrapper.httpx_client.request(
906
+ f"fleet/defects/{jsonable_encoder(id)}",
907
+ method="PATCH",
908
+ json={
909
+ "isResolved": is_resolved,
910
+ "mechanicNotes": mechanic_notes,
911
+ "resolvedAtTime": resolved_at_time,
912
+ "resolvedBy": convert_and_respect_annotation_metadata(
913
+ object_=resolved_by, annotation=ResolvedBy, direction="write"
914
+ ),
915
+ },
916
+ headers={
917
+ "content-type": "application/json",
918
+ },
919
+ request_options=request_options,
920
+ omit=OMIT,
921
+ )
922
+ try:
923
+ if 200 <= _response.status_code < 300:
924
+ _data = typing.cast(
925
+ DefectResponse,
926
+ parse_obj_as(
927
+ type_=DefectResponse, # type: ignore
928
+ object_=_response.json(),
929
+ ),
930
+ )
931
+ return HttpResponse(response=_response, data=_data)
932
+ _response_json = _response.json()
933
+ except JSONDecodeError:
934
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
935
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
936
+
937
+ def create_dvir(
938
+ self,
939
+ *,
940
+ author_id: str,
941
+ safety_status: CreateDvirRequestSafetyStatus,
942
+ license_plate: typing.Optional[str] = OMIT,
943
+ location: typing.Optional[str] = OMIT,
944
+ mechanic_notes: typing.Optional[str] = OMIT,
945
+ odometer_meters: typing.Optional[int] = OMIT,
946
+ resolved_defect_ids: typing.Optional[typing.Sequence[str]] = OMIT,
947
+ trailer_id: typing.Optional[str] = OMIT,
948
+ vehicle_id: typing.Optional[str] = OMIT,
949
+ request_options: typing.Optional[RequestOptions] = None,
950
+ ) -> HttpResponse[DvirResponse]:
951
+ """
952
+ Creates a new mechanic DVIR in the organization.
953
+
954
+ **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.
955
+
956
+ To use this endpoint, select **Write DVIRs** under the Maintenance 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>
957
+
958
+ Parameters
959
+ ----------
960
+ author_id : str
961
+ Samsara user ID of the mechanic creating the DVIR.
962
+
963
+ safety_status : CreateDvirRequestSafetyStatus
964
+ Whether or not this vehicle or trailer is safe to drive.
965
+
966
+ license_plate : typing.Optional[str]
967
+ The license plate of this vehicle.
968
+
969
+ location : typing.Optional[str]
970
+ Optional string if your jurisdiction requires a location of the DVIR.
971
+
972
+ mechanic_notes : typing.Optional[str]
973
+ The mechanics notes on the DVIR.
974
+
975
+ odometer_meters : typing.Optional[int]
976
+ The odometer reading in meters.
977
+
978
+ resolved_defect_ids : typing.Optional[typing.Sequence[str]]
979
+ Array of ids for defects being resolved with this DVIR.
980
+
981
+ trailer_id : typing.Optional[str]
982
+ Id of trailer being inspected. Either vehicleId or trailerId must be provided.
983
+
984
+ vehicle_id : typing.Optional[str]
985
+ Id of vehicle being inspected. Either vehicleId or trailerId must be provided.
986
+
987
+ request_options : typing.Optional[RequestOptions]
988
+ Request-specific configuration.
989
+
990
+ Returns
991
+ -------
992
+ HttpResponse[DvirResponse]
993
+ Newly created DVIR.
994
+ """
995
+ _response = self._client_wrapper.httpx_client.request(
996
+ "fleet/dvirs",
997
+ method="POST",
998
+ json={
999
+ "authorId": author_id,
1000
+ "licensePlate": license_plate,
1001
+ "location": location,
1002
+ "mechanicNotes": mechanic_notes,
1003
+ "odometerMeters": odometer_meters,
1004
+ "resolvedDefectIds": resolved_defect_ids,
1005
+ "safetyStatus": safety_status,
1006
+ "trailerId": trailer_id,
1007
+ "vehicleId": vehicle_id,
1008
+ "type": "mechanic",
1009
+ },
1010
+ headers={
1011
+ "content-type": "application/json",
1012
+ },
1013
+ request_options=request_options,
1014
+ omit=OMIT,
1015
+ )
1016
+ try:
1017
+ if 200 <= _response.status_code < 300:
1018
+ _data = typing.cast(
1019
+ DvirResponse,
1020
+ parse_obj_as(
1021
+ type_=DvirResponse, # type: ignore
1022
+ object_=_response.json(),
1023
+ ),
1024
+ )
1025
+ return HttpResponse(response=_response, data=_data)
1026
+ _response_json = _response.json()
1027
+ except JSONDecodeError:
1028
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1029
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1030
+
1031
+ def update_dvir(
1032
+ self,
1033
+ id: str,
1034
+ *,
1035
+ author_id: str,
1036
+ is_resolved: bool,
1037
+ mechanic_notes: typing.Optional[str] = OMIT,
1038
+ signed_at_time: typing.Optional[str] = OMIT,
1039
+ request_options: typing.Optional[RequestOptions] = None,
1040
+ ) -> HttpResponse[DvirResponse]:
1041
+ """
1042
+ Resolves a given DVIR by marking its `isResolved` field to `true`.
1043
+
1044
+ **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.
1045
+
1046
+ To use this endpoint, select **Write DVIRs** under the Maintenance 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>
1047
+
1048
+ Parameters
1049
+ ----------
1050
+ id : str
1051
+ ID of the DVIR.
1052
+
1053
+ author_id : str
1054
+ The user who is resolving the dvir.
1055
+
1056
+ is_resolved : bool
1057
+ Resolves the DVIR. Must be `true`.
1058
+
1059
+ mechanic_notes : typing.Optional[str]
1060
+ The mechanics notes on the DVIR.
1061
+
1062
+ signed_at_time : typing.Optional[str]
1063
+ Time when user signed this DVIR. Defaults to now. UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
1064
+
1065
+ request_options : typing.Optional[RequestOptions]
1066
+ Request-specific configuration.
1067
+
1068
+ Returns
1069
+ -------
1070
+ HttpResponse[DvirResponse]
1071
+ Updated dvir object with ID.
1072
+ """
1073
+ _response = self._client_wrapper.httpx_client.request(
1074
+ f"fleet/dvirs/{jsonable_encoder(id)}",
1075
+ method="PATCH",
1076
+ json={
1077
+ "authorId": author_id,
1078
+ "isResolved": is_resolved,
1079
+ "mechanicNotes": mechanic_notes,
1080
+ "signedAtTime": signed_at_time,
1081
+ },
1082
+ headers={
1083
+ "content-type": "application/json",
1084
+ },
1085
+ request_options=request_options,
1086
+ omit=OMIT,
1087
+ )
1088
+ try:
1089
+ if 200 <= _response.status_code < 300:
1090
+ _data = typing.cast(
1091
+ DvirResponse,
1092
+ parse_obj_as(
1093
+ type_=DvirResponse, # type: ignore
1094
+ object_=_response.json(),
1095
+ ),
1096
+ )
1097
+ return HttpResponse(response=_response, data=_data)
1098
+ _response_json = _response.json()
1099
+ except JSONDecodeError:
1100
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1101
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1102
+
1103
+ def v_1_get_fleet_maintenance_list(
1104
+ self, *, request_options: typing.Optional[RequestOptions] = None
1105
+ ) -> HttpResponse[InlineResponse2004]:
1106
+ """
1107
+ <n class="warning">
1108
+ <nh>
1109
+ <i class="fa fa-exclamation-circle"></i>
1110
+ This endpoint is still on our legacy API.
1111
+ </nh>
1112
+ </n>
1113
+
1114
+ Get list of the vehicles with any engine faults or check light data.
1115
+
1116
+ **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.
1117
+
1118
+ To use this endpoint, select **Read DVIRs** under the Maintenance 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>
1119
+
1120
+ Parameters
1121
+ ----------
1122
+ request_options : typing.Optional[RequestOptions]
1123
+ Request-specific configuration.
1124
+
1125
+ Returns
1126
+ -------
1127
+ HttpResponse[InlineResponse2004]
1128
+ List of vehicles and maintenance information about each.
1129
+ """
1130
+ _response = self._client_wrapper.httpx_client.request(
1131
+ "v1/fleet/maintenance/list",
1132
+ method="GET",
1133
+ request_options=request_options,
1134
+ )
1135
+ try:
1136
+ if 200 <= _response.status_code < 300:
1137
+ _data = typing.cast(
1138
+ InlineResponse2004,
1139
+ parse_obj_as(
1140
+ type_=InlineResponse2004, # type: ignore
1141
+ object_=_response.json(),
1142
+ ),
1143
+ )
1144
+ return HttpResponse(response=_response, data=_data)
1145
+ _response_json = _response.json()
1146
+ except JSONDecodeError:
1147
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1148
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1149
+
10
1150
 
11
1151
  class AsyncRawMaintenanceClient:
12
1152
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
13
1153
  self._client_wrapper = client_wrapper
1154
+
1155
+ async def get_defect_types(
1156
+ self,
1157
+ *,
1158
+ after: typing.Optional[str] = None,
1159
+ limit: typing.Optional[int] = None,
1160
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1161
+ request_options: typing.Optional[RequestOptions] = None,
1162
+ ) -> AsyncHttpResponse[DvirDefectTypeGetDefectTypesResponseBody]:
1163
+ """
1164
+ Get DVIR defect types.
1165
+
1166
+ <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>).
1167
+
1168
+ To use this endpoint, select **Read Defect Types** under the Maintenance 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>
1169
+
1170
+
1171
+ **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.
1172
+
1173
+ Parameters
1174
+ ----------
1175
+ after : typing.Optional[str]
1176
+ 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.
1177
+
1178
+ limit : typing.Optional[int]
1179
+ The limit for how many objects will be in the response. Default and max for this value is 512 objects.
1180
+
1181
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1182
+ A filter on the data based on this comma-separated list of defect type IDs.
1183
+
1184
+ request_options : typing.Optional[RequestOptions]
1185
+ Request-specific configuration.
1186
+
1187
+ Returns
1188
+ -------
1189
+ AsyncHttpResponse[DvirDefectTypeGetDefectTypesResponseBody]
1190
+ OK response.
1191
+ """
1192
+ _response = await self._client_wrapper.httpx_client.request(
1193
+ "defect-types",
1194
+ method="GET",
1195
+ params={
1196
+ "after": after,
1197
+ "limit": limit,
1198
+ "ids": ids,
1199
+ },
1200
+ request_options=request_options,
1201
+ )
1202
+ try:
1203
+ if 200 <= _response.status_code < 300:
1204
+ _data = typing.cast(
1205
+ DvirDefectTypeGetDefectTypesResponseBody,
1206
+ parse_obj_as(
1207
+ type_=DvirDefectTypeGetDefectTypesResponseBody, # type: ignore
1208
+ object_=_response.json(),
1209
+ ),
1210
+ )
1211
+ return AsyncHttpResponse(response=_response, data=_data)
1212
+ if _response.status_code == 401:
1213
+ raise UnauthorizedError(
1214
+ headers=dict(_response.headers),
1215
+ body=typing.cast(
1216
+ typing.Optional[typing.Any],
1217
+ parse_obj_as(
1218
+ type_=typing.Optional[typing.Any], # type: ignore
1219
+ object_=_response.json(),
1220
+ ),
1221
+ ),
1222
+ )
1223
+ if _response.status_code == 404:
1224
+ raise NotFoundError(
1225
+ headers=dict(_response.headers),
1226
+ body=typing.cast(
1227
+ typing.Optional[typing.Any],
1228
+ parse_obj_as(
1229
+ type_=typing.Optional[typing.Any], # type: ignore
1230
+ object_=_response.json(),
1231
+ ),
1232
+ ),
1233
+ )
1234
+ if _response.status_code == 405:
1235
+ raise MethodNotAllowedError(
1236
+ headers=dict(_response.headers),
1237
+ body=typing.cast(
1238
+ typing.Optional[typing.Any],
1239
+ parse_obj_as(
1240
+ type_=typing.Optional[typing.Any], # type: ignore
1241
+ object_=_response.json(),
1242
+ ),
1243
+ ),
1244
+ )
1245
+ if _response.status_code == 429:
1246
+ raise TooManyRequestsError(
1247
+ headers=dict(_response.headers),
1248
+ body=typing.cast(
1249
+ typing.Optional[typing.Any],
1250
+ parse_obj_as(
1251
+ type_=typing.Optional[typing.Any], # type: ignore
1252
+ object_=_response.json(),
1253
+ ),
1254
+ ),
1255
+ )
1256
+ if _response.status_code == 500:
1257
+ raise InternalServerError(
1258
+ headers=dict(_response.headers),
1259
+ body=typing.cast(
1260
+ typing.Optional[typing.Any],
1261
+ parse_obj_as(
1262
+ type_=typing.Optional[typing.Any], # type: ignore
1263
+ object_=_response.json(),
1264
+ ),
1265
+ ),
1266
+ )
1267
+ if _response.status_code == 501:
1268
+ raise NotImplementedError(
1269
+ headers=dict(_response.headers),
1270
+ body=typing.cast(
1271
+ typing.Optional[typing.Any],
1272
+ parse_obj_as(
1273
+ type_=typing.Optional[typing.Any], # type: ignore
1274
+ object_=_response.json(),
1275
+ ),
1276
+ ),
1277
+ )
1278
+ if _response.status_code == 502:
1279
+ raise BadGatewayError(
1280
+ headers=dict(_response.headers),
1281
+ body=typing.cast(
1282
+ typing.Optional[typing.Any],
1283
+ parse_obj_as(
1284
+ type_=typing.Optional[typing.Any], # type: ignore
1285
+ object_=_response.json(),
1286
+ ),
1287
+ ),
1288
+ )
1289
+ if _response.status_code == 503:
1290
+ raise ServiceUnavailableError(
1291
+ headers=dict(_response.headers),
1292
+ body=typing.cast(
1293
+ typing.Optional[typing.Any],
1294
+ parse_obj_as(
1295
+ type_=typing.Optional[typing.Any], # type: ignore
1296
+ object_=_response.json(),
1297
+ ),
1298
+ ),
1299
+ )
1300
+ if _response.status_code == 504:
1301
+ raise GatewayTimeoutError(
1302
+ headers=dict(_response.headers),
1303
+ body=typing.cast(
1304
+ typing.Optional[typing.Any],
1305
+ parse_obj_as(
1306
+ type_=typing.Optional[typing.Any], # type: ignore
1307
+ object_=_response.json(),
1308
+ ),
1309
+ ),
1310
+ )
1311
+ _response_json = _response.json()
1312
+ except JSONDecodeError:
1313
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1314
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1315
+
1316
+ async def stream_defects(
1317
+ self,
1318
+ *,
1319
+ start_time: str,
1320
+ after: typing.Optional[str] = None,
1321
+ limit: typing.Optional[int] = None,
1322
+ end_time: typing.Optional[str] = None,
1323
+ include_external_ids: typing.Optional[bool] = None,
1324
+ is_resolved: typing.Optional[bool] = None,
1325
+ request_options: typing.Optional[RequestOptions] = None,
1326
+ ) -> AsyncHttpResponse[DvirDefectStreamDefectsResponseBody]:
1327
+ """
1328
+ Stream DVIR defects.
1329
+
1330
+ <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>).
1331
+
1332
+ To use this endpoint, select **Read Defects** under the Maintenance 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>
1333
+
1334
+
1335
+ **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.
1336
+
1337
+ Parameters
1338
+ ----------
1339
+ start_time : str
1340
+ Required RFC 3339 timestamp to begin the feed or history by `updatedAtTime` at `startTime`.
1341
+
1342
+ after : typing.Optional[str]
1343
+ 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.
1344
+
1345
+ limit : typing.Optional[int]
1346
+ The limit for how many objects will be in the response. Default and max for this value is 200 objects.
1347
+
1348
+ end_time : typing.Optional[str]
1349
+ Optional RFC 3339 timestamp. If not provided then the endpoint behaves as an unending feed of changes.
1350
+
1351
+ include_external_ids : typing.Optional[bool]
1352
+ Optional boolean indicating whether to return external IDs on supported entities
1353
+
1354
+ is_resolved : typing.Optional[bool]
1355
+ Boolean value for whether filter defects by resolved status.
1356
+
1357
+ request_options : typing.Optional[RequestOptions]
1358
+ Request-specific configuration.
1359
+
1360
+ Returns
1361
+ -------
1362
+ AsyncHttpResponse[DvirDefectStreamDefectsResponseBody]
1363
+ OK response.
1364
+ """
1365
+ _response = await self._client_wrapper.httpx_client.request(
1366
+ "defects/stream",
1367
+ method="GET",
1368
+ params={
1369
+ "after": after,
1370
+ "limit": limit,
1371
+ "startTime": start_time,
1372
+ "endTime": end_time,
1373
+ "includeExternalIds": include_external_ids,
1374
+ "isResolved": is_resolved,
1375
+ },
1376
+ request_options=request_options,
1377
+ )
1378
+ try:
1379
+ if 200 <= _response.status_code < 300:
1380
+ _data = typing.cast(
1381
+ DvirDefectStreamDefectsResponseBody,
1382
+ parse_obj_as(
1383
+ type_=DvirDefectStreamDefectsResponseBody, # type: ignore
1384
+ object_=_response.json(),
1385
+ ),
1386
+ )
1387
+ return AsyncHttpResponse(response=_response, data=_data)
1388
+ if _response.status_code == 401:
1389
+ raise UnauthorizedError(
1390
+ headers=dict(_response.headers),
1391
+ body=typing.cast(
1392
+ typing.Optional[typing.Any],
1393
+ parse_obj_as(
1394
+ type_=typing.Optional[typing.Any], # type: ignore
1395
+ object_=_response.json(),
1396
+ ),
1397
+ ),
1398
+ )
1399
+ if _response.status_code == 404:
1400
+ raise NotFoundError(
1401
+ headers=dict(_response.headers),
1402
+ body=typing.cast(
1403
+ typing.Optional[typing.Any],
1404
+ parse_obj_as(
1405
+ type_=typing.Optional[typing.Any], # type: ignore
1406
+ object_=_response.json(),
1407
+ ),
1408
+ ),
1409
+ )
1410
+ if _response.status_code == 405:
1411
+ raise MethodNotAllowedError(
1412
+ headers=dict(_response.headers),
1413
+ body=typing.cast(
1414
+ typing.Optional[typing.Any],
1415
+ parse_obj_as(
1416
+ type_=typing.Optional[typing.Any], # type: ignore
1417
+ object_=_response.json(),
1418
+ ),
1419
+ ),
1420
+ )
1421
+ if _response.status_code == 429:
1422
+ raise TooManyRequestsError(
1423
+ headers=dict(_response.headers),
1424
+ body=typing.cast(
1425
+ typing.Optional[typing.Any],
1426
+ parse_obj_as(
1427
+ type_=typing.Optional[typing.Any], # type: ignore
1428
+ object_=_response.json(),
1429
+ ),
1430
+ ),
1431
+ )
1432
+ if _response.status_code == 500:
1433
+ raise InternalServerError(
1434
+ headers=dict(_response.headers),
1435
+ body=typing.cast(
1436
+ typing.Optional[typing.Any],
1437
+ parse_obj_as(
1438
+ type_=typing.Optional[typing.Any], # type: ignore
1439
+ object_=_response.json(),
1440
+ ),
1441
+ ),
1442
+ )
1443
+ if _response.status_code == 501:
1444
+ raise NotImplementedError(
1445
+ headers=dict(_response.headers),
1446
+ body=typing.cast(
1447
+ typing.Optional[typing.Any],
1448
+ parse_obj_as(
1449
+ type_=typing.Optional[typing.Any], # type: ignore
1450
+ object_=_response.json(),
1451
+ ),
1452
+ ),
1453
+ )
1454
+ if _response.status_code == 502:
1455
+ raise BadGatewayError(
1456
+ headers=dict(_response.headers),
1457
+ body=typing.cast(
1458
+ typing.Optional[typing.Any],
1459
+ parse_obj_as(
1460
+ type_=typing.Optional[typing.Any], # type: ignore
1461
+ object_=_response.json(),
1462
+ ),
1463
+ ),
1464
+ )
1465
+ if _response.status_code == 503:
1466
+ raise ServiceUnavailableError(
1467
+ headers=dict(_response.headers),
1468
+ body=typing.cast(
1469
+ typing.Optional[typing.Any],
1470
+ parse_obj_as(
1471
+ type_=typing.Optional[typing.Any], # type: ignore
1472
+ object_=_response.json(),
1473
+ ),
1474
+ ),
1475
+ )
1476
+ if _response.status_code == 504:
1477
+ raise GatewayTimeoutError(
1478
+ headers=dict(_response.headers),
1479
+ body=typing.cast(
1480
+ typing.Optional[typing.Any],
1481
+ parse_obj_as(
1482
+ type_=typing.Optional[typing.Any], # type: ignore
1483
+ object_=_response.json(),
1484
+ ),
1485
+ ),
1486
+ )
1487
+ _response_json = _response.json()
1488
+ except JSONDecodeError:
1489
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1490
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1491
+
1492
+ async def get_defect(
1493
+ self,
1494
+ id: str,
1495
+ *,
1496
+ include_external_ids: typing.Optional[bool] = None,
1497
+ request_options: typing.Optional[RequestOptions] = None,
1498
+ ) -> AsyncHttpResponse[DvirDefectGetDefectResponseBody]:
1499
+ """
1500
+ Get a single DVIR defect by ID.
1501
+
1502
+ <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1503
+
1504
+ To use this endpoint, select **Read Defects** under the Maintenance 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>
1505
+
1506
+
1507
+ **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.
1508
+
1509
+ Parameters
1510
+ ----------
1511
+ id : str
1512
+ The unique ID of the DVIR defect.
1513
+
1514
+ include_external_ids : typing.Optional[bool]
1515
+ Optional boolean indicating whether to return external IDs on supported entities
1516
+
1517
+ request_options : typing.Optional[RequestOptions]
1518
+ Request-specific configuration.
1519
+
1520
+ Returns
1521
+ -------
1522
+ AsyncHttpResponse[DvirDefectGetDefectResponseBody]
1523
+ OK response.
1524
+ """
1525
+ _response = await self._client_wrapper.httpx_client.request(
1526
+ f"defects/{jsonable_encoder(id)}",
1527
+ method="GET",
1528
+ params={
1529
+ "includeExternalIds": include_external_ids,
1530
+ },
1531
+ request_options=request_options,
1532
+ )
1533
+ try:
1534
+ if 200 <= _response.status_code < 300:
1535
+ _data = typing.cast(
1536
+ DvirDefectGetDefectResponseBody,
1537
+ parse_obj_as(
1538
+ type_=DvirDefectGetDefectResponseBody, # type: ignore
1539
+ object_=_response.json(),
1540
+ ),
1541
+ )
1542
+ return AsyncHttpResponse(response=_response, data=_data)
1543
+ if _response.status_code == 401:
1544
+ raise UnauthorizedError(
1545
+ headers=dict(_response.headers),
1546
+ body=typing.cast(
1547
+ typing.Optional[typing.Any],
1548
+ parse_obj_as(
1549
+ type_=typing.Optional[typing.Any], # type: ignore
1550
+ object_=_response.json(),
1551
+ ),
1552
+ ),
1553
+ )
1554
+ if _response.status_code == 404:
1555
+ raise NotFoundError(
1556
+ headers=dict(_response.headers),
1557
+ body=typing.cast(
1558
+ typing.Optional[typing.Any],
1559
+ parse_obj_as(
1560
+ type_=typing.Optional[typing.Any], # type: ignore
1561
+ object_=_response.json(),
1562
+ ),
1563
+ ),
1564
+ )
1565
+ if _response.status_code == 405:
1566
+ raise MethodNotAllowedError(
1567
+ headers=dict(_response.headers),
1568
+ body=typing.cast(
1569
+ typing.Optional[typing.Any],
1570
+ parse_obj_as(
1571
+ type_=typing.Optional[typing.Any], # type: ignore
1572
+ object_=_response.json(),
1573
+ ),
1574
+ ),
1575
+ )
1576
+ if _response.status_code == 429:
1577
+ raise TooManyRequestsError(
1578
+ headers=dict(_response.headers),
1579
+ body=typing.cast(
1580
+ typing.Optional[typing.Any],
1581
+ parse_obj_as(
1582
+ type_=typing.Optional[typing.Any], # type: ignore
1583
+ object_=_response.json(),
1584
+ ),
1585
+ ),
1586
+ )
1587
+ if _response.status_code == 500:
1588
+ raise InternalServerError(
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 == 501:
1599
+ raise NotImplementedError(
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 == 502:
1610
+ raise BadGatewayError(
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 == 503:
1621
+ raise ServiceUnavailableError(
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 == 504:
1632
+ raise GatewayTimeoutError(
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
+ _response_json = _response.json()
1643
+ except JSONDecodeError:
1644
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1645
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1646
+
1647
+ async def get_dvirs(
1648
+ self,
1649
+ *,
1650
+ start_time: str,
1651
+ after: typing.Optional[str] = None,
1652
+ limit: typing.Optional[int] = None,
1653
+ include_external_ids: typing.Optional[bool] = None,
1654
+ end_time: typing.Optional[str] = None,
1655
+ safety_status: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1656
+ request_options: typing.Optional[RequestOptions] = None,
1657
+ ) -> AsyncHttpResponse[DvirGetDvirsResponseBody]:
1658
+ """
1659
+ Returns a history/feed of changed DVIRs by updatedAtTime between startTime and endTime parameters. In case of missing `endTime` parameter it will return a never ending stream of data.
1660
+
1661
+ <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>).
1662
+
1663
+ To use this endpoint, select **Read DVIRs** under the Maintenance 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>
1664
+
1665
+
1666
+ **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.
1667
+
1668
+ Parameters
1669
+ ----------
1670
+ start_time : str
1671
+ Required RFC 3339 timestamp to begin the feed or history by `updatedAtTime` at `startTime`.
1672
+
1673
+ after : typing.Optional[str]
1674
+ 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.
1675
+
1676
+ limit : typing.Optional[int]
1677
+ The limit for how many objects will be in the response. Default and max for this value is 200 objects.
1678
+
1679
+ include_external_ids : typing.Optional[bool]
1680
+ Optional boolean indicating whether to return external IDs on supported entities
1681
+
1682
+ end_time : typing.Optional[str]
1683
+ Optional RFC 3339 timestamp. If not provided then the endpoint behaves as an unending feed of changes.
1684
+
1685
+ safety_status : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1686
+ Optional list of safety statuses. Valid values: [safe, unsafe, resolved]
1687
+
1688
+ request_options : typing.Optional[RequestOptions]
1689
+ Request-specific configuration.
1690
+
1691
+ Returns
1692
+ -------
1693
+ AsyncHttpResponse[DvirGetDvirsResponseBody]
1694
+ OK response.
1695
+ """
1696
+ _response = await self._client_wrapper.httpx_client.request(
1697
+ "dvirs/stream",
1698
+ method="GET",
1699
+ params={
1700
+ "after": after,
1701
+ "limit": limit,
1702
+ "includeExternalIds": include_external_ids,
1703
+ "startTime": start_time,
1704
+ "endTime": end_time,
1705
+ "safetyStatus": safety_status,
1706
+ },
1707
+ request_options=request_options,
1708
+ )
1709
+ try:
1710
+ if 200 <= _response.status_code < 300:
1711
+ _data = typing.cast(
1712
+ DvirGetDvirsResponseBody,
1713
+ parse_obj_as(
1714
+ type_=DvirGetDvirsResponseBody, # type: ignore
1715
+ object_=_response.json(),
1716
+ ),
1717
+ )
1718
+ return AsyncHttpResponse(response=_response, data=_data)
1719
+ if _response.status_code == 401:
1720
+ raise UnauthorizedError(
1721
+ headers=dict(_response.headers),
1722
+ body=typing.cast(
1723
+ typing.Optional[typing.Any],
1724
+ parse_obj_as(
1725
+ type_=typing.Optional[typing.Any], # type: ignore
1726
+ object_=_response.json(),
1727
+ ),
1728
+ ),
1729
+ )
1730
+ if _response.status_code == 404:
1731
+ raise NotFoundError(
1732
+ headers=dict(_response.headers),
1733
+ body=typing.cast(
1734
+ typing.Optional[typing.Any],
1735
+ parse_obj_as(
1736
+ type_=typing.Optional[typing.Any], # type: ignore
1737
+ object_=_response.json(),
1738
+ ),
1739
+ ),
1740
+ )
1741
+ if _response.status_code == 405:
1742
+ raise MethodNotAllowedError(
1743
+ headers=dict(_response.headers),
1744
+ body=typing.cast(
1745
+ typing.Optional[typing.Any],
1746
+ parse_obj_as(
1747
+ type_=typing.Optional[typing.Any], # type: ignore
1748
+ object_=_response.json(),
1749
+ ),
1750
+ ),
1751
+ )
1752
+ if _response.status_code == 429:
1753
+ raise TooManyRequestsError(
1754
+ headers=dict(_response.headers),
1755
+ body=typing.cast(
1756
+ typing.Optional[typing.Any],
1757
+ parse_obj_as(
1758
+ type_=typing.Optional[typing.Any], # type: ignore
1759
+ object_=_response.json(),
1760
+ ),
1761
+ ),
1762
+ )
1763
+ if _response.status_code == 500:
1764
+ raise InternalServerError(
1765
+ headers=dict(_response.headers),
1766
+ body=typing.cast(
1767
+ typing.Optional[typing.Any],
1768
+ parse_obj_as(
1769
+ type_=typing.Optional[typing.Any], # type: ignore
1770
+ object_=_response.json(),
1771
+ ),
1772
+ ),
1773
+ )
1774
+ if _response.status_code == 501:
1775
+ raise NotImplementedError(
1776
+ headers=dict(_response.headers),
1777
+ body=typing.cast(
1778
+ typing.Optional[typing.Any],
1779
+ parse_obj_as(
1780
+ type_=typing.Optional[typing.Any], # type: ignore
1781
+ object_=_response.json(),
1782
+ ),
1783
+ ),
1784
+ )
1785
+ if _response.status_code == 502:
1786
+ raise BadGatewayError(
1787
+ headers=dict(_response.headers),
1788
+ body=typing.cast(
1789
+ typing.Optional[typing.Any],
1790
+ parse_obj_as(
1791
+ type_=typing.Optional[typing.Any], # type: ignore
1792
+ object_=_response.json(),
1793
+ ),
1794
+ ),
1795
+ )
1796
+ if _response.status_code == 503:
1797
+ raise ServiceUnavailableError(
1798
+ headers=dict(_response.headers),
1799
+ body=typing.cast(
1800
+ typing.Optional[typing.Any],
1801
+ parse_obj_as(
1802
+ type_=typing.Optional[typing.Any], # type: ignore
1803
+ object_=_response.json(),
1804
+ ),
1805
+ ),
1806
+ )
1807
+ if _response.status_code == 504:
1808
+ raise GatewayTimeoutError(
1809
+ headers=dict(_response.headers),
1810
+ body=typing.cast(
1811
+ typing.Optional[typing.Any],
1812
+ parse_obj_as(
1813
+ type_=typing.Optional[typing.Any], # type: ignore
1814
+ object_=_response.json(),
1815
+ ),
1816
+ ),
1817
+ )
1818
+ _response_json = _response.json()
1819
+ except JSONDecodeError:
1820
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1821
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1822
+
1823
+ async def get_dvir(
1824
+ self,
1825
+ id: str,
1826
+ *,
1827
+ include_external_ids: typing.Optional[bool] = None,
1828
+ request_options: typing.Optional[RequestOptions] = None,
1829
+ ) -> AsyncHttpResponse[DvirGetDvirResponseBody]:
1830
+ """
1831
+ Get a single DVIR by ID.
1832
+
1833
+ <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1834
+
1835
+ To use this endpoint, select **Read DVIRs** under the Maintenance 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>
1836
+
1837
+
1838
+ **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.
1839
+
1840
+ Parameters
1841
+ ----------
1842
+ id : str
1843
+ Id of the DVIR.
1844
+
1845
+ include_external_ids : typing.Optional[bool]
1846
+ Optional boolean indicating whether to return external IDs on supported entities
1847
+
1848
+ request_options : typing.Optional[RequestOptions]
1849
+ Request-specific configuration.
1850
+
1851
+ Returns
1852
+ -------
1853
+ AsyncHttpResponse[DvirGetDvirResponseBody]
1854
+ OK response.
1855
+ """
1856
+ _response = await self._client_wrapper.httpx_client.request(
1857
+ f"dvirs/{jsonable_encoder(id)}",
1858
+ method="GET",
1859
+ params={
1860
+ "includeExternalIds": include_external_ids,
1861
+ },
1862
+ request_options=request_options,
1863
+ )
1864
+ try:
1865
+ if 200 <= _response.status_code < 300:
1866
+ _data = typing.cast(
1867
+ DvirGetDvirResponseBody,
1868
+ parse_obj_as(
1869
+ type_=DvirGetDvirResponseBody, # type: ignore
1870
+ object_=_response.json(),
1871
+ ),
1872
+ )
1873
+ return AsyncHttpResponse(response=_response, data=_data)
1874
+ if _response.status_code == 401:
1875
+ raise UnauthorizedError(
1876
+ headers=dict(_response.headers),
1877
+ body=typing.cast(
1878
+ typing.Optional[typing.Any],
1879
+ parse_obj_as(
1880
+ type_=typing.Optional[typing.Any], # type: ignore
1881
+ object_=_response.json(),
1882
+ ),
1883
+ ),
1884
+ )
1885
+ if _response.status_code == 404:
1886
+ raise NotFoundError(
1887
+ headers=dict(_response.headers),
1888
+ body=typing.cast(
1889
+ typing.Optional[typing.Any],
1890
+ parse_obj_as(
1891
+ type_=typing.Optional[typing.Any], # type: ignore
1892
+ object_=_response.json(),
1893
+ ),
1894
+ ),
1895
+ )
1896
+ if _response.status_code == 405:
1897
+ raise MethodNotAllowedError(
1898
+ headers=dict(_response.headers),
1899
+ body=typing.cast(
1900
+ typing.Optional[typing.Any],
1901
+ parse_obj_as(
1902
+ type_=typing.Optional[typing.Any], # type: ignore
1903
+ object_=_response.json(),
1904
+ ),
1905
+ ),
1906
+ )
1907
+ if _response.status_code == 429:
1908
+ raise TooManyRequestsError(
1909
+ headers=dict(_response.headers),
1910
+ body=typing.cast(
1911
+ typing.Optional[typing.Any],
1912
+ parse_obj_as(
1913
+ type_=typing.Optional[typing.Any], # type: ignore
1914
+ object_=_response.json(),
1915
+ ),
1916
+ ),
1917
+ )
1918
+ if _response.status_code == 500:
1919
+ raise InternalServerError(
1920
+ headers=dict(_response.headers),
1921
+ body=typing.cast(
1922
+ typing.Optional[typing.Any],
1923
+ parse_obj_as(
1924
+ type_=typing.Optional[typing.Any], # type: ignore
1925
+ object_=_response.json(),
1926
+ ),
1927
+ ),
1928
+ )
1929
+ if _response.status_code == 501:
1930
+ raise NotImplementedError(
1931
+ headers=dict(_response.headers),
1932
+ body=typing.cast(
1933
+ typing.Optional[typing.Any],
1934
+ parse_obj_as(
1935
+ type_=typing.Optional[typing.Any], # type: ignore
1936
+ object_=_response.json(),
1937
+ ),
1938
+ ),
1939
+ )
1940
+ if _response.status_code == 502:
1941
+ raise BadGatewayError(
1942
+ headers=dict(_response.headers),
1943
+ body=typing.cast(
1944
+ typing.Optional[typing.Any],
1945
+ parse_obj_as(
1946
+ type_=typing.Optional[typing.Any], # type: ignore
1947
+ object_=_response.json(),
1948
+ ),
1949
+ ),
1950
+ )
1951
+ if _response.status_code == 503:
1952
+ raise ServiceUnavailableError(
1953
+ headers=dict(_response.headers),
1954
+ body=typing.cast(
1955
+ typing.Optional[typing.Any],
1956
+ parse_obj_as(
1957
+ type_=typing.Optional[typing.Any], # type: ignore
1958
+ object_=_response.json(),
1959
+ ),
1960
+ ),
1961
+ )
1962
+ if _response.status_code == 504:
1963
+ raise GatewayTimeoutError(
1964
+ headers=dict(_response.headers),
1965
+ body=typing.cast(
1966
+ typing.Optional[typing.Any],
1967
+ parse_obj_as(
1968
+ type_=typing.Optional[typing.Any], # type: ignore
1969
+ object_=_response.json(),
1970
+ ),
1971
+ ),
1972
+ )
1973
+ _response_json = _response.json()
1974
+ except JSONDecodeError:
1975
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1976
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1977
+
1978
+ async def update_dvir_defect(
1979
+ self,
1980
+ id: str,
1981
+ *,
1982
+ is_resolved: typing.Optional[bool] = OMIT,
1983
+ mechanic_notes: typing.Optional[str] = OMIT,
1984
+ resolved_at_time: typing.Optional[str] = OMIT,
1985
+ resolved_by: typing.Optional[ResolvedBy] = OMIT,
1986
+ request_options: typing.Optional[RequestOptions] = None,
1987
+ ) -> AsyncHttpResponse[DefectResponse]:
1988
+ """
1989
+ Updates a given defect. Can be used to resolve a defect by marking its `isResolved` field to `true`.
1990
+
1991
+ **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.
1992
+
1993
+ To use this endpoint, select **Write Defects** under the Maintenance 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>
1994
+
1995
+ Parameters
1996
+ ----------
1997
+ id : str
1998
+ ID of the defect.
1999
+
2000
+ is_resolved : typing.Optional[bool]
2001
+ Resolves the defect. Must be `true`.
2002
+
2003
+ mechanic_notes : typing.Optional[str]
2004
+ The mechanics notes on the defect.
2005
+
2006
+ resolved_at_time : typing.Optional[str]
2007
+ Time when defect was resolved. Defaults to now if not provided. UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
2008
+
2009
+ resolved_by : typing.Optional[ResolvedBy]
2010
+
2011
+ request_options : typing.Optional[RequestOptions]
2012
+ Request-specific configuration.
2013
+
2014
+ Returns
2015
+ -------
2016
+ AsyncHttpResponse[DefectResponse]
2017
+ Return the modified defect entity
2018
+ """
2019
+ _response = await self._client_wrapper.httpx_client.request(
2020
+ f"fleet/defects/{jsonable_encoder(id)}",
2021
+ method="PATCH",
2022
+ json={
2023
+ "isResolved": is_resolved,
2024
+ "mechanicNotes": mechanic_notes,
2025
+ "resolvedAtTime": resolved_at_time,
2026
+ "resolvedBy": convert_and_respect_annotation_metadata(
2027
+ object_=resolved_by, annotation=ResolvedBy, direction="write"
2028
+ ),
2029
+ },
2030
+ headers={
2031
+ "content-type": "application/json",
2032
+ },
2033
+ request_options=request_options,
2034
+ omit=OMIT,
2035
+ )
2036
+ try:
2037
+ if 200 <= _response.status_code < 300:
2038
+ _data = typing.cast(
2039
+ DefectResponse,
2040
+ parse_obj_as(
2041
+ type_=DefectResponse, # type: ignore
2042
+ object_=_response.json(),
2043
+ ),
2044
+ )
2045
+ return AsyncHttpResponse(response=_response, data=_data)
2046
+ _response_json = _response.json()
2047
+ except JSONDecodeError:
2048
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2049
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2050
+
2051
+ async def create_dvir(
2052
+ self,
2053
+ *,
2054
+ author_id: str,
2055
+ safety_status: CreateDvirRequestSafetyStatus,
2056
+ license_plate: typing.Optional[str] = OMIT,
2057
+ location: typing.Optional[str] = OMIT,
2058
+ mechanic_notes: typing.Optional[str] = OMIT,
2059
+ odometer_meters: typing.Optional[int] = OMIT,
2060
+ resolved_defect_ids: typing.Optional[typing.Sequence[str]] = OMIT,
2061
+ trailer_id: typing.Optional[str] = OMIT,
2062
+ vehicle_id: typing.Optional[str] = OMIT,
2063
+ request_options: typing.Optional[RequestOptions] = None,
2064
+ ) -> AsyncHttpResponse[DvirResponse]:
2065
+ """
2066
+ Creates a new mechanic DVIR in the organization.
2067
+
2068
+ **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.
2069
+
2070
+ To use this endpoint, select **Write DVIRs** under the Maintenance 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>
2071
+
2072
+ Parameters
2073
+ ----------
2074
+ author_id : str
2075
+ Samsara user ID of the mechanic creating the DVIR.
2076
+
2077
+ safety_status : CreateDvirRequestSafetyStatus
2078
+ Whether or not this vehicle or trailer is safe to drive.
2079
+
2080
+ license_plate : typing.Optional[str]
2081
+ The license plate of this vehicle.
2082
+
2083
+ location : typing.Optional[str]
2084
+ Optional string if your jurisdiction requires a location of the DVIR.
2085
+
2086
+ mechanic_notes : typing.Optional[str]
2087
+ The mechanics notes on the DVIR.
2088
+
2089
+ odometer_meters : typing.Optional[int]
2090
+ The odometer reading in meters.
2091
+
2092
+ resolved_defect_ids : typing.Optional[typing.Sequence[str]]
2093
+ Array of ids for defects being resolved with this DVIR.
2094
+
2095
+ trailer_id : typing.Optional[str]
2096
+ Id of trailer being inspected. Either vehicleId or trailerId must be provided.
2097
+
2098
+ vehicle_id : typing.Optional[str]
2099
+ Id of vehicle being inspected. Either vehicleId or trailerId must be provided.
2100
+
2101
+ request_options : typing.Optional[RequestOptions]
2102
+ Request-specific configuration.
2103
+
2104
+ Returns
2105
+ -------
2106
+ AsyncHttpResponse[DvirResponse]
2107
+ Newly created DVIR.
2108
+ """
2109
+ _response = await self._client_wrapper.httpx_client.request(
2110
+ "fleet/dvirs",
2111
+ method="POST",
2112
+ json={
2113
+ "authorId": author_id,
2114
+ "licensePlate": license_plate,
2115
+ "location": location,
2116
+ "mechanicNotes": mechanic_notes,
2117
+ "odometerMeters": odometer_meters,
2118
+ "resolvedDefectIds": resolved_defect_ids,
2119
+ "safetyStatus": safety_status,
2120
+ "trailerId": trailer_id,
2121
+ "vehicleId": vehicle_id,
2122
+ "type": "mechanic",
2123
+ },
2124
+ headers={
2125
+ "content-type": "application/json",
2126
+ },
2127
+ request_options=request_options,
2128
+ omit=OMIT,
2129
+ )
2130
+ try:
2131
+ if 200 <= _response.status_code < 300:
2132
+ _data = typing.cast(
2133
+ DvirResponse,
2134
+ parse_obj_as(
2135
+ type_=DvirResponse, # type: ignore
2136
+ object_=_response.json(),
2137
+ ),
2138
+ )
2139
+ return AsyncHttpResponse(response=_response, data=_data)
2140
+ _response_json = _response.json()
2141
+ except JSONDecodeError:
2142
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2143
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2144
+
2145
+ async def update_dvir(
2146
+ self,
2147
+ id: str,
2148
+ *,
2149
+ author_id: str,
2150
+ is_resolved: bool,
2151
+ mechanic_notes: typing.Optional[str] = OMIT,
2152
+ signed_at_time: typing.Optional[str] = OMIT,
2153
+ request_options: typing.Optional[RequestOptions] = None,
2154
+ ) -> AsyncHttpResponse[DvirResponse]:
2155
+ """
2156
+ Resolves a given DVIR by marking its `isResolved` field to `true`.
2157
+
2158
+ **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.
2159
+
2160
+ To use this endpoint, select **Write DVIRs** under the Maintenance 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>
2161
+
2162
+ Parameters
2163
+ ----------
2164
+ id : str
2165
+ ID of the DVIR.
2166
+
2167
+ author_id : str
2168
+ The user who is resolving the dvir.
2169
+
2170
+ is_resolved : bool
2171
+ Resolves the DVIR. Must be `true`.
2172
+
2173
+ mechanic_notes : typing.Optional[str]
2174
+ The mechanics notes on the DVIR.
2175
+
2176
+ signed_at_time : typing.Optional[str]
2177
+ Time when user signed this DVIR. Defaults to now. UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
2178
+
2179
+ request_options : typing.Optional[RequestOptions]
2180
+ Request-specific configuration.
2181
+
2182
+ Returns
2183
+ -------
2184
+ AsyncHttpResponse[DvirResponse]
2185
+ Updated dvir object with ID.
2186
+ """
2187
+ _response = await self._client_wrapper.httpx_client.request(
2188
+ f"fleet/dvirs/{jsonable_encoder(id)}",
2189
+ method="PATCH",
2190
+ json={
2191
+ "authorId": author_id,
2192
+ "isResolved": is_resolved,
2193
+ "mechanicNotes": mechanic_notes,
2194
+ "signedAtTime": signed_at_time,
2195
+ },
2196
+ headers={
2197
+ "content-type": "application/json",
2198
+ },
2199
+ request_options=request_options,
2200
+ omit=OMIT,
2201
+ )
2202
+ try:
2203
+ if 200 <= _response.status_code < 300:
2204
+ _data = typing.cast(
2205
+ DvirResponse,
2206
+ parse_obj_as(
2207
+ type_=DvirResponse, # type: ignore
2208
+ object_=_response.json(),
2209
+ ),
2210
+ )
2211
+ return AsyncHttpResponse(response=_response, data=_data)
2212
+ _response_json = _response.json()
2213
+ except JSONDecodeError:
2214
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2215
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
2216
+
2217
+ async def v_1_get_fleet_maintenance_list(
2218
+ self, *, request_options: typing.Optional[RequestOptions] = None
2219
+ ) -> AsyncHttpResponse[InlineResponse2004]:
2220
+ """
2221
+ <n class="warning">
2222
+ <nh>
2223
+ <i class="fa fa-exclamation-circle"></i>
2224
+ This endpoint is still on our legacy API.
2225
+ </nh>
2226
+ </n>
2227
+
2228
+ Get list of the vehicles with any engine faults or check light data.
2229
+
2230
+ **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.
2231
+
2232
+ To use this endpoint, select **Read DVIRs** under the Maintenance 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>
2233
+
2234
+ Parameters
2235
+ ----------
2236
+ request_options : typing.Optional[RequestOptions]
2237
+ Request-specific configuration.
2238
+
2239
+ Returns
2240
+ -------
2241
+ AsyncHttpResponse[InlineResponse2004]
2242
+ List of vehicles and maintenance information about each.
2243
+ """
2244
+ _response = await self._client_wrapper.httpx_client.request(
2245
+ "v1/fleet/maintenance/list",
2246
+ method="GET",
2247
+ request_options=request_options,
2248
+ )
2249
+ try:
2250
+ if 200 <= _response.status_code < 300:
2251
+ _data = typing.cast(
2252
+ InlineResponse2004,
2253
+ parse_obj_as(
2254
+ type_=InlineResponse2004, # type: ignore
2255
+ object_=_response.json(),
2256
+ ),
2257
+ )
2258
+ return AsyncHttpResponse(response=_response, data=_data)
2259
+ _response_json = _response.json()
2260
+ except JSONDecodeError:
2261
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
2262
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)