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

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from .customer_status import CustomerStatus


class CustomerPatchRequest(UniversalBaseModel):
    app_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="appId")] = pydantic.Field(
        default=None
    )
    """
    The App ID of the customer to update. If not provided, the ID of the calling app will be used.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the customer.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    The description of the customer.
    """

    status: typing.Optional[CustomerStatus] = pydantic.Field(default=None)
    """
    Whether or not the customer is in active use.
    
    Only active customers will be available for agent interactions.
    """

    metadata: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Metadata associated with the customer. If not provided, the existing metadata will be preserved.
    """

    assignees: typing.Optional[typing.Set[str]] = pydantic.Field(default=None)
    """
    Set of agent user IDs to assign to this customer. If provided, replaces all existing assignees.
    """

    members: typing.Optional[typing.Set[str]] = pydantic.Field(default=None)
    """
    Set of agent user IDs who are members of this customer. If provided, replaces all existing members.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
