from __future__ import annotations 

import re
import sys
from datetime import (
    date,
    datetime,
    time
)
from decimal import Decimal 
from enum import Enum 
from typing import (
    Any,
    ClassVar,
    Dict,
    List,
    Literal,
    Optional,
    Union
)

from pydantic import (
    BaseModel,
    ConfigDict,
    Field,
    RootModel,
    field_validator
)


metamodel_version = "None"
version = "None"


class ConfiguredBaseModel(BaseModel):
    model_config = ConfigDict(
        validate_assignment = True,
        validate_default = True,
        extra = "forbid",
        arbitrary_types_allowed = True,
        use_enum_values = True,
        strict = False,
    )
    pass




class LinkMLMeta(RootModel):
    root: Dict[str, Any] = {}
    model_config = ConfigDict(frozen=True)

    def __getattr__(self, key:str):
        return getattr(self.root, key)

    def __getitem__(self, key:str):
        return self.root[key]

    def __setitem__(self, key:str, value):
        self.root[key] = value

    def __contains__(self, key:str) -> bool:
        return key in self.root


linkml_meta = LinkMLMeta({'default_prefix': 'lara',
     'default_range': 'string',
     'id': 'https://w3id.org/lara/lara_django_samples',
     'imports': ['linkml:types'],
     'name': 'lara_django_samples',
     'prefixes': {'lara': {'prefix_prefix': 'lara',
                           'prefix_reference': 'http://w3id.org/lara/'},
                  'linkml': {'prefix_prefix': 'linkml',
                             'prefix_reference': 'https://w3id.org/linkml/'},
                  'oso': {'prefix_prefix': 'oso',
                          'prefix_reference': 'http://w3id.org/oso/'}},
     'source_file': 'lara_django_samples_schema.yaml',
     'types': {'FileField': {'base': 'str',
                             'description': 'A file field',
                             'from_schema': 'https://w3id.org/lara/lara_django_samples',
                             'name': 'FileField',
                             'uri': 'https://w3id.org/lara/FileField'},
               'ImageField': {'base': 'str',
                              'description': 'An image field',
                              'from_schema': 'https://w3id.org/lara/lara_django_samples',
                              'name': 'ImageField',
                              'uri': 'https://w3id.org/lara/ImageField'},
               'JSON': {'base': 'string',
                        'description': 'A JSON object',
                        'from_schema': 'https://w3id.org/lara/lara_django_samples',
                        'name': 'JSON',
                        'repr': 'dict',
                        'uri': 'https://json.org'},
               'UUID': {'base': 'str',
                        'description': 'A UUID',
                        'from_schema': 'https://w3id.org/lara/lara_django_samples',
                        'name': 'UUID',
                        'pattern': '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$',
                        'uri': 'https://datatracker.ietf.org/doc/html/rfc9562'}}} )


