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

from __future__ import annotations
from .decimalcreate import DecimalCreate, DecimalCreateTypedDict
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 RetrieveQuoteRequestCreateAssetType(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""The type of asset being evaluated in cost calculations"""

    FIXED_INCOME = "FIXED_INCOME"


class RetrieveQuoteRequestCreateBrokerCapacity(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Capacity used in determining bid and ask prices. Defaults to \"AGENCY\" if no value specified."""

    BROKER_CAPACITY_UNSPECIFIED = "BROKER_CAPACITY_UNSPECIFIED"
    AGENCY = "AGENCY"
    PRINCIPAL = "PRINCIPAL"


class RetrieveQuoteRequestCreateIdentifierType(str, Enum):
    r"""The identifier type of the asset being sought"""

    ASSET_ID = "ASSET_ID"
    CUSIP = "CUSIP"
    ISIN = "ISIN"


class RetrieveQuoteRequestCreateTypedDict(TypedDict):
    r"""Request object for retrieving fixed income quotes"""

    asset_type: RetrieveQuoteRequestCreateAssetType
    r"""The type of asset being evaluated in cost calculations"""
    identifier: str
    r"""Identifier of the asset (of the type specified in `identifier_type`)."""
    identifier_type: RetrieveQuoteRequestCreateIdentifierType
    r"""The identifier type of the asset being sought"""
    parent: str
    r"""The parent resource where this order will be created. Format: accounts/{account_id}"""
    broker_capacity: NotRequired[RetrieveQuoteRequestCreateBrokerCapacity]
    r"""Capacity used in determining bid and ask prices. Defaults to \"AGENCY\" if no value specified."""
    minimum_quantity: NotRequired[DecimalCreateTypedDict]
    r"""A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].

    [BigDecimal]:
    https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html
    [decimal.Decimal]: https://docs.python.org/3/library/decimal.html
    """


class RetrieveQuoteRequestCreate(BaseModel):
    r"""Request object for retrieving fixed income quotes"""

    asset_type: Annotated[
        RetrieveQuoteRequestCreateAssetType, PlainValidator(validate_open_enum(False))
    ]
    r"""The type of asset being evaluated in cost calculations"""

    identifier: str
    r"""Identifier of the asset (of the type specified in `identifier_type`)."""

    identifier_type: RetrieveQuoteRequestCreateIdentifierType
    r"""The identifier type of the asset being sought"""

    parent: str
    r"""The parent resource where this order will be created. Format: accounts/{account_id}"""

    broker_capacity: Annotated[
        Optional[RetrieveQuoteRequestCreateBrokerCapacity],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""Capacity used in determining bid and ask prices. Defaults to \"AGENCY\" if no value specified."""

    minimum_quantity: Optional[DecimalCreate] = None
    r"""A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].

    [BigDecimal]:
    https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html
    [decimal.Decimal]: https://docs.python.org/3/library/decimal.html
    """
