"""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 IRASEPEnrollmentMetadataCreateDividendReinvestmentPlan(
    str, Enum, metaclass=utils.OpenEnumMeta
):
    r"""Option to auto-enroll in Dividend Reinvestment; defaults to true"""

    AUTO_ENROLL_DIVIDEND_REINVESTMENT_UNSPECIFIED = (
        "AUTO_ENROLL_DIVIDEND_REINVESTMENT_UNSPECIFIED"
    )
    DIVIDEND_REINVESTMENT_ENROLL = "DIVIDEND_REINVESTMENT_ENROLL"
    DIVIDEND_REINVESTMENT_DECLINE = "DIVIDEND_REINVESTMENT_DECLINE"


class IRASEPEnrollmentMetadataCreateFdicCashSweep(
    str, Enum, metaclass=utils.OpenEnumMeta
):
    r"""Option to auto-enroll in FDIC cash sweep; defaults to true"""

    AUTO_ENROLL_FDIC_CASH_SWEEP_UNSPECIFIED = "AUTO_ENROLL_FDIC_CASH_SWEEP_UNSPECIFIED"
    FDIC_CASH_SWEEP_ENROLL = "FDIC_CASH_SWEEP_ENROLL"
    FDIC_CASH_SWEEP_DECLINE = "FDIC_CASH_SWEEP_DECLINE"


class IRASEPEnrollmentMetadataCreateTypedDict(TypedDict):
    r"""Enrollment metadata for IRA SEP_IRA accounts enrollment type"""

    dividend_reinvestment_plan: NotRequired[
        IRASEPEnrollmentMetadataCreateDividendReinvestmentPlan
    ]
    r"""Option to auto-enroll in Dividend Reinvestment; defaults to true"""
    fdic_cash_sweep: NotRequired[IRASEPEnrollmentMetadataCreateFdicCashSweep]
    r"""Option to auto-enroll in FDIC cash sweep; defaults to true"""


class IRASEPEnrollmentMetadataCreate(BaseModel):
    r"""Enrollment metadata for IRA SEP_IRA accounts enrollment type"""

    dividend_reinvestment_plan: Annotated[
        Optional[IRASEPEnrollmentMetadataCreateDividendReinvestmentPlan],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""Option to auto-enroll in Dividend Reinvestment; defaults to true"""

    fdic_cash_sweep: Annotated[
        Optional[IRASEPEnrollmentMetadataCreateFdicCashSweep],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""Option to auto-enroll in FDIC cash sweep; defaults to true"""