class LabwareInstance(ConfiguredBaseModel):
    """
    <class 'lara_django_material_store.models.labware_models.LabwareInstance'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class DataType(ConfiguredBaseModel):
    """
    <class 'lara_django_base.models.DataType'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class Entity(ConfiguredBaseModel):
    """
    <class 'lara_django_people.models.Entity'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class Tag(ConfiguredBaseModel):
    """
    <class 'lara_django_base.models.Tag'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class MixtureInstance(ConfiguredBaseModel):
    """
    <class 'lara_django_substances_store.models.MixtureInstance'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class Location(ConfiguredBaseModel):
    """
    <class 'lara_django_base.models.Location'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class PhysicalUnit(ConfiguredBaseModel):
    """
    <class 'lara_django_base.models.PhysicalUnit'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class MediaType(ConfiguredBaseModel):
    """
    <class 'lara_django_base.models.MediaType'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class Namespace(ConfiguredBaseModel):
    """
    <class 'lara_django_base.models.Namespace'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class PolymerInstance(ConfiguredBaseModel):
    """
    <class 'lara_django_substances_store.models.PolymerInstance'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class SubstanceInstance(ConfiguredBaseModel):
    """
    <class 'lara_django_substances_store.models.SubstanceInstance'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class Group(ConfiguredBaseModel):
    """
    <class 'lara_django_people.models.Group'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class OrganismInstance(ConfiguredBaseModel):
    """
    <class 'lara_django_organisms_store.models.OrganismInstance'>
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    pass


class ExtraData(ConfiguredBaseModel):
    """
    \" This class can be used to extend data, by extra information,
        e.g. more telephone numbers, customer numbers, ...
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/ExtraData',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    extradata_id: Optional[str] = Field(None, description="""ExtraData - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'extradata_id',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:samples/ExtraData/extradata_id'} })
    data_type: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'data_type',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:base/DataType'} })
    namespace: str = Field(..., description="""namespace of data""", json_schema_extra = { "linkml_meta": {'alias': 'namespace',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:base/Namespace'} })
    name_display: Optional[str] = Field(None, description="""Human readable display name or title of extra data""", json_schema_extra = { "linkml_meta": {'alias': 'name_display',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/ExtraData/name_display'} })
    name: Optional[str] = Field(None, description="""name of extra data""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/ExtraData/name'} })
    name_full: Optional[str] = Field(None, description="""full name of extra data""", json_schema_extra = { "linkml_meta": {'alias': 'name_full',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:samples/ExtraData/name_full'} })
    version: Optional[str] = Field(None, description="""version of extra data""", json_schema_extra = { "linkml_meta": {'alias': 'version',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:samples/ExtraData/version'} })
    hash_sha256: Optional[str] = Field(None, description="""SHA256 hash of all data (JSON and XML)""", json_schema_extra = { "linkml_meta": {'alias': 'hash_sha256',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:samples/ExtraData/hash_sha256'} })
    data_json: Optional[dict] = Field(None, description="""generic JSON field""", json_schema_extra = { "linkml_meta": {'alias': 'data_json',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/ExtraData/data_json'} })
    media_type: Optional[str] = Field(None, description="""IANA media type of extra data file""", json_schema_extra = { "linkml_meta": {'alias': 'media_type',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:base/MediaType'} })
    iri: Optional[str] = Field(None, description="""International Resource Identifier - IRI: is used for semantic representation """, json_schema_extra = { "linkml_meta": {'alias': 'iri',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SampleSet'],
         'slot_uri': 'lara:samples/ExtraData/iri'} })
    url: Optional[str] = Field(None, description="""Universal Resource Locator - this can be used to link the data to external locations""", json_schema_extra = { "linkml_meta": {'alias': 'url',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/ExtraData/url'} })
    datetime_created: Optional[str] = Field(None, description="""date and time when data was created""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_created',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/ExtraData/datetime_created'} })
    datetime_last_modified: Optional[str] = Field(None, description="""date and time when data was last modified""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_last_modified',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/ExtraData/datetime_last_modified'} })
    description: Optional[str] = Field(None, description="""description of extra data""", json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/ExtraData/description'} })
    file: Optional[str] = Field(None, description="""rel. path/filename""", json_schema_extra = { "linkml_meta": {'alias': 'file',
         'domain_of': ['ExtraData'],
         'slot_uri': 'lara:samples/ExtraData/file'} })


class SampleLayout(ConfiguredBaseModel):
    """
    \" Labware sample layout information, e.g. description what individual wells in, e.g. a microtiterplate contain. \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/SampleLayout',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    samplelayout_id: Optional[str] = Field(None, description="""SampleLayout - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'samplelayout_id',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:samples/SampleLayout/samplelayout_id'} })
    namespace: Optional[str] = Field(None, description="""namespace of sample layout""", json_schema_extra = { "linkml_meta": {'alias': 'namespace',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:base/Namespace'} })
    name: Optional[str] = Field(None, description="""name of the sample layout, e.g. 2333_plate_layout_1.csv""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleLayout/name'} })
    name_display: Optional[str] = Field(None, description="""display name of the sample layout""", json_schema_extra = { "linkml_meta": {'alias': 'name_display',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleLayout/name_display'} })
    num_rows: Optional[int] = Field(None, description="""number of num_rows""", json_schema_extra = { "linkml_meta": {'alias': 'num_rows',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:samples/SampleLayout/num_rows'} })
    num_cols: Optional[int] = Field(None, description="""number of num_columns""", json_schema_extra = { "linkml_meta": {'alias': 'num_cols',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:samples/SampleLayout/num_cols'} })
    layout_json: Optional[dict] = Field(None, description="""JSON representation of layout""", json_schema_extra = { "linkml_meta": {'alias': 'layout_json',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:samples/SampleLayout/layout_json'} })
    layout_file: Optional[str] = Field(None, description="""reference to the layout file""", json_schema_extra = { "linkml_meta": {'alias': 'layout_file',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:samples/SampleLayout/layout_file'} })
    unit_volume: Optional[str] = Field(None, description="""Volume unit. Recommended SI unit: m^3""", json_schema_extra = { "linkml_meta": {'alias': 'unit_volume',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:base/PhysicalUnit'} })
    unit_concentration: Optional[str] = Field(None, description="""Concentration unit. Recommended SI unit: mol/m^3""", json_schema_extra = { "linkml_meta": {'alias': 'unit_concentration',
         'domain_of': ['SampleLayout'],
         'slot_uri': 'lara:base/PhysicalUnit'} })
    description: Optional[str] = Field(None, description="""sample layout description""", json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleLayout/description'} })
    iri: Optional[str] = Field(None, description="""International Resource Identifier - IRI: is used for semantic representation.""", json_schema_extra = { "linkml_meta": {'alias': 'iri',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SampleSet'],
         'slot_uri': 'lara:samples/SampleLayout/iri'} })
    datetime_last_modified: Optional[str] = Field(None, description="""date and time when sample was last modified""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_last_modified',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleLayout/datetime_last_modified'} })


class SampleClass(ConfiguredBaseModel):
    """
    \" classes for sample, e.g. soil sample, tissue sample, reaction mixture, assay, ... \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/SampleClass',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    sampleclass_id: Optional[str] = Field(None, description="""SampleClass - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'sampleclass_id',
         'domain_of': ['SampleClass'],
         'slot_uri': 'lara:samples/SampleClass/sampleclass_id'} })
    name: str = Field(..., description="""name of the sample class, e.g. soil sample, tissue sample, reaction mixture, assay, ...""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleClass/name'} })
    iri: Optional[str] = Field(None, description="""International Resource Identifier - IRI: is used for semantic representation.""", json_schema_extra = { "linkml_meta": {'alias': 'iri',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SampleSet'],
         'slot_uri': 'lara:samples/SampleClass/iri'} })
    description: Optional[str] = Field(None, description="""sample class description """, json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleClass/description'} })


class Sample(ConfiguredBaseModel):
    """
    \" Generic Sample / Sampleset class, that can be used to represent any kind of sample, e.g. a (reaction) mixture,
        an assay, a soil sample,
        a sample can contain other (sub) samples, so it can be also used to represent a sample hierarchy
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/Sample',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    sample_id: Optional[str] = Field(None, description="""Sample - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'sample_id',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:samples/Sample/sample_id'} })
    namespace: str = Field(..., description="""namespace of sample""", json_schema_extra = { "linkml_meta": {'alias': 'namespace',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:base/Namespace'} })
    name: str = Field(..., description="""short part or device name""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/Sample/name'} })
    name_display: Optional[str] = Field(None, description="""display name of the sample""", json_schema_extra = { "linkml_meta": {'alias': 'name_display',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/Sample/name_display'} })
    sample_class: Optional[str] = Field(None, description="""sample class""", json_schema_extra = { "linkml_meta": {'alias': 'sample_class',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:samples/SampleClass'} })
    labware: Optional[str] = Field(None, description="""labware instance containing sample""", json_schema_extra = { "linkml_meta": {'alias': 'labware',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:material_store/LabwareInstance'} })
    sample_layout: Optional[str] = Field(None, description="""sample layout of sample""", json_schema_extra = { "linkml_meta": {'alias': 'sample_layout',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:samples/SampleLayout'} })
    url: Optional[str] = Field(None, description="""Universal Resource Locator - URL""", json_schema_extra = { "linkml_meta": {'alias': 'url',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/url'} })
    pid: Optional[str] = Field(None, description="""handle URI""", json_schema_extra = { "linkml_meta": {'alias': 'pid',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/pid'} })
    iri: Optional[str] = Field(None, description="""International Resource Identifier - IRI: is used for semantic representation.""", json_schema_extra = { "linkml_meta": {'alias': 'iri',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SampleSet'],
         'slot_uri': 'lara:samples/Sample/iri'} })
    pac_id: Optional[str] = Field(None, description="""Publicly Addressable Content IDentifier is a globally unique identifier that operates independently of a central registry.""", json_schema_extra = { "linkml_meta": {'alias': 'pac_id',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:samples/Sample/pac_id'} })
    barcode: Optional[str] = Field(None, description="""text representation of a barcode of the sample.""", json_schema_extra = { "linkml_meta": {'alias': 'barcode',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/barcode'} })
    barcode_json: Optional[dict] = Field(None, description="""Advanced barcodes in JSON for multiple barcode representations, like QR codes etc.""", json_schema_extra = { "linkml_meta": {'alias': 'barcode_json',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/barcode_json'} })
    datetime_created: Optional[str] = Field(None, description="""sample creation date""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_created',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/datetime_created'} })
    datetime_last_modified: Optional[str] = Field(None, description="""date and time when sample was last modified""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_last_modified',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/Sample/datetime_last_modified'} })
    datetime_discarded: Optional[str] = Field(None, description="""sample discarded date""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_discarded',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/datetime_discarded'} })
    datetime_expiry: Optional[str] = Field(None, description="""sample expiry date""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_expiry',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/datetime_expiry'} })
    location: Optional[str] = Field(None, description="""location of sample""", json_schema_extra = { "linkml_meta": {'alias': 'location',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:base/Location'} })
    substance_instance: Optional[str] = Field(None, description="""substance instance of sample""", json_schema_extra = { "linkml_meta": {'alias': 'substance_instance',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:substances-store/SubstanceInstance'} })
    solvent_instance: Optional[str] = Field(None, description="""solvent instance of sample""", json_schema_extra = { "linkml_meta": {'alias': 'solvent_instance',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:substances-store/MixtureInstance'} })
    mixture_instance: Optional[str] = Field(None, description="""mixture instance of sample, impurities can also be modeled as mixtures""", json_schema_extra = { "linkml_meta": {'alias': 'mixture_instance',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:substances-store/MixtureInstance'} })
    polymer_instance: Optional[str] = Field(None, description="""polymer instance of sample""", json_schema_extra = { "linkml_meta": {'alias': 'polymer_instance',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:substances-store/PolymerInstance'} })
    data_json: Optional[dict] = Field(None, description="""JSON filed for more / extra data""", json_schema_extra = { "linkml_meta": {'alias': 'data_json',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/Sample/data_json'} })
    description: Optional[str] = Field(None, description="""sample description""", json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/Sample/description'} })
    remarks: Optional[str] = Field(None, description="""remarks to the sample""", json_schema_extra = { "linkml_meta": {'alias': 'remarks',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:samples/Sample/remarks'} })
    samples: Optional[List[str]] = Field(None, description="""sub samples of sample""", json_schema_extra = { "linkml_meta": {'alias': 'samples',
         'domain_of': ['Sample', 'SamplesSubset', 'SampleSet', 'Container'],
         'slot_uri': 'lara:samples/Sample'} })
    users: Optional[List[str]] = Field(None, description="""users associated with sample, e.g. sample creator""", json_schema_extra = { "linkml_meta": {'alias': 'users', 'domain_of': ['Sample'], 'slot_uri': 'lara:people/Entity'} })
    groups: Optional[List[str]] = Field(None, description="""groups of users/entities who can access / and or use this sample""", json_schema_extra = { "linkml_meta": {'alias': 'groups', 'domain_of': ['Sample'], 'slot_uri': 'lara:people/Group'} })
    organisms_instance: Optional[List[str]] = Field(None, description="""organisms_instance associated with sample""", json_schema_extra = { "linkml_meta": {'alias': 'organisms_instance',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:organisms-store/OrganismInstance'} })
    parent_sample: Optional[List[str]] = Field(None, description="""parent sample of sample (provenance), can be used to model a sample hierarchy""", json_schema_extra = { "linkml_meta": {'alias': 'parent_sample',
         'domain_of': ['Sample'],
         'slot_uri': 'lara:samples/Sample'} })


class SamplesSubset(ConfiguredBaseModel):
    """
    \" This class can be used to create subsets of samples, e.g. to group samples together,
        e.g., for a specific experiment, project, ...
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/SamplesSubset',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    namespace: Optional[str] = Field(None, description="""namespace of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'namespace',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:base/Namespace'} })
    name_display: Optional[str] = Field(None, description="""display name of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'name_display',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SamplesSubset/name_display'} })
    name: Optional[str] = Field(None, description="""name of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SamplesSubset/name'} })
    entity: Optional[str] = Field(None, description="""user who created the subset""", json_schema_extra = { "linkml_meta": {'alias': 'entity',
         'domain_of': ['SamplesSubset', 'SampleSetsSubset'],
         'slot_uri': 'lara:people/Entity'} })
    group: Optional[str] = Field(None, description="""group who created the subset""", json_schema_extra = { "linkml_meta": {'alias': 'group',
         'domain_of': ['SamplesSubset', 'SampleSetsSubset'],
         'slot_uri': 'lara:people/Group'} })
    description: Optional[str] = Field(None, description="""description of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SamplesSubset/description'} })
    datetime_last_modified: Optional[str] = Field(None, description="""datetime of last modification of the selection""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_last_modified',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SamplesSubset/datetime_last_modified'} })
    samplessubset_id: Optional[str] = Field(None, description="""SamplesSubset - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'samplessubset_id',
         'domain_of': ['SamplesSubset'],
         'slot_uri': 'lara:samples/SamplesSubset/samplessubset_id'} })
    tags: Optional[List[str]] = Field(None, description="""tags""", json_schema_extra = { "linkml_meta": {'alias': 'tags',
         'domain_of': ['SamplesSubset', 'SampleSetsSubset'],
         'slot_uri': 'lara:base/Tag'} })
    samples: Optional[List[str]] = Field(None, description="""sub samples of sample subset""", json_schema_extra = { "linkml_meta": {'alias': 'samples',
         'domain_of': ['Sample', 'SamplesSubset', 'SampleSet', 'Container'],
         'slot_uri': 'lara:samples/Sample'} })


class OrderedSamplesSubset(ConfiguredBaseModel):
    """
    \" Through model for the many-to-many relationship between SamplesSubset and Sample.
        This class can be used to store the order of samples in a subset
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/OrderedSamplesSubset',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    orderedsamplessubset_id: Optional[str] = Field(None, description="""OrderedSamplesSubset - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'orderedsamplessubset_id',
         'domain_of': ['OrderedSamplesSubset'],
         'slot_uri': 'lara:samples/OrderedSamplesSubset/orderedsamplessubset_id'} })
    sample: str = Field(..., description="""sample in the subset""", json_schema_extra = { "linkml_meta": {'alias': 'sample',
         'domain_of': ['OrderedSamplesSubset'],
         'slot_uri': 'lara:samples/Sample'} })
    samples_subset: str = Field(..., description="""subset of samples""", json_schema_extra = { "linkml_meta": {'alias': 'samples_subset',
         'domain_of': ['OrderedSamplesSubset'],
         'slot_uri': 'lara:samples/SamplesSubset'} })
    order: int = Field(..., description="""order of sample in subset""", json_schema_extra = { "linkml_meta": {'alias': 'order',
         'domain_of': ['OrderedSamplesSubset', 'OrderedSamplesetsSubset'],
         'slot_uri': 'lara:samples/OrderedSamplesSubset/order'} })


