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

from __future__ import annotations
from .msteamsuserendpointdto import (
    MsTeamsUserEndpointDto,
    MsTeamsUserEndpointDtoTypedDict,
)
from enum import Enum
from novu_py.types import BaseModel
import pydantic
from typing import Any, Dict, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


class CreateMsTeamsUserEndpointDtoContext2TypedDict(TypedDict):
    r"""Rich context object with id and optional data"""

    id: str
    data: NotRequired[Dict[str, Any]]
    r"""Optional additional context data"""


class CreateMsTeamsUserEndpointDtoContext2(BaseModel):
    r"""Rich context object with id and optional data"""

    id: str

    data: Optional[Dict[str, Any]] = None
    r"""Optional additional context data"""


CreateMsTeamsUserEndpointDtoContextTypedDict = TypeAliasType(
    "CreateMsTeamsUserEndpointDtoContextTypedDict",
    Union[CreateMsTeamsUserEndpointDtoContext2TypedDict, str],
)


CreateMsTeamsUserEndpointDtoContext = TypeAliasType(
    "CreateMsTeamsUserEndpointDtoContext",
    Union[CreateMsTeamsUserEndpointDtoContext2, str],
)


class CreateMsTeamsUserEndpointDtoType(str, Enum):
    r"""Type of channel endpoint"""

    MS_TEAMS_USER = "ms_teams_user"


class CreateMsTeamsUserEndpointDtoTypedDict(TypedDict):
    subscriber_id: str
    r"""The subscriber ID to which the channel endpoint is linked"""
    integration_identifier: str
    r"""The identifier of the integration to use for this channel endpoint."""
    type: CreateMsTeamsUserEndpointDtoType
    r"""Type of channel endpoint"""
    endpoint: MsTeamsUserEndpointDtoTypedDict
    r"""MS Teams user endpoint data"""
    identifier: NotRequired[str]
    r"""The unique identifier for the channel endpoint. If not provided, one will be generated automatically."""
    context: NotRequired[Dict[str, CreateMsTeamsUserEndpointDtoContextTypedDict]]
    connection_identifier: NotRequired[str]
    r"""The identifier of the channel connection to use for this channel endpoint."""


class CreateMsTeamsUserEndpointDto(BaseModel):
    subscriber_id: Annotated[str, pydantic.Field(alias="subscriberId")]
    r"""The subscriber ID to which the channel endpoint is linked"""

    integration_identifier: Annotated[
        str, pydantic.Field(alias="integrationIdentifier")
    ]
    r"""The identifier of the integration to use for this channel endpoint."""

    type: CreateMsTeamsUserEndpointDtoType
    r"""Type of channel endpoint"""

    endpoint: MsTeamsUserEndpointDto
    r"""MS Teams user endpoint data"""

    identifier: Optional[str] = None
    r"""The unique identifier for the channel endpoint. If not provided, one will be generated automatically."""

    context: Optional[Dict[str, CreateMsTeamsUserEndpointDtoContext]] = None

    connection_identifier: Annotated[
        Optional[str], pydantic.Field(alias="connectionIdentifier")
    ] = None
    r"""The identifier of the channel connection to use for this channel endpoint."""
