# generated by datamodel-codegen:
#   filename:  structurizr.yaml
#   timestamp: 2022-01-26T15:09:09+00:00

from __future__ import annotations

from enum import Enum
from typing import Any, Dict, List, Optional

from pydantic import BaseModel, Field


class Enterprise(BaseModel):
    name: Optional[str] = Field(None, description="The name of the enterprise.")


class Location(Enum):
    External = "External"
    Internal = "Internal"
    Unspecified = "Unspecified"


class Location1(Enum):
    External = "External"
    Internal = "Internal"
    Unspecified = "Unspecified"


class Role(Enum):
    Primary = "Primary"
    Supporting = "Supporting"


class CodeElement(BaseModel):
    role: Optional[Role] = Field(None, description="The role of this code element.")
    name: Optional[str] = Field(None, description="The name of this code element.")
    type: Optional[str] = Field(
        None,
        description="The type of the code element (e.g. a fully qualified Java interface or class name).",
    )
    description: Optional[str] = Field(
        None, description="A short description of this component."
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    language: Optional[str] = Field(
        None,
        description='The programming language of this code element (e.g. "Java", "C#", etc).',
    )
    category: Optional[str] = Field(
        None, description="The category of code element; e.g. class, interface, etc."
    )
    visibility: Optional[str] = Field(
        None,
        description="The visibility of the code element; e.g. public, package, private.",
    )
    size: Optional[float] = Field(
        None, description="The size of the code element; e.g. the number of lines."
    )


class HttpHealthCheck(BaseModel):
    name: Optional[str] = Field(None, description="The name of the health check.")
    url: Optional[str] = Field(None, description="The health check URL/endpoint.")
    interval: Optional[float] = Field(
        None, description="The polling interval, in seconds."
    )
    timeout: Optional[float] = Field(
        None,
        description="The timeout after which a health check is deemed as failed, in milliseconds.",
    )
    headers: Optional[Dict[str, Any]] = Field(
        None,
        description="A set of name-value pairs corresponding to HTTP headers that should be sent with the request.",
    )


class InteractionStyle(Enum):
    Synchronous = "Synchronous"
    Asynchronous = "Asynchronous"


class Relationship(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this relationship in the model."
    )
    description: Optional[str] = Field(
        None, description="A short description of this relationship."
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this relationship.",
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this relationship can be found.",
    )
    sourceId: Optional[str] = Field(None, description="The ID of the source element.")
    destinationId: Optional[str] = Field(
        None, description="The ID of the destination element."
    )
    technology: Optional[str] = Field(
        None,
        description="The technology associated with this relationship (e.g. HTTPS, JDBC, etc).",
    )
    interactionStyle: Optional[InteractionStyle] = Field(
        None, description="The interaction style (synchronous or asynchronous)."
    )
    linkedRelationshipId: Optional[str] = Field(
        None,
        description="The ID of the container-container relationship upon which this container instance-container instance relationship is based.",
    )


class PaperSize(Enum):
    A6_Portrait = "A6_Portrait"
    A6_Landscape = "A6_Landscape"
    A5_Portrait = "A5_Portrait"
    A5_Landscape = "A5_Landscape"
    A4_Portrait = "A4_Portrait"
    A4_Landscape = "A4_Landscape"
    A3_Portrait = "A3_Portrait"
    A3_Landscape = "A3_Landscape"
    A2_Portrait = "A2_Portrait"
    A2_Landscape = "A2_Landscape"
    A1_Portrait = "A1_Portrait"
    A1_Landscape = "A1_Landscape"
    A0_Portrait = "A0_Portrait"
    A0_Landscape = "A0_Landscape"
    Letter_Portrait = "Letter_Portrait"
    Letter_Landscape = "Letter_Landscape"
    Legal_Portrait = "Legal_Portrait"
    Legal_Landscape = "Legal_Landscape"
    Slide_4_3 = "Slide_4_3"
    Slide_16_9 = "Slide_16_9"
    Slide_16_10 = "Slide_16_10"


class PaperSize1(Enum):
    A6_Portrait = "A6_Portrait"
    A6_Landscape = "A6_Landscape"
    A5_Portrait = "A5_Portrait"
    A5_Landscape = "A5_Landscape"
    A4_Portrait = "A4_Portrait"
    A4_Landscape = "A4_Landscape"
    A3_Portrait = "A3_Portrait"
    A3_Landscape = "A3_Landscape"
    A2_Portrait = "A2_Portrait"
    A2_Landscape = "A2_Landscape"
    A1_Portrait = "A1_Portrait"
    A1_Landscape = "A1_Landscape"
    A0_Portrait = "A0_Portrait"
    A0_Landscape = "A0_Landscape"
    Letter_Portrait = "Letter_Portrait"
    Letter_Landscape = "Letter_Landscape"
    Legal_Portrait = "Legal_Portrait"
    Legal_Landscape = "Legal_Landscape"
    Slide_4_3 = "Slide_4_3"
    Slide_16_9 = "Slide_16_9"
    Slide_16_10 = "Slide_16_10"


class PaperSize2(Enum):
    A6_Portrait = "A6_Portrait"
    A6_Landscape = "A6_Landscape"
    A5_Portrait = "A5_Portrait"
    A5_Landscape = "A5_Landscape"
    A4_Portrait = "A4_Portrait"
    A4_Landscape = "A4_Landscape"
    A3_Portrait = "A3_Portrait"
    A3_Landscape = "A3_Landscape"
    A2_Portrait = "A2_Portrait"
    A2_Landscape = "A2_Landscape"
    A1_Portrait = "A1_Portrait"
    A1_Landscape = "A1_Landscape"
    A0_Portrait = "A0_Portrait"
    A0_Landscape = "A0_Landscape"
    Letter_Portrait = "Letter_Portrait"
    Letter_Landscape = "Letter_Landscape"
    Legal_Portrait = "Legal_Portrait"
    Legal_Landscape = "Legal_Landscape"
    Slide_4_3 = "Slide_4_3"
    Slide_16_9 = "Slide_16_9"
    Slide_16_10 = "Slide_16_10"


class PaperSize3(Enum):
    A6_Portrait = "A6_Portrait"
    A6_Landscape = "A6_Landscape"
    A5_Portrait = "A5_Portrait"
    A5_Landscape = "A5_Landscape"
    A4_Portrait = "A4_Portrait"
    A4_Landscape = "A4_Landscape"
    A3_Portrait = "A3_Portrait"
    A3_Landscape = "A3_Landscape"
    A2_Portrait = "A2_Portrait"
    A2_Landscape = "A2_Landscape"
    A1_Portrait = "A1_Portrait"
    A1_Landscape = "A1_Landscape"
    A0_Portrait = "A0_Portrait"
    A0_Landscape = "A0_Landscape"
    Letter_Portrait = "Letter_Portrait"
    Letter_Landscape = "Letter_Landscape"
    Legal_Portrait = "Legal_Portrait"
    Legal_Landscape = "Legal_Landscape"
    Slide_4_3 = "Slide_4_3"
    Slide_16_9 = "Slide_16_9"
    Slide_16_10 = "Slide_16_10"


class PaperSize4(Enum):
    A6_Portrait = "A6_Portrait"
    A6_Landscape = "A6_Landscape"
    A5_Portrait = "A5_Portrait"
    A5_Landscape = "A5_Landscape"
    A4_Portrait = "A4_Portrait"
    A4_Landscape = "A4_Landscape"
    A3_Portrait = "A3_Portrait"
    A3_Landscape = "A3_Landscape"
    A2_Portrait = "A2_Portrait"
    A2_Landscape = "A2_Landscape"
    A1_Portrait = "A1_Portrait"
    A1_Landscape = "A1_Landscape"
    A0_Portrait = "A0_Portrait"
    A0_Landscape = "A0_Landscape"
    Letter_Portrait = "Letter_Portrait"
    Letter_Landscape = "Letter_Landscape"
    Legal_Portrait = "Legal_Portrait"
    Legal_Landscape = "Legal_Landscape"
    Slide_4_3 = "Slide_4_3"
    Slide_16_9 = "Slide_16_9"
    Slide_16_10 = "Slide_16_10"


class PaperSize5(Enum):
    A6_Portrait = "A6_Portrait"
    A6_Landscape = "A6_Landscape"
    A5_Portrait = "A5_Portrait"
    A5_Landscape = "A5_Landscape"
    A4_Portrait = "A4_Portrait"
    A4_Landscape = "A4_Landscape"
    A3_Portrait = "A3_Portrait"
    A3_Landscape = "A3_Landscape"
    A2_Portrait = "A2_Portrait"
    A2_Landscape = "A2_Landscape"
    A1_Portrait = "A1_Portrait"
    A1_Landscape = "A1_Landscape"
    A0_Portrait = "A0_Portrait"
    A0_Landscape = "A0_Landscape"
    Letter_Portrait = "Letter_Portrait"
    Letter_Landscape = "Letter_Landscape"
    Legal_Portrait = "Legal_Portrait"
    Legal_Landscape = "Legal_Landscape"
    Slide_4_3 = "Slide_4_3"
    Slide_16_9 = "Slide_16_9"
    Slide_16_10 = "Slide_16_10"


class Mode(Enum):
    Include = "Include"
    Exclude = "Exclude"


class FilteredView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="A unique identifier for this view.")
    baseViewKey: Optional[str] = Field(
        None, description="The key of the view on which this filtered view is based."
    )
    mode: Optional[Mode] = Field(
        None,
        description="Whether elements/relationships are being included or excluded based upon the set of tags.",
    )
    tags: Optional[List[str]] = Field(
        None,
        description="The set of tags to include/exclude elements/relationships when rendering this filtered view.",
    )


