# coding: utf-8

"""
    Social Toolkit

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 1.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictStr
from typing_extensions import Annotated
from ssdk_alpha_ti.models.prompt_create_schema import PromptCreateSchema
from ssdk_alpha_ti.models.prompt_response_schema import PromptResponseSchema
from ssdk_alpha_ti.models.prompt_update_schema import PromptUpdateSchema

from ssdk_alpha_ti.api_client import ApiClient, RequestSerialized
from ssdk_alpha_ti.api_response import ApiResponse
from ssdk_alpha_ti.rest import RESTResponseType


class PromptApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def tenant_tenant_id_prompt_get(
        self,
        tenant_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> PromptResponseSchema:
        """List all active prompts for a tenant


        :param tenant_id: (required)
        :type tenant_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_get_serialize(
            tenant_id=tenant_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def tenant_tenant_id_prompt_get_with_http_info(
        self,
        tenant_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[PromptResponseSchema]:
        """List all active prompts for a tenant


        :param tenant_id: (required)
        :type tenant_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_get_serialize(
            tenant_id=tenant_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def tenant_tenant_id_prompt_get_without_preload_content(
        self,
        tenant_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """List all active prompts for a tenant


        :param tenant_id: (required)
        :type tenant_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_get_serialize(
            tenant_id=tenant_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _tenant_tenant_id_prompt_get_serialize(
        self,
        tenant_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if tenant_id is not None:
            _path_params['tenant_id'] = tenant_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'tenant_authorizer'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/tenant/{tenant_id}/prompt',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def tenant_tenant_id_prompt_post(
        self,
        tenant_id: StrictStr,
        body: Annotated[PromptCreateSchema, Field(description="Prompt creation details")],
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> PromptResponseSchema:
        """Create a new prompt for a tenant


        :param tenant_id: (required)
        :type tenant_id: str
        :param body: Prompt creation details (required)
        :type body: PromptCreateSchema
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_post_serialize(
            tenant_id=tenant_id,
            body=body,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "PromptResponseSchema",
            '400': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def tenant_tenant_id_prompt_post_with_http_info(
        self,
        tenant_id: StrictStr,
        body: Annotated[PromptCreateSchema, Field(description="Prompt creation details")],
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[PromptResponseSchema]:
        """Create a new prompt for a tenant


        :param tenant_id: (required)
        :type tenant_id: str
        :param body: Prompt creation details (required)
        :type body: PromptCreateSchema
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_post_serialize(
            tenant_id=tenant_id,
            body=body,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "PromptResponseSchema",
            '400': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def tenant_tenant_id_prompt_post_without_preload_content(
        self,
        tenant_id: StrictStr,
        body: Annotated[PromptCreateSchema, Field(description="Prompt creation details")],
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """Create a new prompt for a tenant


        :param tenant_id: (required)
        :type tenant_id: str
        :param body: Prompt creation details (required)
        :type body: PromptCreateSchema
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_post_serialize(
            tenant_id=tenant_id,
            body=body,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "PromptResponseSchema",
            '400': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _tenant_tenant_id_prompt_post_serialize(
        self,
        tenant_id,
        body,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if tenant_id is not None:
            _path_params['tenant_id'] = tenant_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'tenant_authorizer'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/tenant/{tenant_id}/prompt',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def tenant_tenant_id_prompt_prompt_id_delete(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> None:
        """Delete a prompt


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_delete_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def tenant_tenant_id_prompt_prompt_id_delete_with_http_info(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[None]:
        """Delete a prompt


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_delete_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def tenant_tenant_id_prompt_prompt_id_delete_without_preload_content(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """Delete a prompt


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_delete_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _tenant_tenant_id_prompt_prompt_id_delete_serialize(
        self,
        tenant_id,
        prompt_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if tenant_id is not None:
            _path_params['tenant_id'] = tenant_id
        if prompt_id is not None:
            _path_params['prompt_id'] = prompt_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: List[str] = [
            'tenant_authorizer'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/tenant/{tenant_id}/prompt/{prompt_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def tenant_tenant_id_prompt_prompt_id_get(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> PromptResponseSchema:
        """Get prompt details


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_get_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def tenant_tenant_id_prompt_prompt_id_get_with_http_info(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[PromptResponseSchema]:
        """Get prompt details


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_get_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def tenant_tenant_id_prompt_prompt_id_get_without_preload_content(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """Get prompt details


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_get_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _tenant_tenant_id_prompt_prompt_id_get_serialize(
        self,
        tenant_id,
        prompt_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if tenant_id is not None:
            _path_params['tenant_id'] = tenant_id
        if prompt_id is not None:
            _path_params['prompt_id'] = prompt_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'tenant_authorizer'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/tenant/{tenant_id}/prompt/{prompt_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def tenant_tenant_id_prompt_prompt_id_put(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        body: Annotated[PromptUpdateSchema, Field(description="Prompt update details")],
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> PromptResponseSchema:
        """Update prompt details


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :param body: Prompt update details (required)
        :type body: PromptUpdateSchema
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_put_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            body=body,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
            '400': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def tenant_tenant_id_prompt_prompt_id_put_with_http_info(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        body: Annotated[PromptUpdateSchema, Field(description="Prompt update details")],
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[PromptResponseSchema]:
        """Update prompt details


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :param body: Prompt update details (required)
        :type body: PromptUpdateSchema
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_put_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            body=body,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
            '400': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def tenant_tenant_id_prompt_prompt_id_put_without_preload_content(
        self,
        tenant_id: StrictStr,
        prompt_id: StrictStr,
        body: Annotated[PromptUpdateSchema, Field(description="Prompt update details")],
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """Update prompt details


        :param tenant_id: (required)
        :type tenant_id: str
        :param prompt_id: (required)
        :type prompt_id: str
        :param body: Prompt update details (required)
        :type body: PromptUpdateSchema
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._tenant_tenant_id_prompt_prompt_id_put_serialize(
            tenant_id=tenant_id,
            prompt_id=prompt_id,
            body=body,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PromptResponseSchema",
            '400': None,
            '404': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _tenant_tenant_id_prompt_prompt_id_put_serialize(
        self,
        tenant_id,
        prompt_id,
        body,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if tenant_id is not None:
            _path_params['tenant_id'] = tenant_id
        if prompt_id is not None:
            _path_params['prompt_id'] = prompt_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'tenant_authorizer'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/tenant/{tenant_id}/prompt/{prompt_id}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )


