# coding: utf-8

"""


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

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

from papermerge_restapi_client 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 papermerge_restapi_client import schemas  # noqa: F401

from . import path

# query params


class FormatSchema(
    schemas.EnumBase,
    schemas.StrSchema
):


    class MetaOapg:
        enum_value_to_name = {
            "json": "JSON",
            "vnd.api+json": "VND_APIJSON",
        }
    
    @schemas.classproperty
    def JSON(cls):
        return cls("json")
    
    @schemas.classproperty
    def VND_APIJSON(cls):
        return cls("vnd.api+json")
RequestRequiredQueryParams = typing_extensions.TypedDict(
    'RequestRequiredQueryParams',
    {
    }
)
RequestOptionalQueryParams = typing_extensions.TypedDict(
    'RequestOptionalQueryParams',
    {
        'format': typing.Union[FormatSchema, str, ],
    },
    total=False
)


class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams):
    pass


request_query_format = api_client.QueryParameter(
    name="format",
    style=api_client.ParameterStyle.FORM,
    schema=FormatSchema,
    explode=True,
)
# body param


class SchemaForRequestBodyApplicationVndApijson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            ocr__language = schemas.StrSchema
            
            
            class ocr__trigger(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "auto": "AUTO",
                        "manual": "MANUAL",
                    }
                
                @schemas.classproperty
                def AUTO(cls):
                    return cls("auto")
                
                @schemas.classproperty
                def MANUAL(cls):
                    return cls("manual")
            localization__data_format = schemas.StrSchema
            localization__time_format = schemas.StrSchema
            localization__timezone = schemas.StrSchema
            __annotations__ = {
                "ocr__language": ocr__language,
                "ocr__trigger": ocr__trigger,
                "localization__data_format": localization__data_format,
                "localization__time_format": localization__time_format,
                "localization__timezone": localization__timezone,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ocr__language"]) -> MetaOapg.properties.ocr__language: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ocr__trigger"]) -> MetaOapg.properties.ocr__trigger: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localization__data_format"]) -> MetaOapg.properties.localization__data_format: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localization__time_format"]) -> MetaOapg.properties.localization__time_format: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localization__timezone"]) -> MetaOapg.properties.localization__timezone: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["ocr__language", "ocr__trigger", "localization__data_format", "localization__time_format", "localization__timezone", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ocr__language"]) -> typing.Union[MetaOapg.properties.ocr__language, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ocr__trigger"]) -> typing.Union[MetaOapg.properties.ocr__trigger, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localization__data_format"]) -> typing.Union[MetaOapg.properties.localization__data_format, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localization__time_format"]) -> typing.Union[MetaOapg.properties.localization__time_format, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localization__timezone"]) -> typing.Union[MetaOapg.properties.localization__timezone, 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["ocr__language", "ocr__trigger", "localization__data_format", "localization__time_format", "localization__timezone", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        ocr__language: typing.Union[MetaOapg.properties.ocr__language, str, schemas.Unset] = schemas.unset,
        ocr__trigger: typing.Union[MetaOapg.properties.ocr__trigger, str, schemas.Unset] = schemas.unset,
        localization__data_format: typing.Union[MetaOapg.properties.localization__data_format, str, schemas.Unset] = schemas.unset,
        localization__time_format: typing.Union[MetaOapg.properties.localization__time_format, str, schemas.Unset] = schemas.unset,
        localization__timezone: typing.Union[MetaOapg.properties.localization__timezone, 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],
    ) -> 'SchemaForRequestBodyApplicationVndApijson':
        return super().__new__(
            cls,
            *args,
            ocr__language=ocr__language,
            ocr__trigger=ocr__trigger,
            localization__data_format=localization__data_format,
            localization__time_format=localization__time_format,
            localization__timezone=localization__timezone,
            _configuration=_configuration,
            **kwargs,
        )


class SchemaForRequestBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            ocr__language = schemas.StrSchema
            
            
            class ocr__trigger(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "auto": "AUTO",
                        "manual": "MANUAL",
                    }
                
                @schemas.classproperty
                def AUTO(cls):
                    return cls("auto")
                
                @schemas.classproperty
                def MANUAL(cls):
                    return cls("manual")
            localization__data_format = schemas.StrSchema
            localization__time_format = schemas.StrSchema
            localization__timezone = schemas.StrSchema
            __annotations__ = {
                "ocr__language": ocr__language,
                "ocr__trigger": ocr__trigger,
                "localization__data_format": localization__data_format,
                "localization__time_format": localization__time_format,
                "localization__timezone": localization__timezone,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ocr__language"]) -> MetaOapg.properties.ocr__language: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ocr__trigger"]) -> MetaOapg.properties.ocr__trigger: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localization__data_format"]) -> MetaOapg.properties.localization__data_format: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localization__time_format"]) -> MetaOapg.properties.localization__time_format: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localization__timezone"]) -> MetaOapg.properties.localization__timezone: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["ocr__language", "ocr__trigger", "localization__data_format", "localization__time_format", "localization__timezone", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ocr__language"]) -> typing.Union[MetaOapg.properties.ocr__language, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ocr__trigger"]) -> typing.Union[MetaOapg.properties.ocr__trigger, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localization__data_format"]) -> typing.Union[MetaOapg.properties.localization__data_format, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localization__time_format"]) -> typing.Union[MetaOapg.properties.localization__time_format, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localization__timezone"]) -> typing.Union[MetaOapg.properties.localization__timezone, 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["ocr__language", "ocr__trigger", "localization__data_format", "localization__time_format", "localization__timezone", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        ocr__language: typing.Union[MetaOapg.properties.ocr__language, str, schemas.Unset] = schemas.unset,
        ocr__trigger: typing.Union[MetaOapg.properties.ocr__trigger, str, schemas.Unset] = schemas.unset,
        localization__data_format: typing.Union[MetaOapg.properties.localization__data_format, str, schemas.Unset] = schemas.unset,
        localization__time_format: typing.Union[MetaOapg.properties.localization__time_format, str, schemas.Unset] = schemas.unset,
        localization__timezone: typing.Union[MetaOapg.properties.localization__timezone, 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],
    ) -> 'SchemaForRequestBodyApplicationJson':
        return super().__new__(
            cls,
            *args,
            ocr__language=ocr__language,
            ocr__trigger=ocr__trigger,
            localization__data_format=localization__data_format,
            localization__time_format=localization__time_format,
            localization__timezone=localization__timezone,
            _configuration=_configuration,
            **kwargs,
        )


request_body_any_type = api_client.RequestBody(
    content={
        'application/vnd.api+json': api_client.MediaType(
            schema=SchemaForRequestBodyApplicationVndApijson),
        'application/json': api_client.MediaType(
            schema=SchemaForRequestBodyApplicationJson),
    },
)
_auth = [
    'Token Authentication',
]


class SchemaFor200ResponseBodyApplicationVndApijson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            
            
            class data(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    
                    class items(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            
                            class properties:
                                
                                
                                class additional_data(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            choices = schemas.Schema
                                            __annotations__ = {
                                                "choices": choices,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["choices"]) -> MetaOapg.properties.choices: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["choices", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["choices"]) -> typing.Union[MetaOapg.properties.choices, 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["choices", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        choices: typing.Union[MetaOapg.properties.choices, 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],
                                    ) -> 'additional_data':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            choices=choices,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                default = schemas.StrSchema
                                
                                
                                class field(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            _class = schemas.StrSchema
                                            input_type = schemas.StrSchema
                                            __annotations__ = {
                                                "class": _class,
                                                "input_type": input_type,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["input_type"]) -> MetaOapg.properties.input_type: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["class", "input_type", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["input_type"]) -> typing.Union[MetaOapg.properties.input_type, 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["class", "input_type", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        input_type: typing.Union[MetaOapg.properties.input_type, 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],
                                    ) -> 'field':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            input_type=input_type,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                help_text = schemas.StrSchema
                                id = schemas.StrSchema
                                identifier = schemas.StrSchema
                                name = schemas.StrSchema
                                section = schemas.StrSchema
                                value = schemas.StrSchema
                                __annotations__ = {
                                    "additional_data": additional_data,
                                    "default": default,
                                    "field": field,
                                    "help_text": help_text,
                                    "id": id,
                                    "identifier": identifier,
                                    "name": name,
                                    "section": section,
                                    "value": value,
                                }
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["additional_data"]) -> MetaOapg.properties.additional_data: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["field"]) -> MetaOapg.properties.field: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["help_text"]) -> MetaOapg.properties.help_text: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["identifier"]) -> MetaOapg.properties.identifier: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["additional_data", "default", "field", "help_text", "id", "identifier", "name", "section", "value", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["additional_data"]) -> typing.Union[MetaOapg.properties.additional_data, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["field"]) -> typing.Union[MetaOapg.properties.field, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["help_text"]) -> typing.Union[MetaOapg.properties.help_text, 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["identifier"]) -> typing.Union[MetaOapg.properties.identifier, 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["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, 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["additional_data", "default", "field", "help_text", "id", "identifier", "name", "section", "value", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *args: typing.Union[dict, frozendict.frozendict, ],
                            additional_data: typing.Union[MetaOapg.properties.additional_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                            default: typing.Union[MetaOapg.properties.default, str, schemas.Unset] = schemas.unset,
                            field: typing.Union[MetaOapg.properties.field, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                            help_text: typing.Union[MetaOapg.properties.help_text, str, schemas.Unset] = schemas.unset,
                            id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
                            identifier: typing.Union[MetaOapg.properties.identifier, str, schemas.Unset] = schemas.unset,
                            name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
                            section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset,
                            value: typing.Union[MetaOapg.properties.value, 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,
                                additional_data=additional_data,
                                default=default,
                                field=field,
                                help_text=help_text,
                                id=id,
                                identifier=identifier,
                                name=name,
                                section=section,
                                value=value,
                                _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],
    ) -> 'SchemaFor200ResponseBodyApplicationVndApijson':
        return super().__new__(
            cls,
            *args,
            data=data,
            _configuration=_configuration,
            **kwargs,
        )


class SchemaFor200ResponseBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            
            
            class data(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    
                    class items(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            
                            class properties:
                                
                                
                                class additional_data(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            choices = schemas.Schema
                                            __annotations__ = {
                                                "choices": choices,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["choices"]) -> MetaOapg.properties.choices: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["choices", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["choices"]) -> typing.Union[MetaOapg.properties.choices, 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["choices", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        choices: typing.Union[MetaOapg.properties.choices, 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],
                                    ) -> 'additional_data':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            choices=choices,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                default = schemas.StrSchema
                                
                                
                                class field(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            _class = schemas.StrSchema
                                            input_type = schemas.StrSchema
                                            __annotations__ = {
                                                "class": _class,
                                                "input_type": input_type,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["input_type"]) -> MetaOapg.properties.input_type: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["class", "input_type", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ...
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["input_type"]) -> typing.Union[MetaOapg.properties.input_type, 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["class", "input_type", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        input_type: typing.Union[MetaOapg.properties.input_type, 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],
                                    ) -> 'field':
                                        return super().__new__(
                                            cls,
                                            *args,
                                            input_type=input_type,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                help_text = schemas.StrSchema
                                id = schemas.StrSchema
                                identifier = schemas.StrSchema
                                name = schemas.StrSchema
                                section = schemas.StrSchema
                                value = schemas.StrSchema
                                __annotations__ = {
                                    "additional_data": additional_data,
                                    "default": default,
                                    "field": field,
                                    "help_text": help_text,
                                    "id": id,
                                    "identifier": identifier,
                                    "name": name,
                                    "section": section,
                                    "value": value,
                                }
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["additional_data"]) -> MetaOapg.properties.additional_data: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["field"]) -> MetaOapg.properties.field: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["help_text"]) -> MetaOapg.properties.help_text: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["identifier"]) -> MetaOapg.properties.identifier: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["additional_data", "default", "field", "help_text", "id", "identifier", "name", "section", "value", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["additional_data"]) -> typing.Union[MetaOapg.properties.additional_data, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["field"]) -> typing.Union[MetaOapg.properties.field, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["help_text"]) -> typing.Union[MetaOapg.properties.help_text, 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["identifier"]) -> typing.Union[MetaOapg.properties.identifier, 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["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, 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["additional_data", "default", "field", "help_text", "id", "identifier", "name", "section", "value", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *args: typing.Union[dict, frozendict.frozendict, ],
                            additional_data: typing.Union[MetaOapg.properties.additional_data, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                            default: typing.Union[MetaOapg.properties.default, str, schemas.Unset] = schemas.unset,
                            field: typing.Union[MetaOapg.properties.field, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
                            help_text: typing.Union[MetaOapg.properties.help_text, str, schemas.Unset] = schemas.unset,
                            id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
                            identifier: typing.Union[MetaOapg.properties.identifier, str, schemas.Unset] = schemas.unset,
                            name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
                            section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset,
                            value: typing.Union[MetaOapg.properties.value, 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,
                                additional_data=additional_data,
                                default=default,
                                field=field,
                                help_text=help_text,
                                id=id,
                                identifier=identifier,
                                name=name,
                                section=section,
                                value=value,
                                _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[
        SchemaFor200ResponseBodyApplicationVndApijson,
        SchemaFor200ResponseBodyApplicationJson,
    ]
    headers: schemas.Unset = schemas.unset


_response_for_200 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor200,
    content={
        'application/vnd.api+json': api_client.MediaType(
            schema=SchemaFor200ResponseBodyApplicationVndApijson),
        'application/json': api_client.MediaType(
            schema=SchemaFor200ResponseBodyApplicationJson),
    },
)
_status_code_to_response = {
    '200': _response_for_200,
}
_all_accept_content_types = (
    'application/vnd.api+json',
    'application/json',
)


class BaseApi(api_client.Api):

    def _preferences_bulk_create_oapg(
        self: api_client.Api,
        body: typing.Union[SchemaForRequestBodyApplicationVndApijson, dict, frozendict.frozendict, SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        query_params: RequestQueryParams = frozendict.frozendict(),
        content_type: str = 'application/vnd.api+json',
        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
    ]:
        """
        :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_format,
        ):
            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)

        _fields = None
        _body = None
        if body is not schemas.unset:
            serialized_data = request_body_any_type.serialize(body, content_type)
            _headers.add('Content-Type', content_type)
            if 'fields' in serialized_data:
                _fields = serialized_data['fields']
            elif 'body' in serialized_data:
                _body = serialized_data['body']
        response = self.api_client.call_api(
            resource_path=used_path,
            method='post'.upper(),
            headers=_headers,
            fields=_fields,
            body=_body,
            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 PreferencesBulkCreate(BaseApi):
    # this class is used by api classes that refer to endpoints with operationId fn names

    def preferences_bulk_create(
        self: BaseApi,
        body: typing.Union[SchemaForRequestBodyApplicationVndApijson, dict, frozendict.frozendict, SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        query_params: RequestQueryParams = frozendict.frozendict(),
        content_type: str = 'application/vnd.api+json',
        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._preferences_bulk_create_oapg(
            body=body,
            query_params=query_params,
            content_type=content_type,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


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

    def post(
        self: BaseApi,
        body: typing.Union[SchemaForRequestBodyApplicationVndApijson, dict, frozendict.frozendict, SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        query_params: RequestQueryParams = frozendict.frozendict(),
        content_type: str = 'application/vnd.api+json',
        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._preferences_bulk_create_oapg(
            body=body,
            query_params=query_params,
            content_type=content_type,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


