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

from __future__ import annotations
from attio.errors import SDKError
from attio.models import (
    post_v2_meetings_meeting_id_call_recordingsop as models_post_v2_meetings_meeting_id_call_recordingsop,
)
from attio.types import BaseModel
from dataclasses import dataclass, field
import httpx
from typing import Optional


class PostV2MeetingsMeetingIDCallRecordingsNotFoundErrorData(BaseModel):
    status_code: float
    type: models_post_v2_meetings_meeting_id_call_recordingsop.PostV2MeetingsMeetingIDCallRecordingsNotFoundType
    code: models_post_v2_meetings_meeting_id_call_recordingsop.PostV2MeetingsMeetingIDCallRecordingsNotFoundCode
    message: str


@dataclass(unsafe_hash=True)
class PostV2MeetingsMeetingIDCallRecordingsNotFoundError(SDKError):
    r"""Not Found"""

    data: PostV2MeetingsMeetingIDCallRecordingsNotFoundErrorData = field(hash=False)

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


class AuthErrorData(BaseModel):
    status_code: float
    type: models_post_v2_meetings_meeting_id_call_recordingsop.PostV2MeetingsMeetingIDCallRecordingsForbiddenType
    code: models_post_v2_meetings_meeting_id_call_recordingsop.Code
    message: str


@dataclass(unsafe_hash=True)
class AuthError(SDKError):
    r"""Forbidden"""

    data: AuthErrorData = field(hash=False)

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


class PostV2MeetingsMeetingIDCallRecordingsValidationTypeErrorData(BaseModel):
    status_code: float
    type: models_post_v2_meetings_meeting_id_call_recordingsop.PostV2MeetingsMeetingIDCallRecordingsBadRequestType
    code: models_post_v2_meetings_meeting_id_call_recordingsop.PostV2MeetingsMeetingIDCallRecordingsCodeValidationType
    message: str


@dataclass(unsafe_hash=True)
class PostV2MeetingsMeetingIDCallRecordingsValidationTypeError(SDKError):
    r"""Bad Request"""

    data: PostV2MeetingsMeetingIDCallRecordingsValidationTypeErrorData = field(
        hash=False
    )

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