# coding: utf-8

"""
    MailSlurp API

    MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository  # noqa: E501

    The version of the OpenAPI document: 6.5.2
    Contact: contact@mailslurp.dev
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from mailslurp_client.api_client import ApiClient
from mailslurp_client.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class DeliverabilityTestControllerApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

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

    def cancel_deliverability_simulation_job(self, test_id, job_id, **kwargs):  # noqa: E501
        """Cancel deliverability simulation job  # noqa: E501

        Cancel a running or paused simulation job.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_deliverability_simulation_job(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.cancel_deliverability_simulation_job_with_http_info(test_id, job_id, **kwargs)  # noqa: E501

    def cancel_deliverability_simulation_job_with_http_info(self, test_id, job_id, **kwargs):  # noqa: E501
        """Cancel deliverability simulation job  # noqa: E501

        Cancel a running or paused simulation job.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_deliverability_simulation_job_with_http_info(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'job_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method cancel_deliverability_simulation_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `cancel_deliverability_simulation_job`")  # noqa: E501
        # verify the required parameter 'job_id' is set
        if self.api_client.client_side_validation and ('job_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_id` when calling `cancel_deliverability_simulation_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501
        if 'job_id' in local_var_params:
            path_params['jobId'] = local_var_params['job_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs/{jobId}/cancel', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_deliverability_simulation_job(self, test_id, create_deliverability_simulation_job_options, **kwargs):  # noqa: E501
        """Create deliverability simulation job  # noqa: E501

        Create and start a simulation job for a running deliverability test. Only one active simulation job is allowed per user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_deliverability_simulation_job(test_id, create_deliverability_simulation_job_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param CreateDeliverabilitySimulationJobOptions create_deliverability_simulation_job_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_deliverability_simulation_job_with_http_info(test_id, create_deliverability_simulation_job_options, **kwargs)  # noqa: E501

    def create_deliverability_simulation_job_with_http_info(self, test_id, create_deliverability_simulation_job_options, **kwargs):  # noqa: E501
        """Create deliverability simulation job  # noqa: E501

        Create and start a simulation job for a running deliverability test. Only one active simulation job is allowed per user.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_deliverability_simulation_job_with_http_info(test_id, create_deliverability_simulation_job_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param CreateDeliverabilitySimulationJobOptions create_deliverability_simulation_job_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'create_deliverability_simulation_job_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_deliverability_simulation_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `create_deliverability_simulation_job`")  # noqa: E501
        # verify the required parameter 'create_deliverability_simulation_job_options' is set
        if self.api_client.client_side_validation and ('create_deliverability_simulation_job_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['create_deliverability_simulation_job_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `create_deliverability_simulation_job_options` when calling `create_deliverability_simulation_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_deliverability_simulation_job_options' in local_var_params:
            body_params = local_var_params['create_deliverability_simulation_job_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # noqa: E501

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_deliverability_test(self, create_deliverability_test_options, **kwargs):  # noqa: E501
        """Create deliverability/load test  # noqa: E501

        Create a deliverability test for inboxes or phone numbers using ALL, PATTERN, or EXPLICIT selector scope.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_deliverability_test(create_deliverability_test_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateDeliverabilityTestOptions create_deliverability_test_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_deliverability_test_with_http_info(create_deliverability_test_options, **kwargs)  # noqa: E501

    def create_deliverability_test_with_http_info(self, create_deliverability_test_options, **kwargs):  # noqa: E501
        """Create deliverability/load test  # noqa: E501

        Create a deliverability test for inboxes or phone numbers using ALL, PATTERN, or EXPLICIT selector scope.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_deliverability_test_with_http_info(create_deliverability_test_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param CreateDeliverabilityTestOptions create_deliverability_test_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'create_deliverability_test_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'create_deliverability_test_options' is set
        if self.api_client.client_side_validation and ('create_deliverability_test_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['create_deliverability_test_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `create_deliverability_test_options` when calling `create_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'create_deliverability_test_options' in local_var_params:
            body_params = local_var_params['create_deliverability_test_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # noqa: E501

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

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

        return self.api_client.call_api(
            '/test/deliverability', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_deliverability_test(self, test_id, **kwargs):  # noqa: E501
        """Delete deliverability/load test  # noqa: E501

        Delete test and all persisted entity-level results.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_deliverability_test(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeleteResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_deliverability_test_with_http_info(test_id, **kwargs)  # noqa: E501

    def delete_deliverability_test_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Delete deliverability/load test  # noqa: E501

        Delete test and all persisted entity-level results.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_deliverability_test_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeleteResult, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `delete_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeleteResult',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def duplicate_deliverability_test(self, test_id, **kwargs):  # noqa: E501
        """Duplicate deliverability/load test  # noqa: E501

        Create a fresh deliverability test using an existing test configuration, including selector scope, exclusions, and expectations.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.duplicate_deliverability_test(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.duplicate_deliverability_test_with_http_info(test_id, **kwargs)  # noqa: E501

    def duplicate_deliverability_test_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Duplicate deliverability/load test  # noqa: E501

        Create a fresh deliverability test using an existing test configuration, including selector scope, exclusions, and expectations.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.duplicate_deliverability_test_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method duplicate_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `duplicate_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/duplicate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def export_deliverability_test_report(self, test_id, **kwargs):  # noqa: E501
        """Export deliverability/load test report as PDF  # noqa: E501

        Export a PDF report for a terminal deliverability test (COMPLETE, FAILED, or STOPPED), including configuration, summary outcomes, and detailed entity-level results.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_deliverability_test_report(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.export_deliverability_test_report_with_http_info(test_id, **kwargs)  # noqa: E501

    def export_deliverability_test_report_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Export deliverability/load test report as PDF  # noqa: E501

        Export a PDF report for a terminal deliverability test (COMPLETE, FAILED, or STOPPED), including configuration, summary outcomes, and detailed entity-level results.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_deliverability_test_report_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method export_deliverability_test_report" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `export_deliverability_test_report`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['API_KEY']  # noqa: E501

        return self.api_client.call_api(
            '/test/deliverability/{testId}/report/export', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def export_deliverability_test_results(self, test_id, **kwargs):  # noqa: E501
        """Export deliverability/load test entity results as CSV  # noqa: E501

        Export per-entity deliverability results including expectation-level pass/fail counts. The latest status is evaluated with the same polling safeguards before export.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_deliverability_test_results(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param bool matched:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.export_deliverability_test_results_with_http_info(test_id, **kwargs)  # noqa: E501

    def export_deliverability_test_results_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Export deliverability/load test entity results as CSV  # noqa: E501

        Export per-entity deliverability results including expectation-level pass/fail counts. The latest status is evaluated with the same polling safeguards before export.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.export_deliverability_test_results_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param bool matched:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'matched'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method export_deliverability_test_results" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `export_deliverability_test_results`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []
        if 'matched' in local_var_params and local_var_params['matched'] is not None:  # noqa: E501
            query_params.append(('matched', local_var_params['matched']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['API_KEY']  # noqa: E501

        return self.api_client.call_api(
            '/test/deliverability/{testId}/results/export', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_deliverability_analytics_series(self, **kwargs):  # noqa: E501
        """Get deliverability analytics time series  # noqa: E501

        Compare deliverability runs over a time range with bucketed chart metrics and run-level rows for table views.  # 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_deliverability_analytics_series(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param datetime since:
        :param datetime before:
        :param str scope:
        :param str bucket:
        :param int run_limit:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityAnalyticsSeriesDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_analytics_series_with_http_info(**kwargs)  # noqa: E501

    def get_deliverability_analytics_series_with_http_info(self, **kwargs):  # noqa: E501
        """Get deliverability analytics time series  # noqa: E501

        Compare deliverability runs over a time range with bucketed chart metrics and run-level rows for table views.  # 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_deliverability_analytics_series_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param datetime since:
        :param datetime before:
        :param str scope:
        :param str bucket:
        :param int run_limit:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityAnalyticsSeriesDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'since',
            'before',
            'scope',
            'bucket',
            'run_limit'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'since' in local_var_params and local_var_params['since'] is not None:  # noqa: E501
            query_params.append(('since', local_var_params['since']))  # noqa: E501
        if 'before' in local_var_params and local_var_params['before'] is not None:  # noqa: E501
            query_params.append(('before', local_var_params['before']))  # noqa: E501
        if 'scope' in local_var_params and local_var_params['scope'] is not None:  # noqa: E501
            query_params.append(('scope', local_var_params['scope']))  # noqa: E501
        if 'bucket' in local_var_params and local_var_params['bucket'] is not None:  # noqa: E501
            query_params.append(('bucket', local_var_params['bucket']))  # noqa: E501
        if 'run_limit' in local_var_params and local_var_params['run_limit'] is not None:  # noqa: E501
            query_params.append(('runLimit', local_var_params['run_limit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

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

    def get_deliverability_failure_hotspots(self, **kwargs):  # noqa: E501
        """Get deliverability failure hotspots  # noqa: E501

        Find commonly failing entities and phone country/variant dimensions across deliverability runs in a time range.  # 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_deliverability_failure_hotspots(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param datetime since:
        :param datetime before:
        :param str scope:
        :param int limit:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityFailureHotspotsDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_failure_hotspots_with_http_info(**kwargs)  # noqa: E501

    def get_deliverability_failure_hotspots_with_http_info(self, **kwargs):  # noqa: E501
        """Get deliverability failure hotspots  # noqa: E501

        Find commonly failing entities and phone country/variant dimensions across deliverability runs in a time range.  # 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_deliverability_failure_hotspots_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param datetime since:
        :param datetime before:
        :param str scope:
        :param int limit:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityFailureHotspotsDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'since',
            'before',
            'scope',
            'limit'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'since' in local_var_params and local_var_params['since'] is not None:  # noqa: E501
            query_params.append(('since', local_var_params['since']))  # noqa: E501
        if 'before' in local_var_params and local_var_params['before'] is not None:  # noqa: E501
            query_params.append(('before', local_var_params['before']))  # noqa: E501
        if 'scope' in local_var_params and local_var_params['scope'] is not None:  # noqa: E501
            query_params.append(('scope', local_var_params['scope']))  # noqa: E501
        if 'limit' in local_var_params and local_var_params['limit'] is not None:  # noqa: E501
            query_params.append(('limit', local_var_params['limit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

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

    def get_deliverability_simulation_job(self, test_id, job_id, **kwargs):  # noqa: E501
        """Get deliverability simulation job  # noqa: E501

        Get simulation job status and progress counters.  # 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_deliverability_simulation_job(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_simulation_job_with_http_info(test_id, job_id, **kwargs)  # noqa: E501

    def get_deliverability_simulation_job_with_http_info(self, test_id, job_id, **kwargs):  # noqa: E501
        """Get deliverability simulation job  # noqa: E501

        Get simulation job status and progress counters.  # 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_deliverability_simulation_job_with_http_info(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'job_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_deliverability_simulation_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `get_deliverability_simulation_job`")  # noqa: E501
        # verify the required parameter 'job_id' is set
        if self.api_client.client_side_validation and ('job_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_id` when calling `get_deliverability_simulation_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501
        if 'job_id' in local_var_params:
            path_params['jobId'] = local_var_params['job_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs/{jobId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_deliverability_simulation_job_events(self, test_id, job_id, **kwargs):  # noqa: E501
        """Get deliverability simulation job events  # noqa: E501

        Get paged simulation events including send successes and failures.  # 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_deliverability_simulation_job_events(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param int page:
        :param int size:
        :param str sort:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobEventPageDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_simulation_job_events_with_http_info(test_id, job_id, **kwargs)  # noqa: E501

    def get_deliverability_simulation_job_events_with_http_info(self, test_id, job_id, **kwargs):  # noqa: E501
        """Get deliverability simulation job events  # noqa: E501

        Get paged simulation events including send successes and failures.  # 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_deliverability_simulation_job_events_with_http_info(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param int page:
        :param int size:
        :param str sort:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobEventPageDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'job_id',
            'page',
            'size',
            'sort'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_deliverability_simulation_job_events" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `get_deliverability_simulation_job_events`")  # noqa: E501
        # verify the required parameter 'job_id' is set
        if self.api_client.client_side_validation and ('job_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_id` when calling `get_deliverability_simulation_job_events`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501
        if 'job_id' in local_var_params:
            path_params['jobId'] = local_var_params['job_id']  # noqa: E501

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'size' in local_var_params and local_var_params['size'] is not None:  # noqa: E501
            query_params.append(('size', local_var_params['size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs/{jobId}/events', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobEventPageDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_deliverability_test(self, test_id, **kwargs):  # noqa: E501
        """Get deliverability/load test  # noqa: E501

        Get deliverability test configuration and latest progress counters.  # 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_deliverability_test(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_test_with_http_info(test_id, **kwargs)  # noqa: E501

    def get_deliverability_test_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Get deliverability/load test  # noqa: E501

        Get deliverability test configuration and latest progress counters.  # 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_deliverability_test_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `get_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_deliverability_test_results(self, test_id, **kwargs):  # noqa: E501
        """Get deliverability/load test entity results  # noqa: E501

        Get paged per-entity expectation results with optional matched/unmatched filtering.  # 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_deliverability_test_results(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param bool matched:
        :param int page:
        :param int size:
        :param str sort:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityEntityResultPageDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_test_results_with_http_info(test_id, **kwargs)  # noqa: E501

    def get_deliverability_test_results_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Get deliverability/load test entity results  # noqa: E501

        Get paged per-entity expectation results with optional matched/unmatched filtering.  # 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_deliverability_test_results_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param bool matched:
        :param int page:
        :param int size:
        :param str sort:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityEntityResultPageDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'matched',
            'page',
            'size',
            'sort'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_deliverability_test_results" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `get_deliverability_test_results`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []
        if 'matched' in local_var_params and local_var_params['matched'] is not None:  # noqa: E501
            query_params.append(('matched', local_var_params['matched']))  # noqa: E501
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'size' in local_var_params and local_var_params['size'] is not None:  # noqa: E501
            query_params.append(('size', local_var_params['size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/results', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityEntityResultPageDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_deliverability_tests(self, **kwargs):  # noqa: E501
        """List deliverability/load tests  # noqa: E501

        List deliverability tests for the authenticated account.  # 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_deliverability_tests(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int page: Page index
        :param int size: Page size
        :param str sort: Sort direction
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestPageDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_deliverability_tests_with_http_info(**kwargs)  # noqa: E501

    def get_deliverability_tests_with_http_info(self, **kwargs):  # noqa: E501
        """List deliverability/load tests  # noqa: E501

        List deliverability tests for the authenticated account.  # 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_deliverability_tests_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int page: Page index
        :param int size: Page size
        :param str sort: Sort direction
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestPageDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'page',
            'size',
            'sort'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'size' in local_var_params and local_var_params['size'] is not None:  # noqa: E501
            query_params.append(('size', local_var_params['size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

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

    def get_latest_deliverability_simulation_job(self, test_id, **kwargs):  # noqa: E501
        """Get latest deliverability simulation job  # noqa: E501

        Get the most recent simulation job for a deliverability test.  # 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_latest_deliverability_simulation_job(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_latest_deliverability_simulation_job_with_http_info(test_id, **kwargs)  # noqa: E501

    def get_latest_deliverability_simulation_job_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Get latest deliverability simulation job  # noqa: E501

        Get the most recent simulation job for a deliverability test.  # 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_latest_deliverability_simulation_job_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_latest_deliverability_simulation_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `get_latest_deliverability_simulation_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs/latest', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def pause_deliverability_simulation_job(self, test_id, job_id, **kwargs):  # noqa: E501
        """Pause deliverability simulation job  # noqa: E501

        Pause a running simulation job.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pause_deliverability_simulation_job(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.pause_deliverability_simulation_job_with_http_info(test_id, job_id, **kwargs)  # noqa: E501

    def pause_deliverability_simulation_job_with_http_info(self, test_id, job_id, **kwargs):  # noqa: E501
        """Pause deliverability simulation job  # noqa: E501

        Pause a running simulation job.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pause_deliverability_simulation_job_with_http_info(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'job_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method pause_deliverability_simulation_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `pause_deliverability_simulation_job`")  # noqa: E501
        # verify the required parameter 'job_id' is set
        if self.api_client.client_side_validation and ('job_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_id` when calling `pause_deliverability_simulation_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501
        if 'job_id' in local_var_params:
            path_params['jobId'] = local_var_params['job_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs/{jobId}/pause', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def pause_deliverability_test(self, test_id, **kwargs):  # noqa: E501
        """Pause deliverability/load test  # noqa: E501

        Pause a RUNNING or SCHEDULED deliverability test.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pause_deliverability_test(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.pause_deliverability_test_with_http_info(test_id, **kwargs)  # noqa: E501

    def pause_deliverability_test_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Pause deliverability/load test  # noqa: E501

        Pause a RUNNING or SCHEDULED deliverability test.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.pause_deliverability_test_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method pause_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `pause_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/pause', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def poll_deliverability_test_status(self, test_id, **kwargs):  # noqa: E501
        """Poll deliverability/load test status  # noqa: E501

        Poll test progress. Evaluation is throttled with a 5-second cache window to protect backing data stores.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.poll_deliverability_test_status(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityPollStatusResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.poll_deliverability_test_status_with_http_info(test_id, **kwargs)  # noqa: E501

    def poll_deliverability_test_status_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Poll deliverability/load test status  # noqa: E501

        Poll test progress. Evaluation is throttled with a 5-second cache window to protect backing data stores.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.poll_deliverability_test_status_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityPollStatusResultDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method poll_deliverability_test_status" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `poll_deliverability_test_status`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/status', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityPollStatusResultDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resume_deliverability_simulation_job(self, test_id, job_id, **kwargs):  # noqa: E501
        """Resume deliverability simulation job  # noqa: E501

        Resume a paused simulation job.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.resume_deliverability_simulation_job(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilitySimulationJobDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.resume_deliverability_simulation_job_with_http_info(test_id, job_id, **kwargs)  # noqa: E501

    def resume_deliverability_simulation_job_with_http_info(self, test_id, job_id, **kwargs):  # noqa: E501
        """Resume deliverability simulation job  # noqa: E501

        Resume a paused simulation job.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.resume_deliverability_simulation_job_with_http_info(test_id, job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param str job_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilitySimulationJobDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'job_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resume_deliverability_simulation_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `resume_deliverability_simulation_job`")  # noqa: E501
        # verify the required parameter 'job_id' is set
        if self.api_client.client_side_validation and ('job_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_id` when calling `resume_deliverability_simulation_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501
        if 'job_id' in local_var_params:
            path_params['jobId'] = local_var_params['job_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/simulation-jobs/{jobId}/resume', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilitySimulationJobDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def start_deliverability_test(self, test_id, **kwargs):  # noqa: E501
        """Start or resume deliverability/load test  # noqa: E501

        Start a CREATED test or resume a PAUSED/SCHEDULED test.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.start_deliverability_test(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.start_deliverability_test_with_http_info(test_id, **kwargs)  # noqa: E501

    def start_deliverability_test_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Start or resume deliverability/load test  # noqa: E501

        Start a CREATED test or resume a PAUSED/SCHEDULED test.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.start_deliverability_test_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method start_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `start_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/start', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def stop_deliverability_test(self, test_id, **kwargs):  # noqa: E501
        """Stop deliverability/load test  # noqa: E501

        Stop a deliverability test and mark it terminal.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.stop_deliverability_test(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.stop_deliverability_test_with_http_info(test_id, **kwargs)  # noqa: E501

    def stop_deliverability_test_with_http_info(self, test_id, **kwargs):  # noqa: E501
        """Stop deliverability/load test  # noqa: E501

        Stop a deliverability test and mark it terminal.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.stop_deliverability_test_with_http_info(test_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method stop_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `stop_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}/stop', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_deliverability_test(self, test_id, update_deliverability_test_options, **kwargs):  # noqa: E501
        """Update deliverability/load test  # noqa: E501

        Update metadata, timeout, and expectations for a non-running non-terminal test.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_deliverability_test(test_id, update_deliverability_test_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param UpdateDeliverabilityTestOptions update_deliverability_test_options: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DeliverabilityTestDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_deliverability_test_with_http_info(test_id, update_deliverability_test_options, **kwargs)  # noqa: E501

    def update_deliverability_test_with_http_info(self, test_id, update_deliverability_test_options, **kwargs):  # noqa: E501
        """Update deliverability/load test  # noqa: E501

        Update metadata, timeout, and expectations for a non-running non-terminal test.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_deliverability_test_with_http_info(test_id, update_deliverability_test_options, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str test_id: (required)
        :param UpdateDeliverabilityTestOptions update_deliverability_test_options: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DeliverabilityTestDto, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'test_id',
            'update_deliverability_test_options'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_deliverability_test" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'test_id' is set
        if self.api_client.client_side_validation and ('test_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['test_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `test_id` when calling `update_deliverability_test`")  # noqa: E501
        # verify the required parameter 'update_deliverability_test_options' is set
        if self.api_client.client_side_validation and ('update_deliverability_test_options' not in local_var_params or  # noqa: E501
                                                        local_var_params['update_deliverability_test_options'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `update_deliverability_test_options` when calling `update_deliverability_test`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'test_id' in local_var_params:
            path_params['testId'] = local_var_params['test_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'update_deliverability_test_options' in local_var_params:
            body_params = local_var_params['update_deliverability_test_options']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # noqa: E501

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

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

        return self.api_client.call_api(
            '/test/deliverability/{testId}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeliverabilityTestDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
