# This file is generated by codegen.py. DO NOT EDIT!

from __future__ import annotations

import uuid
from typing import TYPE_CHECKING, Callable, List, Optional

from gaphor.core.modeling.diagram import Diagram
from gaphor.core.modeling.element import Element
from gaphor.core.modeling.properties import (
    association,
    attribute,
    derived,
    derivedunion,
    enumeration,
    redefine,
    relation_many,
    relation_one,
)

# 15: override Presentation
# defined in gaphor.core.modeling.presentation


class Comment(Element):
    body: attribute[str]
    annotatedElement: relation_many[Element]


# 9: override StyleSheet
# defined in gaphor.core.modeling.presentation


Element.note = attribute("note", str)
Diagram.name = attribute("name", str)
Comment.body = attribute("body", str)
# 12: override StyleSheet.styleSheet
# defined in gaphor.core.modeling.presentation

# 24: override Presentation.subject
# defined in gaphor.core.modeling.presentation

# 18: override Element.presentation
# defined in gaphor.core.modeling.presentation

Comment.annotatedElement = association("annotatedElement", Element, opposite="comment")
Element.comment = association("comment", Comment, opposite="annotatedElement")
# 33: override Diagram.ownedPresentation
# defined in gaphor.core.modeling.presentation

# 21: override Presentation.diagram
# defined in gaphor.core.modeling.presentation

# 27: override Presentation.parent
# defined in gaphor.core.modeling.presentation

# 30: override Presentation.children
# defined in gaphor.core.modeling.presentation

Diagram.element = association("element", Element, opposite="ownedDiagram")
Element.ownedDiagram = association(
    "ownedDiagram", Diagram, composite=True, opposite="element"
)
