# generated by datamodel-codegen:
#   filename:  material_attribute_value_schema.json
#   timestamp: 2024-02-07T14:07:20+00:00

from __future__ import annotations

from enum import Enum
from typing import List, Optional, Union

from pydantic import BaseModel, Extra, Field

from . import comment_schema, material_attribute_schema, ontology_annotation_schema


class FieldType(Enum):
    MaterialAttributeValue = 'MaterialAttributeValue'


class ISAMaterialAttributeSchema(BaseModel):
    class Config:
        extra = Extra.forbid

    field_id: Optional[str] = Field(None, alias='@id')
    field_context: Optional[str] = Field(None, alias='@context')
    field_type: Optional[FieldType] = Field(None, alias='@type')
    category: Optional[material_attribute_schema.ISAMaterialAttributeSchema] = None
    value: Optional[Union[ontology_annotation_schema.ISAOntologyReferenceSchema, str, float]] = None
    unit: Optional[ontology_annotation_schema.ISAOntologyReferenceSchema] = None
    comments: Optional[List[comment_schema.ISACommentSchema]] = None
