from __future__ import annotations
from typing import List, Optional, Union, Any
from enum import Enum
from pydantic import Field
from ..base import CIMBase, CIMModelRegistry
from rdflib import URIRef

CIM = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#')

class DiagramLayoutVersion(CIMBase):
    __cim_class__ = URIRef('http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion')
    baseUML: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.baseUML')
    baseURI: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.baseURI')
    date: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.date')
    differenceModelURI: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.differenceModelURI')
    entsoeUML: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.entsoeUML')
    entsoeURI: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.entsoeURI')
    modelDescriptionURI: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.modelDescriptionURI')
    namespaceRDF: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.namespaceRDF')
    namespaceUML: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.namespaceUML')
    shortName: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion.shortName')

CIMModelRegistry.register(URIRef('http://entsoe.eu/CIM/SchemaExtension/3/1#DiagramLayoutVersion'), DiagramLayoutVersion)

class String(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#String')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#String'), String)

class Date(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Date')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Date'), Date)

class OrientationKind(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#OrientationKind')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#OrientationKind'), OrientationKind)

class Simple_Float(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Simple_Float')
    value: Optional[float] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Simple_Float.value')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Simple_Float'), Simple_Float)

class Float(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Float')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Float'), Float)

class Integer(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Integer')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Integer'), Integer)

class Boolean(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Boolean')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Boolean'), Boolean)

class AngleDegrees(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#AngleDegrees')
    multiplier: Optional['UnitMultiplier'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#AngleDegrees.multiplier')
    unit: Optional['UnitSymbol'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#AngleDegrees.unit')
    value: Optional[float] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#AngleDegrees.value')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#AngleDegrees'), AngleDegrees)

class UnitSymbol(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#UnitSymbol')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#UnitSymbol'), UnitSymbol)

class UnitMultiplier(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#UnitMultiplier')
    pass

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#UnitMultiplier'), UnitMultiplier)

class DiagramObjectGluePoint(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectGluePoint')
    DiagramObjectPoints: List['DiagramObjectPoint'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectGluePoint.DiagramObjectPoints')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectGluePoint'), DiagramObjectGluePoint)

class DiagramObjectPoint(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint')
    DiagramObject: Optional['DiagramObject'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint.DiagramObject')
    DiagramObjectGluePoint: Optional['DiagramObjectGluePoint'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint.DiagramObjectGluePoint')
    sequenceNumber: Optional[int] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint.sequenceNumber')
    xPosition: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint.xPosition')
    yPosition: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint.yPosition')
    zPosition: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint.zPosition')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectPoint'), DiagramObjectPoint)

class IdentifiedObject(CIMBase):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject')
    DiagramObjects: List['DiagramObject'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject.DiagramObjects')
    description: Optional[str] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject.description')
    energyIdentCodeEic: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#IdentifiedObject.energyIdentCodeEic')
    energyIdentCodeEic_IdentifiedObject_energyIdentCodeEic: Optional[str] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject.energyIdentCodeEic')
    name: Optional[str] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject.name')
    shortName: Optional[str] = Field(default=None, alias='http://entsoe.eu/CIM/SchemaExtension/3/1#IdentifiedObject.shortName')
    shortName_IdentifiedObject_shortName: Optional[str] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject.shortName')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#IdentifiedObject'), IdentifiedObject)

class DiagramStyle(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramStyle')
    Diagram: List['Diagram'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramStyle.Diagram')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramStyle'), DiagramStyle)

class Diagram(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram')
    DiagramElements: List['DiagramObject'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.DiagramElements')
    DiagramStyle: Optional['DiagramStyle'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.DiagramStyle')
    orientation: Optional['OrientationKind'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.orientation')
    x1InitialView: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.x1InitialView')
    x2InitialView: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.x2InitialView')
    y1InitialView: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.y1InitialView')
    y2InitialView: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram.y2InitialView')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Diagram'), Diagram)

class DiagramObject(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject')
    Diagram: Optional['Diagram'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.Diagram')
    DiagramObjectPoints: List['DiagramObjectPoint'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.DiagramObjectPoints')
    DiagramObjectStyle: Optional['DiagramObjectStyle'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.DiagramObjectStyle')
    IdentifiedObject: Optional['IdentifiedObject'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.IdentifiedObject')
    VisibilityLayers: List['VisibilityLayer'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.VisibilityLayers')
    drawingOrder: Optional[int] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.drawingOrder')
    isPolygon: Optional[bool] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.isPolygon')
    offsetX: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.offsetX')
    offsetY: Optional['Simple_Float'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.offsetY')
    rotation: Optional[float] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject.rotation')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObject'), DiagramObject)

class DiagramObjectStyle(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectStyle')
    StyledObjects: List['DiagramObject'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectStyle.StyledObjects')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#DiagramObjectStyle'), DiagramObjectStyle)

class TextDiagramObject(DiagramObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#TextDiagramObject')
    text: Optional[str] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#TextDiagramObject.text')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#TextDiagramObject'), TextDiagramObject)

class VisibilityLayer(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#VisibilityLayer')
    VisibleObjects: List['DiagramObject'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#VisibilityLayer.VisibleObjects')
    drawingOrder: Optional[int] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#VisibilityLayer.drawingOrder')

CIMModelRegistry.register(URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#VisibilityLayer'), VisibilityLayer)

__all__ = [
    'DiagramLayoutVersion',
    'String',
    'Date',
    'OrientationKind',
    'Simple_Float',
    'Float',
    'Integer',
    'Boolean',
    'AngleDegrees',
    'UnitSymbol',
    'UnitMultiplier',
    'DiagramObjectGluePoint',
    'DiagramObjectPoint',
    'IdentifiedObject',
    'DiagramStyle',
    'Diagram',
    'DiagramObject',
    'DiagramObjectStyle',
    'TextDiagramObject',
    'VisibilityLayer',
]