class SampleSet(ConfiguredBaseModel):
    """
    \" Generic SampleSet class, that can be used to represent any kind of sample set, e.g. a (reaction) mixture set,
        an assay set, a soil sample set,
        a sample set can contain other (sub) sample sets, so it can be also used to represent a sample set hierarchy
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/SampleSet',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    sampleset_id: Optional[str] = Field(None, description="""SampleSet - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'sampleset_id',
         'domain_of': ['SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/sampleset_id'} })
    namespace: Optional[str] = Field(None, description="""namespace of sample""", json_schema_extra = { "linkml_meta": {'alias': 'namespace',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:base/Namespace'} })
    name: str = Field(..., description="""short sample set name""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSet/name'} })
    name_display: Optional[str] = Field(None, description="""display name of the sample set""", json_schema_extra = { "linkml_meta": {'alias': 'name_display',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSet/name_display'} })
    sampleset_class: Optional[str] = Field(None, description="""sample set class""", json_schema_extra = { "linkml_meta": {'alias': 'sampleset_class',
         'domain_of': ['SampleSet'],
         'slot_uri': 'lara:samples/SampleClass'} })
    sampleset_layout: Optional[str] = Field(None, description="""layout of sample set""", json_schema_extra = { "linkml_meta": {'alias': 'sampleset_layout',
         'domain_of': ['SampleSet'],
         'slot_uri': 'lara:samples/SampleLayout'} })
    url: Optional[str] = Field(None, description="""Universal Resource Locator - URL""", json_schema_extra = { "linkml_meta": {'alias': 'url',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/url'} })
    pid: Optional[str] = Field(None, description="""handle URI""", json_schema_extra = { "linkml_meta": {'alias': 'pid',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/pid'} })
    iri: Optional[str] = Field(None, description="""International Resource Identifier - IRI: is used for semantic representation.""", json_schema_extra = { "linkml_meta": {'alias': 'iri',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/iri'} })
    barcode: Optional[str] = Field(None, description="""barcode of the general part type, not of a specific part !!""", json_schema_extra = { "linkml_meta": {'alias': 'barcode',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/barcode'} })
    barcode_json: Optional[dict] = Field(None, description="""Advanced barcodes in JSON for multiple barcode representations, like QR codes etc.""", json_schema_extra = { "linkml_meta": {'alias': 'barcode_json',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/barcode_json'} })
    location: Optional[str] = Field(None, description="""location of sample set""", json_schema_extra = { "linkml_meta": {'alias': 'location',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:base/Location'} })
    datetime_created: str = Field(..., description="""sample set creation date""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_created',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/datetime_created'} })
    datetime_last_modified: str = Field(..., description="""date and time when the sample set was last modified""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_last_modified',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSet/datetime_last_modified'} })
    datetime_discarded: Optional[str] = Field(None, description="""sample set discarded date""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_discarded',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/datetime_discarded'} })
    datetime_expiry: Optional[str] = Field(None, description="""sample set expiry date""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_expiry',
         'domain_of': ['Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/datetime_expiry'} })
    data_json: Optional[dict] = Field(None, description="""JSON filed for more / extra data""", json_schema_extra = { "linkml_meta": {'alias': 'data_json',
         'domain_of': ['ExtraData', 'Sample', 'SampleSet'],
         'slot_uri': 'lara:samples/SampleSet/data_json'} })
    description: Optional[str] = Field(None, description="""sample description""", json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSet/description'} })
    samples: Optional[List[str]] = Field(None, description="""sub samples of sample""", json_schema_extra = { "linkml_meta": {'alias': 'samples',
         'domain_of': ['Sample', 'SamplesSubset', 'SampleSet', 'Container'],
         'slot_uri': 'lara:samples/Sample'} })


class SampleSetsSubset(ConfiguredBaseModel):
    """
    \" This class can be used to create subsets of samplesets, e.g. to group samplesets together,
        e.g., for a specific experiment, project, ...
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/SampleSetSubset',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    namespace: Optional[str] = Field(None, description="""namespace of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'namespace',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:base/Namespace'} })
    name_display: Optional[str] = Field(None, description="""display name of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'name_display',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSetSubset/name_display'} })
    name: Optional[str] = Field(None, description="""name of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'name',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSetSubset/name'} })
    entity: Optional[str] = Field(None, description="""user who created the subset""", json_schema_extra = { "linkml_meta": {'alias': 'entity',
         'domain_of': ['SamplesSubset', 'SampleSetsSubset'],
         'slot_uri': 'lara:people/Entity'} })
    group: Optional[str] = Field(None, description="""group who created the subset""", json_schema_extra = { "linkml_meta": {'alias': 'group',
         'domain_of': ['SamplesSubset', 'SampleSetsSubset'],
         'slot_uri': 'lara:people/Group'} })
    description: Optional[str] = Field(None, description="""description of the subset""", json_schema_extra = { "linkml_meta": {'alias': 'description',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'SampleClass',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSetSubset/description'} })
    datetime_last_modified: Optional[str] = Field(None, description="""datetime of last modification of the selection""", json_schema_extra = { "linkml_meta": {'alias': 'datetime_last_modified',
         'domain_of': ['ExtraData',
                       'SampleLayout',
                       'Sample',
                       'SamplesSubset',
                       'SampleSet',
                       'SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSetSubset/datetime_last_modified'} })
    samplesetssubset_id: Optional[str] = Field(None, description="""SampleSetsSubset - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'samplesetssubset_id',
         'domain_of': ['SampleSetsSubset'],
         'slot_uri': 'lara:samples/SampleSetSubset/samplesetssubset_id'} })
    tags: Optional[List[str]] = Field(None, description="""tags""", json_schema_extra = { "linkml_meta": {'alias': 'tags',
         'domain_of': ['SamplesSubset', 'SampleSetsSubset'],
         'slot_uri': 'lara:base/Tag'} })
    samplesets: Optional[List[str]] = Field(None, description="""sub samplesets of sample subset""", json_schema_extra = { "linkml_meta": {'alias': 'samplesets',
         'domain_of': ['SampleSetsSubset', 'Container'],
         'slot_uri': 'lara:samples/SampleSet'} })


class OrderedSamplesetsSubset(ConfiguredBaseModel):
    """
    \" Through model for the many-to-many relationship between SamplesetsSubset and Sampleset.
        This class can be used to store the order of samplesets in a subset
    \"
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'lara:samples/OrderedSamplesetsSubset',
         'from_schema': 'https://w3id.org/lara/lara_django_samples'})

    orderedsamplestsubset_id: Optional[str] = Field(None, description="""OrderedSamplesetsSubset - primary key (UUID)""", json_schema_extra = { "linkml_meta": {'alias': 'orderedsamplestsubset_id',
         'domain_of': ['OrderedSamplesetsSubset'],
         'slot_uri': 'lara:samples/OrderedSamplesetsSubset/orderedsamplestsubset_id'} })
    sampleset: str = Field(..., description="""sampleset in the subset""", json_schema_extra = { "linkml_meta": {'alias': 'sampleset',
         'domain_of': ['OrderedSamplesetsSubset'],
         'slot_uri': 'lara:samples/SampleSet'} })
    samplesets_subset: str = Field(..., description="""subset of samplesets""", json_schema_extra = { "linkml_meta": {'alias': 'samplesets_subset',
         'domain_of': ['OrderedSamplesetsSubset'],
         'slot_uri': 'lara:samples/SampleSetSubset'} })
    order: int = Field(..., description="""order of sampleset in subset""", json_schema_extra = { "linkml_meta": {'alias': 'order',
         'domain_of': ['OrderedSamplesSubset', 'OrderedSamplesetsSubset'],
         'slot_uri': 'lara:samples/OrderedSamplesetsSubset/order'} })


class Container(ConfiguredBaseModel):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3id.org/lara/lara_django_samples', 'tree_root': True})

    extradatas: Optional[List[ExtraData]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'extradatas', 'domain_of': ['Container']} })
    samplelayouts: Optional[List[SampleLayout]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'samplelayouts', 'domain_of': ['Container']} })
    sampleclasss: Optional[List[SampleClass]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'sampleclasss', 'domain_of': ['Container']} })
    samples: Optional[List[Sample]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'samples',
         'domain_of': ['Sample', 'SamplesSubset', 'SampleSet', 'Container']} })
    samplessubsets: Optional[List[SamplesSubset]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'samplessubsets', 'domain_of': ['Container']} })
    orderedsamplessubsets: Optional[List[OrderedSamplesSubset]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'orderedsamplessubsets', 'domain_of': ['Container']} })
    samplesets: Optional[List[SampleSet]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'samplesets', 'domain_of': ['SampleSetsSubset', 'Container']} })
    samplesetssubsets: Optional[List[SampleSetsSubset]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'samplesetssubsets', 'domain_of': ['Container']} })
    orderedsamplesetssubsets: Optional[List[OrderedSamplesetsSubset]] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'orderedsamplesetssubsets', 'domain_of': ['Container']} })


# Model rebuild
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
LabwareInstance.model_rebuild()
DataType.model_rebuild()
Entity.model_rebuild()
Tag.model_rebuild()
MixtureInstance.model_rebuild()
Location.model_rebuild()
PhysicalUnit.model_rebuild()
MediaType.model_rebuild()
Namespace.model_rebuild()
PolymerInstance.model_rebuild()
SubstanceInstance.model_rebuild()
Group.model_rebuild()
OrganismInstance.model_rebuild()
ExtraData.model_rebuild()
SampleLayout.model_rebuild()
SampleClass.model_rebuild()
Sample.model_rebuild()
SamplesSubset.model_rebuild()
OrderedSamplesSubset.model_rebuild()
SampleSet.model_rebuild()
SampleSetsSubset.model_rebuild()
OrderedSamplesetsSubset.model_rebuild()
Container.model_rebuild()

