# -*- 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 LocationQuery(EventTypeAbstractModel):

    Meta: "LocationQueryMeta" = Field(...)
    Patient: "LocationQueryPatient" = Field(...)


class LocationQueryMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["LocationQueryMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["LocationQueryMetaLog"] = Field(None)
    Message: "LocationQueryMetaMessage" = Field(None)
    Source: "LocationQueryMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "LocationQueryMetaTransmission" = Field(None)


class LocationQueryMetaDestination(RedoxAbstractModel):

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


class LocationQueryMetaLog(RedoxAbstractModel):

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


class LocationQueryMetaMessage(RedoxAbstractModel):

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


class LocationQueryMetaSource(RedoxAbstractModel):

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


class LocationQueryMetaTransmission(RedoxAbstractModel):

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


class LocationQueryPatient(RedoxAbstractModel):

    Identifiers: List["LocationQueryPatientIdentifier"] = Field(...)


class LocationQueryPatientIdentifier(RedoxAbstractModel):

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


LocationQuery.update_forward_refs()
LocationQueryMeta.update_forward_refs()
LocationQueryPatient.update_forward_refs()
