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#')

from .DiagramLayout import IdentifiedObject

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

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

class CoordinateSystem(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#CoordinateSystem')
    Location: List['Location'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#CoordinateSystem.Location')
    crsUrn: Optional[str] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#CoordinateSystem.crsUrn')

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

class Location(IdentifiedObject):
    __cim_class__ = URIRef('http://iec.ch/TC57/2013/CIM-schema-cim16#Location')
    CoordinateSystem: Optional['CoordinateSystem'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Location.CoordinateSystem')
    PositionPoints: List['PositionPoint'] = Field(default_factory=list, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Location.PositionPoints')
    PowerSystemResources: Optional['PowerSystemResource'] = Field(default=None, alias='http://iec.ch/TC57/2013/CIM-schema-cim16#Location.PowerSystemResources')

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

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

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

__all__ = [
    'GeographicalLocationVersion',
    'CoordinateSystem',
    'Location',
    'PositionPoint',
]
