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

from __future__ import annotations
from .datecreate import DateCreate, DateCreateTypedDict
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 IRABeneficiaryEnrollmentMetadataCreateDividendReinvestmentPlan(
    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 IRABeneficiaryEnrollmentMetadataCreateFdicCashSweep(
    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 IRABeneficiaryEnrollmentMetadataCreateTypedDict(TypedDict):
    r"""Enrollment metadata for beneficiary IRA accounts enrollment type"""

    inherited_from_owner_name: str
    r"""The name of the owner from whom the account is inherited"""
    inheritor_is_decedents_spouse: bool
    r"""Indicates if the customer is the spouse of the decedent"""
    dividend_reinvestment_plan: NotRequired[
        IRABeneficiaryEnrollmentMetadataCreateDividendReinvestmentPlan
    ]
    r"""Option to auto-enroll in dividend reinvestment; defaults to true"""
    fdic_cash_sweep: NotRequired[IRABeneficiaryEnrollmentMetadataCreateFdicCashSweep]
    r"""Option to auto-enroll in FDIC cash sweep; defaults to true"""
    inherited_from_owner_birth_date: NotRequired[DateCreateTypedDict]
    r"""Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

    * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date

    Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
    """
    inherited_from_owner_death_date: NotRequired[DateCreateTypedDict]
    r"""Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

    * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date

    Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
    """


class IRABeneficiaryEnrollmentMetadataCreate(BaseModel):
    r"""Enrollment metadata for beneficiary IRA accounts enrollment type"""

    inherited_from_owner_name: str
    r"""The name of the owner from whom the account is inherited"""

    inheritor_is_decedents_spouse: bool
    r"""Indicates if the customer is the spouse of the decedent"""

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

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

    inherited_from_owner_birth_date: Optional[DateCreate] = None
    r"""Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

    * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date

    Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
    """

    inherited_from_owner_death_date: Optional[DateCreate] = None
    r"""Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

    * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date

    Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
    """
