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

from __future__ import annotations

from enum import Enum
from typing import List, Optional

from pydantic import BaseModel, Extra, Field

from . import comment_schema, ontology_annotation_schema, protocol_parameter_schema


class Component(BaseModel):
    componentName: Optional[str] = None
    componentType: Optional[ontology_annotation_schema.ISAOntologyReferenceSchema] = (None)
    comments: Optional[List[comment_schema.ISACommentSchema]] = None


class FieldType(Enum):
    Protocol = 'Protocol'


class ISAProtocolSchema(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')
    name: Optional[str] = None
    protocolType: Optional[ontology_annotation_schema.ISAOntologyReferenceSchema] = None
    description: Optional[str] = None
    uri: Optional[str] = None
    version: Optional[str] = None
    parameters: Optional[List[protocol_parameter_schema.ISAProtocolParameterSchema]] = (None)
    components: Optional[List[Component]] = None
    comments: Optional[List[comment_schema.ISACommentSchema]] = None
