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

    Action: str = Field(...)
    Directory: str = Field(...)
    Meta: "UpdateMeta" = Field(...)
    Organizations: List["UpdateOrganization"] = Field(...)


class UpdateMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["UpdateMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["UpdateMetaLog"] = Field(None)
    Message: "UpdateMetaMessage" = Field(None)
    Source: "UpdateMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "UpdateMetaTransmission" = Field(None)


class UpdateMetaDestination(RedoxAbstractModel):

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


class UpdateMetaLog(RedoxAbstractModel):

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


class UpdateMetaMessage(RedoxAbstractModel):

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


class UpdateMetaSource(RedoxAbstractModel):

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


class UpdateMetaTransmission(RedoxAbstractModel):

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


class UpdateOrganization(RedoxAbstractModel):

    Active: bool = Field(...)
    Address: "UpdateOrganizationAddress" = Field(None)
    Aliases: List[str] = Field(None)
    Contacts: List["UpdateOrganizationContact"] = Field(None)
    DestinationID: Union[str, None] = Field(None)
    Endpoints: List["UpdateOrganizationEndpoint"] = Field(None)
    Identifiers: List["UpdateOrganizationIdentifier"] = Field(None)
    Name: str = Field(...)
    PartOf: "UpdateOrganizationPartOf" = Field(None)
    Type: "UpdateOrganizationType" = Field(None)


class UpdateOrganizationAddress(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 UpdateOrganizationContact(RedoxAbstractModel):

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


class UpdateOrganizationContactPhoneNumber(RedoxAbstractModel):

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


class UpdateOrganizationEndpoint(RedoxAbstractModel):

    Address: Union[str, None] = Field(None)
    Attributes: "UpdateOrganizationEndpointAttributes" = Field(None)
    ConnectionType: "UpdateOrganizationEndpointConnectionType" = Field(None)
    Identifiers: List["UpdateOrganizationEndpointIdentifier"] = Field(None)
    MIMEType: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class UpdateOrganizationEndpointAttributes(RedoxAbstractModel):

    Actor: "UpdateOrganizationEndpointAttributesActor" = Field(None)
    PurposeOfUse: List["UpdateOrganizationEndpointAttributesPurposeOfUse"] = Field(None)
    Roles: List["UpdateOrganizationEndpointAttributesRole"] = Field(None)
    Transaction: Union[str, None] = Field(None)
    UseCases: List["UpdateOrganizationEndpointAttributesUseCase"] = Field(None)
    Version: "UpdateOrganizationEndpointAttributesVersion" = Field(None)


class UpdateOrganizationEndpointAttributesActor(RedoxAbstractModel):

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


class UpdateOrganizationEndpointAttributesPurposeOfUse(RedoxAbstractModel):

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


class UpdateOrganizationEndpointAttributesRole(RedoxAbstractModel):

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


class UpdateOrganizationEndpointAttributesUseCase(RedoxAbstractModel):

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


class UpdateOrganizationEndpointAttributesVersion(RedoxAbstractModel):

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


class UpdateOrganizationEndpointConnectionType(RedoxAbstractModel):

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


class UpdateOrganizationEndpointIdentifier(RedoxAbstractModel):

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


class UpdateOrganizationIdentifier(RedoxAbstractModel):

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


class UpdateOrganizationPartOf(RedoxAbstractModel):

    Identifier: "UpdateOrganizationPartOfIdentifier" = Field(None)


class UpdateOrganizationPartOfIdentifier(RedoxAbstractModel):

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


class UpdateOrganizationType(RedoxAbstractModel):

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


Update.update_forward_refs()
UpdateMeta.update_forward_refs()
UpdateOrganization.update_forward_refs()
UpdateOrganizationContact.update_forward_refs()
UpdateOrganizationEndpoint.update_forward_refs()
UpdateOrganizationEndpointAttributes.update_forward_refs()
UpdateOrganizationPartOf.update_forward_refs()
