# coding: utf-8

"""
    Prompt.io APIs

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class AnalyticsApi(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):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def get_agent_activity_report(self, **kwargs):  # noqa: E501
        """Get the Agent Activity Report for the org.  # noqa: E501

        _in snippets: platform.api.analytics.getAgentActivityReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_agent_activity_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: list[AnalyticsAgentActivityReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_agent_activity_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_agent_activity_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_agent_activity_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Agent Activity Report for the org.  # noqa: E501

        _in snippets: platform.api.analytics.getAgentActivityReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_agent_activity_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: list[AnalyticsAgentActivityReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'include_deleted']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'include_deleted' in params:
            query_params.append(('include_deleted', params['include_deleted']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/agent_activity_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsAgentActivityReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_agent_activity_report_for_channel(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Agent Activity Report for a specific channel.  # noqa: E501

        _in snippets: platform.api.analytics.getAgentActivityReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_agent_activity_report_for_channel(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: list[AnalyticsAgentActivityReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_agent_activity_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_agent_activity_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
            return data

    def get_agent_activity_report_for_channel_with_http_info(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Agent Activity Report for a specific channel.  # noqa: E501

        _in snippets: platform.api.analytics.getAgentActivityReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_agent_activity_report_for_channel_with_http_info(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: list[AnalyticsAgentActivityReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['org_channel_id', 'start_time', 'end_time', 'time_window', 'include_deleted']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'include_deleted' in params:
            query_params.append(('include_deleted', params['include_deleted']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/agent_activity_report/{orgChannelId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsAgentActivityReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_channel_report(self, **kwargs):  # noqa: E501
        """Get the Channel Report for the org.  # noqa: E501

        _in snippets: platform.api.analytics.getChannelReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_channel_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsChannelReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_channel_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_channel_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_channel_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Channel Report for the org.  # noqa: E501

        _in snippets: platform.api.analytics.getChannelReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_channel_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsChannelReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/channel_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsChannelReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_contact_action_report(self, **kwargs):  # noqa: E501
        """Get the Contact Action Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getContactActionReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_contact_action_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsBulkActionReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_contact_action_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_contact_action_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_contact_action_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Contact Action Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getContactActionReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_contact_action_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsBulkActionReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/contact_action_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsBulkActionReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_custom_counters_report(self, **kwargs):  # noqa: E501
        """Get the Custom Counters Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getCustomCountersReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_custom_counters_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomCountersReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_custom_counters_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_custom_counters_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_custom_counters_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Custom Counters Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getCustomCountersReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_custom_counters_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomCountersReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/custom_counters_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsCustomCountersReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_custom_counters_report_for_schema(self, schema_id, **kwargs):  # noqa: E501
        """Get the Custom Counters Report for a specific schemaId  # noqa: E501

        _in snippets: platform.api.analytics.getCustomCountersReportForSchema_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_custom_counters_report_for_schema(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: The numeric schemaId (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomCountersReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_custom_counters_report_for_schema_with_http_info(schema_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_custom_counters_report_for_schema_with_http_info(schema_id, **kwargs)  # noqa: E501
            return data

    def get_custom_counters_report_for_schema_with_http_info(self, schema_id, **kwargs):  # noqa: E501
        """Get the Custom Counters Report for a specific schemaId  # noqa: E501

        _in snippets: platform.api.analytics.getCustomCountersReportForSchema_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_custom_counters_report_for_schema_with_http_info(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: The numeric schemaId (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomCountersReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['schema_id', 'start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'schema_id' in params:
            path_params['schemaId'] = params['schema_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/custom_counters_report/{schemaId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsCustomCountersReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_customer_engagement_report(self, **kwargs):  # noqa: E501
        """Get the Customer Engagement Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getCustomerEngagementReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_customer_engagement_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomerEngagementReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_customer_engagement_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_customer_engagement_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_customer_engagement_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Customer Engagement Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getCustomerEngagementReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_customer_engagement_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomerEngagementReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/customer_engagement_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsCustomerEngagementReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_customer_engagement_report_for_channel(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Customer Engagement Report for a specific channel  # noqa: E501

        _in snippets: platform.api.analytics.getCustomerEngagementReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_customer_engagement_report_for_channel(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomerEngagementReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_customer_engagement_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_customer_engagement_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
            return data

    def get_customer_engagement_report_for_channel_with_http_info(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Customer Engagement Report for a specific channel  # noqa: E501

        _in snippets: platform.api.analytics.getCustomerEngagementReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_customer_engagement_report_for_channel_with_http_info(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsCustomerEngagementReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['org_channel_id', 'start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/customer_engagement_report/{orgChannelId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsCustomerEngagementReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_error_report(self, **kwargs):  # noqa: E501
        """Get the Error Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getErrorReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_error_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsErrorReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_error_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_error_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_error_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Error Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getErrorReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_error_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsErrorReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/error_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsErrorReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_instant_app_report(self, **kwargs):  # noqa: E501
        """Get the Instant App Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getInstantAppReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_instant_app_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsInstantAppReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_instant_app_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_instant_app_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_instant_app_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Instant App Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getInstantAppReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_instant_app_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsInstantAppReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/instant_app_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsInstantAppReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_instant_app_report_for_schema(self, schema_id, **kwargs):  # noqa: E501
        """Get the Instant App Report for a specific schema  # noqa: E501

        _in snippets: platform.api.analytics.getInstantAppReportForSchema_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_instant_app_report_for_schema(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: The numeric schemaId (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsInstantAppReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_instant_app_report_for_schema_with_http_info(schema_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_instant_app_report_for_schema_with_http_info(schema_id, **kwargs)  # noqa: E501
            return data

    def get_instant_app_report_for_schema_with_http_info(self, schema_id, **kwargs):  # noqa: E501
        """Get the Instant App Report for a specific schema  # noqa: E501

        _in snippets: platform.api.analytics.getInstantAppReportForSchema_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_instant_app_report_for_schema_with_http_info(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: The numeric schemaId (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsInstantAppReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['schema_id', 'start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'schema_id' in params:
            path_params['schemaId'] = params['schema_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/instant_app_report/{schemaId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsInstantAppReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_instant_app_schema_report(self, schema_id, **kwargs):  # noqa: E501
        """Get the Instant App Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getInstantAppSchemaReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_instant_app_schema_report(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: The numeric schemaId (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsInstantAppSchemaReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_instant_app_schema_report_with_http_info(schema_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_instant_app_schema_report_with_http_info(schema_id, **kwargs)  # noqa: E501
            return data

    def get_instant_app_schema_report_with_http_info(self, schema_id, **kwargs):  # noqa: E501
        """Get the Instant App Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getInstantAppSchemaReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_instant_app_schema_report_with_http_info(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: The numeric schemaId (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsInstantAppSchemaReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['schema_id', 'start_time', 'end_time', 'time_window']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'schema_id' in params:
            path_params['schemaId'] = params['schema_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/instant_app_schema_report/{schemaId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsInstantAppSchemaReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_kpi_report(self, **kwargs):  # noqa: E501
        """Get the KPI Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getKpiReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_kpi_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsKpiReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_kpi_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_kpi_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_kpi_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the KPI Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getKpiReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_kpi_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: list[AnalyticsKpiReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/kpi_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsKpiReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_messaging_report(self, **kwargs):  # noqa: E501
        """Get the Messaging Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getMessagingReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_messaging_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: AnalyticsMessagingReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_messaging_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_messaging_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_messaging_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Messaging Report for the org  # noqa: E501

        _in snippets: platform.api.analytics.getMessagingReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_messaging_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: AnalyticsMessagingReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/messaging_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AnalyticsMessagingReportModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_messaging_report_for_channel(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Messaging Report for a specific channel  # noqa: E501

        _in snippets: platform.api.analytics.getMessagingReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_messaging_report_for_channel(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: AnalyticsMessagingReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_messaging_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_messaging_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
            return data

    def get_messaging_report_for_channel_with_http_info(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Messaging Report for a specific channel  # noqa: E501

        _in snippets: platform.api.analytics.getMessagingReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_messaging_report_for_channel_with_http_info(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param str group_by_time:
        :return: AnalyticsMessagingReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['org_channel_id', 'start_time', 'end_time', 'time_window', 'group_by_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'group_by_time' in params:
            query_params.append(('groupByTime', params['group_by_time']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/messaging_report/{orgChannelId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AnalyticsMessagingReportModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_opt_out_report(self, **kwargs):  # noqa: E501
        """Get the Opt-Out Report for the org.  # noqa: E501

        _in snippets: platform.api.analytics.getOptOutReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_opt_out_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsOptOutReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_opt_out_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_opt_out_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_opt_out_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Opt-Out Report for the org.  # noqa: E501

        _in snippets: platform.api.analytics.getOptOutReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_opt_out_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsOptOutReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/opt_out_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsOptOutReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_opt_out_report_for_channel(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Opt-Out Report for a specific channel  # noqa: E501

        _in snippets: platform.api.analytics.getOptOutReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_opt_out_report_for_channel(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsOptOutReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_opt_out_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_opt_out_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
            return data

    def get_opt_out_report_for_channel_with_http_info(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Opt-Out Report for a specific channel  # noqa: E501

        _in snippets: platform.api.analytics.getOptOutReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_opt_out_report_for_channel_with_http_info(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :return: list[AnalyticsOptOutReportModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['org_channel_id', 'start_time', 'end_time', 'time_window']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/opt_out_report/{orgChannelId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[AnalyticsOptOutReportModel]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_org_activity_report(self, **kwargs):  # noqa: E501
        """Get the Org Activity Report totals.  # noqa: E501

        _in snippets: platform.api.analytics.getOrgActivityReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_activity_report(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: AnalyticsOrgActivityReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_org_activity_report_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_org_activity_report_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_org_activity_report_with_http_info(self, **kwargs):  # noqa: E501
        """Get the Org Activity Report totals.  # noqa: E501

        _in snippets: platform.api.analytics.getOrgActivityReport_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_activity_report_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: AnalyticsOrgActivityReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start_time', 'end_time', 'time_window', 'include_deleted']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'include_deleted' in params:
            query_params.append(('include_deleted', params['include_deleted']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/org_activity_report', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AnalyticsOrgActivityReportModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_org_activity_report_for_channel(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Org Activity Report totals for a specific channel.  # noqa: E501

        _in snippets: platform.api.analytics.getOrgActivityReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_activity_report_for_channel(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: AnalyticsOrgActivityReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_org_activity_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_org_activity_report_for_channel_with_http_info(org_channel_id, **kwargs)  # noqa: E501
            return data

    def get_org_activity_report_for_channel_with_http_info(self, org_channel_id, **kwargs):  # noqa: E501
        """Get the Org Activity Report totals for a specific channel.  # noqa: E501

        _in snippets: platform.api.analytics.getOrgActivityReportForChannel_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_activity_report_for_channel_with_http_info(org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int org_channel_id: The apiId or internal id (required)
        :param int start_time:
        :param int end_time:
        :param str time_window:
        :param bool include_deleted:
        :return: AnalyticsOrgActivityReportModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['org_channel_id', 'start_time', 'end_time', 'time_window', 'include_deleted']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []
        if 'start_time' in params:
            query_params.append(('start_time', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('end_time', params['end_time']))  # noqa: E501
        if 'time_window' in params:
            query_params.append(('timeWindow', params['time_window']))  # noqa: E501
        if 'include_deleted' in params:
            query_params.append(('include_deleted', params['include_deleted']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/analytics/org_activity_report/{orgChannelId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AnalyticsOrgActivityReportModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
