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

from __future__ import annotations
from abbyy_document_ai.types import BaseModel
from datetime import date
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PartyTypedDict(TypedDict):
    organization_name: NotRequired[str]
    r"""The legal name of a party"""
    person_name: NotRequired[str]
    r"""The name of the individual who represents or acts on behalf of a party"""
    role: NotRequired[str]
    r"""The role of a party. Examples of roles include seller, buyer, service provider, or client"""
    address: NotRequired[str]
    r"""The address of a party"""


class Party(BaseModel):
    organization_name: Annotated[
        Optional[str], pydantic.Field(alias="organizationName")
    ] = None
    r"""The legal name of a party"""

    person_name: Annotated[Optional[str], pydantic.Field(alias="personName")] = None
    r"""The name of the individual who represents or acts on behalf of a party"""

    role: Optional[str] = None
    r"""The role of a party. Examples of roles include seller, buyer, service provider, or client"""

    address: Optional[str] = None
    r"""The address of a party"""


class BasicContractFieldsTypedDict(TypedDict):
    r"""Fields extracted from a basic contract"""

    title: NotRequired[str]
    r"""The title of the contract"""
    party: NotRequired[List[PartyTypedDict]]
    deal_amount: NotRequired[float]
    r"""The amount or value of the contract"""
    agreement_date: NotRequired[date]
    r"""The date on which the contract was officially executed or agreed upon by the parties"""
    effective_date: NotRequired[date]
    r"""The start date of the contract"""
    expiration_date: NotRequired[date]
    r"""The expiration date of the contract"""
    initial_term: NotRequired[str]
    r"""The initial period of time for which the contract will be in effect before any renewal or extension options are considered"""
    renewal_term: NotRequired[str]
    r"""The additional period of time for which the contract can be extended or renewed after the initial term has expired"""
    governing_law: NotRequired[str]
    r"""The jurisdiction that will govern the interpretation, enforcement, and resolution of any disputes or legal issues arising from the contract"""
    security_deposit: NotRequired[float]
    r"""The amount of money that the party providing the security deposit is required to pay"""
    insurance_clause: NotRequired[str]
    r"""The insurance requirements and responsibilities of the parties"""
    limitation_of_liability: NotRequired[float]
    r"""The maximum monetary amount for which a party can be held liable in the event of a breach or dispute"""
    confidentiality_clause: NotRequired[str]
    r"""The terms and conditions regarding the confidentiality of the information shared between the parties"""
    indemnity_clause: NotRequired[str]
    r"""The terms and conditions related to indemnification"""
    non_compete_clause: NotRequired[str]
    r"""The activities or businesses that a party or parties are prohibited from engaging in"""


class BasicContractFields(BaseModel):
    r"""Fields extracted from a basic contract"""

    title: Optional[str] = None
    r"""The title of the contract"""

    party: Optional[List[Party]] = None

    deal_amount: Annotated[Optional[float], pydantic.Field(alias="dealAmount")] = None
    r"""The amount or value of the contract"""

    agreement_date: Annotated[Optional[date], pydantic.Field(alias="agreementDate")] = (
        None
    )
    r"""The date on which the contract was officially executed or agreed upon by the parties"""

    effective_date: Annotated[Optional[date], pydantic.Field(alias="effectiveDate")] = (
        None
    )
    r"""The start date of the contract"""

    expiration_date: Annotated[
        Optional[date], pydantic.Field(alias="expirationDate")
    ] = None
    r"""The expiration date of the contract"""

    initial_term: Annotated[Optional[str], pydantic.Field(alias="initialTerm")] = None
    r"""The initial period of time for which the contract will be in effect before any renewal or extension options are considered"""

    renewal_term: Annotated[Optional[str], pydantic.Field(alias="renewalTerm")] = None
    r"""The additional period of time for which the contract can be extended or renewed after the initial term has expired"""

    governing_law: Annotated[Optional[str], pydantic.Field(alias="governingLaw")] = None
    r"""The jurisdiction that will govern the interpretation, enforcement, and resolution of any disputes or legal issues arising from the contract"""

    security_deposit: Annotated[
        Optional[float], pydantic.Field(alias="securityDeposit")
    ] = None
    r"""The amount of money that the party providing the security deposit is required to pay"""

    insurance_clause: Annotated[
        Optional[str], pydantic.Field(alias="insuranceClause")
    ] = None
    r"""The insurance requirements and responsibilities of the parties"""

    limitation_of_liability: Annotated[
        Optional[float], pydantic.Field(alias="limitationOfLiability")
    ] = None
    r"""The maximum monetary amount for which a party can be held liable in the event of a breach or dispute"""

    confidentiality_clause: Annotated[
        Optional[str], pydantic.Field(alias="confidentialityClause")
    ] = None
    r"""The terms and conditions regarding the confidentiality of the information shared between the parties"""

    indemnity_clause: Annotated[
        Optional[str], pydantic.Field(alias="indemnityClause")
    ] = None
    r"""The terms and conditions related to indemnification"""

    non_compete_clause: Annotated[
        Optional[str], pydantic.Field(alias="nonCompeteClause")
    ] = None
    r"""The activities or businesses that a party or parties are prohibited from engaging in"""
