# 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
BeforeSchema = schemas.IntSchema
AfterSchema = schemas.IntSchema
SkipSchema = schemas.IntSchema
OrderSchema = schemas.StrSchema
LimitSchema = schemas.IntSchema
RequestRequiredQueryParams = typing_extensions.TypedDict(
    'RequestRequiredQueryParams',
    {
    }
)
RequestOptionalQueryParams = typing_extensions.TypedDict(
    'RequestOptionalQueryParams',
    {
        'before': typing.Union[BeforeSchema, decimal.Decimal, int, ],
        'after': typing.Union[AfterSchema, decimal.Decimal, int, ],
        'skip': typing.Union[SkipSchema, decimal.Decimal, int, ],
        'order': typing.Union[OrderSchema, str, ],
        'limit': typing.Union[LimitSchema, decimal.Decimal, int, ],
    },
    total=False
)


class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams):
    pass


request_query_before = api_client.QueryParameter(
    name="before",
    style=api_client.ParameterStyle.FORM,
    schema=BeforeSchema,
    explode=True,
)
request_query_after = api_client.QueryParameter(
    name="after",
    style=api_client.ParameterStyle.FORM,
    schema=AfterSchema,
    explode=True,
)
request_query_skip = api_client.QueryParameter(
    name="skip",
    style=api_client.ParameterStyle.FORM,
    schema=SkipSchema,
    explode=True,
)
request_query_order = api_client.QueryParameter(
    name="order",
    style=api_client.ParameterStyle.FORM,
    schema=OrderSchema,
    explode=True,
)
request_query_limit = api_client.QueryParameter(
    name="limit",
    style=api_client.ParameterStyle.FORM,
    schema=LimitSchema,
    explode=True,
)
_auth = [
    'bearerAuthToken',
]