class ElementView(BaseModel):
    id: Optional[str] = Field(None, description="The ID of the element.")
    x: Optional[float] = Field(
        None, description="The horizontal position of the element when rendered."
    )
    y: Optional[float] = Field(
        None, description="The vertical position of the element when rendered."
    )


class Routing(Enum):
    Direct = "Direct"
    Curved = "Curved"
    Orthogonal = "Orthogonal"


class Vertex(BaseModel):
    x: Optional[float] = Field(
        None, description="The horizontal position of the vertex when rendered."
    )
    y: Optional[float] = Field(
        None, description="The vertical position of the vertex when rendered."
    )


class AnimationStep(BaseModel):
    order: Optional[float] = Field(
        None, description="The order of this animation step."
    )
    elements: Optional[List[str]] = Field(
        None,
        description="The set of element IDs that should be included in this animation step.",
    )
    relationships: Optional[List[str]] = Field(
        None,
        description="The set of relationship IDs that should be included in this animation step.",
    )


class Dimensions(BaseModel):
    width: Optional[float] = Field(None, description="The width (pixels).")
    height: Optional[float] = Field(None, description="The height (pixels).")


class RankDirection(Enum):
    TopBottom = "TopBottom"
    BottomTop = "BottomTop"
    LeftRight = "LeftRight"
    RightLeft = "RightLeft"


