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

from __future__ import annotations
from .v3_globaleventrules_entityowner import (
    V3GlobalEventRulesEntityOwner,
    V3GlobalEventRulesEntityOwnerTypedDict,
)
from .v3_globaleventrules_ruleset import (
    V3GlobalEventRulesRuleset,
    V3GlobalEventRulesRulesetTypedDict,
)
from datetime import datetime
from squadcast_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class V3GlobalEventRulesCreatedGlobalEventRuleResponseTypedDict(TypedDict):
    id: int
    owner_id: str
    name: str
    description: str
    routing_key: str
    created_at: datetime
    created_by: str
    updated_at: datetime
    updated_by: str
    entity_owner: NotRequired[V3GlobalEventRulesEntityOwnerTypedDict]
    rulesets: NotRequired[List[V3GlobalEventRulesRulesetTypedDict]]


class V3GlobalEventRulesCreatedGlobalEventRuleResponse(BaseModel):
    id: int

    owner_id: str

    name: str

    description: str

    routing_key: str

    created_at: datetime

    created_by: str

    updated_at: datetime

    updated_by: str

    entity_owner: Optional[V3GlobalEventRulesEntityOwner] = None

    rulesets: Optional[List[V3GlobalEventRulesRuleset]] = None
