from __future__ import annotations

from pydantic import BaseModel, ConfigDict
from xsdata_pydantic.fields import field

__NAMESPACE__ = 'urn:hl7-org:v3'


class Text(BaseModel):
    class Meta:
        name = 'text'
        namespace = 'urn:hl7-org:v3'

    model_config = ConfigDict(defer_build=True)
    representation: str = field(  # type: ignore
        metadata={
            'type': 'Attribute',
        }
    )
    media_type: str = field(  # type: ignore
        metadata={
            'name': 'mediaType',
            'type': 'Attribute',
        }
    )
    value: str = field(default='')  # type: ignore


class NonXmlbody(BaseModel):
    class Meta:
        name = 'nonXMLBody'
        namespace = 'urn:hl7-org:v3'

    model_config = ConfigDict(defer_build=True)
    class_code: str = field(  # type: ignore
        metadata={
            'name': 'classCode',
            'type': 'Attribute',
        }
    )
    mood_code: str = field(  # type: ignore
        metadata={
            'name': 'moodCode',
            'type': 'Attribute',
        }
    )
    text: Text = field(  # type: ignore
        metadata={
            'type': 'Element',
        }
    )


class Component(BaseModel):
    class Meta:
        name = 'component'
        namespace = 'urn:hl7-org:v3'

    model_config = ConfigDict(defer_build=True)
    non_xmlbody: NonXmlbody = field(  # type: ignore
        metadata={
            'name': 'nonXMLBody',
            'type': 'Element',
        }
    )


class ClinicalDocument(BaseModel):
    class Meta:
        namespace = 'urn:hl7-org:v3'

    model_config = ConfigDict(defer_build=True)
    schema_location: str = field(  # type: ignore
        metadata={
            'name': 'schemaLocation',
            'type': 'Attribute',
            'namespace': 'http://www.w3.org/2001/XMLSchema-instance',
        }
    )
    mood_code: str = field(  # type: ignore
        metadata={
            'name': 'moodCode',
            'type': 'Attribute',
        }
    )
    component: Component = field(  # type: ignore
        metadata={
            'type': 'Element',
        }
    )
