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

from __future__ import annotations

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.asset_data_outputs_patch_asset_data_outputs_response_body import (
    AssetDataOutputsPatchAssetDataOutputsResponseBody,
)
from ..types.asset_location import AssetLocation
from ..types.asset_name import AssetName
from ..types.custom_metadata import CustomMetadata
from ..types.data_input_list_response import DataInputListResponse
from ..types.data_input_snapshot_response import DataInputSnapshotResponse
from ..types.data_inputs_tiny_response import DataInputsTinyResponse
from ..types.inline_response_200 import InlineResponse200
from ..types.inline_response_2008 import InlineResponse2008
from ..types.list_industrial_assets_response import ListIndustrialAssetsResponse
from ..types.location_type import LocationType
from ..types.parent_id import ParentId
from ..types.tag_ids import TagIds
from ..types.v_1_machine_history_response import V1MachineHistoryResponse
from ..types.v_1_programs_for_the_camera_response import V1ProgramsForTheCameraResponse
from ..types.v_1_vision_cameras_response import V1VisionCamerasResponse
from ..types.v_1_vision_run_by_camera_response import V1VisionRunByCameraResponse
from ..types.v_1_vision_runs_by_camera_and_program_response import V1VisionRunsByCameraAndProgramResponse
from ..types.v_1_vision_runs_by_camera_response import V1VisionRunsByCameraResponse
from ..types.v_1_vision_runs_response import V1VisionRunsResponse
from .raw_client import AsyncRawIndustrialClient, RawIndustrialClient

