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

from __future__ import annotations
from enum import Enum
from novu_py.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class Target(str, Enum):
    r"""Target window for the redirection."""

    SELF = "_self"
    BLANK = "_blank"
    PARENT = "_parent"
    TOP = "_top"
    UNFENCED_TOP = "_unfencedTop"


class RedirectDtoTypedDict(TypedDict):
    url: NotRequired[str]
    r"""URL for redirection. Must be a valid URL or start with / or {{ variable }}."""
    target: NotRequired[Target]
    r"""Target window for the redirection."""


class RedirectDto(BaseModel):
    url: Optional[str] = None
    r"""URL for redirection. Must be a valid URL or start with / or {{ variable }}."""

    target: Optional[Target] = Target.SELF
    r"""Target window for the redirection."""
