# 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

# body param


class SchemaForRequestBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            kind = schemas.StrSchema
            apiVersion = schemas.StrSchema
            
            
            class metadata(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        name = schemas.StrSchema
                        description = schemas.StrSchema
                        
                        
                        class tags(
                            schemas.DictSchema
                        ):
                        
                        
                            class MetaOapg:
                                
                                class properties:
                                    template = schemas.StrSchema
                                    __annotations__ = {
                                        "template": template,
                                    }
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["template"]) -> MetaOapg.properties.template: ...
                            
                            @typing.overload
                            def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                            
                            def __getitem__(self, name: typing.Union[typing_extensions.Literal["template", ], str]):
                                # dict_instance[name] accessor
                                return super().__getitem__(name)
                            
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["template"]) -> typing.Union[MetaOapg.properties.template, 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["template", ], str]):
                                return super().get_item_oapg(name)
                            
                        
                            def __new__(
                                cls,
                                *args: typing.Union[dict, frozendict.frozendict, ],
                                template: typing.Union[MetaOapg.properties.template, 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],
                            ) -> 'tags':
                                return super().__new__(
                                    cls,
                                    *args,
                                    template=template,
                                    _configuration=_configuration,
                                    **kwargs,
                                )
                        __annotations__ = {
                            "name": name,
                            "description": description,
                            "tags": tags,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "description", "tags", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @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["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, 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["name", "description", "tags", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
                    description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
                    tags: typing.Union[MetaOapg.properties.tags, 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],
                ) -> 'metadata':
                    return super().__new__(
                        cls,
                        *args,
                        name=name,
                        description=description,
                        tags=tags,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class spec(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        
                        
                        class access(
                            schemas.ListSchema
                        ):
                        
                        
                            class MetaOapg:
                                
                                
                                class items(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        class properties:
                                            
                                            
                                            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)
                                            
                                            
                                            class rules(
                                                schemas.DictSchema
                                            ):
                                            
                                            
                                                class MetaOapg:
                                                    
                                                    class properties:
                                                        client_auth = schemas.IntSchema
                                                        encryption = schemas.IntSchema
                                                        l7_protocol = schemas.StrSchema
                                                        
                                                        
                                                        class l7_access(
                                                            schemas.ListSchema
                                                        ):
                                                        
                                                        
                                                            class MetaOapg:
                                                                
                                                                
                                                                class items(
                                                                    schemas.DictSchema
                                                                ):
                                                                
                                                                
                                                                    class MetaOapg:
                                                                        
                                                                        class properties:
                                                                            
                                                                            
                                                                            class resources(
                                                                                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,
                                                                                ) -> 'resources':
                                                                                    return super().__new__(
                                                                                        cls,
                                                                                        arg,
                                                                                        _configuration=_configuration,
                                                                                    )
                                                                            
                                                                                def __getitem__(self, i: int) -> MetaOapg.items:
                                                                                    return super().__getitem__(i)
                                                                            
                                                                            
                                                                            class actions(
                                                                                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,
                                                                                ) -> 'actions':
                                                                                    return super().__new__(
                                                                                        cls,
                                                                                        arg,
                                                                                        _configuration=_configuration,
                                                                                    )
                                                                            
                                                                                def __getitem__(self, i: int) -> MetaOapg.items:
                                                                                    return super().__getitem__(i)
                                                                            __annotations__ = {
                                                                                "resources": resources,
                                                                                "actions": actions,
                                                                            }
                                                                    
                                                                    @typing.overload
                                                                    def __getitem__(self, name: typing_extensions.Literal["resources"]) -> MetaOapg.properties.resources: ...
                                                                    
                                                                    @typing.overload
                                                                    def __getitem__(self, name: typing_extensions.Literal["actions"]) -> MetaOapg.properties.actions: ...
                                                                    
                                                                    @typing.overload
                                                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                                                    
                                                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["resources", "actions", ], str]):
                                                                        # dict_instance[name] accessor
                                                                        return super().__getitem__(name)
                                                                    
                                                                    
                                                                    @typing.overload
                                                                    def get_item_oapg(self, name: typing_extensions.Literal["resources"]) -> typing.Union[MetaOapg.properties.resources, schemas.Unset]: ...
                                                                    
                                                                    @typing.overload
                                                                    def get_item_oapg(self, name: typing_extensions.Literal["actions"]) -> typing.Union[MetaOapg.properties.actions, 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["resources", "actions", ], str]):
                                                                        return super().get_item_oapg(name)
                                                                    
                                                                
                                                                    def __new__(
                                                                        cls,
                                                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                                                        resources: typing.Union[MetaOapg.properties.resources, list, tuple, schemas.Unset] = schemas.unset,
                                                                        actions: typing.Union[MetaOapg.properties.actions, 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],
                                                                    ) -> 'items':
                                                                        return super().__new__(
                                                                            cls,
                                                                            *args,
                                                                            resources=resources,
                                                                            actions=actions,
                                                                            _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,
                                                            ) -> 'l7_access':
                                                                return super().__new__(
                                                                    cls,
                                                                    arg,
                                                                    _configuration=_configuration,
                                                                )
                                                        
                                                            def __getitem__(self, i: int) -> MetaOapg.items:
                                                                return super().__getitem__(i)
                                                        __annotations__ = {
                                                            "client_auth": client_auth,
                                                            "encryption": encryption,
                                                            "l7_protocol": l7_protocol,
                                                            "l7_access": l7_access,
                                                        }
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["client_auth"]) -> MetaOapg.properties.client_auth: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["encryption"]) -> MetaOapg.properties.encryption: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["l7_protocol"]) -> MetaOapg.properties.l7_protocol: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: typing_extensions.Literal["l7_access"]) -> MetaOapg.properties.l7_access: ...
                                                
                                                @typing.overload
                                                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                                
                                                def __getitem__(self, name: typing.Union[typing_extensions.Literal["client_auth", "encryption", "l7_protocol", "l7_access", ], str]):
                                                    # dict_instance[name] accessor
                                                    return super().__getitem__(name)
                                                
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["client_auth"]) -> typing.Union[MetaOapg.properties.client_auth, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["encryption"]) -> typing.Union[MetaOapg.properties.encryption, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["l7_protocol"]) -> typing.Union[MetaOapg.properties.l7_protocol, schemas.Unset]: ...
                                                
                                                @typing.overload
                                                def get_item_oapg(self, name: typing_extensions.Literal["l7_access"]) -> typing.Union[MetaOapg.properties.l7_access, 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["client_auth", "encryption", "l7_protocol", "l7_access", ], str]):
                                                    return super().get_item_oapg(name)
                                                
                                            
                                                def __new__(
                                                    cls,
                                                    *args: typing.Union[dict, frozendict.frozendict, ],
                                                    client_auth: typing.Union[MetaOapg.properties.client_auth, decimal.Decimal, int, schemas.Unset] = schemas.unset,
                                                    encryption: typing.Union[MetaOapg.properties.encryption, decimal.Decimal, int, schemas.Unset] = schemas.unset,
                                                    l7_protocol: typing.Union[MetaOapg.properties.l7_protocol, str, schemas.Unset] = schemas.unset,
                                                    l7_access: typing.Union[MetaOapg.properties.l7_access, 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],
                                                ) -> 'rules':
                                                    return super().__new__(
                                                        cls,
                                                        *args,
                                                        client_auth=client_auth,
                                                        encryption=encryption,
                                                        l7_protocol=l7_protocol,
                                                        l7_access=l7_access,
                                                        _configuration=_configuration,
                                                        **kwargs,
                                                    )
                                            __annotations__ = {
                                                "roles": roles,
                                                "rules": rules,
                                            }
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["roles"]) -> MetaOapg.properties.roles: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["rules"]) -> MetaOapg.properties.rules: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["roles", "rules", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @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: typing_extensions.Literal["rules"]) -> typing.Union[MetaOapg.properties.rules, 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["roles", "rules", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *args: typing.Union[dict, frozendict.frozendict, ],
                                        roles: typing.Union[MetaOapg.properties.roles, list, tuple, schemas.Unset] = schemas.unset,
                                        rules: typing.Union[MetaOapg.properties.rules, 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,
                                            roles=roles,
                                            rules=rules,
                                            _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,
                            ) -> 'access':
                                return super().__new__(
                                    cls,
                                    arg,
                                    _configuration=_configuration,
                                )
                        
                            def __getitem__(self, i: int) -> MetaOapg.items:
                                return super().__getitem__(i)
                        
                        
                        class exception(
                            schemas.DictSchema
                        ):
                        
                        
                            class MetaOapg:
                                
                                class properties:
                                    
                                    
                                    class src_addr(
                                        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,
                                        ) -> 'src_addr':
                                            return super().__new__(
                                                cls,
                                                arg,
                                                _configuration=_configuration,
                                            )
                                    
                                        def __getitem__(self, i: int) -> MetaOapg.items:
                                            return super().__getitem__(i)
                                    forward_to = schemas.StrSchema
                                    __annotations__ = {
                                        "src_addr": src_addr,
                                        "forward_to": forward_to,
                                    }
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["src_addr"]) -> MetaOapg.properties.src_addr: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["forward_to"]) -> MetaOapg.properties.forward_to: ...
                            
                            @typing.overload
                            def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                            
                            def __getitem__(self, name: typing.Union[typing_extensions.Literal["src_addr", "forward_to", ], str]):
                                # dict_instance[name] accessor
                                return super().__getitem__(name)
                            
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["src_addr"]) -> typing.Union[MetaOapg.properties.src_addr, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["forward_to"]) -> typing.Union[MetaOapg.properties.forward_to, 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["src_addr", "forward_to", ], str]):
                                return super().get_item_oapg(name)
                            
                        
                            def __new__(
                                cls,
                                *args: typing.Union[dict, frozendict.frozendict, ],
                                src_addr: typing.Union[MetaOapg.properties.src_addr, list, tuple, schemas.Unset] = schemas.unset,
                                forward_to: typing.Union[MetaOapg.properties.forward_to, 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],
                            ) -> 'exception':
                                return super().__new__(
                                    cls,
                                    *args,
                                    src_addr=src_addr,
                                    forward_to=forward_to,
                                    _configuration=_configuration,
                                    **kwargs,
                                )
                        __annotations__ = {
                            "access": access,
                            "exception": exception,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["access"]) -> MetaOapg.properties.access: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["exception"]) -> MetaOapg.properties.exception: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["access", "exception", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["access"]) -> typing.Union[MetaOapg.properties.access, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["exception"]) -> typing.Union[MetaOapg.properties.exception, 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["access", "exception", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    access: typing.Union[MetaOapg.properties.access, list, tuple, schemas.Unset] = schemas.unset,
                    exception: typing.Union[MetaOapg.properties.exception, 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],
                ) -> 'spec':
                    return super().__new__(
                        cls,
                        *args,
                        access=access,
                        exception=exception,
                        _configuration=_configuration,
                        **kwargs,
                    )
            __annotations__ = {
                "kind": kind,
                "apiVersion": apiVersion,
                "metadata": metadata,
                "spec": spec,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["apiVersion"]) -> MetaOapg.properties.apiVersion: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["spec"]) -> MetaOapg.properties.spec: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["kind", "apiVersion", "metadata", "spec", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> typing.Union[MetaOapg.properties.kind, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["apiVersion"]) -> typing.Union[MetaOapg.properties.apiVersion, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["spec"]) -> typing.Union[MetaOapg.properties.spec, 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["kind", "apiVersion", "metadata", "spec", ], str]):
        return super().get_item_oapg(name)
    

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


