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

from __future__ import annotations
from .googleprotobufany import GoogleProtobufAny, GoogleProtobufAnyTypedDict
from ascend_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class StatusTypedDict(TypedDict):
    r"""The status message serves as the general-purpose service error message. Each status message includes a gRPC error code, error message, and error details."""

    code: NotRequired[int]
    r"""The code field contains an enum value of google.rpc.Code."""
    details: NotRequired[List[GoogleProtobufAnyTypedDict]]
    r"""The details field contains one or more technical error details."""
    message: NotRequired[str]
    r"""The message field contains human-friendly messages about the error."""


class Status(BaseModel):
    r"""The status message serves as the general-purpose service error message. Each status message includes a gRPC error code, error message, and error details."""

    code: Optional[int] = None
    r"""The code field contains an enum value of google.rpc.Code."""

    details: Optional[List[GoogleProtobufAny]] = None
    r"""The details field contains one or more technical error details."""

    message: Optional[str] = None
    r"""The message field contains human-friendly messages about the error."""
