"""
    WhyLabs API client

    WhyLabs API that enables end-to-end AI observability  # noqa: E501

    The version of the OpenAPI document: 0.1
    Contact: support@whylabs.ai
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from whylabs_client.api_client import ApiClient, Endpoint as _Endpoint
from whylabs_client.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from whylabs_client.model.analyzer_segment_columns_diagnostic_request import AnalyzerSegmentColumnsDiagnosticRequest
from whylabs_client.model.analyzer_segment_columns_diagnostic_response import AnalyzerSegmentColumnsDiagnosticResponse
from whylabs_client.model.analyzer_segments_diagnostic_request import AnalyzerSegmentsDiagnosticRequest
from whylabs_client.model.analyzer_segments_diagnostic_response import AnalyzerSegmentsDiagnosticResponse
from whylabs_client.model.analyzers_diagnostic_request import AnalyzersDiagnosticRequest
from whylabs_client.model.analyzers_diagnostic_response import AnalyzersDiagnosticResponse
from whylabs_client.model.async_diagnosis_response import AsyncDiagnosisResponse
from whylabs_client.model.async_diagnosis_result_response import AsyncDiagnosisResultResponse
from whylabs_client.model.diagnosis_report import DiagnosisReport
from whylabs_client.model.diagnosis_request import DiagnosisRequest
from whylabs_client.model.diagnostic_interval_request import DiagnosticIntervalRequest
from whylabs_client.model.diagnostic_interval_response import DiagnosticIntervalResponse


class MonitorDiagnosticsApi(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
        self.detect_noisy_analyzers_endpoint = _Endpoint(
            settings={
                'response_type': (AnalyzersDiagnosticResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/analyzers',
                'operation_id': 'detect_noisy_analyzers',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'analyzers_diagnostic_request',
                ],
                'required': [
                    'org_id',
                    'analyzers_diagnostic_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'analyzers_diagnostic_request':
                        (AnalyzersDiagnosticRequest,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'analyzers_diagnostic_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.detect_noisy_columns_endpoint = _Endpoint(
            settings={
                'response_type': (AnalyzerSegmentColumnsDiagnosticResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/analyzer/segment/columns',
                'operation_id': 'detect_noisy_columns',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'analyzer_segment_columns_diagnostic_request',
                ],
                'required': [
                    'org_id',
                    'analyzer_segment_columns_diagnostic_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'analyzer_segment_columns_diagnostic_request':
                        (AnalyzerSegmentColumnsDiagnosticRequest,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'analyzer_segment_columns_diagnostic_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.detect_noisy_segments_endpoint = _Endpoint(
            settings={
                'response_type': (AnalyzerSegmentsDiagnosticResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/analyzer/segments',
                'operation_id': 'detect_noisy_segments',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'analyzer_segments_diagnostic_request',
                ],
                'required': [
                    'org_id',
                    'analyzer_segments_diagnostic_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'analyzer_segments_diagnostic_request':
                        (AnalyzerSegmentsDiagnosticRequest,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'analyzer_segments_diagnostic_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.diagnose_analyzer_async_endpoint = _Endpoint(
            settings={
                'response_type': (AsyncDiagnosisResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/diagnose/analyzer/async',
                'operation_id': 'diagnose_analyzer_async',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'diagnosis_request',
                ],
                'required': [
                    'org_id',
                    'diagnosis_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'diagnosis_request':
                        (DiagnosisRequest,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'diagnosis_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.diagnose_analyzer_async_result_endpoint = _Endpoint(
            settings={
                'response_type': (AsyncDiagnosisResultResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/diagnose/analyzer/async/result',
                'operation_id': 'diagnose_analyzer_async_result',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'diagnosis_id',
                ],
                'required': [
                    'org_id',
                    'diagnosis_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'diagnosis_id':
                        (str,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                    'diagnosis_id': 'diagnosis_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'diagnosis_id': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.diagnose_analyzer_sync_endpoint = _Endpoint(
            settings={
                'response_type': (DiagnosisReport,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/diagnose/analyzer/sync',
                'operation_id': 'diagnose_analyzer_sync',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'diagnosis_request',
                ],
                'required': [
                    'org_id',
                    'diagnosis_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'diagnosis_request':
                        (DiagnosisRequest,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'diagnosis_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.recommend_diagnostic_interval_endpoint = _Endpoint(
            settings={
                'response_type': (DiagnosticIntervalResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/v0/organizations/{org_id}/diagnostics/monitor/interval',
                'operation_id': 'recommend_diagnostic_interval',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_id',
                    'diagnostic_interval_request',
                ],
                'required': [
                    'org_id',
                    'diagnostic_interval_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'org_id',
                ]
            },
            root_map={
                'validations': {
                    ('org_id',): {
                        'max_length': 128,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'org_id':
                        (str,),
                    'diagnostic_interval_request':
                        (DiagnosticIntervalRequest,),
                },
                'attribute_map': {
                    'org_id': 'org_id',
                },
                'location_map': {
                    'org_id': 'path',
                    'diagnostic_interval_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )

    def detect_noisy_analyzers(
        self,
        org_id,
        analyzers_diagnostic_request,
        **kwargs
    ):
        """Endpoint to detect noisy or failing analyzers  # noqa: E501

        Returns a list of analyzers sorted so the noisiest (most anomalies per column) is first. Also includes a similar list for analyzer 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.detect_noisy_analyzers(org_id, analyzers_diagnostic_request, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            analyzers_diagnostic_request (AnalyzersDiagnosticRequest):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AnalyzersDiagnosticResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['analyzers_diagnostic_request'] = \
            analyzers_diagnostic_request
        return self.detect_noisy_analyzers_endpoint.call_with_http_info(**kwargs)

    def detect_noisy_columns(
        self,
        org_id,
        analyzer_segment_columns_diagnostic_request,
        **kwargs
    ):
        """Endpoint to detect the noisiest columns for a specific analyzer and segment  # noqa: E501

        Returns a list of column names sorted so the noisiest (most anomalies) is first. Also includes a similar list for columns with analyzer 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.detect_noisy_columns(org_id, analyzer_segment_columns_diagnostic_request, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            analyzer_segment_columns_diagnostic_request (AnalyzerSegmentColumnsDiagnosticRequest):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AnalyzerSegmentColumnsDiagnosticResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['analyzer_segment_columns_diagnostic_request'] = \
            analyzer_segment_columns_diagnostic_request
        return self.detect_noisy_columns_endpoint.call_with_http_info(**kwargs)

    def detect_noisy_segments(
        self,
        org_id,
        analyzer_segments_diagnostic_request,
        **kwargs
    ):
        """Endpoint to detect the noisiest segments for a specific analyzer  # noqa: E501

        Returns a list of segments sorted so the noisiest (most anomalies per column) is first. Also includes a similar list for segments with analyzer 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.detect_noisy_segments(org_id, analyzer_segments_diagnostic_request, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            analyzer_segments_diagnostic_request (AnalyzerSegmentsDiagnosticRequest):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AnalyzerSegmentsDiagnosticResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['analyzer_segments_diagnostic_request'] = \
            analyzer_segments_diagnostic_request
        return self.detect_noisy_segments_endpoint.call_with_http_info(**kwargs)

    def diagnose_analyzer_async(
        self,
        org_id,
        diagnosis_request,
        **kwargs
    ):
        """Endpoint to request a diagnosis for a specific analyzer  # noqa: E501

        Returns a unique request ID for the diagnosis request. Use the DiagnoseAnalyzerAsyncResult endpoint to get the result.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.diagnose_analyzer_async(org_id, diagnosis_request, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            diagnosis_request (DiagnosisRequest):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AsyncDiagnosisResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['diagnosis_request'] = \
            diagnosis_request
        return self.diagnose_analyzer_async_endpoint.call_with_http_info(**kwargs)

    def diagnose_analyzer_async_result(
        self,
        org_id,
        diagnosis_id,
        **kwargs
    ):
        """Endpoint to request the result of an async diagnosis  # noqa: E501

        Returns a response with the request status and the diagnosis report if the request is complete.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.diagnose_analyzer_async_result(org_id, diagnosis_id, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            diagnosis_id (str):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AsyncDiagnosisResultResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['diagnosis_id'] = \
            diagnosis_id
        return self.diagnose_analyzer_async_result_endpoint.call_with_http_info(**kwargs)

    def diagnose_analyzer_sync(
        self,
        org_id,
        diagnosis_request,
        **kwargs
    ):
        """Endpoint to diagnose a specific analyzer  # noqa: E501

        Returns a diagnosis report for a specific analyzer, segment, and interval. Only suitable for small datasets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.diagnose_analyzer_sync(org_id, diagnosis_request, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            diagnosis_request (DiagnosisRequest):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            DiagnosisReport
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['diagnosis_request'] = \
            diagnosis_request
        return self.diagnose_analyzer_sync_endpoint.call_with_http_info(**kwargs)

    def recommend_diagnostic_interval(
        self,
        org_id,
        diagnostic_interval_request,
        **kwargs
    ):
        """Endpoint to recommend a diagnostic interval  # noqa: E501

        Returns an interval containing the last 30 batches of data  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.recommend_diagnostic_interval(org_id, diagnostic_interval_request, async_req=True)
        >>> result = thread.get()

        Args:
            org_id (str):
            diagnostic_interval_request (DiagnosticIntervalRequest):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            DiagnosticIntervalResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['org_id'] = \
            org_id
        kwargs['diagnostic_interval_request'] = \
            diagnostic_interval_request
        return self.recommend_diagnostic_interval_endpoint.call_with_http_info(**kwargs)