request_body_any_type = api_client.RequestBody(
    content={
        'application/json': api_client.MediaType(
            schema=SchemaForRequestBodyApplicationJson),
    },
    required=True,
)
_auth = [
    'bearerAuthToken',
]


class SchemaFor200ResponseBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            PolicyID = schemas.StrSchema
            __annotations__ = {
                "PolicyID": PolicyID,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["PolicyID"]) -> MetaOapg.properties.PolicyID: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["PolicyID", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["PolicyID"]) -> typing.Union[MetaOapg.properties.PolicyID, 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["PolicyID", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        PolicyID: typing.Union[MetaOapg.properties.PolicyID, 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],
    ) -> 'SchemaFor200ResponseBodyApplicationJson':
        return super().__new__(
            cls,
            *args,
            PolicyID=PolicyID,
            _configuration=_configuration,
            **kwargs,
        )


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


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


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


_response_for_400 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor400,
)


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


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


class BaseApi(api_client.Api):

    def _v1_insert_security_policy_post_oapg(
        self: api_client.Api,
        body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ],
        content_type: str = 'application/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
    ]:
        """
         Create a new policy or update an existing policy
        :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
        """
        used_path = path.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)

        if body is schemas.unset:
            raise exceptions.ApiValueError(
                'The required body parameter has an invalid value of: unset. Set a valid value instead')
        _fields = None
        _body = None
        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 V1InsertSecurityPolicyPost(BaseApi):
    # this class is used by api classes that refer to endpoints with operationId fn names

    def v1_insert_security_policy_post(
        self: BaseApi,
        body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ],
        content_type: str = 'application/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._v1_insert_security_policy_post_oapg(
            body=body,
            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[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, ],
        content_type: str = 'application/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._v1_insert_security_policy_post_oapg(
            body=body,
            content_type=content_type,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


