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

from __future__ import annotations
from .foreignbondtradingdetailscreate import (
    ForeignBondTradingDetailsCreate,
    ForeignBondTradingDetailsCreateTypedDict,
)
from .lowpricedsecuritiescreate import (
    LowPricedSecuritiesCreate,
    LowPricedSecuritiesCreateTypedDict,
)
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_extensions import Annotated, TypedDict


class PrimaryAccountActivityType(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""The primary account activity type"""

    PRIMARY_ACCOUNT_ACTIVITY_TYPE_UNSPECIFIED = (
        "PRIMARY_ACCOUNT_ACTIVITY_TYPE_UNSPECIFIED"
    )
    ACTIVE_TRADING = "ACTIVE_TRADING"
    SHORT_TERM_INVESTING = "SHORT_TERM_INVESTING"
    LONG_TERM_INVESTING = "LONG_TERM_INVESTING"


class WithdrawalFrequency(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""The frequency by which cash is anticipated to be withdrawn from the account"""

    WITHDRAWAL_FREQUENCY_UNSPECIFIED = "WITHDRAWAL_FREQUENCY_UNSPECIFIED"
    FREQUENT = "FREQUENT"
    OCCASIONAL = "OCCASIONAL"
    RARE = "RARE"


class PlannedActivityCreateTypedDict(TypedDict):
    r"""Details the customer's intended trading and banking-related activities at the time of account application; informs risk checks and forms a baseline for anomalous activity detection"""

    foreign_bond_trading_details: ForeignBondTradingDetailsCreateTypedDict
    r"""Foreign bond trading detail"""
    low_priced_securities: LowPricedSecuritiesCreateTypedDict
    r"""Low priced securities"""
    primary_account_activity_type: PrimaryAccountActivityType
    r"""The primary account activity type"""
    withdrawal_frequency: WithdrawalFrequency
    r"""The frequency by which cash is anticipated to be withdrawn from the account"""


class PlannedActivityCreate(BaseModel):
    r"""Details the customer's intended trading and banking-related activities at the time of account application; informs risk checks and forms a baseline for anomalous activity detection"""

    foreign_bond_trading_details: ForeignBondTradingDetailsCreate
    r"""Foreign bond trading detail"""

    low_priced_securities: LowPricedSecuritiesCreate
    r"""Low priced securities"""

    primary_account_activity_type: Annotated[
        PrimaryAccountActivityType, PlainValidator(validate_open_enum(False))
    ]
    r"""The primary account activity type"""

    withdrawal_frequency: Annotated[
        WithdrawalFrequency, PlainValidator(validate_open_enum(False))
    ]
    r"""The frequency by which cash is anticipated to be withdrawn from the account"""
