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

import datetime as dt
import typing

import pydantic

from ......core.datetime_utils import serialize_datetime
from .....commons.types.street_address_long_zip import StreetAddressLongZip
from .service_facility_mode import ServiceFacilityMode
from .service_facility_operational_status import ServiceFacilityOperationalStatus
from .service_facility_physical_type import ServiceFacilityPhysicalType
from .service_facility_status import ServiceFacilityStatus
from .service_facility_type import ServiceFacilityType


class OrganizationServiceFacilityCreate(pydantic.BaseModel):
    name: str = pydantic.Field(description="The name of the service facility.")
    aliases: typing.List[str] = pydantic.Field(description="A list of alternate names for the service facility.")
    description: typing.Optional[str] = pydantic.Field(description="A description of the service facility.")
    status: typing.Optional[ServiceFacilityStatus] = pydantic.Field(description="The status of the service facility.")
    operational_status: typing.Optional[ServiceFacilityOperationalStatus] = pydantic.Field(
        description="The operational status of the service facility."
    )
    mode: typing.Optional[ServiceFacilityMode] = pydantic.Field(description="The mode of the service facility.")
    type: typing.Optional[ServiceFacilityType] = pydantic.Field(description="The type of the service facility.")
    physical_type: typing.Optional[ServiceFacilityPhysicalType] = pydantic.Field(
        description="The physical type of the service facility."
    )
    telecoms: typing.List[str] = pydantic.Field(description="A list of contact methods for the service facility.")
    address: StreetAddressLongZip = pydantic.Field(description="The address of the service facility.")

    def json(self, **kwargs: typing.Any) -> str:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().json(**kwargs_with_defaults)

    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().dict(**kwargs_with_defaults)

    class Config:
        frozen = True
        smart_union = True
        json_encoders = {dt.datetime: serialize_datetime}
