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

from __future__ import annotations
from ascend_sdk import utils
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import validate_open_enum
from enum import Enum
from pydantic.functional_validators import PlainValidator
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class MatchState(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Match state - whether or not the match is confirmed"""

    MATCH_UNSPECIFIED = "MATCH_UNSPECIFIED"
    CONFIRMED_MATCH = "CONFIRMED_MATCH"
    POTENTIAL_MATCH = "POTENTIAL_MATCH"
    NO_MATCH = "NO_MATCH"
    INCONCLUSIVE = "INCONCLUSIVE"


class WatchlistMatchTypedDict(TypedDict):
    r"""Matched profile details"""

    active: NotRequired[bool]
    r"""Identifies if the entry is active or not"""
    exclude_from_screening: NotRequired[bool]
    r"""Identifies that a confirmed watchlist match can be excluded when calculating the related screen state"""
    match_state: NotRequired[MatchState]
    r"""Match state - whether or not the match is confirmed"""
    watchlist_id: NotRequired[str]
    r"""Indicates the watchlist source for a given match"""
    watchlist_item_id: NotRequired[int]
    r"""Identification number for the watchlist item that was matched"""


class WatchlistMatch(BaseModel):
    r"""Matched profile details"""

    active: Optional[bool] = None
    r"""Identifies if the entry is active or not"""

    exclude_from_screening: Optional[bool] = None
    r"""Identifies that a confirmed watchlist match can be excluded when calculating the related screen state"""

    match_state: Annotated[
        Optional[MatchState], PlainValidator(validate_open_enum(False))
    ] = None
    r"""Match state - whether or not the match is confirmed"""

    watchlist_id: Optional[str] = None
    r"""Indicates the watchlist source for a given match"""

    watchlist_item_id: Optional[int] = None
    r"""Identification number for the watchlist item that was matched"""
