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

from __future__ import annotations
from .v3_auditlogs_listauditlogsresponse import (
    V3AuditLogsListAuditLogsResponse,
    V3AuditLogsListAuditLogsResponseTypedDict,
)
from datetime import date
import pydantic
from squadcast_sdk.types import BaseModel
from squadcast_sdk.utils import FieldMetadata, QueryParamMetadata
from typing import Callable, List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


Client = Literal[
    "web",
    "mobile",
    "terraform",
]


class AuditLogsListAuditLogsRequestTypedDict(TypedDict):
    page_size: int
    page_number: int
    start_date: date
    end_date: date
    action: NotRequired[List[str]]
    resource: NotRequired[List[str]]
    actor: NotRequired[List[str]]
    team: NotRequired[List[str]]
    client: NotRequired[List[Client]]


class AuditLogsListAuditLogsRequest(BaseModel):
    page_size: Annotated[
        int,
        pydantic.Field(alias="pageSize"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ]

    page_number: Annotated[
        int,
        pydantic.Field(alias="pageNumber"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ]

    start_date: Annotated[
        date,
        pydantic.Field(alias="startDate"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ]

    end_date: Annotated[
        date,
        pydantic.Field(alias="endDate"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ]

    action: Annotated[
        Optional[List[str]],
        pydantic.Field(alias="action[]"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    resource: Annotated[
        Optional[List[str]],
        pydantic.Field(alias="resource[]"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    actor: Annotated[
        Optional[List[str]],
        pydantic.Field(alias="actor[]"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    team: Annotated[
        Optional[List[str]],
        pydantic.Field(alias="team[]"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    client: Annotated[
        Optional[List[Client]],
        pydantic.Field(alias="client[]"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None


class AuditLogsListAuditLogsResponseTypedDict(TypedDict):
    result: V3AuditLogsListAuditLogsResponseTypedDict


class AuditLogsListAuditLogsResponse(BaseModel):
    next: Callable[[], Optional[AuditLogsListAuditLogsResponse]]

    result: V3AuditLogsListAuditLogsResponse
