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

    Directory: str = Field(...)
    Identifier: "QueryIdentifier" = Field(None)
    Index: Union[str, None] = Field(None)
    LastUpdated: Union[str, None] = Field(None)
    Limit: Union[str, None] = Field(None)
    Meta: "QueryMeta" = Field(...)
    NameSearch: "QueryNameSearch" = Field(None)
    RadiusSearch: "QueryRadiusSearch" = Field(None)
    State: Union[str, None] = Field(None)


class QueryIdentifier(RedoxAbstractModel):

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


class QueryMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["QueryMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["QueryMetaLog"] = Field(None)
    Message: "QueryMetaMessage" = Field(None)
    Source: "QueryMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "QueryMetaTransmission" = Field(None)


class QueryMetaDestination(RedoxAbstractModel):

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


class QueryMetaLog(RedoxAbstractModel):

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


class QueryMetaMessage(RedoxAbstractModel):

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


class QueryMetaSource(RedoxAbstractModel):

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


class QueryMetaTransmission(RedoxAbstractModel):

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


class QueryNameSearch(RedoxAbstractModel):

    SearchType: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)


class QueryRadiusSearch(RedoxAbstractModel):

    Radius: Union[str, None] = Field(None)
    ZipCode: Union[str, None] = Field(None)


Query.update_forward_refs()
QueryMeta.update_forward_refs()
