"""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 AccountGoalsUpdateInvestmentObjective(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""The financial goal or purpose that an investor has in mind when making investment decisions; firms often ask investors to specify their investment objectives when opening an account, in order to provide appropriate investment recommendations and manage risk appropriately"""

    INVESTMENT_OBJECTIVE_UNSPECIFIED = "INVESTMENT_OBJECTIVE_UNSPECIFIED"
    BALANCED = "BALANCED"
    CAPITAL_APPRECIATION = "CAPITAL_APPRECIATION"
    CAPITAL_PRESERVATION = "CAPITAL_PRESERVATION"
    GROWTH = "GROWTH"
    GROWTH_AND_INCOME = "GROWTH_AND_INCOME"
    GROWTH_INCOME = "GROWTH_INCOME"
    INCOME = "INCOME"
    LONG_TERM_GROWTH_WITH_GREATER_RISK = "LONG_TERM_GROWTH_WITH_GREATER_RISK"
    LONG_TERM_GROWTH_WITH_SAFETY = "LONG_TERM_GROWTH_WITH_SAFETY"
    MAXIMUM_GROWTH = "MAXIMUM_GROWTH"
    SHORT_TERM_GROWTH_WITH_RISK = "SHORT_TERM_GROWTH_WITH_RISK"
    SPECULATION = "SPECULATION"
    OTHER = "OTHER"


class AccountGoalsUpdateLiquidityNeeds(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""An investor’s short-term cash requirements or the need to access funds quickly; it is important to consider an investor’s liquidity needs to ensure that they have sufficient cash or easily liquidated assets available to meet their financial obligations - this may include holding cash or cash equivalents"""

    LIQUIDITY_NEEDS_UNSPECIFIED = "LIQUIDITY_NEEDS_UNSPECIFIED"
    VERY_IMPORTANT = "VERY_IMPORTANT"
    SOMEWHAT_IMPORTANT = "SOMEWHAT_IMPORTANT"
    NOT_IMPORTANT = "NOT_IMPORTANT"


class AccountGoalsUpdateRiskTolerance(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""An investor’s willingness and ability to tolerate risk when making investment decisions; reflects the investor’s comfort level with the potential ups and downs of the market and their ability to withstand potential losses"""

    RISK_TOLERANCE_UNSPECIFIED = "RISK_TOLERANCE_UNSPECIFIED"
    LOW = "LOW"
    MEDIUM = "MEDIUM"
    HIGH = "HIGH"


class AccountGoalsUpdateTimeHorizon(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""TThe length of time an investor expects to hold an investment before selling it; this can affect the appropriate asset allocation and risk level for the portfolio"""

    TIME_HORIZON_UNSPECIFIED = "TIME_HORIZON_UNSPECIFIED"
    SHORT = "SHORT"
    AVERAGE = "AVERAGE"
    LONG = "LONG"


class AccountGoalsUpdateTypedDict(TypedDict):
    r"""The account goals on an investor profile."""

    investment_objective: NotRequired[AccountGoalsUpdateInvestmentObjective]
    r"""The financial goal or purpose that an investor has in mind when making investment decisions; firms often ask investors to specify their investment objectives when opening an account, in order to provide appropriate investment recommendations and manage risk appropriately"""
    liquidity_needs: NotRequired[AccountGoalsUpdateLiquidityNeeds]
    r"""An investor’s short-term cash requirements or the need to access funds quickly; it is important to consider an investor’s liquidity needs to ensure that they have sufficient cash or easily liquidated assets available to meet their financial obligations - this may include holding cash or cash equivalents"""
    risk_tolerance: NotRequired[AccountGoalsUpdateRiskTolerance]
    r"""An investor’s willingness and ability to tolerate risk when making investment decisions; reflects the investor’s comfort level with the potential ups and downs of the market and their ability to withstand potential losses"""
    time_horizon: NotRequired[AccountGoalsUpdateTimeHorizon]
    r"""TThe length of time an investor expects to hold an investment before selling it; this can affect the appropriate asset allocation and risk level for the portfolio"""


class AccountGoalsUpdate(BaseModel):
    r"""The account goals on an investor profile."""

    investment_objective: Annotated[
        Optional[AccountGoalsUpdateInvestmentObjective],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""The financial goal or purpose that an investor has in mind when making investment decisions; firms often ask investors to specify their investment objectives when opening an account, in order to provide appropriate investment recommendations and manage risk appropriately"""

    liquidity_needs: Annotated[
        Optional[AccountGoalsUpdateLiquidityNeeds],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""An investor’s short-term cash requirements or the need to access funds quickly; it is important to consider an investor’s liquidity needs to ensure that they have sufficient cash or easily liquidated assets available to meet their financial obligations - this may include holding cash or cash equivalents"""

    risk_tolerance: Annotated[
        Optional[AccountGoalsUpdateRiskTolerance],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""An investor’s willingness and ability to tolerate risk when making investment decisions; reflects the investor’s comfort level with the potential ups and downs of the market and their ability to withstand potential losses"""

    time_horizon: Annotated[
        Optional[AccountGoalsUpdateTimeHorizon],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""TThe length of time an investor expects to hold an investment before selling it; this can affect the appropriate asset allocation and risk level for the portfolio"""
