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

from __future__ import annotations
from dataclasses import dataclass, field
import httpx
from moovio_sdk.models.errors import MoovError
from moovio_sdk.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated


class CreateSweepConfigErrorData(BaseModel):
    wallet_id: Annotated[Optional[str], pydantic.Field(alias="walletID")] = None
    status: Optional[str] = None
    push_payment_method_id: Annotated[
        Optional[str], pydantic.Field(alias="pushPaymentMethodID")
    ] = None
    pull_payment_method_id: Annotated[
        Optional[str], pydantic.Field(alias="pullPaymentMethodID")
    ] = None
    statement_descriptor: Annotated[
        Optional[str], pydantic.Field(alias="statementDescriptor")
    ] = None
    minimum_balance: Annotated[
        Optional[str], pydantic.Field(alias="minimumBalance")
    ] = None


@dataclass(unsafe_hash=True)
class CreateSweepConfigError(MoovError):
    data: CreateSweepConfigErrorData = field(hash=False)

    def __init__(
        self,
        data: CreateSweepConfigErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        message = body or raw_response.text
        super().__init__(message, raw_response, body)
        object.__setattr__(self, "data", data)
