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

from __future__ import annotations
from .errorresponse import ErrorResponse, ErrorResponseTypedDict
from .group import Group, GroupTypedDict
from .groupresponse import GroupResponse, GroupResponseTypedDict
from postivo_client.types import BaseModel
from postivo_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class UpdateGroupRequestTypedDict(TypedDict):
    id: int
    r"""Group `id` to update."""
    group: GroupTypedDict
    r"""A `Group` object with the updated fields."""


class UpdateGroupRequest(BaseModel):
    id: Annotated[
        int, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Group `id` to update."""

    group: Annotated[
        Group, FieldMetadata(request=RequestMetadata(media_type="application/json"))
    ]
    r"""A `Group` object with the updated fields."""


UpdateGroupResponseResultTypedDict = TypeAliasType(
    "UpdateGroupResponseResultTypedDict",
    Union[GroupResponseTypedDict, ErrorResponseTypedDict],
)


UpdateGroupResponseResult = TypeAliasType(
    "UpdateGroupResponseResult", Union[GroupResponse, ErrorResponse]
)


class UpdateGroupResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: UpdateGroupResponseResultTypedDict


class UpdateGroupResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: UpdateGroupResponseResult
