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

from __future__ import annotations
from neuralseek.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class AnswerRatingsRequestBodyTypedDict(TypedDict):
    r"""The request object."""

    answer_id: NotRequired[int]
    r"""The answer id"""
    number: NotRequired[int]
    r"""The number of previous user ratings to average. Leave blank to average all ratings."""


class AnswerRatingsRequestBody(BaseModel):
    r"""The request object."""

    answer_id: Annotated[Optional[int], pydantic.Field(alias="answerId")] = None
    r"""The answer id"""

    number: Optional[int] = None
    r"""The number of previous user ratings to average. Leave blank to average all ratings."""


class AnswerRatingsResponseBodyTypedDict(TypedDict):
    r"""Success"""

    score: NotRequired[float]
    r"""The average score for the answer."""
    total: NotRequired[float]
    r"""The total number of user ratings for the answer."""


class AnswerRatingsResponseBody(BaseModel):
    r"""Success"""

    score: Optional[float] = None
    r"""The average score for the answer."""

    total: Optional[float] = None
    r"""The total number of user ratings for the answer."""
