# generated by datamodel-codegen:
#   filename:  liquid-chromatography.json
#   timestamp: 2024-05-01T21:49:52+00:00

from __future__ import annotations

from dataclasses import dataclass
from typing import Any, Optional, Union

from allotropy.allotrope.models.shared.definitions.custom import (
    TQuantityValueCentimeter,
    TQuantityValueCounts,
    TQuantityValueCountsTimesSecond,
    TQuantityValueCubicMillimeter,
    TQuantityValueHertz,
    TQuantityValueMicrometer,
    TQuantityValueMilliAbsorbanceUnit,
    TQuantityValueMilliAbsorbanceUnitTimesMilliliter,
    TQuantityValueMilliAbsorbanceUnitTimesSecond,
    TQuantityValueMilliliter,
    TQuantityValueMillimeter,
    TQuantityValueMillivolt,
    TQuantityValueMillivoltTimesSecond,
    TQuantityValueNanoCoulomb,
    TQuantityValueNanoCoulombTimesSecond,
    TQuantityValueNanometer,
    TQuantityValuePercent,
    TQuantityValuePicoAmpere,
    TQuantityValuePicoAmpereTimesSecond,
    TQuantityValueSecondTime,
    TQuantityValueUnitless,
)
from allotropy.allotrope.models.shared.definitions.definitions import (
    TClass,
    TDatacube,
    TDateTimeStampValue,
    TDateTimeValue,
    TQuantityValue,
    TStringValue,
)


@dataclass
class DiagnosticTraceDocumentItem:
    description: Any


@dataclass
class DiagnosticTraceAggregateDocument:
    diagnostic_trace_document: Optional[list[DiagnosticTraceDocumentItem]] = None


@dataclass
class AdmCoreREC202309ManifestSchema:
    vocabulary: list[str]
    json_schemas: list[str]
    field_id: Optional[str] = None
    field_type: Optional[str] = None
    shapes: Optional[list[str]] = None


@dataclass
class OrderedItem:
    field_index: Optional[int] = None


@dataclass
class DataSourceDocumentItem:
    data_source_identifier: TStringValue
    data_source_feature: TStringValue
    field_index: Optional[int] = None


@dataclass
class DataSourceAggregateDocument:
    data_source_document: list[DataSourceDocumentItem]


@dataclass
class ProcessedDataDocumentItem12(OrderedItem):
    data_processing_document: Optional[dict[str, Any]] = None
    data_source_aggregate_document: Optional[DataSourceAggregateDocument] = None
    processed_data_identifier: Optional[TStringValue] = None


@dataclass
class ProcessedDataAggregateDocument:
    processed_data_document: list[ProcessedDataDocumentItem12]


@dataclass
class StatisticsDocumentItem:
    statistical_feature: TClass


@dataclass
class StatisticsAggregateDocument:
    statistics_document: Optional[list[StatisticsDocumentItem]] = None


@dataclass
class DeviceDocumentItem:
    device_type: TStringValue
    device_identifier: Optional[TStringValue] = None
    model_number: Optional[TStringValue] = None
    product_manufacturer: Optional[TStringValue] = None
    brand_name: Optional[TStringValue] = None
    equipment_serial_number: Optional[TStringValue] = None
    firmware_version: Optional[TStringValue] = None
    field_index: Optional[int] = None


@dataclass
class DeviceSystemDocument:
    asset_management_identifier: TStringValue
    description: Optional[Any] = None
    brand_name: Optional[TStringValue] = None
    product_manufacturer: Optional[TStringValue] = None
    device_identifier: Optional[TStringValue] = None
    model_number: Optional[TStringValue] = None
    equipment_serial_number: Optional[TStringValue] = None
    firmware_version: Optional[TStringValue] = None
    device_document: Optional[list[DeviceDocumentItem]] = None
    pump_model_number: Optional[TStringValue] = None
    detector_model_number: Optional[TStringValue] = None


@dataclass
class DeviceControlDocumentItem:
    device_type: TStringValue
    device_identifier: Optional[TStringValue] = None
    detection_type: Optional[TStringValue] = None
    product_manufacturer: Optional[TStringValue] = None
    brand_name: Optional[TStringValue] = None
    equipment_serial_number: Optional[TStringValue] = None
    model_number: Optional[TStringValue] = None
    firmware_version: Optional[TStringValue] = None
    field_index: Optional[int] = None
    detector_offset_setting: Optional[TQuantityValue] = None
    detector_sampling_rate_setting: Optional[TQuantityValueHertz] = None
    detector_wavelength_setting: Optional[TQuantityValueNanometer] = None
    detector_bandwidth_setting: Optional[TQuantityValueNanometer] = None
    electronic_absorbance_wavelength_setting: Optional[TQuantityValueNanometer] = None
    electronic_absorbance_bandwidth_setting: Optional[TQuantityValueNanometer] = None
    electronic_absorbance_reference_bandwidth_setting: Optional[
        TQuantityValueNanometer
    ] = None
    electronic_absorbance_reference_wavelength_setting: Optional[
        TQuantityValueNanometer
    ] = None


