# 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

_auth = [
    'bearerAuthToken',
]


class SchemaFor200ResponseBodyApplicationJson(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            ID = schemas.StrSchema
            Name = schemas.StrSchema
            Description = schemas.StrSchema
            CreatedBy = schemas.StrSchema
            CreatedAt = schemas.IntSchema
            LastUpdatedBy = schemas.StrSchema
            LastUpdatedAt = schemas.IntSchema
            
            
            class Spec(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        kind = schemas.StrSchema
                        apiVersion = schemas.StrSchema
                        
                        
                        class metadata(
                            schemas.DictSchema
                        ):
                        
                        
                            class MetaOapg:
                                
                                class properties:
                                    id = schemas.StrSchema
                                    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__ = {
                                        "id": id,
                                        "name": name,
                                        "description": description,
                                        "tags": tags,
                                    }
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
                            
                            @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["id", "name", "description", "tags", ], str]):
                                # dict_instance[name] accessor
                                return super().__getitem__(name)
                            
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["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["id", "name", "description", "tags", ], str]):
                                return super().get_item_oapg(name)
                            
                        
                            def __new__(
                                cls,
                                *args: typing.Union[dict, frozendict.frozendict, ],
                                id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
                                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,
                                    id=id,
                                    name=name,
                                    description=description,
                                    tags=tags,
                                    _configuration=_configuration,
                                    **kwargs,
                                )
                        
                        
                        class spec(
                            schemas.DictSchema
                        ):
                        
                        
                            class MetaOapg:
                                
                                class properties:
                                    client_id = schemas.StrSchema
                                    client_secret = schemas.StrSchema
                                    redirect_url = schemas.StrSchema
                                    protocol = schemas.StrSchema
                                    type = schemas.StrSchema
                                    name_id_format = schemas.StrSchema
                                    suppress_device_trust_verification = schemas.IntSchema
                                    enable_service_level_passwordless = schemas.BoolSchema
                                    __annotations__ = {
                                        "client_id": client_id,
                                        "client_secret": client_secret,
                                        "redirect_url": redirect_url,
                                        "protocol": protocol,
                                        "type": type,
                                        "name_id_format": name_id_format,
                                        "suppress_device_trust_verification": suppress_device_trust_verification,
                                        "enable_service_level_passwordless": enable_service_level_passwordless,
                                    }
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["client_id"]) -> MetaOapg.properties.client_id: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["client_secret"]) -> MetaOapg.properties.client_secret: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["redirect_url"]) -> MetaOapg.properties.redirect_url: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["name_id_format"]) -> MetaOapg.properties.name_id_format: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["suppress_device_trust_verification"]) -> MetaOapg.properties.suppress_device_trust_verification: ...
                            
                            @typing.overload
                            def __getitem__(self, name: typing_extensions.Literal["enable_service_level_passwordless"]) -> MetaOapg.properties.enable_service_level_passwordless: ...
                            
                            @typing.overload
                            def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                            
                            def __getitem__(self, name: typing.Union[typing_extensions.Literal["client_id", "client_secret", "redirect_url", "protocol", "type", "name_id_format", "suppress_device_trust_verification", "enable_service_level_passwordless", ], str]):
                                # dict_instance[name] accessor
                                return super().__getitem__(name)
                            
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["client_id"]) -> typing.Union[MetaOapg.properties.client_id, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["client_secret"]) -> typing.Union[MetaOapg.properties.client_secret, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["redirect_url"]) -> typing.Union[MetaOapg.properties.redirect_url, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> typing.Union[MetaOapg.properties.protocol, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["name_id_format"]) -> typing.Union[MetaOapg.properties.name_id_format, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["suppress_device_trust_verification"]) -> typing.Union[MetaOapg.properties.suppress_device_trust_verification, schemas.Unset]: ...
                            
                            @typing.overload
                            def get_item_oapg(self, name: typing_extensions.Literal["enable_service_level_passwordless"]) -> typing.Union[MetaOapg.properties.enable_service_level_passwordless, 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_id", "client_secret", "redirect_url", "protocol", "type", "name_id_format", "suppress_device_trust_verification", "enable_service_level_passwordless", ], str]):
                                return super().get_item_oapg(name)
                            
                        
                            def __new__(
                                cls,
                                *args: typing.Union[dict, frozendict.frozendict, ],
                                client_id: typing.Union[MetaOapg.properties.client_id, str, schemas.Unset] = schemas.unset,
                                client_secret: typing.Union[MetaOapg.properties.client_secret, str, schemas.Unset] = schemas.unset,
                                redirect_url: typing.Union[MetaOapg.properties.redirect_url, str, schemas.Unset] = schemas.unset,
                                protocol: typing.Union[MetaOapg.properties.protocol, str, schemas.Unset] = schemas.unset,
                                type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset,
                                name_id_format: typing.Union[MetaOapg.properties.name_id_format, str, schemas.Unset] = schemas.unset,
                                suppress_device_trust_verification: typing.Union[MetaOapg.properties.suppress_device_trust_verification, decimal.Decimal, int, schemas.Unset] = schemas.unset,
                                enable_service_level_passwordless: typing.Union[MetaOapg.properties.enable_service_level_passwordless, bool, 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,
                                    client_id=client_id,
                                    client_secret=client_secret,
                                    redirect_url=redirect_url,
                                    protocol=protocol,
                                    type=type,
                                    name_id_format=name_id_format,
                                    suppress_device_trust_verification=suppress_device_trust_verification,
                                    enable_service_level_passwordless=enable_service_level_passwordless,
                                    _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],
                ) -> 'Spec':
                    return super().__new__(
                        cls,
                        *args,
                        kind=kind,
                        apiVersion=apiVersion,
                        metadata=metadata,
                        spec=spec,
                        _configuration=_configuration,
                        **kwargs,
                    )
            Enabled = schemas.StrSchema
            Protocol = schemas.StrSchema
            Type = schemas.StrSchema
            __annotations__ = {
                "ID": ID,
                "Name": Name,
                "Description": Description,
                "CreatedBy": CreatedBy,
                "CreatedAt": CreatedAt,
                "LastUpdatedBy": LastUpdatedBy,
                "LastUpdatedAt": LastUpdatedAt,
                "Spec": Spec,
                "Enabled": Enabled,
                "Protocol": Protocol,
                "Type": Type,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ID"]) -> MetaOapg.properties.ID: ...
    
    @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["CreatedBy"]) -> MetaOapg.properties.CreatedBy: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["CreatedAt"]) -> MetaOapg.properties.CreatedAt: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["LastUpdatedBy"]) -> MetaOapg.properties.LastUpdatedBy: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["LastUpdatedAt"]) -> MetaOapg.properties.LastUpdatedAt: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Spec"]) -> MetaOapg.properties.Spec: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Enabled"]) -> MetaOapg.properties.Enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Protocol"]) -> MetaOapg.properties.Protocol: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Type"]) -> MetaOapg.properties.Type: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["ID", "Name", "Description", "CreatedBy", "CreatedAt", "LastUpdatedBy", "LastUpdatedAt", "Spec", "Enabled", "Protocol", "Type", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ID"]) -> typing.Union[MetaOapg.properties.ID, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["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["CreatedBy"]) -> typing.Union[MetaOapg.properties.CreatedBy, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["CreatedAt"]) -> typing.Union[MetaOapg.properties.CreatedAt, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["LastUpdatedBy"]) -> typing.Union[MetaOapg.properties.LastUpdatedBy, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["LastUpdatedAt"]) -> typing.Union[MetaOapg.properties.LastUpdatedAt, 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: typing_extensions.Literal["Enabled"]) -> typing.Union[MetaOapg.properties.Enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Protocol"]) -> typing.Union[MetaOapg.properties.Protocol, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Type"]) -> typing.Union[MetaOapg.properties.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["ID", "Name", "Description", "CreatedBy", "CreatedAt", "LastUpdatedBy", "LastUpdatedAt", "Spec", "Enabled", "Protocol", "Type", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        ID: typing.Union[MetaOapg.properties.ID, str, schemas.Unset] = schemas.unset,
        Name: typing.Union[MetaOapg.properties.Name, str, schemas.Unset] = schemas.unset,
        Description: typing.Union[MetaOapg.properties.Description, str, schemas.Unset] = schemas.unset,
        CreatedBy: typing.Union[MetaOapg.properties.CreatedBy, str, schemas.Unset] = schemas.unset,
        CreatedAt: typing.Union[MetaOapg.properties.CreatedAt, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        LastUpdatedBy: typing.Union[MetaOapg.properties.LastUpdatedBy, str, schemas.Unset] = schemas.unset,
        LastUpdatedAt: typing.Union[MetaOapg.properties.LastUpdatedAt, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        Spec: typing.Union[MetaOapg.properties.Spec, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        Enabled: typing.Union[MetaOapg.properties.Enabled, str, schemas.Unset] = schemas.unset,
        Protocol: typing.Union[MetaOapg.properties.Protocol, str, schemas.Unset] = schemas.unset,
        Type: typing.Union[MetaOapg.properties.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],
    ) -> 'SchemaFor200ResponseBodyApplicationJson':
        return super().__new__(
            cls,
            *args,
            ID=ID,
            Name=Name,
            Description=Description,
            CreatedBy=CreatedBy,
            CreatedAt=CreatedAt,
            LastUpdatedBy=LastUpdatedBy,
            LastUpdatedAt=LastUpdatedAt,
            Spec=Spec,
            Enabled=Enabled,
            Protocol=Protocol,
            Type=Type,
            _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_saasapp_post_oapg(
        self: api_client.Api,
        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 or update an existing saas app service
        :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)

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

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

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

        return api_response


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

    def v1_insert_saasapp_post(
        self: BaseApi,
        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_saasapp_post_oapg(
            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,
        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_saasapp_post_oapg(
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