class AutomaticLayout(BaseModel):
    rankDirection: Optional[RankDirection] = Field(
        None, description="The algorithm rank direction."
    )
    rankSeparation: Optional[float] = Field(
        None, description="The separation between ranks (pixels)."
    )
    nodeSeparation: Optional[float] = Field(
        None, description="The separation between nodes in the same rank (pixels)."
    )
    edgeSeparation: Optional[float] = Field(
        None, description="The separation between edges (pixels)."
    )
    vertices: Optional[bool] = Field(
        None, description="Whether vertices should be created during automatic layout."
    )


class MetadataSymbols(Enum):
    SquareBrackets_ = "SquareBrackets,"
    RoundBrackets_ = "RoundBrackets,"
    CurlyBrackets_ = "CurlyBrackets,"
    AngleBrackets_ = "AngleBrackets,"
    DoubleAngleBrackets_ = "DoubleAngleBrackets,"
    None_ = "None"


class Font(BaseModel):
    name: Optional[str] = Field(
        None, description='The font name (e.g. "Times New Roman", "Open Sans", etc).'
    )
    url: Optional[str] = Field(
        None, description="For web fonts, the URL where the font can be found."
    )


class Branding(BaseModel):
    logo: Optional[str] = Field(
        None, description="A Base64 data URI representation of a PNG/JPG/GIF file."
    )
    font: Optional[Font] = Field(
        None,
        description="Represents a font, including a name and an optional URL for web fonts.",
    )


class Shape(Enum):
    Box = "Box"
    RoundedBox = "RoundedBox"
    Component = "Component"
    Circle = "Circle"
    Ellipse = "Ellipse"
    Hexagon = "Hexagon"
    Diamond = "Diamond"
    Folder = "Folder"
    Cylinder = "Cylinder"
    Pipe = "Pipe"
    WebBrowser = "WebBrowser"
    MobileDevicePortrait = "MobileDevicePortrait"
    MobileDeviceLandscape = "MobileDeviceLandscape"
    Person = "Person"
    Robot = "Robot"


