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

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


class InvestorCommunicationServiceListDocumentsRequestTypedDict(TypedDict):
    page_size: NotRequired[int]
    r"""The maximum number of items to return; The service may return fewer than this value"""
    page_token: NotRequired[str]
    r"""Token used to get a specific page of results"""
    filter_: NotRequired[str]
    r"""CEL filter to be applied against the documents; Providing a correspondent to search for is required; Only one correspondent can be searched at a time"""


class InvestorCommunicationServiceListDocumentsRequest(BaseModel):
    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""The maximum number of items to return; The service may return fewer than this value"""

    page_token: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Token used to get a specific page of results"""

    filter_: Annotated[
        Optional[str],
        pydantic.Field(alias="filter"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""CEL filter to be applied against the documents; Providing a correspondent to search for is required; Only one correspondent can be searched at a time"""


class InvestorCommunicationServiceListDocumentsResponseTypedDict(TypedDict):
    http_meta: components_httpmetadata.HTTPMetadataTypedDict
    list_documents_response: NotRequired[
        components_listdocumentsresponse.ListDocumentsResponseTypedDict
    ]
    r"""OK"""
    status: NotRequired[components_status.StatusTypedDict]
    r"""INVALID_ARGUMENT: The request was not well formed."""


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

    list_documents_response: Optional[
        components_listdocumentsresponse.ListDocumentsResponse
    ] = None
    r"""OK"""

    status: Optional[components_status.Status] = None
    r"""INVALID_ARGUMENT: The request was not well formed."""
