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

    Advisories: List["ResponseAdvisory"] = Field(...)
    Meta: "ResponseMeta" = Field(...)


class ResponseAdvisory(RedoxAbstractModel):

    AdditionalInfo: List["ResponseAdvisoryAdditionalInfo"] = Field(None)
    AdditionalUnsignedOrders: List["ResponseAdvisoryAdditionalUnsignedOrder"] = Field(
        None
    )
    Description: Union[str, None] = Field(None)
    Errors: List["ResponseAdvisoryError"] = Field(None)
    Notes: List["ResponseAdvisoryNote"] = Field(None)
    RemovableUnsignedOrders: List["ResponseAdvisoryRemovableUnsignedOrder"] = Field(
        None
    )
    Session: str = Field(...)
    ShowAlert: Union[bool, None] = Field(None)


class ResponseAdvisoryAdditionalInfo(RedoxAbstractModel):

    DecisionSupport: "ResponseAdvisoryAdditionalInfoDecisionSupport" = Field(None)
    Link: Union[str, None] = Field(None)


class ResponseAdvisoryAdditionalInfoDecisionSupport(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)


class ResponseAdvisoryAdditionalUnsignedOrder(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Questions: List["ResponseAdvisoryAdditionalUnsignedOrderQuestion"] = Field(None)
    Title: Union[str, None] = Field(None)


class ResponseAdvisoryAdditionalUnsignedOrderQuestion(RedoxAbstractModel):

    Answers: List["ResponseAdvisoryAdditionalUnsignedOrderQuestionAnswer"] = Field(None)
    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)


class ResponseAdvisoryAdditionalUnsignedOrderQuestionAnswer(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Comment: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)


class ResponseAdvisoryError(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)


class ResponseAdvisoryNote(RedoxAbstractModel):

    Display: Union[str, None] = Field(None)
    Text: Union[str, None] = Field(None)


class ResponseAdvisoryRemovableUnsignedOrder(RedoxAbstractModel):

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


class ResponseMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["ResponseMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["ResponseMetaLog"] = Field(None)
    Message: "ResponseMetaMessage" = Field(None)
    Source: "ResponseMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "ResponseMetaTransmission" = Field(None)


class ResponseMetaDestination(RedoxAbstractModel):

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


class ResponseMetaLog(RedoxAbstractModel):

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


class ResponseMetaMessage(RedoxAbstractModel):

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


class ResponseMetaSource(RedoxAbstractModel):

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


class ResponseMetaTransmission(RedoxAbstractModel):

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


Response.update_forward_refs()
ResponseAdvisory.update_forward_refs()
ResponseAdvisoryAdditionalInfo.update_forward_refs()
ResponseAdvisoryAdditionalUnsignedOrder.update_forward_refs()
ResponseAdvisoryAdditionalUnsignedOrderQuestion.update_forward_refs()
ResponseMeta.update_forward_refs()
