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

import typing_extensions
import typing_extensions
import typing
from ..types.product_type import ProductType
from ..types.device_code_status import DeviceCodeStatus


class DeviceCodeParams(typing_extensions.TypedDict):
    id: typing_extensions.NotRequired[str]
    """
    The unique id for this device code.
    """

    name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    An optional user-defined name for the device code.
    """

    code: typing_extensions.NotRequired[str]
    """
    The unique code that can be used to login.
    """

    device_id: typing_extensions.NotRequired[str]
    """
    The unique id of the device that used this code. Populated when the device is paired up.
    """

    product_type: ProductType
    """
    The targeting product type of the device code.
    """

    location_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The location assigned to this code.
    """

    status: typing_extensions.NotRequired[DeviceCodeStatus]
    """
    The pairing status of the device code.
    See [DeviceCodeStatus](#type-devicecodestatus) for possible values
    """

    pair_by: typing_extensions.NotRequired[str]
    """
    When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.
    """

    created_at: typing_extensions.NotRequired[str]
    """
    When this DeviceCode was created. Timestamp in RFC 3339 format.
    """

    status_changed_at: typing_extensions.NotRequired[str]
    """
    When this DeviceCode's status was last changed. Timestamp in RFC 3339 format.
    """

    paired_at: typing_extensions.NotRequired[str]
    """
    When this DeviceCode was paired. Timestamp in RFC 3339 format.
    """
