# coding: utf-8

"""
    BombBomb

    We make it easy to build relationships using simple videos.

    OpenAPI spec version: 2.0.24005
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class PromptsApi(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def create_prompt_bot(self, list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, **kwargs):
        """
        Create a running Prompt Bot for a list
        Creates a Prompt Bot that sends emails to contacts on a list over the span of time defined.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_prompt_bot(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str list_id: The list id to attach the bot to. (required)
        :param str email_id: The default email to use. (required)
        :param str name: The name of the bot. (required)
        :param str subject: The subject of the default email. (required)
        :param str content: The content used in the email. (required)
        :param str contact_field_value_column: The custom field value column with dates for this bot. (required)
        :param str bot_type_id: The type of bot to create. (required)
        :param str template_id: The template used to create the email id. (required)
        :param str video_id: The video used in the email.
        :param str end_date: The time frame to complete sending to the list.
        :return: PromptBot
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.create_prompt_bot_with_http_info(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, **kwargs)
        else:
            (data) = self.create_prompt_bot_with_http_info(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, **kwargs)
            return data

    def create_prompt_bot_with_http_info(self, list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, **kwargs):
        """
        Create a running Prompt Bot for a list
        Creates a Prompt Bot that sends emails to contacts on a list over the span of time defined.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_prompt_bot_with_http_info(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str list_id: The list id to attach the bot to. (required)
        :param str email_id: The default email to use. (required)
        :param str name: The name of the bot. (required)
        :param str subject: The subject of the default email. (required)
        :param str content: The content used in the email. (required)
        :param str contact_field_value_column: The custom field value column with dates for this bot. (required)
        :param str bot_type_id: The type of bot to create. (required)
        :param str template_id: The template used to create the email id. (required)
        :param str video_id: The video used in the email.
        :param str end_date: The time frame to complete sending to the list.
        :return: PromptBot
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['list_id', 'email_id', 'name', 'subject', 'content', 'contact_field_value_column', 'bot_type_id', 'template_id', 'video_id', 'end_date']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_prompt_bot" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'list_id' is set
        if ('list_id' not in params) or (params['list_id'] is None):
            raise ValueError("Missing the required parameter `list_id` when calling `create_prompt_bot`")
        # verify the required parameter 'email_id' is set
        if ('email_id' not in params) or (params['email_id'] is None):
            raise ValueError("Missing the required parameter `email_id` when calling `create_prompt_bot`")
        # verify the required parameter 'name' is set
        if ('name' not in params) or (params['name'] is None):
            raise ValueError("Missing the required parameter `name` when calling `create_prompt_bot`")
        # verify the required parameter 'subject' is set
        if ('subject' not in params) or (params['subject'] is None):
            raise ValueError("Missing the required parameter `subject` when calling `create_prompt_bot`")
        # verify the required parameter 'content' is set
        if ('content' not in params) or (params['content'] is None):
            raise ValueError("Missing the required parameter `content` when calling `create_prompt_bot`")
        # verify the required parameter 'contact_field_value_column' is set
        if ('contact_field_value_column' not in params) or (params['contact_field_value_column'] is None):
            raise ValueError("Missing the required parameter `contact_field_value_column` when calling `create_prompt_bot`")
        # verify the required parameter 'bot_type_id' is set
        if ('bot_type_id' not in params) or (params['bot_type_id'] is None):
            raise ValueError("Missing the required parameter `bot_type_id` when calling `create_prompt_bot`")
        # verify the required parameter 'template_id' is set
        if ('template_id' not in params) or (params['template_id'] is None):
            raise ValueError("Missing the required parameter `template_id` when calling `create_prompt_bot`")

        resource_path = '/prompts/bots'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'list_id' in params:
            form_params.append(('listId', params['list_id']))
        if 'email_id' in params:
            form_params.append(('emailId', params['email_id']))
        if 'video_id' in params:
            form_params.append(('videoId', params['video_id']))
        if 'name' in params:
            form_params.append(('name', params['name']))
        if 'subject' in params:
            form_params.append(('subject', params['subject']))
        if 'content' in params:
            form_params.append(('content', params['content']))
        if 'contact_field_value_column' in params:
            form_params.append(('contactFieldValueColumn', params['contact_field_value_column']))
        if 'end_date' in params:
            form_params.append(('endDate', params['end_date']))
        if 'bot_type_id' in params:
            form_params.append(('botTypeId', params['bot_type_id']))
        if 'template_id' in params:
            form_params.append(('templateId', params['template_id']))

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='PromptBot',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def create_video_email_prompt(self, prompt, **kwargs):
        """
        Prompts user to send a video
        Sends the account holder an email prompting them to add a video to a scheduled outgoing message. Recipients, content and timing is all preset for the user.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_video_email_prompt(prompt, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param VideoEmailPrompt prompt: The Video Email Prompt to be created (required)
        :return: VideoEmailPrompt
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.create_video_email_prompt_with_http_info(prompt, **kwargs)
        else:
            (data) = self.create_video_email_prompt_with_http_info(prompt, **kwargs)
            return data

    def create_video_email_prompt_with_http_info(self, prompt, **kwargs):
        """
        Prompts user to send a video
        Sends the account holder an email prompting them to add a video to a scheduled outgoing message. Recipients, content and timing is all preset for the user.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_video_email_prompt_with_http_info(prompt, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param VideoEmailPrompt prompt: The Video Email Prompt to be created (required)
        :return: VideoEmailPrompt
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['prompt']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_video_email_prompt" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'prompt' is set
        if ('prompt' not in params) or (params['prompt'] is None):
            raise ValueError("Missing the required parameter `prompt` when calling `create_video_email_prompt`")

        resource_path = '/prompt'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'prompt' in params:
            body_params = params['prompt']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='VideoEmailPrompt',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def get_pending_video_email_prompts(self, **kwargs):
        """
        List pending prompts
        Returns a list of prompts that have not been sent yet, and can still be customized.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_pending_video_email_prompts(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: list[VideoEmailPrompt]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_pending_video_email_prompts_with_http_info(**kwargs)
        else:
            (data) = self.get_pending_video_email_prompts_with_http_info(**kwargs)
            return data

    def get_pending_video_email_prompts_with_http_info(self, **kwargs):
        """
        List pending prompts
        Returns a list of prompts that have not been sent yet, and can still be customized.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_pending_video_email_prompts_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: list[VideoEmailPrompt]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_pending_video_email_prompts" % key
                )
            params[key] = val
        del params['kwargs']

        resource_path = '/prompt/pending'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[VideoEmailPrompt]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def get_prompt_bots(self, **kwargs):
        """
        List Prompt Bots
        Returns a list of all Prompt Bots for the user.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_prompt_bots(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: list[PromptBot]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_prompt_bots_with_http_info(**kwargs)
        else:
            (data) = self.get_prompt_bots_with_http_info(**kwargs)
            return data

    def get_prompt_bots_with_http_info(self, **kwargs):
        """
        List Prompt Bots
        Returns a list of all Prompt Bots for the user.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_prompt_bots_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: list[PromptBot]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_prompt_bots" % key
                )
            params[key] = val
        del params['kwargs']

        resource_path = '/prompts/bots'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[PromptBot]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def get_prompt_campaigns(self, **kwargs):
        """
        List Prompt Campaigns
        Returns a list of all Prompt Campaigns for the user.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_prompt_campaigns(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_prompt_campaigns_with_http_info(**kwargs)
        else:
            (data) = self.get_prompt_campaigns_with_http_info(**kwargs)
            return data

    def get_prompt_campaigns_with_http_info(self, **kwargs):
        """
        List Prompt Campaigns
        Returns a list of all Prompt Campaigns for the user.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_prompt_campaigns_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_prompt_campaigns" % key
                )
            params[key] = val
        del params['kwargs']

        resource_path = '/prompts/campaigns'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def get_video_email_prompt(self, id, **kwargs):
        """
        Gets a prompt
        Gets a prompt

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_video_email_prompt(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: The Id of the prompt (required)
        :return: VideoEmailPrompt
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_video_email_prompt_with_http_info(id, **kwargs)
        else:
            (data) = self.get_video_email_prompt_with_http_info(id, **kwargs)
            return data

    def get_video_email_prompt_with_http_info(self, id, **kwargs):
        """
        Gets a prompt
        Gets a prompt

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_video_email_prompt_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: The Id of the prompt (required)
        :return: VideoEmailPrompt
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_video_email_prompt" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_video_email_prompt`")

        resource_path = '/prompt/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='VideoEmailPrompt',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def get_video_email_prompts(self, **kwargs):
        """
        List prompts
        Returns a list of all prompts.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_video_email_prompts(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: list[VideoEmailPrompt]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_video_email_prompts_with_http_info(**kwargs)
        else:
            (data) = self.get_video_email_prompts_with_http_info(**kwargs)
            return data

    def get_video_email_prompts_with_http_info(self, **kwargs):
        """
        List prompts
        Returns a list of all prompts.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_video_email_prompts_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :return: list[VideoEmailPrompt]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_video_email_prompts" % key
                )
            params[key] = val
        del params['kwargs']

        resource_path = '/prompt/'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[VideoEmailPrompt]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def respond_to_video_email_prompt(self, id, choice, **kwargs):
        """
        Respond to a prompt
        Respond to a prompt by either adding a video, sending without a video or cancelling the prompt.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.respond_to_video_email_prompt(id, choice, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: The id of the prompt. (required)
        :param str choice: The users' selection. Can be: WithVideo, WithEmail, Cancel, Restore, Reset, Manual (required)
        :param str video_id: The id of the video.
        :param str email_id: The id of the email.
        :param str subject: The subject of the email
        :return: VideoEmailPrompt
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.respond_to_video_email_prompt_with_http_info(id, choice, **kwargs)
        else:
            (data) = self.respond_to_video_email_prompt_with_http_info(id, choice, **kwargs)
            return data

    def respond_to_video_email_prompt_with_http_info(self, id, choice, **kwargs):
        """
        Respond to a prompt
        Respond to a prompt by either adding a video, sending without a video or cancelling the prompt.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.respond_to_video_email_prompt_with_http_info(id, choice, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: The id of the prompt. (required)
        :param str choice: The users' selection. Can be: WithVideo, WithEmail, Cancel, Restore, Reset, Manual (required)
        :param str video_id: The id of the video.
        :param str email_id: The id of the email.
        :param str subject: The subject of the email
        :return: VideoEmailPrompt
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'choice', 'video_id', 'email_id', 'subject']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method respond_to_video_email_prompt" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `respond_to_video_email_prompt`")
        # verify the required parameter 'choice' is set
        if ('choice' not in params) or (params['choice'] is None):
            raise ValueError("Missing the required parameter `choice` when calling `respond_to_video_email_prompt`")

        resource_path = '/prompt/{id}/response'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'video_id' in params:
            form_params.append(('videoId', params['video_id']))
        if 'email_id' in params:
            form_params.append(('emailId', params['email_id']))
        if 'subject' in params:
            form_params.append(('subject', params['subject']))
        if 'choice' in params:
            form_params.append(('choice', params['choice']))

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='VideoEmailPrompt',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def update_prompt_bot(self, id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, **kwargs):
        """
        Update Prompt Bot
        Updates a Prompt Bot's settings.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_prompt_bot(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: The bot id. (required)
        :param str list_id: The list id to attach the bot to. (required)
        :param str email_id: The default email to use. (required)
        :param str name: The name of the bot. (required)
        :param str subject: The subject of the default email. (required)
        :param str content: The content used in the default email. (required)
        :param str contact_field_value_column: The custom field value column with dates for this bot. (required)
        :param str template_id: The template used to create the email id. (required)
        :param str video_id: The video used in the default email.
        :param str end_date: The time frame to complete sending to the list.
        :param str status: The status of the bot.
        :return: PromptBot
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.update_prompt_bot_with_http_info(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, **kwargs)
        else:
            (data) = self.update_prompt_bot_with_http_info(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, **kwargs)
            return data

    def update_prompt_bot_with_http_info(self, id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, **kwargs):
        """
        Update Prompt Bot
        Updates a Prompt Bot's settings.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_prompt_bot_with_http_info(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: The bot id. (required)
        :param str list_id: The list id to attach the bot to. (required)
        :param str email_id: The default email to use. (required)
        :param str name: The name of the bot. (required)
        :param str subject: The subject of the default email. (required)
        :param str content: The content used in the default email. (required)
        :param str contact_field_value_column: The custom field value column with dates for this bot. (required)
        :param str template_id: The template used to create the email id. (required)
        :param str video_id: The video used in the default email.
        :param str end_date: The time frame to complete sending to the list.
        :param str status: The status of the bot.
        :return: PromptBot
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'list_id', 'email_id', 'name', 'subject', 'content', 'contact_field_value_column', 'template_id', 'video_id', 'end_date', 'status']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_prompt_bot" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `update_prompt_bot`")
        # verify the required parameter 'list_id' is set
        if ('list_id' not in params) or (params['list_id'] is None):
            raise ValueError("Missing the required parameter `list_id` when calling `update_prompt_bot`")
        # verify the required parameter 'email_id' is set
        if ('email_id' not in params) or (params['email_id'] is None):
            raise ValueError("Missing the required parameter `email_id` when calling `update_prompt_bot`")
        # verify the required parameter 'name' is set
        if ('name' not in params) or (params['name'] is None):
            raise ValueError("Missing the required parameter `name` when calling `update_prompt_bot`")
        # verify the required parameter 'subject' is set
        if ('subject' not in params) or (params['subject'] is None):
            raise ValueError("Missing the required parameter `subject` when calling `update_prompt_bot`")
        # verify the required parameter 'content' is set
        if ('content' not in params) or (params['content'] is None):
            raise ValueError("Missing the required parameter `content` when calling `update_prompt_bot`")
        # verify the required parameter 'contact_field_value_column' is set
        if ('contact_field_value_column' not in params) or (params['contact_field_value_column'] is None):
            raise ValueError("Missing the required parameter `contact_field_value_column` when calling `update_prompt_bot`")
        # verify the required parameter 'template_id' is set
        if ('template_id' not in params) or (params['template_id'] is None):
            raise ValueError("Missing the required parameter `template_id` when calling `update_prompt_bot`")

        resource_path = '/prompts/bots/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'list_id' in params:
            form_params.append(('listId', params['list_id']))
        if 'email_id' in params:
            form_params.append(('emailId', params['email_id']))
        if 'video_id' in params:
            form_params.append(('videoId', params['video_id']))
        if 'end_date' in params:
            form_params.append(('endDate', params['end_date']))
        if 'status' in params:
            form_params.append(('status', params['status']))
        if 'name' in params:
            form_params.append(('name', params['name']))
        if 'subject' in params:
            form_params.append(('subject', params['subject']))
        if 'content' in params:
            form_params.append(('content', params['content']))
        if 'contact_field_value_column' in params:
            form_params.append(('contactFieldValueColumn', params['contact_field_value_column']))
        if 'template_id' in params:
            form_params.append(('templateId', params['template_id']))

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='PromptBot',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def update_prompt_campaign(self, client_group_id, **kwargs):
        """
        Update Prompt Campaign
        Updates a Prompt Campaign's Settings

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_prompt_campaign(client_group_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str client_group_id: The client group of the campaign. (required)
        :param str branded_template_id: The template to use for branded feel emails.
        :param str personal_template_id: The template to use for personal feel emails.
        :param bool enabled: Set whether the user is able to start receiving prompts.
        :param str auto_shares: These are what we are autosharing to
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.update_prompt_campaign_with_http_info(client_group_id, **kwargs)
        else:
            (data) = self.update_prompt_campaign_with_http_info(client_group_id, **kwargs)
            return data

    def update_prompt_campaign_with_http_info(self, client_group_id, **kwargs):
        """
        Update Prompt Campaign
        Updates a Prompt Campaign's Settings

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_prompt_campaign_with_http_info(client_group_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str client_group_id: The client group of the campaign. (required)
        :param str branded_template_id: The template to use for branded feel emails.
        :param str personal_template_id: The template to use for personal feel emails.
        :param bool enabled: Set whether the user is able to start receiving prompts.
        :param str auto_shares: These are what we are autosharing to
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['client_group_id', 'branded_template_id', 'personal_template_id', 'enabled', 'auto_shares']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_prompt_campaign" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'client_group_id' is set
        if ('client_group_id' not in params) or (params['client_group_id'] is None):
            raise ValueError("Missing the required parameter `client_group_id` when calling `update_prompt_campaign`")

        resource_path = '/prompts/campaigns/{id}'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'client_group_id' in params:
            form_params.append(('clientGroupId', params['client_group_id']))
        if 'branded_template_id' in params:
            form_params.append(('brandedTemplateId', params['branded_template_id']))
        if 'personal_template_id' in params:
            form_params.append(('personalTemplateId', params['personal_template_id']))
        if 'enabled' in params:
            form_params.append(('enabled', params['enabled']))
        if 'auto_shares' in params:
            form_params.append(('autoShares', params['auto_shares']))

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/x-www-form-urlencoded'])

        # Authentication setting
        auth_settings = ['BBOAuth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))
