# -*- coding: utf-8 -*-
# ----  AUTO-GENERATED BY redox_lib_gen. DO NOT MODIFY MANUALLY!!  ---- #

from typing import List, Union

from pydantic import Field

from ..abstract_base import EventTypeAbstractModel, RedoxAbstractModel
from ..field_types import Number


class LocationQueryResponse(EventTypeAbstractModel):

    Meta: "LocationQueryResponseMeta" = Field(...)
    Patients: List["LocationQueryResponsePatient"] = Field(...)


class LocationQueryResponseMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["LocationQueryResponseMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["LocationQueryResponseMetaLog"] = Field(None)
    Message: "LocationQueryResponseMetaMessage" = Field(None)
    Source: "LocationQueryResponseMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "LocationQueryResponseMetaTransmission" = Field(None)


class LocationQueryResponseMetaDestination(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class LocationQueryResponseMetaLog(RedoxAbstractModel):

    AttemptID: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)


class LocationQueryResponseMetaMessage(RedoxAbstractModel):

    ID: Union[Number, None] = Field(None)


class LocationQueryResponseMetaSource(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class LocationQueryResponseMetaTransmission(RedoxAbstractModel):

    ID: Union[Number, None] = Field(None)


class LocationQueryResponsePatient(RedoxAbstractModel):

    Identifiers: List["LocationQueryResponsePatientIdentifier"] = Field(...)
    Organization: "LocationQueryResponsePatientOrganization" = Field(None)


class LocationQueryResponsePatientIdentifier(RedoxAbstractModel):

    ID: str = Field(...)
    IDType: str = Field(...)


class LocationQueryResponsePatientOrganization(RedoxAbstractModel):

    Address: "LocationQueryResponsePatientOrganizationAddress" = Field(None)
    Aliases: List[str] = Field(None)
    Contacts: List["LocationQueryResponsePatientOrganizationContact"] = Field(None)
    Identifiers: List["LocationQueryResponsePatientOrganizationIdentifier"] = Field(
        None
    )
    Name: Union[str, None] = Field(None)


class LocationQueryResponsePatientOrganizationAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class LocationQueryResponsePatientOrganizationContact(RedoxAbstractModel):

    EmailAddresses: List[str] = Field(None)
    Name: Union[str, None] = Field(None)
    PhoneNumber: "LocationQueryResponsePatientOrganizationContactPhoneNumber" = Field(
        None
    )
    Purpose: Union[str, None] = Field(None)


class LocationQueryResponsePatientOrganizationContactPhoneNumber(RedoxAbstractModel):

    Home: Union[str, None] = Field(None)
    Mobile: Union[str, None] = Field(None)
    Work: Union[str, None] = Field(None)


class LocationQueryResponsePatientOrganizationIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)


LocationQueryResponse.update_forward_refs()
LocationQueryResponseMeta.update_forward_refs()
LocationQueryResponsePatient.update_forward_refs()
LocationQueryResponsePatientOrganization.update_forward_refs()
LocationQueryResponsePatientOrganizationContact.update_forward_refs()
