# coding: utf-8

"""
    SevOne API Documentation

    Supported endpoints by the new RESTful API  # noqa: E501

    OpenAPI spec version: 2.1.18, Hash: db562e6
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class RunReportAttachmentsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

    def create_flow_falcon_pm(self, flow_falcon_request_dto, **kwargs):  # noqa: E501
        """Create performance metrics flow falcon report  # noqa: E501

        Create performance metrics flow falcon report  # 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_flow_falcon_pm(flow_falcon_request_dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FlowFalconPerformanceMetricsRequestDto flow_falcon_request_dto: FlowFalcon report request object (required)
        :return: FlowFalconReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_flow_falcon_pm_with_http_info(flow_falcon_request_dto, **kwargs)  # noqa: E501
        else:
            (data) = self.create_flow_falcon_pm_with_http_info(flow_falcon_request_dto, **kwargs)  # noqa: E501
            return data

    def create_flow_falcon_pm_with_http_info(self, flow_falcon_request_dto, **kwargs):  # noqa: E501
        """Create performance metrics flow falcon report  # noqa: E501

        Create performance metrics flow falcon report  # 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_flow_falcon_pm_with_http_info(flow_falcon_request_dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FlowFalconPerformanceMetricsRequestDto flow_falcon_request_dto: FlowFalcon report request object (required)
        :return: FlowFalconReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['flow_falcon_request_dto']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'flow_falcon_request_dto' in params:
            body_params = params['flow_falcon_request_dto']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/flow-falcon/performance-metrics/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='FlowFalconReportResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_flow_falcon_top_n(self, flow_falcon_request_dto, **kwargs):  # noqa: E501
        """Create TopN flow falcon report  # noqa: E501

        Create TopN flow falcon report  # 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_flow_falcon_top_n(flow_falcon_request_dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FlowFalconReportRequestDto flow_falcon_request_dto: FlowFalcon report request object (required)
        :return: FlowFalconReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_flow_falcon_top_n_with_http_info(flow_falcon_request_dto, **kwargs)  # noqa: E501
        else:
            (data) = self.create_flow_falcon_top_n_with_http_info(flow_falcon_request_dto, **kwargs)  # noqa: E501
            return data

    def create_flow_falcon_top_n_with_http_info(self, flow_falcon_request_dto, **kwargs):  # noqa: E501
        """Create TopN flow falcon report  # noqa: E501

        Create TopN flow falcon report  # 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_flow_falcon_top_n_with_http_info(flow_falcon_request_dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FlowFalconReportRequestDto flow_falcon_request_dto: FlowFalcon report request object (required)
        :return: FlowFalconReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['flow_falcon_request_dto']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'flow_falcon_request_dto' in params:
            body_params = params['flow_falcon_request_dto']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/flow-falcon/topn/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='FlowFalconReportResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_alert_attachment(self, id, **kwargs):  # noqa: E501
        """Run alert attachment  # noqa: E501

        Run alert attachment. <br/><br/>By default the alert report would include two additional filters: alertStatus = \"open\" and showIgnored = \"off\". You can override this behavior by giving explicit values for one or both of those filters. If you want to disable them, just add filters alertStatus = \"both\" and showIgnored = \"both\".  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_alert_attachment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The id of the report attachment (required)
        :return: AlertReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_alert_attachment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.run_alert_attachment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def run_alert_attachment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Run alert attachment  # noqa: E501

        Run alert attachment. <br/><br/>By default the alert report would include two additional filters: alertStatus = \"open\" and showIgnored = \"off\". You can override this behavior by giving explicit values for one or both of those filters. If you want to disable them, just add filters alertStatus = \"both\" and showIgnored = \"both\".  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_alert_attachment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The id of the report attachment (required)
        :return: AlertReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['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(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/alerts/{id}/run', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AlertReportResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_alert_report(self, attachment, **kwargs):  # noqa: E501
        """Run alert report  # noqa: E501

        Run alert report. <br/><br/>By default the alert report would include two additional filters: alertStatus = \"open\" and showIgnored = \"off\". You can override this behavior by giving explicit values for one or both of those filters. If you want to disable them, just add filters alertStatus = \"both\" and showIgnored = \"both\".  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_alert_report(attachment, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AlertAttachmentDto attachment: Alert attachment (required)
        :return: AlertReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_alert_report_with_http_info(attachment, **kwargs)  # noqa: E501
        else:
            (data) = self.run_alert_report_with_http_info(attachment, **kwargs)  # noqa: E501
            return data

    def run_alert_report_with_http_info(self, attachment, **kwargs):  # noqa: E501
        """Run alert report  # noqa: E501

        Run alert report. <br/><br/>By default the alert report would include two additional filters: alertStatus = \"open\" and showIgnored = \"off\". You can override this behavior by giving explicit values for one or both of those filters. If you want to disable them, just add filters alertStatus = \"both\" and showIgnored = \"both\".  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_alert_report_with_http_info(attachment, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AlertAttachmentDto attachment: Alert attachment (required)
        :return: AlertReportResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['attachment']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'attachment' in params:
            body_params = params['attachment']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/alerts/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AlertReportResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_flow_falcon_attachment(self, id, **kwargs):  # noqa: E501
        """Run a flow falcon attachment  # noqa: E501

        Run a flow falcon attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_flow_falcon_attachment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The id of the report attachment (required)
        :return: FlowFalconAttachmentDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_flow_falcon_attachment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.run_flow_falcon_attachment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def run_flow_falcon_attachment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Run a flow falcon attachment  # noqa: E501

        Run a flow falcon attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_flow_falcon_attachment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The id of the report attachment (required)
        :return: FlowFalconAttachmentDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['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(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/flow-falcon/{id}/run', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='FlowFalconAttachmentDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_flow_falcon_report(self, dto, **kwargs):  # noqa: E501
        """Run a flow falcon report  # noqa: E501

        Run a flow falcon report  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_flow_falcon_report(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FlowFalconAttachmentDto dto: FlowFalcon attachment object (required)
        :return: FlowFalconAttachmentResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_flow_falcon_report_with_http_info(dto, **kwargs)  # noqa: E501
        else:
            (data) = self.run_flow_falcon_report_with_http_info(dto, **kwargs)  # noqa: E501
            return data

    def run_flow_falcon_report_with_http_info(self, dto, **kwargs):  # noqa: E501
        """Run a flow falcon report  # noqa: E501

        Run a flow falcon report  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_flow_falcon_report_with_http_info(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param FlowFalconAttachmentDto dto: FlowFalcon attachment object (required)
        :return: FlowFalconAttachmentResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['dto']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'dto' in params:
            body_params = params['dto']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/flow-falcon/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='FlowFalconAttachmentResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_performance_metrics_attachment(self, performance_metric_attachment, **kwargs):  # noqa: E501
        """Run performance metrics attachment  # noqa: E501

        Run a performance metrics attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_performance_metrics_attachment(performance_metric_attachment, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PerformanceMetricsDto performance_metric_attachment: Performance metrics attachment object (required)
        :param bool skip_null_points: skipNullPoints
        :param int graph_width: Graph width allows overriding in auto aggregation calculation, where the aggregation interval is calculated as (endTime - startTime) / graphWidth
        :param int max_indicators: Report will fail if resources resolve to more than maxIndicators number of indicators
        :return: PerformanceMetricsResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_performance_metrics_attachment_with_http_info(performance_metric_attachment, **kwargs)  # noqa: E501
        else:
            (data) = self.run_performance_metrics_attachment_with_http_info(performance_metric_attachment, **kwargs)  # noqa: E501
            return data

    def run_performance_metrics_attachment_with_http_info(self, performance_metric_attachment, **kwargs):  # noqa: E501
        """Run performance metrics attachment  # noqa: E501

        Run a performance metrics attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_performance_metrics_attachment_with_http_info(performance_metric_attachment, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PerformanceMetricsDto performance_metric_attachment: Performance metrics attachment object (required)
        :param bool skip_null_points: skipNullPoints
        :param int graph_width: Graph width allows overriding in auto aggregation calculation, where the aggregation interval is calculated as (endTime - startTime) / graphWidth
        :param int max_indicators: Report will fail if resources resolve to more than maxIndicators number of indicators
        :return: PerformanceMetricsResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['performance_metric_attachment', 'skip_null_points', 'graph_width', 'max_indicators']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'skip_null_points' in params:
            query_params.append(('skipNullPoints', params['skip_null_points']))  # noqa: E501
        if 'graph_width' in params:
            query_params.append(('graphWidth', params['graph_width']))  # noqa: E501
        if 'max_indicators' in params:
            query_params.append(('maxIndicators', params['max_indicators']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'performance_metric_attachment' in params:
            body_params = params['performance_metric_attachment']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/performance-metrics/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PerformanceMetricsResultDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_performance_metrics_attachment_by_id(self, id, **kwargs):  # noqa: E501
        """Run performance metrics attachment  # noqa: E501

        Run a performance metrics attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_performance_metrics_attachment_by_id(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: Performance metrics attachment id (required)
        :param bool skip_null_points: skipNullPoints
        :param int graph_width: Graph width allows overriding in auto aggregation calculation, where the aggregation interval is calculated as (endTime - startTime) / graphWidth
        :param int max_indicators: Report will fail if resources resolve to more than maxIndicators number of indicators
        :return: PerformanceMetricsResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_performance_metrics_attachment_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.run_performance_metrics_attachment_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def run_performance_metrics_attachment_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Run performance metrics attachment  # noqa: E501

        Run a performance metrics attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_performance_metrics_attachment_by_id_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: Performance metrics attachment id (required)
        :param bool skip_null_points: skipNullPoints
        :param int graph_width: Graph width allows overriding in auto aggregation calculation, where the aggregation interval is calculated as (endTime - startTime) / graphWidth
        :param int max_indicators: Report will fail if resources resolve to more than maxIndicators number of indicators
        :return: PerformanceMetricsResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'skip_null_points', 'graph_width', 'max_indicators']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'skip_null_points' in params:
            query_params.append(('skipNullPoints', params['skip_null_points']))  # noqa: E501
        if 'graph_width' in params:
            query_params.append(('graphWidth', params['graph_width']))  # noqa: E501
        if 'max_indicators' in params:
            query_params.append(('maxIndicators', params['max_indicators']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/performance-metrics/{id}/run', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PerformanceMetricsResultDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_top_n_attachment(self, resources, **kwargs):  # noqa: E501
        """Run topn attachment  # noqa: E501

        Run topn attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_top_n_attachment(resources, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param TopNRunReportRequestDto resources: TopN attachment (required)
        :return: TopNRunReportResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_top_n_attachment_with_http_info(resources, **kwargs)  # noqa: E501
        else:
            (data) = self.run_top_n_attachment_with_http_info(resources, **kwargs)  # noqa: E501
            return data

    def run_top_n_attachment_with_http_info(self, resources, **kwargs):  # noqa: E501
        """Run topn attachment  # noqa: E501

        Run topn attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_top_n_attachment_with_http_info(resources, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param TopNRunReportRequestDto resources: TopN attachment (required)
        :return: TopNRunReportResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['resources']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'resources' in params:
            body_params = params['resources']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/topn/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TopNRunReportResultDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_top_n_attachment1(self, id, **kwargs):  # noqa: E501
        """Run topn attachment  # noqa: E501

        Run topn attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_top_n_attachment1(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: TopN attachment id (required)
        :return: TopNRunReportResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_top_n_attachment1_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.run_top_n_attachment1_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def run_top_n_attachment1_with_http_info(self, id, **kwargs):  # noqa: E501
        """Run topn attachment  # noqa: E501

        Run topn attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_top_n_attachment1_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: TopN attachment id (required)
        :return: TopNRunReportResultDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['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(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/topn/{id}/run', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TopNRunReportResultDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_topology_attachment(self, id, **kwargs):  # noqa: E501
        """Run a topology attachment  # noqa: E501

        Run a topology attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_topology_attachment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The id of the report attachment (required)
        :param bool include_layout: Include topology layout data
        :param bool include_device_data: Include device data
        :return: TopologyAttachmentResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_topology_attachment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.run_topology_attachment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def run_topology_attachment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Run a topology attachment  # noqa: E501

        Run a topology attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_topology_attachment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The id of the report attachment (required)
        :param bool include_layout: Include topology layout data
        :param bool include_device_data: Include device data
        :return: TopologyAttachmentResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'include_layout', 'include_device_data']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'include_layout' in params:
            query_params.append(('includeLayout', params['include_layout']))  # noqa: E501
        if 'include_device_data' in params:
            query_params.append(('includeDeviceData', params['include_device_data']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/topology/{id}/run', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TopologyAttachmentResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def run_topology_report(self, dto, **kwargs):  # noqa: E501
        """Run a topology attachment  # noqa: E501

        Run a topology attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_topology_report(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param TopologyAttachmentDto dto: Topology attachment object (required)
        :param bool include_layout: Include topology layout data
        :param bool include_device_data: Include device data
        :return: TopologyAttachmentResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.run_topology_report_with_http_info(dto, **kwargs)  # noqa: E501
        else:
            (data) = self.run_topology_report_with_http_info(dto, **kwargs)  # noqa: E501
            return data

    def run_topology_report_with_http_info(self, dto, **kwargs):  # noqa: E501
        """Run a topology attachment  # noqa: E501

        Run a topology attachment  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_topology_report_with_http_info(dto, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param TopologyAttachmentDto dto: Topology attachment object (required)
        :param bool include_layout: Include topology layout data
        :param bool include_device_data: Include device data
        :return: TopologyAttachmentResponseDto
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['dto', 'include_layout', 'include_device_data']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'include_layout' in params:
            query_params.append(('includeLayout', params['include_layout']))  # noqa: E501
        if 'include_device_data' in params:
            query_params.append(('includeDeviceData', params['include_device_data']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'dto' in params:
            body_params = params['dto']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/v2/reports/attachments/topology/run', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TopologyAttachmentResponseDto',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