@dataclass
class DeviceControlAggregateDocument:
    device_control_document: list[DeviceControlDocumentItem]


@dataclass
class SampleDocument:
    sample_identifier: TStringValue
    description: Optional[Any] = None
    batch_identifier: Optional[TStringValue] = None
    sample_role_type: Optional[TClass] = None
    written_name: Optional[TStringValue] = None


@dataclass
class PeakItem:
    peak_end: Optional[Union[TQuantityValueMilliliter, TQuantityValueSecondTime]] = None
    identifier: Optional[TStringValue] = None
    relative_peak_height: Optional[TQuantityValuePercent] = None
    written_name: Optional[TStringValue] = None
    peak_height: Optional[
        Union[
            TQuantityValueCounts,
            TQuantityValueMillivolt,
            TQuantityValueNanoCoulomb,
            TQuantityValuePicoAmpere,
        ]
    ] = None
    capacity_factor__chromatography_: Optional[TQuantityValueUnitless] = None
    peak_area: Optional[
        Union[
            TQuantityValueCountsTimesSecond,
            TQuantityValueMillivoltTimesSecond,
            TQuantityValueNanoCoulombTimesSecond,
            TQuantityValuePicoAmpereTimesSecond,
        ]
    ] = None
    relative_peak_area: Optional[TQuantityValuePercent] = None
    retention_time: Optional[TQuantityValueSecondTime] = None
    retention_volume: Optional[TQuantityValueMilliliter] = None
    peak_start: Optional[
        Union[TQuantityValueMilliliter, TQuantityValueSecondTime]
    ] = None
    peak_selectivity__chromatography_: Optional[TQuantityValueUnitless] = None
    chromatographic_peak_resolution: Optional[TQuantityValueUnitless] = None
    chromatographic_peak_resolution_using_baseline_peak_widths: Optional[
        TQuantityValueUnitless
    ] = None
    chromatographic_peak_resolution_using_peak_width_at_half_height: Optional[
        TQuantityValueUnitless
    ] = None
    chromatographic_peak_resolution_using_statistical_moments: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates__chromatography_: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_measured_at_60_7___of_peak_height: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_measured_at_32_4___of_peak_height: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_measured_at_13_4___of_peak_height: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_measured_at_4_4___of_peak_height: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_by_tangent_method: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_by_peak_width_at_half_height: Optional[
        TQuantityValueUnitless
    ] = None
    number_of_theoretical_plates_by_peak_width_at_half_height__JP14_: Optional[
        TQuantityValueUnitless
    ] = None
    peak_width_at_4_4___of_height: Optional[TQuantityValueSecondTime] = None
    peak_width_at_13_4___of_height: Optional[TQuantityValueSecondTime] = None
    peak_width_at_32_4___of_height: Optional[TQuantityValueSecondTime] = None
    peak_width_at_60_7___of_height: Optional[TQuantityValueSecondTime] = None
    peak_width_at_half_height: Optional[TQuantityValueSecondTime] = None
    peak_width_at_5___of_height: Optional[TQuantityValueSecondTime] = None
    peak_width_at_baseline: Optional[TQuantityValueSecondTime] = None
    peak_width_at_inflection: Optional[TQuantityValueSecondTime] = None
    peak_width_at_10___of_height: Optional[TQuantityValueSecondTime] = None
    peak_width: Optional[TQuantityValueSecondTime] = None
    statistical_skew__chromatography_: Optional[TQuantityValueUnitless] = None
    asymmetry_factor_measured_at_5___height: Optional[TQuantityValueUnitless] = None
    asymmetry_factor_measured_at_10___height: Optional[TQuantityValueUnitless] = None
    asymmetry_factor_squared_measured_at_10___height: Optional[
        TQuantityValueUnitless
    ] = None
    asymmetry_factor_squared_measured_at_4_4___height: Optional[
        TQuantityValueUnitless
    ] = None
    asymmetry_factor_measured_at_4_4___height: Optional[TQuantityValueUnitless] = None
    asymmetry_factor_measured_at_baseline: Optional[TQuantityValueUnitless] = None
    chromatographic_peak_asymmetry_factor: Optional[TQuantityValueUnitless] = None
    field_index: Optional[int] = None


@dataclass
class PeakList:
    peak: Optional[list[PeakItem]] = None


@dataclass
class ProcessedDataDocumentItem:
    data_processing_document: Optional[dict[str, Any]] = None
    data_source_aggregate_document: Optional[DataSourceAggregateDocument] = None
    processed_data_identifier: Optional[TStringValue] = None
    field_index: Optional[int] = None
    peak_list: Optional[PeakList] = None


