# coding: utf-8

"""
    BombBomb

    We make it easy to build relationships using simple videos.

    OpenAPI spec version: 2.0.0
    
    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 SocialsApi(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 get_facebook_pages(self, **kwargs):
        """
        Gets facebook pages
        Gets facebook pages by client id

        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_facebook_pages(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_facebook_pages_with_http_info(**kwargs)
        else:
            (data) = self.get_facebook_pages_with_http_info(**kwargs)
            return data

    def get_facebook_pages_with_http_info(self, **kwargs):
        """
        Gets facebook pages
        Gets facebook pages by client id

        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_facebook_pages_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_facebook_pages" % key
                )
            params[key] = val
        del params['kwargs']

        resource_path = '/socials/facebook/pages'.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_social_article_properties(self, email_id, social_content_id, **kwargs):
        """
        Gets the social email properties
        Gets the social email properties

        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_social_article_properties(email_id, social_content_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str email_id: This is the email Id for the email url (required)
        :param str social_content_id: This is the social content Id (required)
        :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_social_article_properties_with_http_info(email_id, social_content_id, **kwargs)
        else:
            (data) = self.get_social_article_properties_with_http_info(email_id, social_content_id, **kwargs)
            return data

    def get_social_article_properties_with_http_info(self, email_id, social_content_id, **kwargs):
        """
        Gets the social email properties
        Gets the social email properties

        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_social_article_properties_with_http_info(email_id, social_content_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str email_id: This is the email Id for the email url (required)
        :param str social_content_id: This is the social content Id (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['email_id', 'social_content_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_social_article_properties" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `get_social_article_properties`")
        # verify the required parameter 'social_content_id' is set
        if ('social_content_id' not in params) or (params['social_content_id'] is None):
            raise ValueError("Missing the required parameter `social_content_id` when calling `get_social_article_properties`")

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

        query_params = {}
        if 'email_id' in params:
            query_params['emailId'] = params['email_id']
        if 'social_content_id' in params:
            query_params['socialContentId'] = params['social_content_id']

        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_social_authorizations(self, **kwargs):
        """
        Get authorizations for all social integration
        Get authorizations and autoshares for all social integration and has redirect for user to login

        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_social_authorizations(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str client_group_id: ID of the client group association
        :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_social_authorizations_with_http_info(**kwargs)
        else:
            (data) = self.get_social_authorizations_with_http_info(**kwargs)
            return data

    def get_social_authorizations_with_http_info(self, **kwargs):
        """
        Get authorizations for all social integration
        Get authorizations and autoshares for all social integration and has redirect for user to login

        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_social_authorizations_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str client_group_id: ID of the client group association
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['client_group_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_social_authorizations" % key
                )
            params[key] = val
        del params['kwargs']

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

        query_params = {}
        if 'client_group_id' in params:
            query_params['clientGroupId'] = params['client_group_id']

        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_social_profile_properties(self, social_type, **kwargs):
        """
        Gets the profile properties
        Gets the social profile properties

        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_social_profile_properties(social_type, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str social_type: The social type (required)
        :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_social_profile_properties_with_http_info(social_type, **kwargs)
        else:
            (data) = self.get_social_profile_properties_with_http_info(social_type, **kwargs)
            return data

    def get_social_profile_properties_with_http_info(self, social_type, **kwargs):
        """
        Gets the profile properties
        Gets the social profile properties

        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_social_profile_properties_with_http_info(social_type, callback=callback_function)

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

        all_params = ['social_type']
        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_social_profile_properties" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'social_type' is set
        if ('social_type' not in params) or (params['social_type'] is None):
            raise ValueError("Missing the required parameter `social_type` when calling `get_social_profile_properties`")

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

        query_params = {}
        if 'social_type' in params:
            query_params['socialType'] = params['social_type']

        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_social_stats(self, prompt_id, **kwargs):
        """
        Get social stats for a prompt
        Get social stats for a prompt by id

        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_social_stats(prompt_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str prompt_id: ID of the prompt (required)
        :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_social_stats_with_http_info(prompt_id, **kwargs)
        else:
            (data) = self.get_social_stats_with_http_info(prompt_id, **kwargs)
            return data

    def get_social_stats_with_http_info(self, prompt_id, **kwargs):
        """
        Get social stats for a prompt
        Get social stats for a prompt by id

        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_social_stats_with_http_info(prompt_id, callback=callback_function)

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

        all_params = ['prompt_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_social_stats" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'prompt_id' is set
        if ('prompt_id' not in params) or (params['prompt_id'] is None):
            raise ValueError("Missing the required parameter `prompt_id` when calling `get_social_stats`")

        resource_path = '/socials/{promptId}/stats'.replace('{format}', 'json')
        path_params = {}
        if 'prompt_id' in params:
            path_params['promptId'] = params['prompt_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=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def post_social_content(self, email_id, **kwargs):
        """
        Creates social content
        Creates social content for an email

        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.post_social_content(email_id, callback=callback_function)

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

    def post_social_content_with_http_info(self, email_id, **kwargs):
        """
        Creates social content
        Creates social content for an email

        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.post_social_content_with_http_info(email_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str email_id: The email's id (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['email_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 post_social_content" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `post_social_content`")

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

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'email_id' in params:
            form_params.append(('emailId', params['email_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=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def retry_social_send(self, prompt_id, **kwargs):
        """
        Sends social content
        Sends social content that failed for a user via their associated 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.retry_social_send(prompt_id, callback=callback_function)

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

    def retry_social_send_with_http_info(self, prompt_id, **kwargs):
        """
        Sends social content
        Sends social content that failed for a user via their associated 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.retry_social_send_with_http_info(prompt_id, callback=callback_function)

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

        all_params = ['prompt_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 retry_social_send" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'prompt_id' is set
        if ('prompt_id' not in params) or (params['prompt_id'] is None):
            raise ValueError("Missing the required parameter `prompt_id` when calling `retry_social_send`")

        resource_path = '/socials/send/retry'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'prompt_id' in params:
            form_params.append(('promptId', params['prompt_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=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def send_social(self, prompt_id, social_type, **kwargs):
        """
        Sends social content
        Sends social content for a user via their associated 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.send_social(prompt_id, social_type, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str prompt_id: The prompt id (required)
        :param str social_type: The destination for social content (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.send_social_with_http_info(prompt_id, social_type, **kwargs)
        else:
            (data) = self.send_social_with_http_info(prompt_id, social_type, **kwargs)
            return data

    def send_social_with_http_info(self, prompt_id, social_type, **kwargs):
        """
        Sends social content
        Sends social content for a user via their associated 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.send_social_with_http_info(prompt_id, social_type, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str prompt_id: The prompt id (required)
        :param str social_type: The destination for social content (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['prompt_id', 'social_type']
        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 send_social" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'prompt_id' is set
        if ('prompt_id' not in params) or (params['prompt_id'] is None):
            raise ValueError("Missing the required parameter `prompt_id` when calling `send_social`")
        # verify the required parameter 'social_type' is set
        if ('social_type' not in params) or (params['social_type'] is None):
            raise ValueError("Missing the required parameter `social_type` when calling `send_social`")

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

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'prompt_id' in params:
            form_params.append(('promptId', params['prompt_id']))
        if 'social_type' in params:
            form_params.append(('socialType', params['social_type']))

        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=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'))

    def update_client_group_send_mechanism(self, send_mechanism, client_group_id, **kwargs):
        """
        Gets the auto shares from the client group assoc id
        Gets the auto shares from the client group assoc id

        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_client_group_send_mechanism(send_mechanism, client_group_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str send_mechanism: The send mechanism for the prompt (required)
        :param str client_group_id: ID of the client group association (required)
        :param str enabled: Is the send mechanism enabled?
        :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_client_group_send_mechanism_with_http_info(send_mechanism, client_group_id, **kwargs)
        else:
            (data) = self.update_client_group_send_mechanism_with_http_info(send_mechanism, client_group_id, **kwargs)
            return data

    def update_client_group_send_mechanism_with_http_info(self, send_mechanism, client_group_id, **kwargs):
        """
        Gets the auto shares from the client group assoc id
        Gets the auto shares from the client group assoc id

        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_client_group_send_mechanism_with_http_info(send_mechanism, client_group_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str send_mechanism: The send mechanism for the prompt (required)
        :param str client_group_id: ID of the client group association (required)
        :param str enabled: Is the send mechanism enabled?
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['send_mechanism', 'client_group_id', 'enabled']
        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_client_group_send_mechanism" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'send_mechanism' is set
        if ('send_mechanism' not in params) or (params['send_mechanism'] is None):
            raise ValueError("Missing the required parameter `send_mechanism` when calling `update_client_group_send_mechanism`")
        # 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_client_group_send_mechanism`")

        resource_path = '/socials/client/sendMechanism'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'send_mechanism' in params:
            form_params.append(('sendMechanism', params['send_mechanism']))
        if 'client_group_id' in params:
            form_params.append(('clientGroupId', params['client_group_id']))
        if 'enabled' in params:
            form_params.append(('enabled', params['enabled']))

        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'))

    def update_client_groups_send_mechanism(self, send_mechanism, enabled, **kwargs):
        """
        Toggles the prompt campaigns in a users account
        Toggles the prompt campaigns in a users account for a social integrations on or off

        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_client_groups_send_mechanism(send_mechanism, enabled, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str send_mechanism: The send mechanism for the prompt (required)
        :param str enabled: Is the send mechanism enabled? (required)
        :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_client_groups_send_mechanism_with_http_info(send_mechanism, enabled, **kwargs)
        else:
            (data) = self.update_client_groups_send_mechanism_with_http_info(send_mechanism, enabled, **kwargs)
            return data

    def update_client_groups_send_mechanism_with_http_info(self, send_mechanism, enabled, **kwargs):
        """
        Toggles the prompt campaigns in a users account
        Toggles the prompt campaigns in a users account for a social integrations on or off

        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_client_groups_send_mechanism_with_http_info(send_mechanism, enabled, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str send_mechanism: The send mechanism for the prompt (required)
        :param str enabled: Is the send mechanism enabled? (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['send_mechanism', 'enabled']
        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_client_groups_send_mechanism" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'send_mechanism' is set
        if ('send_mechanism' not in params) or (params['send_mechanism'] is None):
            raise ValueError("Missing the required parameter `send_mechanism` when calling `update_client_groups_send_mechanism`")
        # verify the required parameter 'enabled' is set
        if ('enabled' not in params) or (params['enabled'] is None):
            raise ValueError("Missing the required parameter `enabled` when calling `update_client_groups_send_mechanism`")

        resource_path = '/socials/client/sendMechanisms'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'send_mechanism' in params:
            form_params.append(('sendMechanism', params['send_mechanism']))
        if 'enabled' in params:
            form_params.append(('enabled', params['enabled']))

        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'))

    def update_facebook_pages(self, page_ids, **kwargs):
        """
        Updates facebook page Ids
        Updates facebook page Ids to be sent to for 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.update_facebook_pages(page_ids, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str page_ids: Page Ids for the prompt (required)
        :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_facebook_pages_with_http_info(page_ids, **kwargs)
        else:
            (data) = self.update_facebook_pages_with_http_info(page_ids, **kwargs)
            return data

    def update_facebook_pages_with_http_info(self, page_ids, **kwargs):
        """
        Updates facebook page Ids
        Updates facebook page Ids to be sent to for 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.update_facebook_pages_with_http_info(page_ids, callback=callback_function)

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

        all_params = ['page_ids']
        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_facebook_pages" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'page_ids' is set
        if ('page_ids' not in params) or (params['page_ids'] is None):
            raise ValueError("Missing the required parameter `page_ids` when calling `update_facebook_pages`")

        resource_path = '/socials/facebook/pages'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'page_ids' in params:
            form_params.append(('pageIds', params['page_ids']))

        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'))

    def update_social_content(self, social_id, **kwargs):
        """
        Updates social content
        Updates social content for an email

        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_social_content(social_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str social_id: The social id (required)
        :param str title: The title for the article
        :param str description: The article description
        :param str picture_url: The article picture url
        :param str suggested_message: The suggested message to use
        :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_social_content_with_http_info(social_id, **kwargs)
        else:
            (data) = self.update_social_content_with_http_info(social_id, **kwargs)
            return data

    def update_social_content_with_http_info(self, social_id, **kwargs):
        """
        Updates social content
        Updates social content for an email

        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_social_content_with_http_info(social_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str social_id: The social id (required)
        :param str title: The title for the article
        :param str description: The article description
        :param str picture_url: The article picture url
        :param str suggested_message: The suggested message to use
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['social_id', 'title', 'description', 'picture_url', 'suggested_message']
        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_social_content" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'social_id' is set
        if ('social_id' not in params) or (params['social_id'] is None):
            raise ValueError("Missing the required parameter `social_id` when calling `update_social_content`")

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

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'social_id' in params:
            form_params.append(('socialId', params['social_id']))
        if 'title' in params:
            form_params.append(('title', params['title']))
        if 'description' in params:
            form_params.append(('description', params['description']))
        if 'picture_url' in params:
            form_params.append(('pictureUrl', params['picture_url']))
        if 'suggested_message' in params:
            form_params.append(('suggestedMessage', params['suggested_message']))

        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'))
