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

from __future__ import annotations
from ascend_sdk.models.components import (
    httpmetadata as components_httpmetadata,
    listcontributionsummariesresponse as components_listcontributionsummariesresponse,
    status as components_status,
)
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class RetirementConstraintsListContributionSummariesRequestTypedDict(TypedDict):
    account_id: str
    r"""The account id."""
    page_size: NotRequired[int]
    r"""Number of contribution summaries to get (partitioned by tax year) Default = 2 (current year and prior year), maximum = 10"""
    page_token: NotRequired[str]
    r"""When paginating, this is used to retrieve a specific page from the overall response"""


class RetirementConstraintsListContributionSummariesRequest(BaseModel):
    account_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The account id."""

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Number of contribution summaries to get (partitioned by tax year) Default = 2 (current year and prior year), maximum = 10"""

    page_token: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""When paginating, this is used to retrieve a specific page from the overall response"""


class RetirementConstraintsListContributionSummariesResponseTypedDict(TypedDict):
    http_meta: components_httpmetadata.HTTPMetadataTypedDict
    list_contribution_summaries_response: NotRequired[
        components_listcontributionsummariesresponse.ListContributionSummariesResponseTypedDict
    ]
    r"""OK"""
    status: NotRequired[components_status.StatusTypedDict]
    r"""INVALID_ARGUMENT: The request has an invalid argument."""


class RetirementConstraintsListContributionSummariesResponse(BaseModel):
    http_meta: Annotated[
        Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True)
    ] = None

    list_contribution_summaries_response: Optional[
        components_listcontributionsummariesresponse.ListContributionSummariesResponse
    ] = None
    r"""OK"""

    status: Optional[components_status.Status] = None
    r"""INVALID_ARGUMENT: The request has an invalid argument."""
