samsara-api 4.0.1__py3-none-any.whl → 4.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. samsara/__init__.py +138 -0
  2. samsara/client.py +19 -0
  3. samsara/core/client_wrapper.py +2 -2
  4. samsara/route_events/__init__.py +4 -0
  5. samsara/route_events/client.py +176 -0
  6. samsara/route_events/raw_client.py +362 -0
  7. samsara/types/__init__.py +155 -0
  8. samsara/types/door_open_response_body.py +28 -0
  9. samsara/types/route_event_details_response_body.py +36 -0
  10. samsara/types/route_event_response_response_body.py +56 -0
  11. samsara/types/route_event_response_response_body_event_type.py +17 -0
  12. samsara/types/route_event_route_response_response_body.py +35 -0
  13. samsara/types/route_event_stop_response_response_body.py +35 -0
  14. samsara/types/routes_get_route_events_stream_bad_gateway_error_response_body.py +33 -0
  15. samsara/types/routes_get_route_events_stream_gateway_timeout_error_response_body.py +33 -0
  16. samsara/types/routes_get_route_events_stream_internal_server_error_response_body.py +33 -0
  17. samsara/types/routes_get_route_events_stream_method_not_allowed_error_response_body.py +33 -0
  18. samsara/types/routes_get_route_events_stream_not_found_error_response_body.py +33 -0
  19. samsara/types/routes_get_route_events_stream_not_implemented_error_response_body.py +33 -0
  20. samsara/types/routes_get_route_events_stream_response_body.py +26 -0
  21. samsara/types/routes_get_route_events_stream_service_unavailable_error_response_body.py +33 -0
  22. samsara/types/routes_get_route_events_stream_too_many_requests_error_response_body.py +33 -0
  23. samsara/types/routes_get_route_events_stream_unauthorized_error_response_body.py +33 -0
  24. samsara/types/safety_event.py +6 -6
  25. samsara/types/safety_event_driver.py +5 -0
  26. samsara/types/safety_event_location.py +5 -0
  27. samsara/types/safety_event_vehicle.py +5 -0
  28. samsara/types/stop_eta_updated_event_details_response_body.py +33 -0
  29. samsara/types/stop_task_completed_event_details_response_body.py +36 -0
  30. samsara/types/stop_task_completed_event_details_response_body_task_type.py +5 -0
  31. samsara/types/stop_task_skipped_event_details_response_body.py +36 -0
  32. samsara/types/stop_task_skipped_event_details_response_body_task_type.py +5 -0
  33. samsara/types/vehicle.py +28 -16
  34. samsara/types/vehicle_aux_input_type_1.py +5 -0
  35. samsara/types/vehicle_aux_input_type_10.py +5 -0
  36. samsara/types/vehicle_aux_input_type_11.py +5 -0
  37. samsara/types/vehicle_aux_input_type_12.py +5 -0
  38. samsara/types/vehicle_aux_input_type_13.py +5 -0
  39. samsara/types/vehicle_aux_input_type_2.py +5 -0
  40. samsara/types/vehicle_aux_input_type_3.py +5 -0
  41. samsara/types/vehicle_aux_input_type_4.py +5 -0
  42. samsara/types/vehicle_aux_input_type_5.py +5 -0
  43. samsara/types/vehicle_aux_input_type_6.py +5 -0
  44. samsara/types/vehicle_aux_input_type_7.py +5 -0
  45. samsara/types/vehicle_aux_input_type_8.py +5 -0
  46. samsara/types/vehicle_aux_input_type_9.py +5 -0
  47. samsara/types/vehicle_location.py +6 -4
  48. samsara/types/vehicle_location_reverse_geo.py +5 -0
  49. samsara/types/vehicle_location_time.py +5 -0
  50. samsara/types/vehicle_static_assigned_driver.py +5 -0
  51. samsara/types/vehicle_stats_ambient_air_temp_milli_c.py +2 -2
  52. samsara/types/vehicle_stats_ambient_air_temp_milli_c_with_decoration.py +2 -2
  53. samsara/types/vehicle_stats_barometric_pressure_pa.py +2 -2
  54. samsara/types/vehicle_stats_barometric_pressure_pa_with_decoration.py +2 -2
  55. samsara/types/vehicle_stats_battery_voltage.py +2 -2
  56. samsara/types/vehicle_stats_battery_voltage_with_decoration.py +2 -2
  57. samsara/types/vehicle_stats_decorations.py +4 -0
  58. samsara/types/vehicle_stats_decorations_gps.py +4 -2
  59. samsara/types/vehicle_stats_def_level_milli_percent.py +2 -2
  60. samsara/types/vehicle_stats_def_level_milli_percent_with_decoration.py +2 -2
  61. samsara/types/vehicle_stats_ecu_door_status.py +29 -0
  62. samsara/types/vehicle_stats_ecu_door_status_value.py +5 -0
  63. samsara/types/vehicle_stats_ecu_speed_mph.py +2 -2
  64. samsara/types/vehicle_stats_ecu_speed_mph_with_decoration.py +2 -2
  65. samsara/types/vehicle_stats_engine_coolant_temp_milli_c.py +2 -2
  66. samsara/types/vehicle_stats_engine_coolant_temp_milli_c_with_decoration.py +2 -2
  67. samsara/types/vehicle_stats_engine_load_percent.py +2 -2
  68. samsara/types/vehicle_stats_engine_load_percent_with_decoration.py +2 -2
  69. samsara/types/vehicle_stats_engine_oil_pressure_k_pa.py +2 -2
  70. samsara/types/vehicle_stats_engine_oil_pressure_k_pa_with_decoration.py +2 -2
  71. samsara/types/vehicle_stats_engine_rpm.py +2 -2
  72. samsara/types/vehicle_stats_engine_rpm_with_decoration.py +2 -2
  73. samsara/types/vehicle_stats_engine_state.py +2 -2
  74. samsara/types/vehicle_stats_engine_state_with_decoration.py +2 -2
  75. samsara/types/vehicle_stats_ev_average_battery_temperature_milli_celsius.py +2 -2
  76. samsara/types/vehicle_stats_ev_battery_current_milli_amp.py +2 -2
  77. samsara/types/vehicle_stats_ev_battery_state_of_health_milli_percent.py +2 -2
  78. samsara/types/vehicle_stats_ev_battery_voltage_milli_volt.py +2 -2
  79. samsara/types/vehicle_stats_ev_charging_current_milli_amp.py +2 -2
  80. samsara/types/vehicle_stats_ev_charging_energy_micro_wh.py +2 -2
  81. samsara/types/vehicle_stats_ev_charging_status.py +2 -2
  82. samsara/types/vehicle_stats_ev_charging_voltage_milli_volt.py +2 -2
  83. samsara/types/vehicle_stats_ev_consumed_energy_micro_wh.py +2 -2
  84. samsara/types/vehicle_stats_ev_distance_driven_meters.py +2 -2
  85. samsara/types/vehicle_stats_ev_regenerated_energy_micro_wh.py +2 -2
  86. samsara/types/vehicle_stats_ev_state_of_charge_milli_percent.py +2 -2
  87. samsara/types/vehicle_stats_fault_codes_with_decoration.py +2 -2
  88. samsara/types/vehicle_stats_fuel_consumed_milliliters.py +2 -2
  89. samsara/types/vehicle_stats_fuel_consumed_milliliters_with_decoration.py +2 -2
  90. samsara/types/vehicle_stats_fuel_percent.py +2 -2
  91. samsara/types/vehicle_stats_fuel_percent_with_decoration.py +2 -2
  92. samsara/types/vehicle_stats_gps.py +6 -4
  93. samsara/types/vehicle_stats_gps_distance_meters.py +2 -2
  94. samsara/types/vehicle_stats_gps_distance_meters_with_decoration.py +2 -2
  95. samsara/types/vehicle_stats_gps_odometer_meters.py +2 -2
  96. samsara/types/vehicle_stats_gps_odometer_meters_with_decoration.py +2 -2
  97. samsara/types/vehicle_stats_idling_duration_milliseconds.py +2 -2
  98. samsara/types/vehicle_stats_idling_duration_milliseconds_with_decoration.py +2 -2
  99. samsara/types/vehicle_stats_intake_manifold_temp_milli_c.py +2 -2
  100. samsara/types/vehicle_stats_intake_manifold_temp_milli_c_with_decoration.py +2 -2
  101. samsara/types/vehicle_stats_list_gps.py +6 -4
  102. samsara/types/vehicle_stats_list_response_data.py +8 -0
  103. samsara/types/vehicle_stats_obd_engine_seconds.py +2 -2
  104. samsara/types/vehicle_stats_obd_engine_seconds_with_decoration.py +2 -2
  105. samsara/types/vehicle_stats_obd_odometer_meters.py +2 -2
  106. samsara/types/vehicle_stats_obd_odometer_meters_with_decoration.py +2 -2
  107. samsara/types/vehicle_stats_response_data.py +4 -0
  108. samsara/types/vehicle_stats_response_ecu_door_status.py +32 -0
  109. samsara/types/vehicle_stats_response_ecu_door_status_value.py +5 -0
  110. samsara/types/vehicle_stats_seatbelt_driver.py +2 -2
  111. samsara/types/vehicle_stats_spreader_active.py +2 -2
  112. samsara/types/vehicle_stats_spreader_air_temp.py +2 -2
  113. samsara/types/vehicle_stats_spreader_blast_state.py +2 -2
  114. samsara/types/vehicle_stats_spreader_granular_name.py +2 -2
  115. samsara/types/vehicle_stats_spreader_granular_rate.py +2 -2
  116. samsara/types/vehicle_stats_spreader_liquid_name.py +2 -2
  117. samsara/types/vehicle_stats_spreader_liquid_rate.py +2 -2
  118. samsara/types/vehicle_stats_spreader_on_state.py +2 -2
  119. samsara/types/vehicle_stats_spreader_plow_status.py +2 -2
  120. samsara/types/vehicle_stats_spreader_prewet_name.py +2 -2
  121. samsara/types/vehicle_stats_spreader_prewet_rate.py +2 -2
  122. samsara/types/vehicle_stats_spreader_road_temp.py +2 -2
  123. samsara/types/vehicle_stats_time.py +5 -0
  124. samsara/types/workflow_incident_details_object_response_body.py +4 -0
  125. samsara/vehicle_stats/client.py +10 -0
  126. samsara/vehicle_stats/raw_client.py +10 -0
  127. samsara/vehicle_stats/types/get_vehicle_stats_feed_request_decorations_item.py +1 -0
  128. samsara/vehicle_stats/types/get_vehicle_stats_feed_request_types_item.py +1 -0
  129. samsara/vehicle_stats/types/get_vehicle_stats_history_request_decorations_item.py +1 -0
  130. samsara/vehicle_stats/types/get_vehicle_stats_history_request_types_item.py +1 -0
  131. samsara/vehicle_stats/types/get_vehicle_stats_request_types_item.py +1 -0
  132. samsara/work_orders/client.py +30 -0
  133. samsara/work_orders/raw_client.py +30 -0
  134. {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/METADATA +1 -1
  135. {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/RECORD +137 -89
  136. {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/LICENSE +0 -0
  137. {samsara_api-4.0.1.dist-info → samsara_api-4.1.1.dist-info}/WHEEL +0 -0
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsEvChargingStatus(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsEvChargingStatus(UniversalBaseModel):
12
12
  Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Charging status for electric and hybrid vehicles. Statuses:
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsEvChargingVoltageMilliVolt(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsEvChargingVoltageMilliVolt(UniversalBaseModel):
12
12
  Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Charging voltage for electric and hybrid vehicles in milli volts.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsEvConsumedEnergyMicroWh(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsEvConsumedEnergyMicroWh(UniversalBaseModel):
12
12
  Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsEvDistanceDrivenMeters(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsEvDistanceDrivenMeters(UniversalBaseModel):
12
12
  Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Electric distance driven for electric and hybrid vehicles in meters.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsEvRegeneratedEnergyMicroWh(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsEvRegeneratedEnergyMicroWh(UniversalBaseModel):
12
12
  Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Regenerated energy for electric and hybrid vehicles in microwatt hours.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsEvStateOfChargeMilliPercent(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsEvStateOfChargeMilliPercent(UniversalBaseModel):
12
12
  State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Milli percent State of Charge for electric and hybrid vehicles.
@@ -6,12 +6,12 @@ import pydantic
6
6
  import typing_extensions
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
- from .time import Time
10
9
  from .vehicle_stats_decorations import VehicleStatsDecorations
11
10
  from .vehicle_stats_fault_codes_can_bus_type import VehicleStatsFaultCodesCanBusType
12
11
  from .vehicle_stats_fault_codes_j_1939 import VehicleStatsFaultCodesJ1939
13
12
  from .vehicle_stats_fault_codes_obdii import VehicleStatsFaultCodesObdii
14
13
  from .vehicle_stats_fault_codes_oem import VehicleStatsFaultCodesOem
14
+ from .vehicle_stats_time import VehicleStatsTime
15
15
 
16
16
 
17
17
  class VehicleStatsFaultCodesWithDecoration(UniversalBaseModel):
@@ -28,7 +28,7 @@ class VehicleStatsFaultCodesWithDecoration(UniversalBaseModel):
28
28
  )
29
29
  obdii: typing.Optional[VehicleStatsFaultCodesObdii] = None
30
30
  oem: typing.Optional[VehicleStatsFaultCodesOem] = None
31
- time: Time
31
+ time: VehicleStatsTime
32
32
 
33
33
  if IS_PYDANTIC_V2:
34
34
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsFuelConsumedMilliliters(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsFuelConsumedMilliliters(UniversalBaseModel):
12
12
  The cumulative fuel consumption in milliliters for vehicles. Cumulative values always increase. This includes all fuel consumption reported by vehicles without filtering of invalid data points. For filtered fuel consumption that matches the Fuel & Energy Report, please use <a href="https://developers.samsara.com/reference/getfuelenergyvehiclereports" target="_blank">the Fuel and Energy API</a>.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  The cumulative fuel consumption in milliliters for vehicles. Cumulative values always increase. This includes all fuel consumption reported by vehicles without filtering of invalid data points. For filtered fuel consumption that matches the Fuel & Energy Report, please use <a href="https://developers.samsara.com/reference/getfuelenergyvehiclereports" target="_blank">the Fuel and Energy API</a>.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsFuelConsumedMillilitersWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsFuelConsumedMillilitersWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  The cumulative fuel consumption in milliliters for vehicles. Cumulative values always increase. This includes all fuel consumption reported by vehicles without filtering of invalid data points. For filtered fuel consumption that matches the Fuel & Energy Report, please use <a href="https://developers.samsara.com/reference/getfuelenergyvehiclereports" target="_blank">the Fuel and Energy API</a>.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsFuelPercent(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsFuelPercent(UniversalBaseModel):
12
12
  Vehicle fuel percentage reading.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  The engine fuel level in percentage points (e.g. `99`, `50`, etc).
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsFuelPercentWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsFuelPercentWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  The engine fuel level in percentage points (e.g. `99`, `50`, etc).
@@ -6,14 +6,14 @@ import pydantic
6
6
  import typing_extensions
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
- from .reverse_geo import ReverseGeo
10
- from .time import Time
11
9
  from .vehicle_location_address import VehicleLocationAddress
12
10
  from .vehicle_location_heading import VehicleLocationHeading
13
11
  from .vehicle_location_is_ecu_speed import VehicleLocationIsEcuSpeed
14
12
  from .vehicle_location_latitude import VehicleLocationLatitude
15
13
  from .vehicle_location_longitude import VehicleLocationLongitude
14
+ from .vehicle_location_reverse_geo import VehicleLocationReverseGeo
16
15
  from .vehicle_location_speed import VehicleLocationSpeed
16
+ from .vehicle_stats_time import VehicleStatsTime
17
17
 
18
18
 
19
19
  class VehicleStatsGps(UniversalBaseModel):
@@ -30,11 +30,13 @@ class VehicleStatsGps(UniversalBaseModel):
30
30
  ] = None
31
31
  latitude: VehicleLocationLatitude
32
32
  longitude: VehicleLocationLongitude
33
- reverse_geo: typing_extensions.Annotated[typing.Optional[ReverseGeo], FieldMetadata(alias="reverseGeo")] = None
33
+ reverse_geo: typing_extensions.Annotated[
34
+ typing.Optional[VehicleLocationReverseGeo], FieldMetadata(alias="reverseGeo")
35
+ ] = None
34
36
  speed_miles_per_hour: typing_extensions.Annotated[
35
37
  typing.Optional[VehicleLocationSpeed], FieldMetadata(alias="speedMilesPerHour")
36
38
  ] = None
37
- time: Time
39
+ time: VehicleStatsTime
38
40
 
39
41
  if IS_PYDANTIC_V2:
40
42
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsGpsDistanceMeters(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsGpsDistanceMeters(UniversalBaseModel):
12
12
  Vehicle GPS distance event.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: float = pydantic.Field()
17
17
  """
18
18
  Number of meters the vehicle has traveled since the gateway was installed, based on GPS calculations.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsGpsDistanceMetersWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsGpsDistanceMetersWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: float = pydantic.Field()
19
19
  """
20
20
  Number of meters the vehicle has traveled since the gateway was installed, based on GPS calculations.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsGpsOdometerMeters(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsGpsOdometerMeters(UniversalBaseModel):
12
12
  Vehicle GPS odometer event.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Number of meters the vehicle has traveled according to the GPS calculations and the manually-specified odometer reading.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsGpsOdometerMetersWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsGpsOdometerMetersWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  Number of meters the vehicle has traveled according to the GPS calculations and the manually-specified odometer reading.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsIdlingDurationMilliseconds(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsIdlingDurationMilliseconds(UniversalBaseModel):
12
12
  The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use <a href="https://developers.samsara.com/reference/getvehicleidlingreports" target="_blank">the Idling Events API</a>.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use <a href="https://developers.samsara.com/reference/getvehicleidlingreports" target="_blank">the Idling Events API</a>.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsIdlingDurationMillisecondsWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsIdlingDurationMillisecondsWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use <a href="https://developers.samsara.com/reference/getvehicleidlingreports" target="_blank">the Idling Events API</a>.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsIntakeManifoldTempMilliC(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsIntakeManifoldTempMilliC(UniversalBaseModel):
12
12
  Vehicle intake manifold temperature reading.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  The intake manifold temperature reading in millidegree Celsius.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsIntakeManifoldTempMilliCWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsIntakeManifoldTempMilliCWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  The intake manifold temperature reading in millidegree Celsius.
@@ -6,15 +6,15 @@ import pydantic
6
6
  import typing_extensions
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
- from .reverse_geo import ReverseGeo
10
- from .time import Time
11
9
  from .vehicle_location_address import VehicleLocationAddress
12
10
  from .vehicle_location_heading import VehicleLocationHeading
13
11
  from .vehicle_location_is_ecu_speed import VehicleLocationIsEcuSpeed
14
12
  from .vehicle_location_latitude import VehicleLocationLatitude
15
13
  from .vehicle_location_longitude import VehicleLocationLongitude
14
+ from .vehicle_location_reverse_geo import VehicleLocationReverseGeo
16
15
  from .vehicle_location_speed import VehicleLocationSpeed
17
16
  from .vehicle_stats_decorations import VehicleStatsDecorations
17
+ from .vehicle_stats_time import VehicleStatsTime
18
18
 
19
19
 
20
20
  class VehicleStatsListGps(UniversalBaseModel):
@@ -32,11 +32,13 @@ class VehicleStatsListGps(UniversalBaseModel):
32
32
  ] = None
33
33
  latitude: VehicleLocationLatitude
34
34
  longitude: VehicleLocationLongitude
35
- reverse_geo: typing_extensions.Annotated[typing.Optional[ReverseGeo], FieldMetadata(alias="reverseGeo")] = None
35
+ reverse_geo: typing_extensions.Annotated[
36
+ typing.Optional[VehicleLocationReverseGeo], FieldMetadata(alias="reverseGeo")
37
+ ] = None
36
38
  speed_miles_per_hour: typing_extensions.Annotated[
37
39
  typing.Optional[VehicleLocationSpeed], FieldMetadata(alias="speedMilesPerHour")
38
40
  ] = None
39
- time: Time
41
+ time: VehicleStatsTime
40
42
 
41
43
  if IS_PYDANTIC_V2:
42
44
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -14,6 +14,7 @@ from .vehicle_stats_aux_input_with_decoration import VehicleStatsAuxInputWithDec
14
14
  from .vehicle_stats_barometric_pressure_pa_with_decoration import VehicleStatsBarometricPressurePaWithDecoration
15
15
  from .vehicle_stats_battery_voltage_with_decoration import VehicleStatsBatteryVoltageWithDecoration
16
16
  from .vehicle_stats_def_level_milli_percent_with_decoration import VehicleStatsDefLevelMilliPercentWithDecoration
17
+ from .vehicle_stats_ecu_door_status import VehicleStatsEcuDoorStatus
17
18
  from .vehicle_stats_ecu_speed_mph_with_decoration import VehicleStatsEcuSpeedMphWithDecoration
18
19
  from .vehicle_stats_engine_coolant_temp_milli_c_with_decoration import VehicleStatsEngineCoolantTempMilliCWithDecoration
19
20
  from .vehicle_stats_engine_immobilizer_with_decoration import VehicleStatsEngineImmobilizerWithDecoration
@@ -193,6 +194,13 @@ class VehicleStatsListResponseData(UniversalBaseModel):
193
194
  A list of DEF level milli percentage readings for the given vehicle.
194
195
  """
195
196
 
197
+ ecu_door_status: typing_extensions.Annotated[
198
+ typing.Optional[typing.List[VehicleStatsEcuDoorStatus]], FieldMetadata(alias="ecuDoorStatus")
199
+ ] = pydantic.Field(default=None)
200
+ """
201
+ Door status as read from the vehicle (either from ECU or AUX as a fallback).
202
+ """
203
+
196
204
  ecu_speed_mph: typing_extensions.Annotated[
197
205
  typing.Optional[typing.List[VehicleStatsEcuSpeedMphWithDecoration]], FieldMetadata(alias="ecuSpeedMph")
198
206
  ] = pydantic.Field(default=None)
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsObdEngineSeconds(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsObdEngineSeconds(UniversalBaseModel):
12
12
  Vehicle OBD engine seconds reading.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Number of seconds the vehicle's engine has been on according to the on-board diagnostics.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsObdEngineSecondsWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsObdEngineSecondsWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  Number of seconds the vehicle's engine has been on according to the on-board diagnostics.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsObdOdometerMeters(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsObdOdometerMeters(UniversalBaseModel):
12
12
  Vehicle OBD odometer reading.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Number of meters the vehicle has traveled according to the on-board diagnostics.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_decorations import VehicleStatsDecorations
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsObdOdometerMetersWithDecoration(UniversalBaseModel):
@@ -14,7 +14,7 @@ class VehicleStatsObdOdometerMetersWithDecoration(UniversalBaseModel):
14
14
  """
15
15
 
16
16
  decorations: typing.Optional[VehicleStatsDecorations] = None
17
- time: Time
17
+ time: VehicleStatsTime
18
18
  value: int = pydantic.Field()
19
19
  """
20
20
  Number of meters the vehicle has traveled according to the on-board diagnostics.
@@ -32,6 +32,7 @@ from .vehicle_stats_intake_manifold_temp_milli_c import VehicleStatsIntakeManifo
32
32
  from .vehicle_stats_nfc_card_scan import VehicleStatsNfcCardScan
33
33
  from .vehicle_stats_obd_engine_seconds import VehicleStatsObdEngineSeconds
34
34
  from .vehicle_stats_obd_odometer_meters import VehicleStatsObdOdometerMeters
35
+ from .vehicle_stats_response_ecu_door_status import VehicleStatsResponseEcuDoorStatus
35
36
  from .vehicle_stats_response_ev_average_battery_temperature_milli_celsius import (
36
37
  VehicleStatsResponseEvAverageBatteryTemperatureMilliCelsius,
37
38
  )
@@ -120,6 +121,9 @@ class VehicleStatsResponseData(UniversalBaseModel):
120
121
  def_level_milli_percent: typing_extensions.Annotated[
121
122
  typing.Optional[VehicleStatsDefLevelMilliPercent], FieldMetadata(alias="defLevelMilliPercent")
122
123
  ] = None
124
+ ecu_door_status: typing_extensions.Annotated[
125
+ typing.Optional[VehicleStatsResponseEcuDoorStatus], FieldMetadata(alias="ecuDoorStatus")
126
+ ] = None
123
127
  ecu_speed_mph: typing_extensions.Annotated[
124
128
  typing.Optional[VehicleStatsEcuSpeedMph], FieldMetadata(alias="ecuSpeedMph")
125
129
  ] = None
@@ -0,0 +1,32 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vehicle_stats_response_ecu_door_status_value import VehicleStatsResponseEcuDoorStatusValue
8
+
9
+
10
+ class VehicleStatsResponseEcuDoorStatus(UniversalBaseModel):
11
+ """
12
+ Door status as read from the vehicle (either from ECU or AUX as a fallback).
13
+ """
14
+
15
+ time: str = pydantic.Field()
16
+ """
17
+ UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
18
+ """
19
+
20
+ value: VehicleStatsResponseEcuDoorStatusValue = pydantic.Field()
21
+ """
22
+ Status of doors. Either `Closed`, `Open` or `Unknown`.
23
+ """
24
+
25
+ if IS_PYDANTIC_V2:
26
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
+ else:
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ VehicleStatsResponseEcuDoorStatusValue = typing.Union[typing.Literal["Closed", "Open", "Unknown"], typing.Any]
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_seatbelt_driver_value import VehicleStatsSeatbeltDriverValue
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsSeatbeltDriver(UniversalBaseModel):
@@ -13,7 +13,7 @@ class VehicleStatsSeatbeltDriver(UniversalBaseModel):
13
13
  Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`.
14
14
  """
15
15
 
16
- time: Time
16
+ time: VehicleStatsTime
17
17
  value: VehicleStatsSeatbeltDriverValue = pydantic.Field()
18
18
  """
19
19
  Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`.
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
8
7
  from .vehicle_stats_spreader_active_value import VehicleStatsSpreaderActiveValue
8
+ from .vehicle_stats_time import VehicleStatsTime
9
9
 
10
10
 
11
11
  class VehicleStatsSpreaderActive(UniversalBaseModel):
@@ -13,7 +13,7 @@ class VehicleStatsSpreaderActive(UniversalBaseModel):
13
13
  Whether vehicle is actively spreading any material.
14
14
  """
15
15
 
16
- time: Time
16
+ time: VehicleStatsTime
17
17
  value: VehicleStatsSpreaderActiveValue = pydantic.Field()
18
18
  """
19
19
  Whether vehicle is actively spreading any material.
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .time import Time
7
+ from .vehicle_stats_time import VehicleStatsTime
8
8
 
9
9
 
10
10
  class VehicleStatsSpreaderAirTemp(UniversalBaseModel):
@@ -12,7 +12,7 @@ class VehicleStatsSpreaderAirTemp(UniversalBaseModel):
12
12
  Air (ambient) temperature in milli celsius reading from material spreader.
13
13
  """
14
14
 
15
- time: Time
15
+ time: VehicleStatsTime
16
16
  value: int = pydantic.Field()
17
17
  """
18
18
  Air (ambient) temperature in milli celsius reading from material spreader.