class Border(Enum):
    Solid = "Solid"
    Dashed = "Dashed"
    Dotted = "Dotted"


class ElementStyle(BaseModel):
    tag: Optional[str] = Field(
        None, description="The tag to which this element style applies."
    )
    width: Optional[float] = Field(
        None, description="The width of the element, in pixels."
    )
    height: Optional[float] = Field(
        None, description="The height of the element, in pixels."
    )
    background: Optional[str] = Field(
        None,
        description="The background colour of the element, as a HTML RGB hex string (e.g. '#ffffff').",
    )
    stroke: Optional[str] = Field(
        None,
        description="The stroke colour of the element, as a HTML RGB hex string (e.g. '#000000').",
    )
    color: Optional[str] = Field(
        None,
        description="The foreground (text) colour of the element, as a HTML RGB hex string (e.g. '#ffffff').",
    )
    fontSize: Optional[float] = Field(
        None, description="The standard font size used to render text, in pixels."
    )
    shape: Optional[Shape] = Field(
        None, description="The shape used to render the element."
    )
    icon: Optional[str] = Field(
        None, description="A Base64 data URI representation of a PNG/JPG/GIF file."
    )
    border: Optional[Border] = Field(
        None, description="The type of border used to render the element."
    )
    opacity: Optional[float] = Field(
        None, description="The opacity used when rendering the element; 0-100."
    )
    metadata: Optional[bool] = Field(
        None, description="Whether the element metadata should be shown or not."
    )
    description: Optional[bool] = Field(
        None, description="Whether the element description should be shown or not."
    )


class Routing1(Enum):
    Direct = "Direct"
    Curved = "Curved"
    Orthogonal = "Orthogonal"


class RelationshipStyle(BaseModel):
    tag: Optional[str] = Field(
        None, description="The tag to which this relationship style applies."
    )
    thickness: Optional[float] = Field(
        None, description="The thickness of the line, in pixels."
    )
    color: Optional[str] = Field(
        None,
        description="The colour of the line, as a HTML RGB hex string (e.g. '#ffffff').",
    )
    fontSize: Optional[float] = Field(
        None,
        description="The standard font size used to render the relationship annotation, in pixels.",
    )
    width: Optional[float] = Field(
        None, description="The width of the relationship annotation, in pixels."
    )
    dashed: Optional[bool] = Field(
        None,
        description="A flag to indicate whether the line is rendered as dashed or not.",
    )
    routing: Optional[Routing1] = Field(
        None, description="The routing algorithm used when rendering lines."
    )
    position: Optional[float] = Field(
        None,
        description="The position of the annotation along the line; 0 (start) to 100 (end).",
    )
    opacity: Optional[float] = Field(
        None, description="The opacity used when rendering the line; 0-100."
    )


class Format(Enum):
    Markdown = "Markdown"
    AsciiDoc = "AsciiDoc"


class DocumentationSection(BaseModel):
    title: Optional[str] = Field(
        None, description="The title (name/section heading) of the section."
    )
    content: Optional[str] = Field(
        None, description="The Markdown or AsciiDoc content of the section."
    )
    format: Optional[Format] = Field(None, description="The content format type.")
    order: Optional[float] = Field(
        None, description="The order (index) of the section in the document."
    )
    elementId: Optional[str] = Field(
        None,
        description="The ID of the element (in the model) that this section applies to (optional).",
    )


class Status(Enum):
    Proposed = "Proposed"
    Accepted = "Accepted"
    Superseded = "Superseded"
    Deprecated = "Deprecated"
    Rejected = "Rejected"


class Format1(Enum):
    Markdown = "Markdown"
    AsciiDoc = "AsciiDoc"


class Decision(BaseModel):
    id: Optional[str] = Field(None, description="The ID of the decision.")
    date: Optional[str] = Field(
        None, description="The date that the decision was made (ISO 8601 format)."
    )
    status: Optional[Status] = Field(None, description="The status of the decision.")
    title: Optional[str] = Field(None, description="The title of the decision.")
    content: Optional[str] = Field(
        None, description="The Markdown or AsciiDoc content of the section."
    )
    format: Optional[Format1] = Field(None, description="The content format type.")
    elementId: Optional[str] = Field(
        None,
        description="The ID of the element (in the model) that this decision applies to (optional).",
    )