class SchemaFor200ResponseBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            
            
            class data(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    
                    class items(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            
                            class properties:
                                action = schemas.StrSchema
                                created_at = schemas.IntSchema
                                group_id = schemas.StrSchema
                                id = schemas.StrSchema
                                messages = schemas.StrSchema
                                org_id = schemas.StrSchema
                                org_name = schemas.StrSchema
                                result = schemas.StrSchema
                                severity = schemas.StrSchema
                                sub_type = schemas.StrSchema
                                type = schemas.StrSchema
                                
                                
                                class user_principal(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            
                                            
                                            class device(
                                                schemas.DictSchema
                                            ):
                                            
                                            
                                                class MetaOapg:
                                                    
                                                    class properties:
                                                        id = schemas.StrSchema
                                                        friendly_name = schemas.StrSchema
                                                        mac_address = schemas.StrSchema
                                                        serial_number = schemas.StrSchema
                                                        registration_status = schemas.StrSchema
                                                        compromised_status = schemas.StrSchema
                                                        compliance_status = schemas.StrSchema
                                                        oem_info = schemas.StrSchema
                                                        model = schemas.StrSchema
                                                        platform = schemas.StrSchema
                                                        ownership = schemas.StrSchema
                                                        architecture = schemas.StrSchema
                                                        udid = schemas.StrSchema
                                                        source = schemas.StrSchema
                                                        last_mdm_data_synced_at = schemas.IntSchema
                                                        __annotations__ = {
                                                            "id": id,
                                                            "friendly_name": friendly_name,
                                                            "mac_address": mac_address,
                                                            "serial_number": serial_number,
                                                            "registration_status": registration_status,
                                                            "compromised_status": compromised_status,
                                                            "compliance_status": compliance_status,
                                                            "oem_info": oem_info,
                                                            "model": model,
                                                            "platform": platform,
                                                            "ownership": ownership,
                                                            "architecture": architecture,
                                                            "udid": udid,
                                                            "source": source,
                                                            "last_mdm_data_synced_at": last_mdm_data_synced_at,
                                                        }
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["friendly_name"]) -> MetaOapg.properties.friendly_name: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["mac_address"]) -> MetaOapg.properties.mac_address: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["serial_number"]) -> MetaOapg.properties.serial_number: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["registration_status"]) -> MetaOapg.properties.registration_status: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["compromised_status"]) -> MetaOapg.properties.compromised_status: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["compliance_status"]) -> MetaOapg.properties.compliance_status: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["oem_info"]) -> MetaOapg.properties.oem_info: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["model"]) -> MetaOapg.properties.model: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["platform"]) -> MetaOapg.properties.platform: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["ownership"]) -> MetaOapg.properties.ownership: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["architecture"]) -> MetaOapg.properties.architecture: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["udid"]) -> MetaOapg.properties.udid: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["last_mdm_data_synced_at"]) -> MetaOapg.properties.last_mdm_data_synced_at: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                                
                                                def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "friendly_name", "mac_address", "serial_number", "registration_status", "compromised_status", "compliance_status", "oem_info", "model", "platform", "ownership", "architecture", "udid", "source", "last_mdm_data_synced_at", ], 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["friendly_name"]) -> typing.Union[MetaOapg.properties.friendly_name, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["mac_address"]) -> typing.Union[MetaOapg.properties.mac_address, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["serial_number"]) -> typing.Union[MetaOapg.properties.serial_number, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["registration_status"]) -> typing.Union[MetaOapg.properties.registration_status, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["compromised_status"]) -> typing.Union[MetaOapg.properties.compromised_status, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["compliance_status"]) -> typing.Union[MetaOapg.properties.compliance_status, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["oem_info"]) -> typing.Union[MetaOapg.properties.oem_info, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["model"]) -> typing.Union[MetaOapg.properties.model, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["platform"]) -> typing.Union[MetaOapg.properties.platform, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["ownership"]) -> typing.Union[MetaOapg.properties.ownership, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["architecture"]) -> typing.Union[MetaOapg.properties.architecture, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["udid"]) -> typing.Union[MetaOapg.properties.udid, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union[MetaOapg.properties.source, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["last_mdm_data_synced_at"]) -> typing.Union[MetaOapg.properties.last_mdm_data_synced_at, 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", "friendly_name", "mac_address", "serial_number", "registration_status", "compromised_status", "compliance_status", "oem_info", "model", "platform", "ownership", "architecture", "udid", "source", "last_mdm_data_synced_at", ], 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,
                                                    friendly_name: typing.Union[MetaOapg.properties.friendly_name, str, schemas.Unset] = schemas.unset,
                                                    mac_address: typing.Union[MetaOapg.properties.mac_address, str, schemas.Unset] = schemas.unset,
                                                    serial_number: typing.Union[MetaOapg.properties.serial_number, str, schemas.Unset] = schemas.unset,
                                                    registration_status: typing.Union[MetaOapg.properties.registration_status, str, schemas.Unset] = schemas.unset,
                                                    compromised_status: typing.Union[MetaOapg.properties.compromised_status, str, schemas.Unset] = schemas.unset,
                                                    compliance_status: typing.Union[MetaOapg.properties.compliance_status, str, schemas.Unset] = schemas.unset,
                                                    oem_info: typing.Union[MetaOapg.properties.oem_info, str, schemas.Unset] = schemas.unset,
                                                    model: typing.Union[MetaOapg.properties.model, str, schemas.Unset] = schemas.unset,
                                                    platform: typing.Union[MetaOapg.properties.platform, str, schemas.Unset] = schemas.unset,
                                                    ownership: typing.Union[MetaOapg.properties.ownership, str, schemas.Unset] = schemas.unset,
                                                    architecture: typing.Union[MetaOapg.properties.architecture, str, schemas.Unset] = schemas.unset,
                                                    udid: typing.Union[MetaOapg.properties.udid, str, schemas.Unset] = schemas.unset,
                                                    source: typing.Union[MetaOapg.properties.source, str, schemas.Unset] = schemas.unset,
                                                    last_mdm_data_synced_at: typing.Union[MetaOapg.properties.last_mdm_data_synced_at, 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],
                                                ) -> 'device':
                                                    return super().__new__(
                                                        cls,
                                                        *args,
                                                        id=id,
                                                        friendly_name=friendly_name,
                                                        mac_address=mac_address,
                                                        serial_number=serial_number,
                                                        registration_status=registration_status,
                                                        compromised_status=compromised_status,
                                                        compliance_status=compliance_status,
                                                        oem_info=oem_info,
                                                        model=model,
                                                        platform=platform,
                                                        ownership=ownership,
                                                        architecture=architecture,
                                                        udid=udid,
                                                        source=source,
                                                        last_mdm_data_synced_at=last_mdm_data_synced_at,
                                                        _configuration=_configuration,
                                                        **kwargs,
                                                    )
                                            
                                            
                                            class user(
                                                schemas.DictSchema
                                            ):
                                            
                                            
                                                class MetaOapg:
                                                    
                                                    class properties:
                                                        email = schemas.StrSchema
                                                        
                                                        
                                                        class groups(
                                                            schemas.ListSchema
                                                        ):
                                                        
                                                        
                                                            class MetaOapg:
                                                                items = schemas.StrSchema
                                                        
                                                            def __new__(
                                                                cls,
                                                                arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
                                                                _configuration: typing.Optional[schemas.Configuration] = None,
                                                            ) -> 'groups':
                                                                return super().__new__(
                                                                    cls,
                                                                    arg,
                                                                    _configuration=_configuration,
                                                                )
                                                        
                                                            def __getitem__(self, i: int) -> MetaOapg.items:
                                                                return super().__getitem__(i)
                                                        
                                                        
                                                        class roles(
                                                            schemas.ListSchema
                                                        ):
                                                        
                                                        
                                                            class MetaOapg:
                                                                items = schemas.StrSchema
                                                        
                                                            def __new__(
                                                                cls,
                                                                arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
                                                                _configuration: typing.Optional[schemas.Configuration] = None,
                                                            ) -> 'roles':
                                                                return super().__new__(
                                                                    cls,
                                                                    arg,
                                                                    _configuration=_configuration,
                                                                )
                                                        
                                                            def __getitem__(self, i: int) -> MetaOapg.items:
                                                                return super().__getitem__(i)
                                                        __annotations__ = {
                                                            "email": email,
                                                            "groups": groups,
                                                            "roles": roles,
                                                        }
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["roles"]) -> MetaOapg.properties.roles: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                                
                                                def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", "groups", "roles", ], str]):
                                                    # dict_instance[name] accessor
                                                    return super().__getitem__(name)
                                                
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["roles"]) -> typing.Union[MetaOapg.properties.roles, 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["email", "groups", "roles", ], str]):
                                                    return super().get_item_oapg(name)
                                                
                                            
                                                def __new__(
                                                    cls,
                                                    *args: typing.Union[dict, frozendict.frozendict, ],
                                                    email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset,
                                                    groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset,
                                                    roles: typing.Union[MetaOapg.properties.roles, list, tuple, 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],
                                                ) -> 'user':
                                                    return super().__new__(
                                                        cls,
                                                        *args,
                                                        email=email,
                                                        groups=groups,
                                                        roles=roles,
                                                        _configuration=_configuration,
                                                        **kwargs,
                                                    )
                                            __annotations__ = {
                                                "device": device,
                                                "user": user,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["device"]) -> MetaOapg.properties.device: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["device", "user", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["device"]) -> typing.Union[MetaOapg.properties.device, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, 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["device", "user", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        device: typing.Union[MetaOapg.properties.device, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                                        user: typing.Union[MetaOapg.properties.user, dict, frozendict.frozendict, 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],
                                    ) -> 'user_principal':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            device=device,
                                            user=user,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                __annotations__ = {
                                    "action": action,
                                    "created_at": created_at,
                                    "group_id": group_id,
                                    "id": id,
                                    "messages": messages,
                                    "org_id": org_id,
                                    "org_name": org_name,
                                    "result": result,
                                    "severity": severity,
                                    "sub_type": sub_type,
                                    "type": type,
                                    "user_principal": user_principal,
                                }
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["group_id"]) -> MetaOapg.properties.group_id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["messages"]) -> MetaOapg.properties.messages: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["org_id"]) -> MetaOapg.properties.org_id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["org_name"]) -> MetaOapg.properties.org_name: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["severity"]) -> MetaOapg.properties.severity: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["sub_type"]) -> MetaOapg.properties.sub_type: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["user_principal"]) -> MetaOapg.properties.user_principal: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["action", "created_at", "group_id", "id", "messages", "org_id", "org_name", "result", "severity", "sub_type", "type", "user_principal", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @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["created_at"]) -> typing.Union[MetaOapg.properties.created_at, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["group_id"]) -> typing.Union[MetaOapg.properties.group_id, schemas.Unset]: ...
                        
                        @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["messages"]) -> typing.Union[MetaOapg.properties.messages, 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["org_name"]) -> typing.Union[MetaOapg.properties.org_name, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["severity"]) -> typing.Union[MetaOapg.properties.severity, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["sub_type"]) -> typing.Union[MetaOapg.properties.sub_type, 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["user_principal"]) -> typing.Union[MetaOapg.properties.user_principal, 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["action", "created_at", "group_id", "id", "messages", "org_id", "org_name", "result", "severity", "sub_type", "type", "user_principal", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *args: typing.Union[dict, frozendict.frozendict, ],
                            action: typing.Union[MetaOapg.properties.action, str, schemas.Unset] = schemas.unset,
                            created_at: typing.Union[MetaOapg.properties.created_at, decimal.Decimal, int, schemas.Unset] = schemas.unset,
                            group_id: typing.Union[MetaOapg.properties.group_id, str, schemas.Unset] = schemas.unset,
                            id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
                            messages: typing.Union[MetaOapg.properties.messages, str, schemas.Unset] = schemas.unset,
                            org_id: typing.Union[MetaOapg.properties.org_id, str, schemas.Unset] = schemas.unset,
                            org_name: typing.Union[MetaOapg.properties.org_name, str, schemas.Unset] = schemas.unset,
                            result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset,
                            severity: typing.Union[MetaOapg.properties.severity, str, schemas.Unset] = schemas.unset,
                            sub_type: typing.Union[MetaOapg.properties.sub_type, str, schemas.Unset] = schemas.unset,
                            type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset,
                            user_principal: typing.Union[MetaOapg.properties.user_principal, dict, frozendict.frozendict, 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,
                                action=action,
                                created_at=created_at,
                                group_id=group_id,
                                id=id,
                                messages=messages,
                                org_id=org_id,
                                org_name=org_name,
                                result=result,
                                severity=severity,
                                sub_type=sub_type,
                                type=type,
                                user_principal=user_principal,
                                _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,
                ) -> 'data':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            __annotations__ = {
                "data": data,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, 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["data", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        data: typing.Union[MetaOapg.properties.data, list, tuple, 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,
            data=data,
            _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),
    },
)
_status_code_to_response = {
    '200': _response_for_200,
}
_all_accept_content_types = (
    'application/json',
)


class BaseApi(api_client.Api):

    def _v1_events_feed_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 Events Feed
        :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_before,
            request_query_after,
            request_query_skip,
            request_query_order,
            request_query_limit,
        ):
            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 V1EventsFeedGet(BaseApi):
    # this class is used by api classes that refer to endpoints with operationId fn names

    def v1_events_feed_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_events_feed_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_events_feed_get_oapg(
            query_params=query_params,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


