# coding: utf-8

"""


    Generated by: https://openapi-generator.tech
"""

from dataclasses import dataclass
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict

from banyanclient import api_client, exceptions
from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from banyanclient import schemas  # noqa: F401

from . import path

# query params
ActionSchema = schemas.StrSchema
AdminEmailSchema = schemas.StrSchema
EndTimeSchema = schemas.IntSchema
LimitSchema = schemas.IntSchema
SkipSchema = schemas.IntSchema
StartTimeSchema = schemas.IntSchema
TypeSchema = schemas.StrSchema
OrgIdSchema = schemas.StrSchema
OrderSchema = schemas.StrSchema
RequestRequiredQueryParams = typing_extensions.TypedDict(
    'RequestRequiredQueryParams',
    {
    }
)
RequestOptionalQueryParams = typing_extensions.TypedDict(
    'RequestOptionalQueryParams',
    {
        'action': typing.Union[ActionSchema, str, ],
        'admin_email': typing.Union[AdminEmailSchema, str, ],
        'end_time': typing.Union[EndTimeSchema, decimal.Decimal, int, ],
        'limit': typing.Union[LimitSchema, decimal.Decimal, int, ],
        'skip': typing.Union[SkipSchema, decimal.Decimal, int, ],
        'start_time': typing.Union[StartTimeSchema, decimal.Decimal, int, ],
        'type': typing.Union[TypeSchema, str, ],
        'org_id': typing.Union[OrgIdSchema, str, ],
        'order': typing.Union[OrderSchema, str, ],
    },
    total=False
)


class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams):
    pass


request_query_action = api_client.QueryParameter(
    name="action",
    style=api_client.ParameterStyle.FORM,
    schema=ActionSchema,
    explode=True,
)
request_query_admin_email = api_client.QueryParameter(
    name="admin_email",
    style=api_client.ParameterStyle.FORM,
    schema=AdminEmailSchema,
    explode=True,
)
request_query_end_time = api_client.QueryParameter(
    name="end_time",
    style=api_client.ParameterStyle.FORM,
    schema=EndTimeSchema,
    explode=True,
)
request_query_limit = api_client.QueryParameter(
    name="limit",
    style=api_client.ParameterStyle.FORM,
    schema=LimitSchema,
    explode=True,
)
request_query_skip = api_client.QueryParameter(
    name="skip",
    style=api_client.ParameterStyle.FORM,
    schema=SkipSchema,
    explode=True,
)
request_query_start_time = api_client.QueryParameter(
    name="start_time",
    style=api_client.ParameterStyle.FORM,
    schema=StartTimeSchema,
    explode=True,
)
request_query_type = api_client.QueryParameter(
    name="type",
    style=api_client.ParameterStyle.FORM,
    schema=TypeSchema,
    explode=True,
)
request_query_org_id = api_client.QueryParameter(
    name="org_id",
    style=api_client.ParameterStyle.FORM,
    schema=OrgIdSchema,
    explode=True,
)
request_query_order = api_client.QueryParameter(
    name="order",
    style=api_client.ParameterStyle.FORM,
    schema=OrderSchema,
    explode=True,
)
_auth = [
    'bearerAuthToken',
]