class Image(BaseModel):
    name: Optional[str] = Field(None, description="The name of the image.")
    content: Optional[str] = Field(
        None, description="The (base64 encoded) content of the image."
    )
    type: Optional[str] = Field(
        None, description='The image MIME type (e.g. "image/png").'
    )


class DocumentationTemplateMetadata(BaseModel):
    name: Optional[str] = Field(
        None, description="The name of the documentation template."
    )
    author: Optional[str] = Field(
        None, description="The name of the author of the documentation template."
    )
    url: Optional[str] = Field(
        None,
        description="A URL that points to more information about the documentation template.",
    )


class Terminology(BaseModel):
    enterprise: Optional[str] = Field(
        None, description="The terminology used when rendering the enterprise boundary."
    )
    person: Optional[str] = Field(
        None, description="The terminology used when rendering people."
    )
    softwareSystem: Optional[str] = Field(
        None, description="The terminology used when rendering software systems."
    )
    container: Optional[str] = Field(
        None, description="The terminology used when rendering containers."
    )
    component: Optional[str] = Field(
        None, description="The terminology used when rendering components."
    )
    code: Optional[str] = Field(
        None, description="The terminology used when rendering code elements."
    )
    deploymentNode: Optional[str] = Field(
        None, description="The terminology used when rendering deployment nodes."
    )
    relationship: Optional[str] = Field(
        None, description="The terminology used when rendering relationships."
    )


class Role1(Enum):
    ReadWrite = "ReadWrite"
    ReadOnly = "ReadOnly"


class User(BaseModel):
    username: Optional[str] = Field(
        None, description="The username of the user (e.g. e-mail address)."
    )
    role: Optional[Role1] = Field(None, description="The user's role.")


class APIResponse(BaseModel):
    success: Optional[bool] = Field(
        None, description="true if the API call was successful, false otherwise."
    )
    message: Optional[str] = Field(
        None, description="A human readable response message."
    )
    revision: Optional[int] = Field(None, description="The internal revision number.")


