# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.vehicle_stats_list_response import VehicleStatsListResponse
from ..types.vehicle_stats_response import VehicleStatsResponse
from .raw_client import AsyncRawVehicleStatsClient, RawVehicleStatsClient
from .types.get_vehicle_stats_feed_request_decorations_item import GetVehicleStatsFeedRequestDecorationsItem
from .types.get_vehicle_stats_feed_request_types_item import GetVehicleStatsFeedRequestTypesItem
from .types.get_vehicle_stats_history_request_decorations_item import GetVehicleStatsHistoryRequestDecorationsItem
from .types.get_vehicle_stats_history_request_types_item import GetVehicleStatsHistoryRequestTypesItem
from .types.get_vehicle_stats_request_types_item import GetVehicleStatsRequestTypesItem


class VehicleStatsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawVehicleStatsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawVehicleStatsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawVehicleStatsClient
        """
        return self._raw_client

    def get_vehicle_stats(
        self,
        *,
        after: typing.Optional[str] = None,
        time: typing.Optional[str] = None,
        parent_tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        vehicle_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        types: typing.Optional[
            typing.Union[GetVehicleStatsRequestTypesItem, typing.Sequence[GetVehicleStatsRequestTypesItem]]
        ] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> VehicleStatsResponse:
        """
        Returns the last known stats of all vehicles at the given `time`. If no `time` is specified, the current time is used.

        Related guide: <a href="/docs/telematics" target="_blank">Telematics</a>.

         **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.

        To use this endpoint, select **Read Vehicle Statistics** under the Vehicles 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>

        Parameters
        ----------
        after : typing.Optional[str]
            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.

        time : typing.Optional[str]
            A filter on the data that returns the last known data points with timestamps less than or equal to this value. Defaults to now if not provided. Must be a string in RFC 3339 format. Millisecond precision and timezones are supported. (Example: `2020-01-27T07:06:25Z`).

        parent_tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`

        tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`

        vehicle_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`

        types : typing.Optional[typing.Union[GetVehicleStatsRequestTypesItem, typing.Sequence[GetVehicleStatsRequestTypesItem]]]
            The stat types you want this endpoint to return information on. See also the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            You may list ***up to 3*** types using comma-separated format. For example: `types=gps,engineStates,obdOdometerMeters`.

            *Note:* `auxInput3`-`auxInput10` count as a single type against the limit of 3. For example, you could list `types=engineStates,obdOdometerMeters,auxInput3,auxInput4` because `auxInput3` and `auxInput4` count as a single stat type. `auxInput1` and `auxInput2` still count as their own individual types.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `defLevelMilliPercent`: The Diesel Exhaust Fluid (DEF) level in milli percentage points (e.g. `99001`, `49999`, etc).
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `gpsOdometerMeters`: Odometer reading provided by GPS calculations when OBD odometer cannot be pulled automatically. You must provide a manual odometer reading before this value is updated. Manual odometer readings can be provided via the [PATCH /fleet/vehicles/{id}](ref:updatevehicle) endpoint or through the <a href="https://kb.samsara.com/hc/en-us/articles/115005273667-Editing-Odometer-Reading" target="_blank">cloud dasbhoard</a>. Odometer readings that are manually set will update as GPS trip data is gathered. Try combining with `obdOdometerMeters`.
            - `idlingDurationMilliseconds`: The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use [the Idling Events API](https://developers.samsara.com/reference/getvehicleidlingreports).
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in ‘blast mode’.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VehicleStatsResponse
            Vehicle stats snapshot

        Examples
        --------
        from samsara import Samsara

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.vehicle_stats.get_vehicle_stats()
        """
        _response = self._raw_client.get_vehicle_stats(
            after=after,
            time=time,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            vehicle_ids=vehicle_ids,
            types=types,
            request_options=request_options,
        )
        return _response.data

    def get_vehicle_stats_feed(
        self,
        *,
        after: typing.Optional[str] = None,
        parent_tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        vehicle_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        types: typing.Optional[
            typing.Union[GetVehicleStatsFeedRequestTypesItem, typing.Sequence[GetVehicleStatsFeedRequestTypesItem]]
        ] = None,
        decorations: typing.Optional[
            typing.Union[
                GetVehicleStatsFeedRequestDecorationsItem, typing.Sequence[GetVehicleStatsFeedRequestDecorationsItem]
            ]
        ] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> VehicleStatsListResponse:
        """
        Follow a feed of vehicle stats.

        Your first call to this endpoint will provide you with the most recent stats for each vehicle and an `endCursor`.

        You can the provide the `endCursor` value to the `after` query parameter to get all updates since the last call you made.

        If `hasNextPage` is `false`, no new data is immediately available. You should wait a minimum of 5 seconds making a subsequent request.

        Related guide: <a href="/docs/telematics" target="_blank">Telematics</a>.

         **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.

        To use this endpoint, select **Read Vehicle Statistics** under the Vehicles 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>

        Parameters
        ----------
        after : typing.Optional[str]
            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.

        parent_tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`

        tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`

        vehicle_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`

        types : typing.Optional[typing.Union[GetVehicleStatsFeedRequestTypesItem, typing.Sequence[GetVehicleStatsFeedRequestTypesItem]]]
            The stat types you want this endpoint to return information on. See also the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            You may list ***up to 3*** types using comma-separated format. For example: `types=gps,engineStates,obdOdometerMeters`.

            *Note:* `auxInput3`-`auxInput10` count as a single type against the limit of 3. For example, you could list `types=engineStates,obdOdometerMeters,auxInput3,auxInput4` because `auxInput3` and `auxInput4` count as a single stat type. `auxInput1` and `auxInput2` still count as their own individual types.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `defLevelMilliPercent`: The Diesel Exhaust Fluid (DEF) level in milli percentage points (e.g. `99001`, `49999`, etc).
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `gpsOdometerMeters`: Odometer reading provided by GPS calculations when OBD odometer cannot be pulled automatically. You must provide a manual odometer reading before this value is updated. Manual odometer readings can be provided via the [PATCH /fleet/vehicles/{id}](ref:updatevehicle) endpoint or through the <a href="https://kb.samsara.com/hc/en-us/articles/115005273667-Editing-Odometer-Reading" target="_blank">cloud dasbhoard</a>. Odometer readings that are manually set will update as GPS trip data is gathered. Try combining with `obdOdometerMeters`.
            - `idlingDurationMilliseconds`: The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use [the Idling Events API](https://developers.samsara.com/reference/getvehicleidlingreports).
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in ‘blast mode’.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        decorations : typing.Optional[typing.Union[GetVehicleStatsFeedRequestDecorationsItem, typing.Sequence[GetVehicleStatsFeedRequestDecorationsItem]]]
            Decorations to add to the primary stats listed in the `types` parameter. For example, if you wish to know the vehicle's location whenever the engine changes state, you may set `types=engineStates&decorations=gps`.

            You may list ***up to 2*** decorations using comma-separated format. If multiple stats are listed in the `types` parameter, the decorations will be added to each one. For example: `types=engineStates,obdOdometerMeters,faultCodes&decorations=gps,fuelPercents` will list GPS and fuel decorations for each engine state change, each odometer reading, and each fault code. See the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            Note that decorations may significantly increase the response payload size.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `idlingDurationMilliseconds`: 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>.
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in 'blast mode'.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VehicleStatsListResponse
            List of stat events for the specified vehicles and stat types.

        Examples
        --------
        from samsara import Samsara

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.vehicle_stats.get_vehicle_stats_feed()
        """
        _response = self._raw_client.get_vehicle_stats_feed(
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            vehicle_ids=vehicle_ids,
            types=types,
            decorations=decorations,
            request_options=request_options,
        )
        return _response.data

    def get_vehicle_stats_history(
        self,
        *,
        start_time: str,
        end_time: str,
        after: typing.Optional[str] = None,
        parent_tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        vehicle_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        types: typing.Optional[
            typing.Union[
                GetVehicleStatsHistoryRequestTypesItem, typing.Sequence[GetVehicleStatsHistoryRequestTypesItem]
            ]
        ] = None,
        decorations: typing.Optional[
            typing.Union[
                GetVehicleStatsHistoryRequestDecorationsItem,
                typing.Sequence[GetVehicleStatsHistoryRequestDecorationsItem],
            ]
        ] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> VehicleStatsListResponse:
        """
        Returns vehicle stats during the given time range for all vehicles. This can be optionally filtered by tags or specific vehicle IDs.

        Related guide: <a href="/docs/telematics" target="_blank">Telematics</a>.

         **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.

        To use this endpoint, select **Read Vehicle Statistics** under the Vehicles 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>

        Parameters
        ----------
        start_time : str
            A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).

        end_time : str
            An end time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).

        after : typing.Optional[str]
            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.

        parent_tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`

        tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`

        vehicle_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`

        types : typing.Optional[typing.Union[GetVehicleStatsHistoryRequestTypesItem, typing.Sequence[GetVehicleStatsHistoryRequestTypesItem]]]
            The stat types you want this endpoint to return information on. See also the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            You may list ***up to 3*** types using comma-separated format. For example: `types=gps,engineStates,obdOdometerMeters`.

            *Note:* `auxInput3`-`auxInput10` count as a single type against the limit of 3. For example, you could list `types=engineStates,obdOdometerMeters,auxInput3,auxInput4` because `auxInput3` and `auxInput4` count as a single stat type. `auxInput1` and `auxInput2` still count as their own individual types.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `defLevelMilliPercent`: The Diesel Exhaust Fluid (DEF) level in milli percentage points (e.g. `99001`, `49999`, etc).
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `gpsOdometerMeters`: Odometer reading provided by GPS calculations when OBD odometer cannot be pulled automatically. You must provide a manual odometer reading before this value is updated. Manual odometer readings can be provided via the [PATCH /fleet/vehicles/{id}](ref:updatevehicle) endpoint or through the <a href="https://kb.samsara.com/hc/en-us/articles/115005273667-Editing-Odometer-Reading" target="_blank">cloud dasbhoard</a>. Odometer readings that are manually set will update as GPS trip data is gathered. Try combining with `obdOdometerMeters`.
            - `idlingDurationMilliseconds`: The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use [the Idling Events API](https://developers.samsara.com/reference/getvehicleidlingreports).
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in ‘blast mode’.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        decorations : typing.Optional[typing.Union[GetVehicleStatsHistoryRequestDecorationsItem, typing.Sequence[GetVehicleStatsHistoryRequestDecorationsItem]]]
            Decorations to add to the primary stats listed in the `types` parameter. For example, if you wish to know the vehicle's location whenever the engine changes state, you may set `types=engineStates&decorations=gps`.

            You may list ***up to 2*** decorations using comma-separated format. If multiple stats are listed in the `types` parameter, the decorations will be added to each one. For example: `types=engineStates,obdOdometerMeters,faultCodes&decorations=gps,fuelPercents` will list GPS and fuel decorations for each engine state change, each odometer reading, and each fault code. See the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            Note that decorations may significantly increase the response payload size.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `idlingDurationMilliseconds`: 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>.
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in 'blast mode'.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VehicleStatsListResponse
            List of vehicle stats for the specified vehicles, stat type, and time range.

        Examples
        --------
        from samsara import Samsara

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.vehicle_stats.get_vehicle_stats_history(
            start_time="startTime",
            end_time="endTime",
        )
        """
        _response = self._raw_client.get_vehicle_stats_history(
            start_time=start_time,
            end_time=end_time,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            vehicle_ids=vehicle_ids,
            types=types,
            decorations=decorations,
            request_options=request_options,
        )
        return _response.data


class AsyncVehicleStatsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawVehicleStatsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawVehicleStatsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawVehicleStatsClient
        """
        return self._raw_client

    async def get_vehicle_stats(
        self,
        *,
        after: typing.Optional[str] = None,
        time: typing.Optional[str] = None,
        parent_tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        vehicle_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        types: typing.Optional[
            typing.Union[GetVehicleStatsRequestTypesItem, typing.Sequence[GetVehicleStatsRequestTypesItem]]
        ] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> VehicleStatsResponse:
        """
        Returns the last known stats of all vehicles at the given `time`. If no `time` is specified, the current time is used.

        Related guide: <a href="/docs/telematics" target="_blank">Telematics</a>.

         **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.

        To use this endpoint, select **Read Vehicle Statistics** under the Vehicles 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>

        Parameters
        ----------
        after : typing.Optional[str]
            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.

        time : typing.Optional[str]
            A filter on the data that returns the last known data points with timestamps less than or equal to this value. Defaults to now if not provided. Must be a string in RFC 3339 format. Millisecond precision and timezones are supported. (Example: `2020-01-27T07:06:25Z`).

        parent_tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`

        tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`

        vehicle_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`

        types : typing.Optional[typing.Union[GetVehicleStatsRequestTypesItem, typing.Sequence[GetVehicleStatsRequestTypesItem]]]
            The stat types you want this endpoint to return information on. See also the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            You may list ***up to 3*** types using comma-separated format. For example: `types=gps,engineStates,obdOdometerMeters`.

            *Note:* `auxInput3`-`auxInput10` count as a single type against the limit of 3. For example, you could list `types=engineStates,obdOdometerMeters,auxInput3,auxInput4` because `auxInput3` and `auxInput4` count as a single stat type. `auxInput1` and `auxInput2` still count as their own individual types.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `defLevelMilliPercent`: The Diesel Exhaust Fluid (DEF) level in milli percentage points (e.g. `99001`, `49999`, etc).
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `gpsOdometerMeters`: Odometer reading provided by GPS calculations when OBD odometer cannot be pulled automatically. You must provide a manual odometer reading before this value is updated. Manual odometer readings can be provided via the [PATCH /fleet/vehicles/{id}](ref:updatevehicle) endpoint or through the <a href="https://kb.samsara.com/hc/en-us/articles/115005273667-Editing-Odometer-Reading" target="_blank">cloud dasbhoard</a>. Odometer readings that are manually set will update as GPS trip data is gathered. Try combining with `obdOdometerMeters`.
            - `idlingDurationMilliseconds`: The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use [the Idling Events API](https://developers.samsara.com/reference/getvehicleidlingreports).
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in ‘blast mode’.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VehicleStatsResponse
            Vehicle stats snapshot

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.vehicle_stats.get_vehicle_stats()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_vehicle_stats(
            after=after,
            time=time,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            vehicle_ids=vehicle_ids,
            types=types,
            request_options=request_options,
        )
        return _response.data

    async def get_vehicle_stats_feed(
        self,
        *,
        after: typing.Optional[str] = None,
        parent_tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        vehicle_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        types: typing.Optional[
            typing.Union[GetVehicleStatsFeedRequestTypesItem, typing.Sequence[GetVehicleStatsFeedRequestTypesItem]]
        ] = None,
        decorations: typing.Optional[
            typing.Union[
                GetVehicleStatsFeedRequestDecorationsItem, typing.Sequence[GetVehicleStatsFeedRequestDecorationsItem]
            ]
        ] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> VehicleStatsListResponse:
        """
        Follow a feed of vehicle stats.

        Your first call to this endpoint will provide you with the most recent stats for each vehicle and an `endCursor`.

        You can the provide the `endCursor` value to the `after` query parameter to get all updates since the last call you made.

        If `hasNextPage` is `false`, no new data is immediately available. You should wait a minimum of 5 seconds making a subsequent request.

        Related guide: <a href="/docs/telematics" target="_blank">Telematics</a>.

         **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.

        To use this endpoint, select **Read Vehicle Statistics** under the Vehicles 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>

        Parameters
        ----------
        after : typing.Optional[str]
            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.

        parent_tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`

        tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`

        vehicle_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`

        types : typing.Optional[typing.Union[GetVehicleStatsFeedRequestTypesItem, typing.Sequence[GetVehicleStatsFeedRequestTypesItem]]]
            The stat types you want this endpoint to return information on. See also the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            You may list ***up to 3*** types using comma-separated format. For example: `types=gps,engineStates,obdOdometerMeters`.

            *Note:* `auxInput3`-`auxInput10` count as a single type against the limit of 3. For example, you could list `types=engineStates,obdOdometerMeters,auxInput3,auxInput4` because `auxInput3` and `auxInput4` count as a single stat type. `auxInput1` and `auxInput2` still count as their own individual types.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `defLevelMilliPercent`: The Diesel Exhaust Fluid (DEF) level in milli percentage points (e.g. `99001`, `49999`, etc).
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `gpsOdometerMeters`: Odometer reading provided by GPS calculations when OBD odometer cannot be pulled automatically. You must provide a manual odometer reading before this value is updated. Manual odometer readings can be provided via the [PATCH /fleet/vehicles/{id}](ref:updatevehicle) endpoint or through the <a href="https://kb.samsara.com/hc/en-us/articles/115005273667-Editing-Odometer-Reading" target="_blank">cloud dasbhoard</a>. Odometer readings that are manually set will update as GPS trip data is gathered. Try combining with `obdOdometerMeters`.
            - `idlingDurationMilliseconds`: The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use [the Idling Events API](https://developers.samsara.com/reference/getvehicleidlingreports).
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in ‘blast mode’.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        decorations : typing.Optional[typing.Union[GetVehicleStatsFeedRequestDecorationsItem, typing.Sequence[GetVehicleStatsFeedRequestDecorationsItem]]]
            Decorations to add to the primary stats listed in the `types` parameter. For example, if you wish to know the vehicle's location whenever the engine changes state, you may set `types=engineStates&decorations=gps`.

            You may list ***up to 2*** decorations using comma-separated format. If multiple stats are listed in the `types` parameter, the decorations will be added to each one. For example: `types=engineStates,obdOdometerMeters,faultCodes&decorations=gps,fuelPercents` will list GPS and fuel decorations for each engine state change, each odometer reading, and each fault code. See the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            Note that decorations may significantly increase the response payload size.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `idlingDurationMilliseconds`: 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>.
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in 'blast mode'.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VehicleStatsListResponse
            List of stat events for the specified vehicles and stat types.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.vehicle_stats.get_vehicle_stats_feed()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_vehicle_stats_feed(
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            vehicle_ids=vehicle_ids,
            types=types,
            decorations=decorations,
            request_options=request_options,
        )
        return _response.data

    async def get_vehicle_stats_history(
        self,
        *,
        start_time: str,
        end_time: str,
        after: typing.Optional[str] = None,
        parent_tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        tag_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        vehicle_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        types: typing.Optional[
            typing.Union[
                GetVehicleStatsHistoryRequestTypesItem, typing.Sequence[GetVehicleStatsHistoryRequestTypesItem]
            ]
        ] = None,
        decorations: typing.Optional[
            typing.Union[
                GetVehicleStatsHistoryRequestDecorationsItem,
                typing.Sequence[GetVehicleStatsHistoryRequestDecorationsItem],
            ]
        ] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> VehicleStatsListResponse:
        """
        Returns vehicle stats during the given time range for all vehicles. This can be optionally filtered by tags or specific vehicle IDs.

        Related guide: <a href="/docs/telematics" target="_blank">Telematics</a>.

         **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.

        To use this endpoint, select **Read Vehicle Statistics** under the Vehicles 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>

        Parameters
        ----------
        start_time : str
            A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).

        end_time : str
            An end time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).

        after : typing.Optional[str]
            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.

        parent_tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`

        tag_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`

        vehicle_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`

        types : typing.Optional[typing.Union[GetVehicleStatsHistoryRequestTypesItem, typing.Sequence[GetVehicleStatsHistoryRequestTypesItem]]]
            The stat types you want this endpoint to return information on. See also the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            You may list ***up to 3*** types using comma-separated format. For example: `types=gps,engineStates,obdOdometerMeters`.

            *Note:* `auxInput3`-`auxInput10` count as a single type against the limit of 3. For example, you could list `types=engineStates,obdOdometerMeters,auxInput3,auxInput4` because `auxInput3` and `auxInput4` count as a single stat type. `auxInput1` and `auxInput2` still count as their own individual types.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `defLevelMilliPercent`: The Diesel Exhaust Fluid (DEF) level in milli percentage points (e.g. `99001`, `49999`, etc).
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `gpsOdometerMeters`: Odometer reading provided by GPS calculations when OBD odometer cannot be pulled automatically. You must provide a manual odometer reading before this value is updated. Manual odometer readings can be provided via the [PATCH /fleet/vehicles/{id}](ref:updatevehicle) endpoint or through the <a href="https://kb.samsara.com/hc/en-us/articles/115005273667-Editing-Odometer-Reading" target="_blank">cloud dasbhoard</a>. Odometer readings that are manually set will update as GPS trip data is gathered. Try combining with `obdOdometerMeters`.
            - `idlingDurationMilliseconds`: The cumulative idling duration in milliseconds. Cumulative values always increase. For filtering of idling duration please use [the Idling Events API](https://developers.samsara.com/reference/getvehicleidlingreports).
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in ‘blast mode’.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        decorations : typing.Optional[typing.Union[GetVehicleStatsHistoryRequestDecorationsItem, typing.Sequence[GetVehicleStatsHistoryRequestDecorationsItem]]]
            Decorations to add to the primary stats listed in the `types` parameter. For example, if you wish to know the vehicle's location whenever the engine changes state, you may set `types=engineStates&decorations=gps`.

            You may list ***up to 2*** decorations using comma-separated format. If multiple stats are listed in the `types` parameter, the decorations will be added to each one. For example: `types=engineStates,obdOdometerMeters,faultCodes&decorations=gps,fuelPercents` will list GPS and fuel decorations for each engine state change, each odometer reading, and each fault code. See the <a href="/docs/telematics#query-parameters" target="_blank">Telematics</a> guide for more details.

            Note that decorations may significantly increase the response payload size.

            - `ambientAirTemperatureMilliC`: The ambient air temperature reading in millidegree Celsius.
            - `auxInput1`-`auxInput13`: Stat events from the <a href="https://kb.samsara.com/hc/en-us/articles/360043040512-Auxiliary-Inputs" target="_blank">auxiliary inputs</a> for the vehicle.
            - `batteryMilliVolts`: The vehicle battery voltage reading.
            - `barometricPressurePa`: The barometric pressure reading in pascals.
            - `ecuSpeedMph`: The speed of the engine in miles per hour according to the ECU.
            - `engineCoolantTemperatureMilliC`: The engine coolant temperature reading in millidegree Celsius.
            - `engineImmobilizer`: The state of the engine immobilizer - Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
            - `engineOilPressureKPa`: The engine oil pressure reading in kilopascals.
            - `engineLoadPercent`: The engine load in percentage points (e.g. `99`, `50`, etc).
            - `engineRpm`: The revolutions per minute of the engine.
            - `engineStates`: The state of the engine (`Off`, `On`, `Idle`).
            - `faultCodes`: The diagnostic fault codes for the vehicle.
            - `fuelPercents`: The engine fuel level in percentage points (e.g. `99`, `50`, etc).
            - `fuelConsumedMilliliters`: 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>.
            - `gps`: GPS data including lat/long, heading, speed, address book entry (if exists), and a reverse geocoded address.
            - `gpsDistanceMeters`: The distance the vehicle has traveled since the gateway was installed based on GPS calculations.
            - `idlingDurationMilliseconds`: 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>.
            - `intakeManifoldTemperatureMilliC`: The intake manifold temperature reading in millidegree Celsius.
            - `nfcCardScans`: ID card scans.
            - `obdEngineSeconds`: The cumulative number of seconds the engine has run according to onboard diagnostics. When onboard diagnostic data is unavailable, ignition-based engine data (for ELD vehicles) will be used as a proxy to accumulate engine hours.
            - `obdOdometerMeters`: The odometer reading according to onboard diagnostics. If Samsara does not have diagnostic coverage for a particular vehicle, the value for this stat type will be omitted.
            - `syntheticEngineSeconds`: The cumulative number of seconds the engine has run estimated based on when the engine is running. Please note that this method <a href="https://kb.samsara.com/hc/en-us/articles/360043552511-Synthetic-Engine-Hours" target="_blank">requires the addition of a baseline</a> to trigger accumulation.
            - `evStateOfChargeMilliPercent`: Milli percent State of Charge for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evChargingStatus`: Charging status for electric and hybrid vehicles. Not all EV and HEVs may report this field. Statuses: unknown - 0, not charging - 1, charging - 2.
            - `evChargingEnergyMicroWh`: Charging energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evChargingVoltageMilliVolt`: Charging voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evChargingCurrentMilliAmp`: Charging current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evConsumedEnergyMicroWh`: Consumed energy (including regenerated) for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evRegeneratedEnergyMicroWh`: Regenerated energy for electric and hybrid vehicles in microwatt hours. Not all EV and HEVs may report this field.
            - `evBatteryVoltageMilliVolt`: Battery voltage for electric and hybrid vehicles in milli volts. Not all EV and HEVs may report this field.
            - `evBatteryCurrentMilliAmp`: Battery current for electric and hybrid vehicles in milli amps. Not all EV and HEVs may report this field.
            - `evBatteryStateOfHealthMilliPercent`: Milli percent battery state of health for electric and hybrid vehicles. Not all EV and HEVs may report this field.
            - `evAverageBatteryTemperatureMilliCelsius`: Battery temperature for electric and hybrid vehicles in milli celsius. Not all EV and HEVs may report this field.
            - `evDistanceDrivenMeters`: Electric distance driven for electric and hybrid vehicles in meters. Not all EV and HEVs may report this field.
            - `spreaderLiquidRate`: Liquid spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderGranularRate`: Granular spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderPrewetRate`: Prewet spread rate reading in milliliters per meter, read from the material spreader. Unfiltered live stats are supplied as-read from the Material Spreader unit. Readings do not consider total spread rate(s) over time or distance.
            - `spreaderAirTemp`: Air (ambient) temperature in milli celsius reading from material spreader.
            - `spreaderRoadTemp`: Road temperature reading in milli celsius from material spreader.
            - `spreaderOnState`: Whether vehicle spreader is enabled.
            - `spreaderActive`: Whether vehicle is actively spreading any material.
            - `spreaderBlastState`: Whether vehicle is actively spreading material in 'blast mode'.
            - `spreaderGranularName`: Name of most recent type of granular material spread, read from the material spreader.
            - `spreaderPrewetName`: Name of most recent type of prewet material spread, read from the material spreader.
            - `spreaderLiquidName`: Name of most recent type of liquid material spread, read from the material spreader.
            - `spreaderPlowStatus`: Snow plow status (`Up` or `Down`), as read from the material spreader. Note: this is separate from plow status defined via auxInput.
            - `seatbeltDriver`: Seatbelt Driver Status as read from the vehicle. `Buckled` or `Unbuckled`. (Beta only)
            - `tellTales`: Tell tales status as read from the vehicle.
            - `ecuDoorStatus`: Status of doors, sourced from ECU or from AUX port assigned to a Door label if diagnostic from ECU is not available. Either `Closed`, `Open` or `Unknown`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VehicleStatsListResponse
            List of vehicle stats for the specified vehicles, stat type, and time range.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.vehicle_stats.get_vehicle_stats_history(
                start_time="startTime",
                end_time="endTime",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_vehicle_stats_history(
            start_time=start_time,
            end_time=end_time,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            vehicle_ids=vehicle_ids,
            types=types,
            decorations=decorations,
            request_options=request_options,
        )
        return _response.data
