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

from __future__ import annotations
from ascend_sdk.models.components import (
    achdepositschedule as components_achdepositschedule,
    cancelachdepositschedulerequestcreate as components_cancelachdepositschedulerequestcreate,
    httpmetadata as components_httpmetadata,
    status as components_status,
)
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class AchDepositSchedulesCancelAchDepositScheduleRequestTypedDict(TypedDict):
    account_id: str
    r"""The account id."""
    ach_deposit_schedule_id: str
    r"""The achDepositSchedule id."""
    cancel_ach_deposit_schedule_request_create: components_cancelachdepositschedulerequestcreate.CancelAchDepositScheduleRequestCreateTypedDict


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

    ach_deposit_schedule_id: Annotated[
        str,
        pydantic.Field(alias="achDepositSchedule_id"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""The achDepositSchedule id."""

    cancel_ach_deposit_schedule_request_create: Annotated[
        components_cancelachdepositschedulerequestcreate.CancelAchDepositScheduleRequestCreate,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class AchDepositSchedulesCancelAchDepositScheduleResponseTypedDict(TypedDict):
    http_meta: components_httpmetadata.HTTPMetadataTypedDict
    ach_deposit_schedule: NotRequired[
        components_achdepositschedule.AchDepositScheduleTypedDict
    ]
    r"""OK"""
    status: NotRequired[components_status.StatusTypedDict]
    r"""INVALID_ARGUMENT: The request has an invalid argument."""


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

    ach_deposit_schedule: Optional[
        components_achdepositschedule.AchDepositSchedule
    ] = None
    r"""OK"""

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