class Person(BaseModel):
    id: Optional[str] = Field(None, description="The ID of this person in the model.")
    name: Optional[str] = Field(None, description="The name of this person.")
    description: Optional[str] = Field(
        None, description="A short description of this person."
    )
    tags: Optional[str] = Field(
        None, description="A comma separated list of tags associated with this person."
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    location: Optional[Location] = Field(
        None, description="The location of this person."
    )
    group: Optional[str] = Field(
        None,
        description="The name of the group in which this person should be included in.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None, description="The set of relationships from this person to other elements."
    )


class Component(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this component in the model."
    )
    name: Optional[str] = Field(None, description="The name of this component.")
    description: Optional[str] = Field(
        None, description="A short description of this component."
    )
    technology: Optional[str] = Field(
        None,
        description="The technology associated with this component (e.g. Spring Bean).",
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this component.",
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    code: Optional[List[CodeElement]] = Field(
        None, description="The set of code elements that make up this component."
    )
    group: Optional[str] = Field(
        None,
        description="The name of the group in which this component should be included in.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this component to other elements.",
    )


class InfrastructureNode(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this infrastructure node in the model."
    )
    name: Optional[str] = Field(
        None, description="The name of this infrastructure node."
    )
    description: Optional[str] = Field(
        None, description="A short description of this infrastructure node."
    )
    technology: Optional[str] = Field(
        None,
        description='The technology associated with this infrastructure node (e.g. "Route 53").',
    )
    environment: Optional[str] = Field(
        None,
        description='The deployment environment in which this infrastructure node resides (e.g. "Development", "Live", etc).',
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this infrastructure node.",
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this infrastructure node to other elements.",
    )


class SoftwareSystemInstance(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this software system instance in the model."
    )
    softwareSystemId: Optional[str] = Field(
        None, description="The ID of the software system this is an instance of."
    )
    instanceId: Optional[float] = Field(
        None, description="The number/index of this instance."
    )
    environment: Optional[str] = Field(
        None,
        description='The deployment environment in which this software system instance resides (e.g. "Development", "Live", etc).',
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this software system instance.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this software system instance to other elements.",
    )
    healthChecks: Optional[List[HttpHealthCheck]] = Field(
        None,
        description="The set of HTTP-based health checks for this software system instance.",
    )


class ContainerInstance(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this container instance in the model."
    )
    containerId: Optional[str] = Field(
        None, description="The ID of the container this is an instance of."
    )
    instanceId: Optional[float] = Field(
        None, description="The number/index of this instance."
    )
    environment: Optional[str] = Field(
        None,
        description='The deployment environment in which this container instance resides (e.g. "Development", "Live", etc).',
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this container instance.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this container instance to other elements.",
    )
    healthChecks: Optional[List[HttpHealthCheck]] = Field(
        None,
        description="The set of HTTP-based health checks for this container instance.",
    )


class RelationshipView(BaseModel):
    id: Optional[str] = Field(None, description="The ID of the relationship.")
    description: Optional[str] = Field(
        None,
        description="The description of this relationship (used in dynamic views only).",
    )
    response: Optional[bool] = Field(
        None,
        description="Signifies whether this relationship represents a return/response message (used in dynamic views only).",
    )
    order: Optional[str] = Field(
        None,
        description="Gets the order of this relationship (used in dynamic views only; e.g. 1.0, 1.1, 2.0, etc).",
    )
    vertices: Optional[List[Vertex]] = Field(
        None, description="The set of vertices used to render the relationship."
    )
    routing: Optional[Routing] = Field(
        None,
        description="The routing algorithm used when rendering this individual relationship.",
    )
    position: Optional[float] = Field(
        None,
        description="The position of the annotation along the line; 0 (start) to 100 (end).",
    )


class Styles(BaseModel):
    elements: Optional[List[ElementStyle]] = Field(
        None, description="The set of element styles."
    )
    relationships: Optional[List[RelationshipStyle]] = Field(
        None, description="The set of relationship styles."
    )


class Configuration(BaseModel):
    styles: Optional[Styles] = Field(
        None, description="The styles associated with this set of views."
    )
    lastSavedView: Optional[str] = Field(
        None, description="The key of the view that was saved most recently."
    )
    defaultView: Optional[str] = Field(
        None, description="The key of the view that should be shown by default."
    )
    themes: Optional[List[str]] = Field(
        None,
        description="The URL(s) of the theme(s) to be used when rendering diagrams.",
    )
    branding: Optional[Branding] = None
    terminology: Optional[Terminology] = None
    metadataSymbols: Optional[MetadataSymbols] = Field(
        None, description="The type of symbols to use when rendering metadata."
    )


class Documentation(BaseModel):
    sections: Optional[List[DocumentationSection]] = None
    decisions: Optional[List[Decision]] = None
    images: Optional[List[Image]] = None
    template: Optional[DocumentationTemplateMetadata] = None


class WorkspaceConfiguration(BaseModel):
    users: Optional[List[User]] = None


class Container(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this container in the model."
    )
    name: Optional[str] = Field(None, description="The name of this container.")
    description: Optional[str] = Field(
        None, description="A short description of this container."
    )
    technology: Optional[str] = Field(
        None,
        description="The technology associated with this container (e.g. Apache Tomcat).",
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this container.",
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    components: Optional[List[Component]] = Field(
        None, description="The set of components within this container."
    )
    group: Optional[str] = Field(
        None,
        description="The name of the group in which this container should be included in.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this container to other elements.",
    )


class DeploymentNode(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this deployment node in the model."
    )
    name: Optional[str] = Field(None, description="The name of this deployment node.")
    description: Optional[str] = Field(
        None, description="A short description of this deployment node."
    )
    technology: Optional[str] = Field(
        None,
        description="The technology associated with this deployment node (e.g. Apache Tomcat).",
    )
    environment: Optional[str] = Field(
        None,
        description='The deployment environment in which this deployment node resides (e.g. "Development", "Live", etc).',
    )
    instances: Optional[float] = Field(None, description="The number of instances.")
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this deployment node.",
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    children: Optional[List[DeploymentNode]] = Field(
        None, description="The set of child/nested deployment nodes."
    )
    infrastructureNodes: Optional[List[InfrastructureNode]] = None
    softwareSystemInstances: Optional[List[SoftwareSystemInstance]] = Field(
        None,
        description="The set of software systems instances running in this deployment node..",
    )
    containerInstances: Optional[List[ContainerInstance]] = Field(
        None,
        description="The set of container instances running in this deployment node..",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this deployment node to other elements.",
    )


class SystemLandscapeView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="A unique identifier for this view.")
    paperSize: Optional[PaperSize] = Field(
        None, description="The paper size that should be used to render this view."
    )
    dimensions: Optional[Dimensions] = None
    automaticLayout: Optional[AutomaticLayout] = None
    enterpriseBoundaryVisible: Optional[bool] = Field(
        None,
        description="Specifies whether the enterprise boundary (to differentiate internal elements from external elements) should be visible on the resulting diagram.",
    )
    elements: Optional[List[ElementView]] = Field(
        None, description="The set of elements in this views."
    )
    relationships: Optional[List[RelationshipView]] = Field(
        None, description="The set of relationships in this views."
    )
    animations: Optional[List[AnimationStep]] = Field(
        None, description="The set of animation steps (optional)."
    )


class SystemContextView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="A unique identifier for this view.")
    softwareSystemId: Optional[str] = Field(
        None, description="The ID of the software system this view is associated with."
    )
    paperSize: Optional[PaperSize1] = Field(
        None, description="The paper size that should be used to render this view."
    )
    dimensions: Optional[Dimensions] = None
    automaticLayout: Optional[AutomaticLayout] = None
    enterpriseBoundaryVisible: Optional[bool] = Field(
        None,
        description='Specifies whether the enterprise boundary (to differentiate internal elements from external elements") should be visible on the resulting diagram.',
    )
    elements: Optional[List[ElementView]] = Field(
        None, description="The set of elements in this view."
    )
    relationships: Optional[List[RelationshipView]] = Field(
        None, description="The set of relationships in this view."
    )
    animations: Optional[List[AnimationStep]] = Field(
        None, description="The set of animation steps (optional)."
    )


class ContainerView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="A unique identifier for this view.")
    softwareSystemId: Optional[str] = Field(
        None, description="The ID of the software system this view is associated with."
    )
    paperSize: Optional[PaperSize2] = Field(
        None, description="The paper size that should be used to render this view."
    )
    dimensions: Optional[Dimensions] = None
    automaticLayout: Optional[AutomaticLayout] = None
    elements: Optional[List[ElementView]] = Field(
        None, description="The set of elements in this views."
    )
    relationships: Optional[List[RelationshipView]] = Field(
        None, description="The set of relationships in this views."
    )
    animations: Optional[List[AnimationStep]] = Field(
        None, description="The set of animation steps (optional)."
    )
    externalSoftwareSystemBoundariesVisible: Optional[bool] = Field(
        None,
        description='Specifies whether software system boundaries should be visible for "external" containers (those outside the software system in scope).',
    )


