# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .page_identifier import PageIdentifier
from .pagesize import Pagesize
from .totalpages import Totalpages
from .totalrecords import Totalrecords


class BillQueryResponseSummary(UniversalBaseModel):
    pageidentifier: typing.Optional[PageIdentifier] = None
    page_size: typing_extensions.Annotated[typing.Optional[Pagesize], FieldMetadata(alias="pageSize")] = None
    total_2_approval: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="total2approval")] = None
    totalactive: typing.Optional[int] = None
    total_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="totalAmount")] = (
        pydantic.Field(default=None)
    )
    """
    Total amount of bills in response.
    """

    totalamount_2_approval: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="totalamount2approval")
    ] = None
    totalamountactive: typing.Optional[float] = None
    totalamountapproved: typing.Optional[float] = pydantic.Field(default=None)
    """
    The total amount of approved bills.
    """

    totalamountcancel: typing.Optional[float] = None
    totalamountdisapproved: typing.Optional[float] = pydantic.Field(default=None)
    """
    The total amount of disapproved bills.
    """

    totalamountintransit: typing.Optional[float] = None
    totalamountoverdue: typing.Optional[float] = pydantic.Field(default=None)
    """
    The total amount of bills that are overdue.
    """

    totalamountpaid: typing.Optional[float] = pydantic.Field(default=None)
    """
    The total amount of paid bills.
    """

    totalamountsent_2_approval: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="totalamountsent2approval")
    ] = None
    totalapproved: typing.Optional[int] = pydantic.Field(default=None)
    """
    The total number of bills that were approved.
    """

    totalcancel: typing.Optional[int] = None
    totaldisapproved: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of bills that were disapproved.
    """

    totalintransit: typing.Optional[int] = None
    totaloverdue: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of bills that are overdue.
    """

    total_pages: typing_extensions.Annotated[typing.Optional[Totalpages], FieldMetadata(alias="totalPages")] = None
    totalpaid: typing.Optional[int] = pydantic.Field(default=None)
    """
    The total number of paid bills.
    """

    total_records: typing_extensions.Annotated[typing.Optional[Totalrecords], FieldMetadata(alias="totalRecords")] = (
        None
    )
    totalsent_2_approval: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="totalsent2approval")
    ] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