@dataclass
class ProcessedDataAggregateDocument1:
    processed_data_document: list[ProcessedDataDocumentItem]


@dataclass
class ChromatographyColumnDocument:
    chromatography_column_part_number: Optional[TStringValue] = None
    chromatography_column_serial_number: Optional[TStringValue] = None
    chromatography_column_length: Optional[TQuantityValueCentimeter] = None
    column_inner_diameter: Optional[TQuantityValueMillimeter] = None
    chromatography_column_chemistry_type: Optional[TStringValue] = None
    chromatography_column_particle_size: Optional[TQuantityValueMicrometer] = None
    product_manufacturer: Optional[TStringValue] = None


@dataclass
class InjectionDocument:
    autosampler_injection_volume_setting__chromatography_: TQuantityValueCubicMillimeter
    injection_identifier: TStringValue
    injection_time: TDateTimeValue


@dataclass
class PeakItem1(OrderedItem):
    peak_height: Optional[TQuantityValue] = None
    peak_area: Optional[TQuantityValue] = None


@dataclass
class PeakList1:
    peak: Optional[list[PeakItem1]] = None


@dataclass
class ProcessedDataDocument:
    peak_list: Optional[PeakList1] = None


@dataclass
class PeakItem11(OrderedItem):
    peak_height: Optional[TQuantityValueMilliAbsorbanceUnit] = None
    peak_area: Optional[
        Union[
            TQuantityValueMilliAbsorbanceUnitTimesMilliliter,
            TQuantityValueMilliAbsorbanceUnitTimesSecond,
        ]
    ] = None


@dataclass
class PeakList11:
    peak: Optional[list[PeakItem11]] = None


@dataclass
class ProcessedDataDocument11:
    peak_list: Optional[PeakList11] = None


@dataclass
class CalculatedDataDocumentItem:
    calculated_data_name: TStringValue
    calculated_result: TQuantityValue
    data_source_aggregate_document: Optional[DataSourceAggregateDocument] = None
    calculated_data_identifier: Optional[TStringValue] = None
    calculation_description: Optional[TStringValue] = None
    field_index: Optional[int] = None


@dataclass
class CalculatedDataAggregateDocument:
    calculated_data_document: list[CalculatedDataDocumentItem]


@dataclass
class MeasurementDocument:
    device_control_aggregate_document: DeviceControlAggregateDocument
    sample_document: SampleDocument
    chromatography_column_document: ChromatographyColumnDocument
    measurement_time: Optional[TDateTimeStampValue] = None
    measurement_identifier: Optional[TStringValue] = None
    detection_type: Optional[TStringValue] = None
    processed_data_aggregate_document: Optional[ProcessedDataAggregateDocument1] = None
    calculated_data_aggregate_document: Optional[CalculatedDataAggregateDocument] = None
    statistics_aggregate_document: Optional[StatisticsAggregateDocument] = None
    injection_document: Optional[InjectionDocument] = None
    chromatogram_data_cube: Optional[TDatacube] = None
    three_dimensional_ultraviolet_spectrum_data_cube: Optional[TDatacube] = None
    processed_data_document: Optional[
        Union[ProcessedDataDocument, ProcessedDataDocument11]
    ] = None
    mass_chromatogram_data_cube: Optional[TDatacube] = None


@dataclass
class MeasurementAggregateDocument:
    measurement_document: list[MeasurementDocument]
    diagnostic_trace_aggregate_document: Optional[
        DiagnosticTraceAggregateDocument
    ] = None
    processed_data_aggregate_document: Optional[ProcessedDataAggregateDocument] = None
    calculated_data_aggregate_document: Optional[CalculatedDataAggregateDocument] = None
    statistics_aggregate_document: Optional[StatisticsAggregateDocument] = None


@dataclass
class LiquidChromatographyDocumentItem:
    measurement_aggregate_document: MeasurementAggregateDocument
    analyst: Optional[TStringValue] = None
    submitter: Optional[TStringValue] = None


@dataclass
class LiquidChromatographyAggregateDocument:
    liquid_chromatography_document: list[LiquidChromatographyDocumentItem]
    device_system_document: Optional[DeviceSystemDocument] = None
    processed_data_aggregate_document: Optional[ProcessedDataAggregateDocument] = None
    calculated_data_aggregate_document: Optional[CalculatedDataAggregateDocument] = None
    statistics_aggregate_document: Optional[StatisticsAggregateDocument] = None


@dataclass
class Model:
    field_asm_manifest: Union[AdmCoreREC202309ManifestSchema, str]
    liquid_chromatography_aggregate_document: Optional[
        LiquidChromatographyAggregateDocument
    ] = None