if typing.TYPE_CHECKING:
    from .assets.client import AssetsClient, AsyncAssetsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class IndustrialClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawIndustrialClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._assets: typing.Optional[AssetsClient] = None

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

        Returns
        -------
        RawIndustrialClient
        """
        return self._raw_client

    def get_industrial_assets(
        self,
        *,
        limit: typing.Optional[int] = None,
        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,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ListIndustrialAssetsResponse:
        """
        List all assets in the organization.

         **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 Equipment** under the Equipment 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
        ----------
        limit : typing.Optional[int]
            The limit for how many objects will be in the response. Default and max for this value is 512 objects.

        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`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        ListIndustrialAssetsResponse
            Assets in the organization.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.get_industrial_assets()
        """
        _response = self._raw_client.get_industrial_assets(
            limit=limit,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    def create_industrial_asset(
        self,
        *,
        name: AssetName,
        custom_metadata: typing.Optional[CustomMetadata] = OMIT,
        location: typing.Optional[AssetLocation] = OMIT,
        location_data_input_id: typing.Optional[str] = OMIT,
        location_type: typing.Optional[LocationType] = OMIT,
        parent_id: typing.Optional[ParentId] = OMIT,
        running_status_data_input_id: typing.Optional[str] = OMIT,
        tag_ids: typing.Optional[TagIds] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> InlineResponse200:
        """
        Create an asset with optional configuration parameters.

         **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 **Write Equipment** under the Equipment 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
        ----------
        name : AssetName

        custom_metadata : typing.Optional[CustomMetadata]

        location : typing.Optional[AssetLocation]

        location_data_input_id : typing.Optional[str]
            Required if locationType is "dataInput". Specifies the id of a location data input which will determine the asset's location. **The data input will be moved to the new asset.**

        location_type : typing.Optional[LocationType]

        parent_id : typing.Optional[ParentId]

        running_status_data_input_id : typing.Optional[str]
            The asset's isRunning status will be true when the associated data input's value is 1. Data input cannot be of location format. **The data input will be moved to the new asset.**

        tag_ids : typing.Optional[TagIds]

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

        Returns
        -------
        InlineResponse200
            Newly created asset object

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.create_industrial_asset(
            name="name",
        )
        """
        _response = self._raw_client.create_industrial_asset(
            name=name,
            custom_metadata=custom_metadata,
            location=location,
            location_data_input_id=location_data_input_id,
            location_type=location_type,
            parent_id=parent_id,
            running_status_data_input_id=running_status_data_input_id,
            tag_ids=tag_ids,
            request_options=request_options,
        )
        return _response.data

    def patch_industrial_asset(
        self,
        id: str,
        *,
        custom_metadata: typing.Optional[CustomMetadata] = OMIT,
        location: typing.Optional[AssetLocation] = OMIT,
        location_data_input_id: typing.Optional[str] = OMIT,
        location_type: typing.Optional[LocationType] = OMIT,
        name: typing.Optional[AssetName] = OMIT,
        parent_id: typing.Optional[str] = OMIT,
        running_status_data_input_id: typing.Optional[str] = OMIT,
        tag_ids: typing.Optional[TagIds] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> InlineResponse200:
        """
        Update an existing asset. Only the provided fields will be updated.

         **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 **Write Equipment** under the Equipment 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
        ----------
        id : str
            Id of the asset to be updated

        custom_metadata : typing.Optional[CustomMetadata]

        location : typing.Optional[AssetLocation]

        location_data_input_id : typing.Optional[str]
            Required if locationType is "dataInput". Specifies the id of a location data input which will determine the asset's location. The data input must be in the asset.

        location_type : typing.Optional[LocationType]

        name : typing.Optional[AssetName]

        parent_id : typing.Optional[str]
            The id of the parent asset that the asset belongs to. Pass in an empty string to remove the child from the parent.

        running_status_data_input_id : typing.Optional[str]
            The asset's isRunning status will be true when the associated data input's value is 1. Data input cannot be of location format. The data input must be in the asset.

        tag_ids : typing.Optional[TagIds]

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

        Returns
        -------
        InlineResponse200
            The updated asset

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.patch_industrial_asset(
            id="id",
        )
        """
        _response = self._raw_client.patch_industrial_asset(
            id,
            custom_metadata=custom_metadata,
            location=location,
            location_data_input_id=location_data_input_id,
            location_type=location_type,
            name=name,
            parent_id=parent_id,
            running_status_data_input_id=running_status_data_input_id,
            tag_ids=tag_ids,
            request_options=request_options,
        )
        return _response.data

    def patch_asset_data_outputs(
        self, id: str, *, values: typing.Dict[str, typing.Any], request_options: typing.Optional[RequestOptions] = None
    ) -> AssetDataOutputsPatchAssetDataOutputsResponseBody:
        """
        Writes values to multiple data outputs on an asset simultaneously. Only the provided data outputs will be updated.

         <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

        To use this endpoint, select **Write Equipment Statistics** under the Equipment 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>


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

        Parameters
        ----------
        id : str
            Asset ID

        values : typing.Dict[str, typing.Any]
            A map of data output IDs to values. All data outputs must belong to the same asset. Only the specified IDs will be written to.

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

        Returns
        -------
        AssetDataOutputsPatchAssetDataOutputsResponseBody
            OK response.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.patch_asset_data_outputs(
            id="id",
            values={"key": "value"},
        )
        """
        _response = self._raw_client.patch_asset_data_outputs(id, values=values, request_options=request_options)
        return _response.data

    def get_data_inputs(
        self,
        *,
        limit: typing.Optional[int] = None,
        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,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputsTinyResponse:
        """
        Returns all data inputs, optionally filtered by tags or asset ids.

         **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 Equipment Statistics** under the Equipment 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
        ----------
        limit : typing.Optional[int]
            The limit for how many objects will be in the response. Default and max for this value is 512 objects.

        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`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputsTinyResponse
            List of data inputs with names, ids, and other metadata.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.get_data_inputs()
        """
        _response = self._raw_client.get_data_inputs(
            limit=limit,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    def get_data_input_data_snapshot(
        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,
        data_input_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputSnapshotResponse:
        """
        Returns last known data points for all data inputs. This can be filtered by optional tags, specific data input IDs or asset IDs.

         **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 Equipment Statistics** under the Equipment 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`

        data_input_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of data input IDs. Example: `dataInputIds=1234,5678`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputSnapshotResponse
            List of last known data input data points and pagination parameters

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.get_data_input_data_snapshot()
        """
        _response = self._raw_client.get_data_input_data_snapshot(
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            data_input_ids=data_input_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    def get_data_input_data_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,
        data_input_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputListResponse:
        """
        Follow a continuous feed of all data input data points.

        Your first call to this endpoint will provide you with the most recent data points for each data input and a `pagination` object that contains an `endCursor`.

        You can provide the `endCursor` to the `after` parameter of this endpoint to get data point updates since that `endCursor`.

        If `hasNextPage` is `false`, no updates are readily available yet. We suggest waiting a minimum of 5 seconds before requesting updates.

         **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 Equipment Statistics** under the Equipment 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`

        data_input_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of data input IDs. Example: `dataInputIds=1234,5678`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputListResponse
            List of all data points for specified data inputs

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.get_data_input_data_feed()
        """
        _response = self._raw_client.get_data_input_data_feed(
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            data_input_ids=data_input_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    def get_data_input_data_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,
        data_input_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputListResponse:
        """
        Returns all known data points during the given time range for all data inputs. This can be filtered by optional tags, specific data input IDs or asset IDs.

         **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 Equipment Statistics** under the Equipment 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`

        data_input_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of data input IDs. Example: `dataInputIds=1234,5678`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputListResponse
            List of all data points for the specified data inputs and time range.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.get_data_input_data_history(
            start_time="startTime",
            end_time="endTime",
        )
        """
        _response = self._raw_client.get_data_input_data_history(
            start_time=start_time,
            end_time=end_time,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            data_input_ids=data_input_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    def v_1_get_cameras(self, *, request_options: typing.Optional[RequestOptions] = None) -> V1VisionCamerasResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch all cameras.

         **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 Industrial** under the Industrial 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
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        V1VisionCamerasResponse
            Returns details about a camera.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_cameras()
        """
        _response = self._raw_client.v_1_get_cameras(request_options=request_options)
        return _response.data

    def v_1_get_vision_programs_by_camera(
        self, camera_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> V1ProgramsForTheCameraResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch configured programs on the camera.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

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

        Returns
        -------
        V1ProgramsForTheCameraResponse
            Returns programs configured on the camera.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_vision_programs_by_camera(
            camera_id=1000000,
        )
        """
        _response = self._raw_client.v_1_get_vision_programs_by_camera(camera_id, request_options=request_options)
        return _response.data

    def v_1_get_vision_latest_run_camera(
        self,
        camera_id: int,
        *,
        program_id: typing.Optional[int] = None,
        started_at_ms: typing.Optional[int] = None,
        include: typing.Optional[str] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunByCameraResponse:
        """
        Fetch the latest run for a camera or program by default. If startedAtMs is supplied, fetch the specific run that corresponds to that start time.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

        program_id : typing.Optional[int]
            The configured program's ID on the camera.

        started_at_ms : typing.Optional[int]
            EndMs is an optional param. It will default to the current time.

        include : typing.Optional[str]
            Include is a filter parameter. Accepts 'pass', 'reject' or 'no_read'.

        limit : typing.Optional[int]
            Limit is an integer value from 1 to 1,000.

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

        Returns
        -------
        V1VisionRunByCameraResponse
            Returns the details for this run.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_vision_latest_run_camera(
            camera_id=1000000,
        )
        """
        _response = self._raw_client.v_1_get_vision_latest_run_camera(
            camera_id,
            program_id=program_id,
            started_at_ms=started_at_ms,
            include=include,
            limit=limit,
            request_options=request_options,
        )
        return _response.data

    def v_1_get_vision_runs(
        self,
        *,
        duration_ms: int,
        end_ms: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunsResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch runs.

         **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 Industrial** under the Industrial 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
        ----------
        duration_ms : int
            DurationMs is a required param. This works with the EndMs parameter. Indicates the duration in which the visionRuns will be fetched

        end_ms : typing.Optional[int]
            EndMs is an optional param. It will default to the current time.

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

        Returns
        -------
        V1VisionRunsResponse
            Return runs.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_vision_runs(
            duration_ms=1000000,
        )
        """
        _response = self._raw_client.v_1_get_vision_runs(
            duration_ms=duration_ms, end_ms=end_ms, request_options=request_options
        )
        return _response.data

    def get_vision_runs_by_camera(
        self,
        camera_id: int,
        *,
        duration_ms: int,
        end_ms: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunsByCameraResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch runs by camera.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

        duration_ms : int
            DurationMs is a required param. This works with the EndMs parameter. Indicates the duration in which the visionRuns will be fetched

        end_ms : typing.Optional[int]
            EndMs is an optional param. It will default to the current time.

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

        Returns
        -------
        V1VisionRunsByCameraResponse
            Return runs by cameraId.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.get_vision_runs_by_camera(
            camera_id=1000000,
            duration_ms=1000000,
        )
        """
        _response = self._raw_client.get_vision_runs_by_camera(
            camera_id, duration_ms=duration_ms, end_ms=end_ms, request_options=request_options
        )
        return _response.data

    def v_1_get_vision_runs_by_camera_and_program(
        self,
        camera_id: int,
        program_id: int,
        started_at_ms: int,
        *,
        include: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunsByCameraAndProgramResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch runs by camera and program.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

        program_id : int
            The configured program's ID on the camera.

        started_at_ms : int
            Started_at_ms is a required param. Indicates the start time of the run to be fetched.

        include : typing.Optional[str]
            Include is a filter parameter. Accepts 'pass', 'reject' or 'no_read'.

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

        Returns
        -------
        V1VisionRunsByCameraAndProgramResponse
            Return runs by camera ID and program ID.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_vision_runs_by_camera_and_program(
            camera_id=1000000,
            program_id=1000000,
            started_at_ms=1000000,
        )
        """
        _response = self._raw_client.v_1_get_vision_runs_by_camera_and_program(
            camera_id, program_id, started_at_ms, include=include, request_options=request_options
        )
        return _response.data

    def v_1_get_machines_history(
        self, *, end_ms: int, start_ms: int, request_options: typing.Optional[RequestOptions] = None
    ) -> V1MachineHistoryResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Get historical data for machine objects. This method returns a set of historical data for all machines.

         **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 **Write Industrial** under the Industrial 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
        ----------
        end_ms : int
            End of the time range, specified in milliseconds UNIX time.

        start_ms : int
            Beginning of the time range, specified in milliseconds UNIX time.

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

        Returns
        -------
        V1MachineHistoryResponse
            List of machine results objects, each containing a time and a datapoint.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_machines_history(
            end_ms=1462881998034,
            start_ms=1462878398034,
        )
        """
        _response = self._raw_client.v_1_get_machines_history(
            end_ms=end_ms, start_ms=start_ms, request_options=request_options
        )
        return _response.data

    def v_1_get_machines(self, *, request_options: typing.Optional[RequestOptions] = None) -> InlineResponse2008:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Get machine objects. This method returns a list of the machine objects in the Samsara Cloud and information about them.

         **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 **Write Industrial** under the Industrial 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
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        InlineResponse2008
            List of machine objects.

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

        client = Samsara(
            token="YOUR_TOKEN",
        )
        client.industrial.v_1_get_machines()
        """
        _response = self._raw_client.v_1_get_machines(request_options=request_options)
        return _response.data

    @property
    def assets(self):
        if self._assets is None:
            from .assets.client import AssetsClient  # noqa: E402

            self._assets = AssetsClient(client_wrapper=self._client_wrapper)
        return self._assets


class AsyncIndustrialClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawIndustrialClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._assets: typing.Optional[AsyncAssetsClient] = None

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

        Returns
        -------
        AsyncRawIndustrialClient
        """
        return self._raw_client

    async def get_industrial_assets(
        self,
        *,
        limit: typing.Optional[int] = None,
        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,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ListIndustrialAssetsResponse:
        """
        List all assets in the organization.

         **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 Equipment** under the Equipment 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
        ----------
        limit : typing.Optional[int]
            The limit for how many objects will be in the response. Default and max for this value is 512 objects.

        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`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        ListIndustrialAssetsResponse
            Assets in the organization.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.get_industrial_assets()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_industrial_assets(
            limit=limit,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    async def create_industrial_asset(
        self,
        *,
        name: AssetName,
        custom_metadata: typing.Optional[CustomMetadata] = OMIT,
        location: typing.Optional[AssetLocation] = OMIT,
        location_data_input_id: typing.Optional[str] = OMIT,
        location_type: typing.Optional[LocationType] = OMIT,
        parent_id: typing.Optional[ParentId] = OMIT,
        running_status_data_input_id: typing.Optional[str] = OMIT,
        tag_ids: typing.Optional[TagIds] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> InlineResponse200:
        """
        Create an asset with optional configuration parameters.

         **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 **Write Equipment** under the Equipment 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
        ----------
        name : AssetName

        custom_metadata : typing.Optional[CustomMetadata]

        location : typing.Optional[AssetLocation]

        location_data_input_id : typing.Optional[str]
            Required if locationType is "dataInput". Specifies the id of a location data input which will determine the asset's location. **The data input will be moved to the new asset.**

        location_type : typing.Optional[LocationType]

        parent_id : typing.Optional[ParentId]

        running_status_data_input_id : typing.Optional[str]
            The asset's isRunning status will be true when the associated data input's value is 1. Data input cannot be of location format. **The data input will be moved to the new asset.**

        tag_ids : typing.Optional[TagIds]

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

        Returns
        -------
        InlineResponse200
            Newly created asset object

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.create_industrial_asset(
                name="name",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_industrial_asset(
            name=name,
            custom_metadata=custom_metadata,
            location=location,
            location_data_input_id=location_data_input_id,
            location_type=location_type,
            parent_id=parent_id,
            running_status_data_input_id=running_status_data_input_id,
            tag_ids=tag_ids,
            request_options=request_options,
        )
        return _response.data

    async def patch_industrial_asset(
        self,
        id: str,
        *,
        custom_metadata: typing.Optional[CustomMetadata] = OMIT,
        location: typing.Optional[AssetLocation] = OMIT,
        location_data_input_id: typing.Optional[str] = OMIT,
        location_type: typing.Optional[LocationType] = OMIT,
        name: typing.Optional[AssetName] = OMIT,
        parent_id: typing.Optional[str] = OMIT,
        running_status_data_input_id: typing.Optional[str] = OMIT,
        tag_ids: typing.Optional[TagIds] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> InlineResponse200:
        """
        Update an existing asset. Only the provided fields will be updated.

         **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 **Write Equipment** under the Equipment 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
        ----------
        id : str
            Id of the asset to be updated

        custom_metadata : typing.Optional[CustomMetadata]

        location : typing.Optional[AssetLocation]

        location_data_input_id : typing.Optional[str]
            Required if locationType is "dataInput". Specifies the id of a location data input which will determine the asset's location. The data input must be in the asset.

        location_type : typing.Optional[LocationType]

        name : typing.Optional[AssetName]

        parent_id : typing.Optional[str]
            The id of the parent asset that the asset belongs to. Pass in an empty string to remove the child from the parent.

        running_status_data_input_id : typing.Optional[str]
            The asset's isRunning status will be true when the associated data input's value is 1. Data input cannot be of location format. The data input must be in the asset.

        tag_ids : typing.Optional[TagIds]

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

        Returns
        -------
        InlineResponse200
            The updated asset

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.patch_industrial_asset(
                id="id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.patch_industrial_asset(
            id,
            custom_metadata=custom_metadata,
            location=location,
            location_data_input_id=location_data_input_id,
            location_type=location_type,
            name=name,
            parent_id=parent_id,
            running_status_data_input_id=running_status_data_input_id,
            tag_ids=tag_ids,
            request_options=request_options,
        )
        return _response.data

    async def patch_asset_data_outputs(
        self, id: str, *, values: typing.Dict[str, typing.Any], request_options: typing.Optional[RequestOptions] = None
    ) -> AssetDataOutputsPatchAssetDataOutputsResponseBody:
        """
        Writes values to multiple data outputs on an asset simultaneously. Only the provided data outputs will be updated.

         <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

        To use this endpoint, select **Write Equipment Statistics** under the Equipment 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>


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

        Parameters
        ----------
        id : str
            Asset ID

        values : typing.Dict[str, typing.Any]
            A map of data output IDs to values. All data outputs must belong to the same asset. Only the specified IDs will be written to.

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

        Returns
        -------
        AssetDataOutputsPatchAssetDataOutputsResponseBody
            OK response.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.patch_asset_data_outputs(
                id="id",
                values={"key": "value"},
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.patch_asset_data_outputs(id, values=values, request_options=request_options)
        return _response.data

    async def get_data_inputs(
        self,
        *,
        limit: typing.Optional[int] = None,
        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,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputsTinyResponse:
        """
        Returns all data inputs, optionally filtered by tags or asset ids.

         **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 Equipment Statistics** under the Equipment 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
        ----------
        limit : typing.Optional[int]
            The limit for how many objects will be in the response. Default and max for this value is 512 objects.

        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`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputsTinyResponse
            List of data inputs with names, ids, and other metadata.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.get_data_inputs()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_data_inputs(
            limit=limit,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    async def get_data_input_data_snapshot(
        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,
        data_input_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputSnapshotResponse:
        """
        Returns last known data points for all data inputs. This can be filtered by optional tags, specific data input IDs or asset IDs.

         **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 Equipment Statistics** under the Equipment 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`

        data_input_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of data input IDs. Example: `dataInputIds=1234,5678`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputSnapshotResponse
            List of last known data input data points and pagination parameters

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.get_data_input_data_snapshot()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_data_input_data_snapshot(
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            data_input_ids=data_input_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    async def get_data_input_data_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,
        data_input_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputListResponse:
        """
        Follow a continuous feed of all data input data points.

        Your first call to this endpoint will provide you with the most recent data points for each data input and a `pagination` object that contains an `endCursor`.

        You can provide the `endCursor` to the `after` parameter of this endpoint to get data point updates since that `endCursor`.

        If `hasNextPage` is `false`, no updates are readily available yet. We suggest waiting a minimum of 5 seconds before requesting updates.

         **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 Equipment Statistics** under the Equipment 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`

        data_input_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of data input IDs. Example: `dataInputIds=1234,5678`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputListResponse
            List of all data points for specified data inputs

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.get_data_input_data_feed()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_data_input_data_feed(
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            data_input_ids=data_input_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    async def get_data_input_data_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,
        data_input_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DataInputListResponse:
        """
        Returns all known data points during the given time range for all data inputs. This can be filtered by optional tags, specific data input IDs or asset IDs.

         **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 Equipment Statistics** under the Equipment 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`

        data_input_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of data input IDs. Example: `dataInputIds=1234,5678`

        asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            A comma-separated list of industrial asset UUIDs. Example: `assetIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544`

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

        Returns
        -------
        DataInputListResponse
            List of all data points for the specified data inputs and time range.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


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


        asyncio.run(main())
        """
        _response = await self._raw_client.get_data_input_data_history(
            start_time=start_time,
            end_time=end_time,
            after=after,
            parent_tag_ids=parent_tag_ids,
            tag_ids=tag_ids,
            data_input_ids=data_input_ids,
            asset_ids=asset_ids,
            request_options=request_options,
        )
        return _response.data

    async def v_1_get_cameras(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> V1VisionCamerasResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch all cameras.

         **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 Industrial** under the Industrial 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
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        V1VisionCamerasResponse
            Returns details about a camera.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_cameras()


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_cameras(request_options=request_options)
        return _response.data

    async def v_1_get_vision_programs_by_camera(
        self, camera_id: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> V1ProgramsForTheCameraResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch configured programs on the camera.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

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

        Returns
        -------
        V1ProgramsForTheCameraResponse
            Returns programs configured on the camera.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_vision_programs_by_camera(
                camera_id=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_vision_programs_by_camera(camera_id, request_options=request_options)
        return _response.data

    async def v_1_get_vision_latest_run_camera(
        self,
        camera_id: int,
        *,
        program_id: typing.Optional[int] = None,
        started_at_ms: typing.Optional[int] = None,
        include: typing.Optional[str] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunByCameraResponse:
        """
        Fetch the latest run for a camera or program by default. If startedAtMs is supplied, fetch the specific run that corresponds to that start time.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

        program_id : typing.Optional[int]
            The configured program's ID on the camera.

        started_at_ms : typing.Optional[int]
            EndMs is an optional param. It will default to the current time.

        include : typing.Optional[str]
            Include is a filter parameter. Accepts 'pass', 'reject' or 'no_read'.

        limit : typing.Optional[int]
            Limit is an integer value from 1 to 1,000.

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

        Returns
        -------
        V1VisionRunByCameraResponse
            Returns the details for this run.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_vision_latest_run_camera(
                camera_id=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_vision_latest_run_camera(
            camera_id,
            program_id=program_id,
            started_at_ms=started_at_ms,
            include=include,
            limit=limit,
            request_options=request_options,
        )
        return _response.data

    async def v_1_get_vision_runs(
        self,
        *,
        duration_ms: int,
        end_ms: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunsResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch runs.

         **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 Industrial** under the Industrial 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
        ----------
        duration_ms : int
            DurationMs is a required param. This works with the EndMs parameter. Indicates the duration in which the visionRuns will be fetched

        end_ms : typing.Optional[int]
            EndMs is an optional param. It will default to the current time.

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

        Returns
        -------
        V1VisionRunsResponse
            Return runs.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_vision_runs(
                duration_ms=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_vision_runs(
            duration_ms=duration_ms, end_ms=end_ms, request_options=request_options
        )
        return _response.data

    async def get_vision_runs_by_camera(
        self,
        camera_id: int,
        *,
        duration_ms: int,
        end_ms: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunsByCameraResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch runs by camera.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

        duration_ms : int
            DurationMs is a required param. This works with the EndMs parameter. Indicates the duration in which the visionRuns will be fetched

        end_ms : typing.Optional[int]
            EndMs is an optional param. It will default to the current time.

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

        Returns
        -------
        V1VisionRunsByCameraResponse
            Return runs by cameraId.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.get_vision_runs_by_camera(
                camera_id=1000000,
                duration_ms=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_vision_runs_by_camera(
            camera_id, duration_ms=duration_ms, end_ms=end_ms, request_options=request_options
        )
        return _response.data

    async def v_1_get_vision_runs_by_camera_and_program(
        self,
        camera_id: int,
        program_id: int,
        started_at_ms: int,
        *,
        include: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> V1VisionRunsByCameraAndProgramResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Fetch runs by camera and program.

         **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 Industrial** under the Industrial 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
        ----------
        camera_id : int
            The camera_id should be valid for the given accessToken.

        program_id : int
            The configured program's ID on the camera.

        started_at_ms : int
            Started_at_ms is a required param. Indicates the start time of the run to be fetched.

        include : typing.Optional[str]
            Include is a filter parameter. Accepts 'pass', 'reject' or 'no_read'.

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

        Returns
        -------
        V1VisionRunsByCameraAndProgramResponse
            Return runs by camera ID and program ID.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_vision_runs_by_camera_and_program(
                camera_id=1000000,
                program_id=1000000,
                started_at_ms=1000000,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_vision_runs_by_camera_and_program(
            camera_id, program_id, started_at_ms, include=include, request_options=request_options
        )
        return _response.data

    async def v_1_get_machines_history(
        self, *, end_ms: int, start_ms: int, request_options: typing.Optional[RequestOptions] = None
    ) -> V1MachineHistoryResponse:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Get historical data for machine objects. This method returns a set of historical data for all machines.

         **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 **Write Industrial** under the Industrial 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
        ----------
        end_ms : int
            End of the time range, specified in milliseconds UNIX time.

        start_ms : int
            Beginning of the time range, specified in milliseconds UNIX time.

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

        Returns
        -------
        V1MachineHistoryResponse
            List of machine results objects, each containing a time and a datapoint.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_machines_history(
                end_ms=1462881998034,
                start_ms=1462878398034,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_machines_history(
            end_ms=end_ms, start_ms=start_ms, request_options=request_options
        )
        return _response.data

    async def v_1_get_machines(self, *, request_options: typing.Optional[RequestOptions] = None) -> InlineResponse2008:
        """
        <n class="warning">
        <nh>
        <i class="fa fa-exclamation-circle"></i>
        This endpoint is still on our legacy API.
        </nh>
        </n>

        Get machine objects. This method returns a list of the machine objects in the Samsara Cloud and information about them.

         **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 **Write Industrial** under the Industrial 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
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        InlineResponse2008
            List of machine objects.

        Examples
        --------
        import asyncio

        from samsara import AsyncSamsara

        client = AsyncSamsara(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.industrial.v_1_get_machines()


        asyncio.run(main())
        """
        _response = await self._raw_client.v_1_get_machines(request_options=request_options)
        return _response.data

    @property
    def assets(self):
        if self._assets is None:
            from .assets.client import AsyncAssetsClient  # noqa: E402

            self._assets = AsyncAssetsClient(client_wrapper=self._client_wrapper)
        return self._assets