class ComponentView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="A unique identifier for this view.")
    containerId: Optional[str] = Field(
        None, description="The ID of the container this view is associated with."
    )
    paperSize: Optional[PaperSize3] = Field(
        None, description="The paper size that should be used to render this view."
    )
    dimensions: Optional[Dimensions] = None
    automaticLayout: Optional[AutomaticLayout] = None
    elements: Optional[List[ElementView]] = Field(
        None, description="The set of elements in this views."
    )
    relationships: Optional[List[RelationshipView]] = Field(
        None, description="The set of relationships in this views."
    )
    animations: Optional[List[AnimationStep]] = Field(
        None, description="The set of animation steps (optional)."
    )
    externalContainerBoundariesVisible: Optional[bool] = Field(
        None,
        description='Specifies whether container boundaries should be visible for "external" components (those outside the container in scope).',
    )


class DynamicView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="An identifier for this view.")
    elementId: Optional[str] = Field(
        None,
        description="The ID of the element this view is associated with (optional).",
    )
    paperSize: Optional[PaperSize4] = Field(
        None, description="The paper size that should be used to render this view."
    )
    dimensions: Optional[Dimensions] = None
    automaticLayout: Optional[AutomaticLayout] = None
    elements: Optional[List[ElementView]] = Field(
        None, description="The set of elements in this views."
    )
    relationships: Optional[List[RelationshipView]] = Field(
        None, description="The set of relationships in this views."
    )
    externalBoundariesVisible: Optional[bool] = Field(
        None,
        description='Specifies software system/container boundaries should be visible for "external" containers/components (those outside the element in scope)',
    )


