samsara-api 4.0.0__py3-none-any.whl → 4.1.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 (136) 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_api-4.1.0.dist-info/METADATA +670 -0
  133. {samsara_api-4.0.0.dist-info → samsara_api-4.1.0.dist-info}/RECORD +135 -87
  134. samsara_api-4.0.0.dist-info/METADATA +0 -238
  135. {samsara_api-4.0.0.dist-info → samsara_api-4.1.0.dist-info}/LICENSE +0 -0
  136. {samsara_api-4.0.0.dist-info → samsara_api-4.1.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamGatewayTimeoutErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Gateway timeout
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamInternalServerErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ An internal server error occurred
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamMethodNotAllowedErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Method not allowed
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamNotFoundErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Resource not found
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamNotImplementedErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Requested endpoint is not yet implemented
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,26 @@
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 .goa_pagination_response_response_body import GoaPaginationResponseResponseBody
8
+ from .route_event_response_response_body import RouteEventResponseResponseBody
9
+
10
+
11
+ class RoutesGetRouteEventsStreamResponseBody(UniversalBaseModel):
12
+ data: typing.List[RouteEventResponseResponseBody] = pydantic.Field()
13
+ """
14
+ List of route event objects.
15
+ """
16
+
17
+ pagination: GoaPaginationResponseResponseBody
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamServiceUnavailableErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Service unavailable
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamTooManyRequestsErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Too many requests
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class RoutesGetRouteEventsStreamUnauthorizedErrorResponseBody(UniversalBaseModel):
12
+ """
13
+ Unauthorized
14
+ """
15
+
16
+ message: str = pydantic.Field()
17
+ """
18
+ Message of error
19
+ """
20
+
21
+ request_id: typing_extensions.Annotated[str, FieldMetadata(alias="requestId")] = pydantic.Field()
22
+ """
23
+ The request ID; used when reaching out to support for issues with requests.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -6,17 +6,17 @@ 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 .driver_tiny_response import DriverTinyResponse
10
- from .location import Location
11
9
  from .safety_event_behavior_labels import SafetyEventBehaviorLabels
12
10
  from .safety_event_coaching_state import SafetyEventCoachingState
13
11
  from .safety_event_download_forward_video_url import SafetyEventDownloadForwardVideoUrl
14
12
  from .safety_event_download_inward_video_url import SafetyEventDownloadInwardVideoUrl
15
13
  from .safety_event_download_tracked_inward_video_url import SafetyEventDownloadTrackedInwardVideoUrl
14
+ from .safety_event_driver import SafetyEventDriver
16
15
  from .safety_event_id import SafetyEventId
16
+ from .safety_event_location import SafetyEventLocation
17
17
  from .safety_event_max_acceleration_g_force import SafetyEventMaxAccelerationGForce
18
18
  from .safety_event_time import SafetyEventTime
19
- from .vehicle_tiny_response import VehicleTinyResponse
19
+ from .safety_event_vehicle import SafetyEventVehicle
20
20
 
21
21
 
22
22
  class SafetyEvent(UniversalBaseModel):
@@ -39,14 +39,14 @@ class SafetyEvent(UniversalBaseModel):
39
39
  download_tracked_inward_video_url: typing_extensions.Annotated[
40
40
  typing.Optional[SafetyEventDownloadTrackedInwardVideoUrl], FieldMetadata(alias="downloadTrackedInwardVideoUrl")
41
41
  ] = None
42
- driver: typing.Optional[DriverTinyResponse] = None
42
+ driver: typing.Optional[SafetyEventDriver] = None
43
43
  id: typing.Optional[SafetyEventId] = None
44
- location: typing.Optional[Location] = None
44
+ location: typing.Optional[SafetyEventLocation] = None
45
45
  max_acceleration_g_force: typing_extensions.Annotated[
46
46
  typing.Optional[SafetyEventMaxAccelerationGForce], FieldMetadata(alias="maxAccelerationGForce")
47
47
  ] = None
48
48
  time: typing.Optional[SafetyEventTime] = None
49
- vehicle: typing.Optional[VehicleTinyResponse] = None
49
+ vehicle: typing.Optional[SafetyEventVehicle] = None
50
50
 
51
51
  if IS_PYDANTIC_V2:
52
52
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .driver_tiny_response import DriverTinyResponse
4
+
5
+ SafetyEventDriver = DriverTinyResponse
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .location import Location
4
+
5
+ SafetyEventLocation = Location
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_tiny_response import VehicleTinyResponse
4
+
5
+ SafetyEventVehicle = VehicleTinyResponse
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class StopEtaUpdatedEventDetailsResponseBody(UniversalBaseModel):
12
+ """
13
+ Details for stop ETA updated events.
14
+ """
15
+
16
+ eta_ms: typing_extensions.Annotated[str, FieldMetadata(alias="etaMs")] = pydantic.Field()
17
+ """
18
+ Estimated arrival time in milliseconds since epoch.
19
+ """
20
+
21
+ eta_updated_at_ms: typing_extensions.Annotated[str, FieldMetadata(alias="etaUpdatedAtMs")] = pydantic.Field()
22
+ """
23
+ Time when the ETA was updated in milliseconds since epoch.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,36 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .stop_task_completed_event_details_response_body_task_type import StopTaskCompletedEventDetailsResponseBodyTaskType
10
+
11
+
12
+ class StopTaskCompletedEventDetailsResponseBody(UniversalBaseModel):
13
+ """
14
+ Details for stop task completed events.
15
+ """
16
+
17
+ task_id: typing_extensions.Annotated[str, FieldMetadata(alias="taskId")] = pydantic.Field()
18
+ """
19
+ ID of the completed stop task.
20
+ """
21
+
22
+ task_type: typing_extensions.Annotated[
23
+ StopTaskCompletedEventDetailsResponseBodyTaskType, FieldMetadata(alias="taskType")
24
+ ] = pydantic.Field()
25
+ """
26
+ Type of the completed stop task. Valid values: `form`, `document`
27
+ """
28
+
29
+ if IS_PYDANTIC_V2:
30
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
+ else:
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ 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
+ StopTaskCompletedEventDetailsResponseBodyTaskType = typing.Union[typing.Literal["form", "document"], typing.Any]
@@ -0,0 +1,36 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .stop_task_skipped_event_details_response_body_task_type import StopTaskSkippedEventDetailsResponseBodyTaskType
10
+
11
+
12
+ class StopTaskSkippedEventDetailsResponseBody(UniversalBaseModel):
13
+ """
14
+ Details for stop task skipped events.
15
+ """
16
+
17
+ task_id: typing_extensions.Annotated[str, FieldMetadata(alias="taskId")] = pydantic.Field()
18
+ """
19
+ ID of the skipped stop task.
20
+ """
21
+
22
+ task_type: typing_extensions.Annotated[
23
+ StopTaskSkippedEventDetailsResponseBodyTaskType, FieldMetadata(alias="taskType")
24
+ ] = pydantic.Field()
25
+ """
26
+ Type of the skipped stop task. Valid values: `form`, `document`
27
+ """
28
+
29
+ if IS_PYDANTIC_V2:
30
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
+ else:
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ 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
+ StopTaskSkippedEventDetailsResponseBodyTaskType = typing.Union[typing.Literal["form", "document"], typing.Any]
samsara/types/vehicle.py CHANGED
@@ -8,11 +8,22 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
9
  from .attribute_tiny import AttributeTiny
10
10
  from .camera_serial import CameraSerial
11
- from .driver_tiny_response import DriverTinyResponse
12
11
  from .gateway_tiny import GatewayTiny
13
12
  from .gross_vehicle_weight import GrossVehicleWeight
14
13
  from .serial import Serial
15
- from .vehicle_aux_input_type import VehicleAuxInputType
14
+ from .vehicle_aux_input_type_1 import VehicleAuxInputType1
15
+ from .vehicle_aux_input_type_2 import VehicleAuxInputType2
16
+ from .vehicle_aux_input_type_3 import VehicleAuxInputType3
17
+ from .vehicle_aux_input_type_4 import VehicleAuxInputType4
18
+ from .vehicle_aux_input_type_5 import VehicleAuxInputType5
19
+ from .vehicle_aux_input_type_6 import VehicleAuxInputType6
20
+ from .vehicle_aux_input_type_7 import VehicleAuxInputType7
21
+ from .vehicle_aux_input_type_8 import VehicleAuxInputType8
22
+ from .vehicle_aux_input_type_9 import VehicleAuxInputType9
23
+ from .vehicle_aux_input_type_10 import VehicleAuxInputType10
24
+ from .vehicle_aux_input_type_11 import VehicleAuxInputType11
25
+ from .vehicle_aux_input_type_12 import VehicleAuxInputType12
26
+ from .vehicle_aux_input_type_13 import VehicleAuxInputType13
16
27
  from .vehicle_esn import VehicleEsn
17
28
  from .vehicle_external_ids import VehicleExternalIds
18
29
  from .vehicle_harsh_acceleration_setting_type import VehicleHarshAccelerationSettingType
@@ -24,6 +35,7 @@ from .vehicle_name import VehicleName
24
35
  from .vehicle_notes import VehicleNotes
25
36
  from .vehicle_regulation_mode import VehicleRegulationMode
26
37
  from .vehicle_sensor_configuration import VehicleSensorConfiguration
38
+ from .vehicle_static_assigned_driver import VehicleStaticAssignedDriver
27
39
  from .vehicle_tags import VehicleTags
28
40
  from .vehicle_type import VehicleType
29
41
  from .vehicle_vin import VehicleVin
@@ -41,43 +53,43 @@ class Vehicle(UniversalBaseModel):
41
53
  """
42
54
 
43
55
  aux_input_type_1: typing_extensions.Annotated[
44
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType1")
56
+ typing.Optional[VehicleAuxInputType1], FieldMetadata(alias="auxInputType1")
45
57
  ] = None
46
58
  aux_input_type_10: typing_extensions.Annotated[
47
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType10")
59
+ typing.Optional[VehicleAuxInputType10], FieldMetadata(alias="auxInputType10")
48
60
  ] = None
49
61
  aux_input_type_11: typing_extensions.Annotated[
50
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType11")
62
+ typing.Optional[VehicleAuxInputType11], FieldMetadata(alias="auxInputType11")
51
63
  ] = None
52
64
  aux_input_type_12: typing_extensions.Annotated[
53
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType12")
65
+ typing.Optional[VehicleAuxInputType12], FieldMetadata(alias="auxInputType12")
54
66
  ] = None
55
67
  aux_input_type_13: typing_extensions.Annotated[
56
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType13")
68
+ typing.Optional[VehicleAuxInputType13], FieldMetadata(alias="auxInputType13")
57
69
  ] = None
58
70
  aux_input_type_2: typing_extensions.Annotated[
59
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType2")
71
+ typing.Optional[VehicleAuxInputType2], FieldMetadata(alias="auxInputType2")
60
72
  ] = None
61
73
  aux_input_type_3: typing_extensions.Annotated[
62
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType3")
74
+ typing.Optional[VehicleAuxInputType3], FieldMetadata(alias="auxInputType3")
63
75
  ] = None
64
76
  aux_input_type_4: typing_extensions.Annotated[
65
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType4")
77
+ typing.Optional[VehicleAuxInputType4], FieldMetadata(alias="auxInputType4")
66
78
  ] = None
67
79
  aux_input_type_5: typing_extensions.Annotated[
68
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType5")
80
+ typing.Optional[VehicleAuxInputType5], FieldMetadata(alias="auxInputType5")
69
81
  ] = None
70
82
  aux_input_type_6: typing_extensions.Annotated[
71
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType6")
83
+ typing.Optional[VehicleAuxInputType6], FieldMetadata(alias="auxInputType6")
72
84
  ] = None
73
85
  aux_input_type_7: typing_extensions.Annotated[
74
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType7")
86
+ typing.Optional[VehicleAuxInputType7], FieldMetadata(alias="auxInputType7")
75
87
  ] = None
76
88
  aux_input_type_8: typing_extensions.Annotated[
77
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType8")
89
+ typing.Optional[VehicleAuxInputType8], FieldMetadata(alias="auxInputType8")
78
90
  ] = None
79
91
  aux_input_type_9: typing_extensions.Annotated[
80
- typing.Optional[VehicleAuxInputType], FieldMetadata(alias="auxInputType9")
92
+ typing.Optional[VehicleAuxInputType9], FieldMetadata(alias="auxInputType9")
81
93
  ] = None
82
94
  camera_serial: typing_extensions.Annotated[typing.Optional[CameraSerial], FieldMetadata(alias="cameraSerial")] = (
83
95
  None
@@ -106,7 +118,7 @@ class Vehicle(UniversalBaseModel):
106
118
  ] = None
107
119
  serial: typing.Optional[Serial] = None
108
120
  static_assigned_driver: typing_extensions.Annotated[
109
- typing.Optional[DriverTinyResponse], FieldMetadata(alias="staticAssignedDriver")
121
+ typing.Optional[VehicleStaticAssignedDriver], FieldMetadata(alias="staticAssignedDriver")
110
122
  ] = None
111
123
  tags: typing.Optional[VehicleTags] = None
112
124
  vehicle_regulation_mode: typing_extensions.Annotated[
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType1 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType10 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType11 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType12 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType13 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType2 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType3 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType4 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType5 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType6 = VehicleAuxInputType
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .vehicle_aux_input_type import VehicleAuxInputType
4
+
5
+ VehicleAuxInputType7 = VehicleAuxInputType