"""This file was generated by xsdata, v26.1, on 2026-02-18 00:40:52

Generator: DataclassGenerator
See: https://xsdata.readthedocs.io/
"""

from __future__ import annotations

from dataclasses import dataclass, field

from ccsds_ndm.models.ndmxml1.ndmxml_1_0_navwg_common import (
    AtmosphericReentryParametersType,
    ControlledType,
    DisintegrationType,
    DistanceType,
    GroundImpactParametersType,
    ImpactUncertaintyType,
    ObjectDescriptionType,
    OdParametersType,
    OpmCovarianceMatrixType,
    RdmSpacecraftParametersType,
    ReentryUncertaintyMethodType,
    StateVectorType,
    UserDefinedType,
    YesNoType,
)

__NAMESPACE__ = "urn:ccsds:recommendation:navigation:schema:ndmxml"


@dataclass(kw_only=True)
class RdmHeader:
    class Meta:
        name = "rdmHeader"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    creation_date: str = field(
        metadata={
            "name": "CREATION_DATE",
            "type": "Element",
            "namespace": "",
            "required": True,
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        }
    )
    originator: str = field(
        metadata={
            "name": "ORIGINATOR",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    message_id: str = field(
        metadata={
            "name": "MESSAGE_ID",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )


@dataclass(kw_only=True)
class RdmData:
    class Meta:
        name = "rdmData"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    atmospheric_reentry_parameters: AtmosphericReentryParametersType = field(
        metadata={
            "name": "atmosphericReentryParameters",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    ground_impact_parameters: None | GroundImpactParametersType = field(
        default=None,
        metadata={
            "name": "groundImpactParameters",
            "type": "Element",
            "namespace": "",
        },
    )
    state_vector: None | StateVectorType = field(
        default=None,
        metadata={
            "name": "stateVector",
            "type": "Element",
            "namespace": "",
        },
    )
    covariance_matrix: None | OpmCovarianceMatrixType = field(
        default=None,
        metadata={
            "name": "covarianceMatrix",
            "type": "Element",
            "namespace": "",
        },
    )
    spacecraft_parameters: None | RdmSpacecraftParametersType = field(
        default=None,
        metadata={
            "name": "spacecraftParameters",
            "type": "Element",
            "namespace": "",
        },
    )
    od_parameters: None | OdParametersType = field(
        default=None,
        metadata={
            "name": "odParameters",
            "type": "Element",
            "namespace": "",
        },
    )
    user_defined_parameters: None | UserDefinedType = field(
        default=None,
        metadata={
            "name": "userDefinedParameters",
            "type": "Element",
            "namespace": "",
        },
    )


@dataclass(kw_only=True)
class RdmMetadata:
    class Meta:
        name = "rdmMetadata"

    comment: list[str] = field(
        default_factory=list,
        metadata={
            "name": "COMMENT",
            "type": "Element",
            "namespace": "",
        },
    )
    object_name: str = field(
        metadata={
            "name": "OBJECT_NAME",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    international_designator: str = field(
        metadata={
            "name": "INTERNATIONAL_DESIGNATOR",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    catalog_name: None | str = field(
        default=None,
        metadata={
            "name": "CATALOG_NAME",
            "type": "Element",
            "namespace": "",
        },
    )
    object_designator: None | str = field(
        default=None,
        metadata={
            "name": "OBJECT_DESIGNATOR",
            "type": "Element",
            "namespace": "",
        },
    )
    object_type: None | ObjectDescriptionType = field(
        default=None,
        metadata={
            "name": "OBJECT_TYPE",
            "type": "Element",
            "namespace": "",
        },
    )
    object_owner: None | str = field(
        default=None,
        metadata={
            "name": "OBJECT_OWNER",
            "type": "Element",
            "namespace": "",
        },
    )
    object_operator: None | str = field(
        default=None,
        metadata={
            "name": "OBJECT_OPERATOR",
            "type": "Element",
            "namespace": "",
        },
    )
    controlled_reentry: ControlledType = field(
        metadata={
            "name": "CONTROLLED_REENTRY",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    center_name: str = field(
        metadata={
            "name": "CENTER_NAME",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    time_system: str = field(
        metadata={
            "name": "TIME_SYSTEM",
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    epoch_tzero: str = field(
        metadata={
            "name": "EPOCH_TZERO",
            "type": "Element",
            "namespace": "",
            "required": True,
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        }
    )
    ref_frame: None | str = field(
        default=None,
        metadata={
            "name": "REF_FRAME",
            "type": "Element",
            "namespace": "",
        },
    )
    ref_frame_epoch: None | str = field(
        default=None,
        metadata={
            "name": "REF_FRAME_EPOCH",
            "type": "Element",
            "namespace": "",
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        },
    )
    ephemeris_name: None | str = field(
        default=None,
        metadata={
            "name": "EPHEMERIS_NAME",
            "type": "Element",
            "namespace": "",
        },
    )
    gravity_model: None | str = field(
        default=None,
        metadata={
            "name": "GRAVITY_MODEL",
            "type": "Element",
            "namespace": "",
        },
    )
    atmospheric_model: None | str = field(
        default=None,
        metadata={
            "name": "ATMOSPHERIC_MODEL",
            "type": "Element",
            "namespace": "",
        },
    )
    solar_flux_prediction: None | str = field(
        default=None,
        metadata={
            "name": "SOLAR_FLUX_PREDICTION",
            "type": "Element",
            "namespace": "",
        },
    )
    n_body_perturbations: None | str = field(
        default=None,
        metadata={
            "name": "N_BODY_PERTURBATIONS",
            "type": "Element",
            "namespace": "",
        },
    )
    solar_rad_pressure: None | str = field(
        default=None,
        metadata={
            "name": "SOLAR_RAD_PRESSURE",
            "type": "Element",
            "namespace": "",
        },
    )
    earth_tides: None | str = field(
        default=None,
        metadata={
            "name": "EARTH_TIDES",
            "type": "Element",
            "namespace": "",
        },
    )
    intrack_thrust: None | YesNoType = field(
        default=None,
        metadata={
            "name": "INTRACK_THRUST",
            "type": "Element",
            "namespace": "",
        },
    )
    drag_parameters_source: None | str = field(
        default=None,
        metadata={
            "name": "DRAG_PARAMETERS_SOURCE",
            "type": "Element",
            "namespace": "",
        },
    )
    drag_parameters_altitude: None | DistanceType = field(
        default=None,
        metadata={
            "name": "DRAG_PARAMETERS_ALTITUDE",
            "type": "Element",
            "namespace": "",
        },
    )
    reentry_uncertainty_method: None | ReentryUncertaintyMethodType = field(
        default=None,
        metadata={
            "name": "REENTRY_UNCERTAINTY_METHOD",
            "type": "Element",
            "namespace": "",
        },
    )
    reentry_disintegration: None | DisintegrationType = field(
        default=None,
        metadata={
            "name": "REENTRY_DISINTEGRATION",
            "type": "Element",
            "namespace": "",
        },
    )
    impact_uncertainty_method: None | ImpactUncertaintyType = field(
        default=None,
        metadata={
            "name": "IMPACT_UNCERTAINTY_METHOD",
            "type": "Element",
            "namespace": "",
        },
    )
    previous_message_id: None | str = field(
        default=None,
        metadata={
            "name": "PREVIOUS_MESSAGE_ID",
            "type": "Element",
            "namespace": "",
        },
    )
    previous_message_epoch: None | str = field(
        default=None,
        metadata={
            "name": "PREVIOUS_MESSAGE_EPOCH",
            "type": "Element",
            "namespace": "",
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        },
    )
    next_message_epoch: None | str = field(
        default=None,
        metadata={
            "name": "NEXT_MESSAGE_EPOCH",
            "type": "Element",
            "namespace": "",
            "pattern": r"\-?\d{4}\d*-((\d{2}\-\d{2})|\d{3})T\d{2}:\d{2}:\d{2}(\.\d*)?(Z|[+|\-]\d{2}:\d{2})?|[+|\-]?\d*(\.\d*)?",
        },
    )


@dataclass(kw_only=True)
class RdmSegment:
    class Meta:
        name = "rdmSegment"

    metadata: RdmMetadata = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    data: RdmData = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )


@dataclass(kw_only=True)
class RdmBody:
    class Meta:
        name = "rdmBody"

    segment: RdmSegment = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )


@dataclass(kw_only=True)
class RdmType:
    class Meta:
        name = "rdmType"

    header: RdmHeader = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    body: RdmBody = field(
        metadata={
            "type": "Element",
            "namespace": "",
            "required": True,
        }
    )
    id: str = field(
        init=False,
        default="CCSDS_RDM_VERS",
        metadata={
            "type": "Attribute",
            "required": True,
        },
    )
    version: str = field(
        init=False,
        default="1.0",
        metadata={
            "type": "Attribute",
            "required": True,
        },
    )