class DeploymentView(BaseModel):
    title: Optional[str] = Field(None, description="The title of this view (optional).")
    description: Optional[str] = Field(
        None, description="The description of this view."
    )
    key: Optional[str] = Field(None, description="A unique identifier for this view.")
    softwareSystemId: Optional[str] = Field(
        None,
        description="The ID of the software system this view is associated with (optional).",
    )
    environment: Optional[str] = Field(
        None,
        description='The name of the environment that this deployment view is for (e.g. "Development", "Live", etc).',
    )
    paperSize: Optional[PaperSize5] = Field(
        None, description="The paper size that should be used to render this view."
    )
    dimensions: Optional[Dimensions] = None
    automaticLayout: Optional[AutomaticLayout] = None
    elements: Optional[List[ElementView]] = Field(
        None, description="The set of elements in this views."
    )
    relationships: Optional[List[RelationshipView]] = Field(
        None, description="The set of relationships in this views."
    )
    animations: Optional[List[AnimationStep]] = Field(
        None, description="The set of animation steps (optional)."
    )


class SoftwareSystem(BaseModel):
    id: Optional[str] = Field(
        None, description="The ID of this software system in the model."
    )
    name: Optional[str] = Field(None, description="The name of this software system.")
    description: Optional[str] = Field(
        None, description="A short description of this software system."
    )
    location: Optional[Location1] = Field(
        None, description="The location of this software system."
    )
    tags: Optional[str] = Field(
        None,
        description="A comma separated list of tags associated with this software system.",
    )
    url: Optional[str] = Field(
        None,
        description="The URL where more information about this element can be found.",
    )
    containers: Optional[List[Container]] = Field(
        None, description="The set of containers within this software system."
    )
    group: Optional[str] = Field(
        None,
        description="The name of the group in which this software system should be included in.",
    )
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )
    relationships: Optional[List[Relationship]] = Field(
        None,
        description="The set of relationships from this software system to other elements.",
    )


class Views(BaseModel):
    systemLandscapeViews: Optional[List[SystemLandscapeView]] = Field(
        None, description="The set of system landscape views."
    )
    systemContextViews: Optional[List[SystemContextView]] = Field(
        None, description="The set of system context views."
    )
    containerViews: Optional[List[ContainerView]] = Field(
        None, description="The set of container views."
    )
    componentViews: Optional[List[ComponentView]] = Field(
        None, description="The set of component views."
    )
    dynamicViews: Optional[List[DynamicView]] = Field(
        None, description="The set of dynamic views."
    )
    deploymentView: Optional[List[DeploymentView]] = Field(
        None, description="The set of deployment views."
    )
    filteredViews: Optional[List[FilteredView]] = Field(
        None, description="The set of filtered views."
    )
    configuration: Optional[Configuration] = None


class Model(BaseModel):
    enterprise: Optional[Enterprise] = Field(
        None, description="The enterprise associated with this model."
    )
    people: Optional[List[Person]] = None
    softwareSystems: Optional[List[SoftwareSystem]] = None
    deploymentNodes: Optional[List[DeploymentNode]] = None


class Workspace(BaseModel):
    id: Optional[float] = Field(None, description="The workspace ID.")
    name: Optional[str] = Field(None, description="The name of the workspace.")
    description: Optional[str] = Field(
        None, description="A short description of the workspace."
    )
    version: Optional[str] = Field(
        None, description="A version number for the workspace."
    )
    thumbnail: Optional[str] = Field(
        None,
        description="The thumbnail associated with the workspace; a Base64 encoded PNG file as a data URI (data:image/png;base64).",
    )
    lastModifiedDate: Optional[str] = Field(
        None,
        description='The last modified date, in ISO 8601 format (e.g. "2018-09-08T12:40:03Z").',
    )
    lastModifiedUser: Optional[str] = Field(
        None,
        description="A string identifying the user who last modified the workspace (e.g. an e-mail address or username).",
    )
    lastModifiedAgent: Optional[str] = Field(
        None,
        description='A string identifying the agent that was last used to modify the workspace (e.g. "structurizr-java/1.2.0").',
    )
    model: Optional[Model] = None
    views: Optional[Views] = None
    documentation: Optional[Documentation] = None
    configuration: Optional[WorkspaceConfiguration] = None
    properties: Optional[Dict[str, Any]] = Field(
        None, description="A set of arbitrary name-value properties."
    )


DeploymentNode.update_forward_refs()
