"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .v3_workflows_actionrequest import (
    V3WorkflowsActionRequest,
    V3WorkflowsActionRequestTypedDict,
)
from .v3_workflows_createworkflowfilter import (
    V3WorkflowsCreateWorkflowFilter,
    V3WorkflowsCreateWorkflowFilterTypedDict,
)
from .v3_workflows_entityowner import (
    V3WorkflowsEntityOwner,
    V3WorkflowsEntityOwnerTypedDict,
)
from .v3_workflows_tag import V3WorkflowsTag, V3WorkflowsTagTypedDict
from .v3_workflows_workflowtrigger import V3WorkflowsWorkflowTrigger
from squadcast_sdk.types import BaseModel
from typing import List, Literal, Optional
from typing_extensions import NotRequired, TypedDict


V3WorkflowsCreateWorkflowRequestOwnerType = Literal[
    "user",
    "squad",
]


class V3WorkflowsCreateWorkflowRequestTypedDict(TypedDict):
    title: str
    owner_id: str
    trigger: V3WorkflowsWorkflowTrigger
    filters: V3WorkflowsCreateWorkflowFilterTypedDict
    actions: List[V3WorkflowsActionRequestTypedDict]
    description: NotRequired[str]
    owner_type: NotRequired[V3WorkflowsCreateWorkflowRequestOwnerType]
    entity_owner: NotRequired[V3WorkflowsEntityOwnerTypedDict]
    tags: NotRequired[List[V3WorkflowsTagTypedDict]]
    enabled: NotRequired[bool]


class V3WorkflowsCreateWorkflowRequest(BaseModel):
    title: str

    owner_id: str

    trigger: V3WorkflowsWorkflowTrigger

    filters: V3WorkflowsCreateWorkflowFilter

    actions: List[V3WorkflowsActionRequest]

    description: Optional[str] = None

    owner_type: Optional[V3WorkflowsCreateWorkflowRequestOwnerType] = None

    entity_owner: Optional[V3WorkflowsEntityOwner] = None

    tags: Optional[List[V3WorkflowsTag]] = None

    enabled: Optional[bool] = None