class SchemaFor200ResponseBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            
            
            class auditlogs(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    
                    class items(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            
                            class properties:
                                id = schemas.StrSchema
                                org_id = schemas.StrSchema
                                created_at = schemas.IntSchema
                                message = schemas.StrSchema
                                type = schemas.StrSchema
                                action = schemas.StrSchema
                                admin_email = schemas.StrSchema
                                
                                
                                class changes_new(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            
                                            
                                            class config(
                                                schemas.DictSchema
                                            ):
                                            
                                            
                                                class MetaOapg:
                                                    
                                                    class properties:
                                                        ClientID = schemas.StrSchema
                                                        ClientSecret = schemas.StrSchema
                                                        IssuerURL = schemas.StrSchema
                                                        RedirectURL = schemas.StrSchema
                                                        __annotations__ = {
                                                            "ClientID": ClientID,
                                                            "ClientSecret": ClientSecret,
                                                            "IssuerURL": IssuerURL,
                                                            "RedirectURL": RedirectURL,
                                                        }
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["ClientID"]) -> MetaOapg.properties.ClientID: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["ClientSecret"]) -> MetaOapg.properties.ClientSecret: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["IssuerURL"]) -> MetaOapg.properties.IssuerURL: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["RedirectURL"]) -> MetaOapg.properties.RedirectURL: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                                
                                                def __getitem__(self, name: typing.Union[typing_extensions.Literal["ClientID", "ClientSecret", "IssuerURL", "RedirectURL", ], str]):
                                                    # dict_instance[name] accessor
                                                    return super().__getitem__(name)
                                                
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["ClientID"]) -> typing.Union[MetaOapg.properties.ClientID, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["ClientSecret"]) -> typing.Union[MetaOapg.properties.ClientSecret, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["IssuerURL"]) -> typing.Union[MetaOapg.properties.IssuerURL, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["RedirectURL"]) -> typing.Union[MetaOapg.properties.RedirectURL, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                                                
                                                def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ClientID", "ClientSecret", "IssuerURL", "RedirectURL", ], str]):
                                                    return super().get_item_oapg(name)
                                                
                                            
                                                def __new__(
                                                    cls,
                                                    *args: typing.Union[dict, frozendict.frozendict, ],
                                                    ClientID: typing.Union[MetaOapg.properties.ClientID, str, schemas.Unset] = schemas.unset,
                                                    ClientSecret: typing.Union[MetaOapg.properties.ClientSecret, str, schemas.Unset] = schemas.unset,
                                                    IssuerURL: typing.Union[MetaOapg.properties.IssuerURL, str, schemas.Unset] = schemas.unset,
                                                    RedirectURL: typing.Union[MetaOapg.properties.RedirectURL, str, schemas.Unset] = schemas.unset,
                                                    _configuration: typing.Optional[schemas.Configuration] = None,
                                                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                                                ) -> 'config':
                                                    return super().__new__(
                                                        cls,
                                                        *args,
                                                        ClientID=ClientID,
                                                        ClientSecret=ClientSecret,
                                                        IssuerURL=IssuerURL,
                                                        RedirectURL=RedirectURL,
                                                        _configuration=_configuration,
                                                        **kwargs,
                                                    )
                                            name = schemas.StrSchema
                                            protocol = schemas.StrSchema
                                            __annotations__ = {
                                                "config": config,
                                                "name": name,
                                                "protocol": protocol,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["config"]) -> MetaOapg.properties.config: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["config", "name", "protocol", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["config"]) -> typing.Union[MetaOapg.properties.config, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> typing.Union[MetaOapg.properties.protocol, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                                    
                                    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["config", "name", "protocol", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        config: typing.Union[MetaOapg.properties.config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                                        name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
                                        protocol: typing.Union[MetaOapg.properties.protocol, str, schemas.Unset] = schemas.unset,
                                        _configuration: typing.Optional[schemas.Configuration] = None,
                                        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                                    ) -> 'changes_new':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            config=config,
                                            name=name,
                                            protocol=protocol,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                
                                
                                class changes_old(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            
                                            
                                            class config(
                                                schemas.DictSchema
                                            ):
                                            
                                            
                                                class MetaOapg:
                                                    
                                                    class properties:
                                                        ClientID = schemas.StrSchema
                                                        ClientSecret = schemas.StrSchema
                                                        IssuerURL = schemas.StrSchema
                                                        RedirectURL = schemas.StrSchema
                                                        __annotations__ = {
                                                            "ClientID": ClientID,
                                                            "ClientSecret": ClientSecret,
                                                            "IssuerURL": IssuerURL,
                                                            "RedirectURL": RedirectURL,
                                                        }
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["ClientID"]) -> MetaOapg.properties.ClientID: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["ClientSecret"]) -> MetaOapg.properties.ClientSecret: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["IssuerURL"]) -> MetaOapg.properties.IssuerURL: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["RedirectURL"]) -> MetaOapg.properties.RedirectURL: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                                
                                                def __getitem__(self, name: typing.Union[typing_extensions.Literal["ClientID", "ClientSecret", "IssuerURL", "RedirectURL", ], str]):
                                                    # dict_instance[name] accessor
                                                    return super().__getitem__(name)
                                                
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["ClientID"]) -> typing.Union[MetaOapg.properties.ClientID, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["ClientSecret"]) -> typing.Union[MetaOapg.properties.ClientSecret, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["IssuerURL"]) -> typing.Union[MetaOapg.properties.IssuerURL, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["RedirectURL"]) -> typing.Union[MetaOapg.properties.RedirectURL, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                                                
                                                def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ClientID", "ClientSecret", "IssuerURL", "RedirectURL", ], str]):
                                                    return super().get_item_oapg(name)
                                                
                                            
                                                def __new__(
                                                    cls,
                                                    *args: typing.Union[dict, frozendict.frozendict, ],
                                                    ClientID: typing.Union[MetaOapg.properties.ClientID, str, schemas.Unset] = schemas.unset,
                                                    ClientSecret: typing.Union[MetaOapg.properties.ClientSecret, str, schemas.Unset] = schemas.unset,
                                                    IssuerURL: typing.Union[MetaOapg.properties.IssuerURL, str, schemas.Unset] = schemas.unset,
                                                    RedirectURL: typing.Union[MetaOapg.properties.RedirectURL, str, schemas.Unset] = schemas.unset,
                                                    _configuration: typing.Optional[schemas.Configuration] = None,
                                                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                                                ) -> 'config':
                                                    return super().__new__(
                                                        cls,
                                                        *args,
                                                        ClientID=ClientID,
                                                        ClientSecret=ClientSecret,
                                                        IssuerURL=IssuerURL,
                                                        RedirectURL=RedirectURL,
                                                        _configuration=_configuration,
                                                        **kwargs,
                                                    )
                                            name = schemas.StrSchema
                                            protocol = schemas.StrSchema
                                            __annotations__ = {
                                                "config": config,
                                                "name": name,
                                                "protocol": protocol,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["config"]) -> MetaOapg.properties.config: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["config", "name", "protocol", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["config"]) -> typing.Union[MetaOapg.properties.config, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> typing.Union[MetaOapg.properties.protocol, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                                    
                                    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["config", "name", "protocol", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        config: typing.Union[MetaOapg.properties.config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                                        name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
                                        protocol: typing.Union[MetaOapg.properties.protocol, str, schemas.Unset] = schemas.unset,
                                        _configuration: typing.Optional[schemas.Configuration] = None,
                                        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                                    ) -> 'changes_old':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            config=config,
                                            name=name,
                                            protocol=protocol,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                token_unique_id = schemas.StrSchema
                                token_iat = schemas.IntSchema
                                token_auth_issuer = schemas.StrSchema
                                client_ip_address = schemas.StrSchema
                                client_user_agent = schemas.StrSchema
                                __annotations__ = {
                                    "id": id,
                                    "org_id": org_id,
                                    "created_at": created_at,
                                    "message": message,
                                    "type": type,
                                    "action": action,
                                    "admin_email": admin_email,
                                    "changes_new": changes_new,
                                    "changes_old": changes_old,
                                    "token_unique_id": token_unique_id,
                                    "token_iat": token_iat,
                                    "token_auth_issuer": token_auth_issuer,
                                    "client_ip_address": client_ip_address,
                                    "client_user_agent": client_user_agent,
                                }
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["org_id"]) -> MetaOapg.properties.org_id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["admin_email"]) -> MetaOapg.properties.admin_email: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["changes_new"]) -> MetaOapg.properties.changes_new: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["changes_old"]) -> MetaOapg.properties.changes_old: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["token_unique_id"]) -> MetaOapg.properties.token_unique_id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["token_iat"]) -> MetaOapg.properties.token_iat: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["token_auth_issuer"]) -> MetaOapg.properties.token_auth_issuer: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["client_ip_address"]) -> MetaOapg.properties.client_ip_address: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["client_user_agent"]) -> MetaOapg.properties.client_user_agent: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "org_id", "created_at", "message", "type", "action", "admin_email", "changes_new", "changes_old", "token_unique_id", "token_iat", "token_auth_issuer", "client_ip_address", "client_user_agent", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["org_id"]) -> typing.Union[MetaOapg.properties.org_id, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> typing.Union[MetaOapg.properties.created_at, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> typing.Union[MetaOapg.properties.action, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["admin_email"]) -> typing.Union[MetaOapg.properties.admin_email, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["changes_new"]) -> typing.Union[MetaOapg.properties.changes_new, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["changes_old"]) -> typing.Union[MetaOapg.properties.changes_old, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["token_unique_id"]) -> typing.Union[MetaOapg.properties.token_unique_id, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["token_iat"]) -> typing.Union[MetaOapg.properties.token_iat, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["token_auth_issuer"]) -> typing.Union[MetaOapg.properties.token_auth_issuer, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["client_ip_address"]) -> typing.Union[MetaOapg.properties.client_ip_address, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["client_user_agent"]) -> typing.Union[MetaOapg.properties.client_user_agent, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                        
                        def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "org_id", "created_at", "message", "type", "action", "admin_email", "changes_new", "changes_old", "token_unique_id", "token_iat", "token_auth_issuer", "client_ip_address", "client_user_agent", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *args: typing.Union[dict, frozendict.frozendict, ],
                            id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
                            org_id: typing.Union[MetaOapg.properties.org_id, str, schemas.Unset] = schemas.unset,
                            created_at: typing.Union[MetaOapg.properties.created_at, decimal.Decimal, int, schemas.Unset] = schemas.unset,
                            message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset,
                            type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset,
                            action: typing.Union[MetaOapg.properties.action, str, schemas.Unset] = schemas.unset,
                            admin_email: typing.Union[MetaOapg.properties.admin_email, str, schemas.Unset] = schemas.unset,
                            changes_new: typing.Union[MetaOapg.properties.changes_new, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                            changes_old: typing.Union[MetaOapg.properties.changes_old, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                            token_unique_id: typing.Union[MetaOapg.properties.token_unique_id, str, schemas.Unset] = schemas.unset,
                            token_iat: typing.Union[MetaOapg.properties.token_iat, decimal.Decimal, int, schemas.Unset] = schemas.unset,
                            token_auth_issuer: typing.Union[MetaOapg.properties.token_auth_issuer, str, schemas.Unset] = schemas.unset,
                            client_ip_address: typing.Union[MetaOapg.properties.client_ip_address, str, schemas.Unset] = schemas.unset,
                            client_user_agent: typing.Union[MetaOapg.properties.client_user_agent, str, schemas.Unset] = schemas.unset,
                            _configuration: typing.Optional[schemas.Configuration] = None,
                            **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                        ) -> 'items':
                            return super().__new__(
                                cls,
                                *args,
                                id=id,
                                org_id=org_id,
                                created_at=created_at,
                                message=message,
                                type=type,
                                action=action,
                                admin_email=admin_email,
                                changes_new=changes_new,
                                changes_old=changes_old,
                                token_unique_id=token_unique_id,
                                token_iat=token_iat,
                                token_auth_issuer=token_auth_issuer,
                                client_ip_address=client_ip_address,
                                client_user_agent=client_user_agent,
                                _configuration=_configuration,
                                **kwargs,
                            )
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'auditlogs':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            count = schemas.IntSchema
            __annotations__ = {
                "auditlogs": auditlogs,
                "count": count,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["auditlogs"]) -> MetaOapg.properties.auditlogs: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["auditlogs", "count", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["auditlogs"]) -> typing.Union[MetaOapg.properties.auditlogs, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["count"]) -> typing.Union[MetaOapg.properties.count, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["auditlogs", "count", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        auditlogs: typing.Union[MetaOapg.properties.auditlogs, list, tuple, schemas.Unset] = schemas.unset,
        count: typing.Union[MetaOapg.properties.count, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'SchemaFor200ResponseBodyApplicationJson':
        return super().__new__(
            cls,
            *args,
            auditlogs=auditlogs,
            count=count,
            _configuration=_configuration,
            **kwargs,
        )


@dataclass
class ApiResponseFor200(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: typing.Union[
        SchemaFor200ResponseBodyApplicationJson,
    ]
    headers: schemas.Unset = schemas.unset


_response_for_200 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor200,
    content={
        'application/json': api_client.MediaType(
            schema=SchemaFor200ResponseBodyApplicationJson),
    },
)


@dataclass
class ApiResponseFor400(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: schemas.Unset = schemas.unset
    headers: schemas.Unset = schemas.unset


_response_for_400 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor400,
)


@dataclass
class ApiResponseFor401(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: schemas.Unset = schemas.unset
    headers: schemas.Unset = schemas.unset


_response_for_401 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor401,
)


@dataclass
class ApiResponseFor404(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: schemas.Unset = schemas.unset
    headers: schemas.Unset = schemas.unset


_response_for_404 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor404,
)


@dataclass
class ApiResponseFor500(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: schemas.Unset = schemas.unset
    headers: schemas.Unset = schemas.unset


_response_for_500 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor500,
)
_status_code_to_response = {
    '200': _response_for_200,
    '400': _response_for_400,
    '401': _response_for_401,
    '404': _response_for_404,
    '500': _response_for_500,
}
_all_accept_content_types = (
    'application/json',
)


class BaseApi(api_client.Api):

    def _v1_audit_logs_get_oapg(
        self: api_client.Api,
        query_params: RequestQueryParams = frozendict.frozendict(),
        accept_content_types: typing.Tuple[str] = _all_accept_content_types,
        stream: bool = False,
        timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
        skip_deserialization: bool = False,
    ) -> typing.Union[
        ApiResponseFor200,
        api_client.ApiResponseWithoutDeserialization
    ]:
        """
         Get Audit Logs
        :param skip_deserialization: If true then api_response.response will be set but
            api_response.body and api_response.headers will not be deserialized into schema
            class instances
        """
        self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params)
        used_path = path.value

        prefix_separator_iterator = None
        for parameter in (
            request_query_action,
            request_query_admin_email,
            request_query_end_time,
            request_query_limit,
            request_query_skip,
            request_query_start_time,
            request_query_type,
            request_query_org_id,
            request_query_order,
        ):
            parameter_data = query_params.get(parameter.name, schemas.unset)
            if parameter_data is schemas.unset:
                continue
            if prefix_separator_iterator is None:
                prefix_separator_iterator = parameter.get_prefix_separator_iterator()
            serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator)
            for serialized_value in serialized_data.values():
                used_path += serialized_value

        _headers = HTTPHeaderDict()
        # TODO add cookie handling
        if accept_content_types:
            for accept_content_type in accept_content_types:
                _headers.add('Accept', accept_content_type)

        response = self.api_client.call_api(
            resource_path=used_path,
            method='get'.upper(),
            headers=_headers,
            auth_settings=_auth,
            stream=stream,
            timeout=timeout,
        )

        if skip_deserialization:
            api_response = api_client.ApiResponseWithoutDeserialization(response=response)
        else:
            response_for_status = _status_code_to_response.get(str(response.status))
            if response_for_status:
                api_response = response_for_status.deserialize(response, self.api_client.configuration)
            else:
                api_response = api_client.ApiResponseWithoutDeserialization(response=response)

        if not 200 <= response.status <= 299:
            raise exceptions.ApiException(api_response=api_response)

        return api_response


class V1AuditLogsGet(BaseApi):
    # this class is used by api classes that refer to endpoints with operationId fn names

    def v1_audit_logs_get(
        self: BaseApi,
        query_params: RequestQueryParams = frozendict.frozendict(),
        accept_content_types: typing.Tuple[str] = _all_accept_content_types,
        stream: bool = False,
        timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
        skip_deserialization: bool = False,
    ) -> typing.Union[
        ApiResponseFor200,
        api_client.ApiResponseWithoutDeserialization
    ]:
        return self._v1_audit_logs_get_oapg(
            query_params=query_params,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


class ApiForget(BaseApi):
    # this class is used by api classes that refer to endpoints by path and http method names

    def get(
        self: BaseApi,
        query_params: RequestQueryParams = frozendict.frozendict(),
        accept_content_types: typing.Tuple[str] = _all_accept_content_types,
        stream: bool = False,
        timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
        skip_deserialization: bool = False,
    ) -> typing.Union[
        ApiResponseFor200,
        api_client.ApiResponseWithoutDeserialization
    ]:
        return self._v1_audit_logs_get_oapg(
            query_params=query_params,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


