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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .vendor import Vendor
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class UpdateVendorRequest(UncheckedBaseModel):
    """
    Represents an input to a call to [UpdateVendor](api-endpoint:Vendors-UpdateVendor).
    """

    idempotency_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    A client-supplied, universally unique identifier (UUID) for the
    request.
    
    See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
    [API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
    information.
    """

    vendor: Vendor = pydantic.Field()
    """
    The specified [Vendor](entity:Vendor) to be updated.
    """

    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
