# This file is generated by coder.py. DO NOT EDIT!
# ruff: noqa: F401, E402, F811
# fmt: off

from __future__ import annotations

import enum

from gaphor.core.modeling.properties import (
    association,
    attribute as _attribute,
    derived,
    derivedunion,
    enumeration as _enumeration,
    redefine,
    relation_many,
    relation_one,
)


from gaphor.UML.uml import Actor as _Actor
from gaphor.UML.uml import Package as _Package
from gaphor.UML.uml import Dependency as _Dependency
from gaphor.UML.uml import Diagram as _Diagram


class Person(_Actor):
    description: _attribute[str] = _attribute("description", str)
    location: _attribute[str] = _attribute("location", str)


class Container(_Package):
    description: _attribute[str] = _attribute("description", str)
    location: _attribute[str] = _attribute("location", str)
    ownerContainer: relation_one[Container]
    owningContainer: relation_many[Container]
    technology: _attribute[str] = _attribute("technology", str)
    type: _attribute[str] = _attribute("type", str)


class Database(Container):
    pass


class Dependency(_Dependency):
    technology: _attribute[str] = _attribute("technology", str)


class C4Diagram(_Diagram):
    diagramType: _attribute[str] = _attribute("diagramType", str, default="c4")



Container.ownerContainer = association("ownerContainer", Container, upper=1, opposite="owningContainer")
Container.owningContainer = association("owningContainer", Container, composite=True, opposite="ownerContainer")
from gaphor.UML.uml import NamedElement as _NamedElement
_NamedElement.namespace.add(Container.ownerContainer)  # type: ignore[attr-defined]
from gaphor.UML.uml import Namespace as _Namespace
_Namespace.ownedMember.add(Container.owningContainer)  # type: ignore[attr-defined]
