Exemplo n.º 1
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._validate_endpoint = _Endpoint(
            settings={
                "response_type": (AuthenticationValidationResponse, ),
                "auth": ["apiKeyAuth"],
                "endpoint_path": "/api/v1/validate",
                "operation_id": "validate",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": []
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._submit_service_check_endpoint = _Endpoint(
            settings={
                "response_type": (IntakePayloadAccepted, ),
                "auth": ["apiKeyAuth"],
                "endpoint_path": "/api/v1/check_run",
                "operation_id": "submit_service_check",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (ServiceChecks, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )
Exemplo n.º 3
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._create_api_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApiKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/api_key",
                "operation_id": "create_api_key",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (ApiKey, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._create_application_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApplicationKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/application_key",
                "operation_id": "create_application_key",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (ApplicationKey, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._delete_api_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApiKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/api_key/{key}",
                "operation_id": "delete_api_key",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "key",
                ],
                "required": [
                    "key",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "key": (str, ),
                },
                "attribute_map": {
                    "key": "key",
                },
                "location_map": {
                    "key": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._delete_application_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApplicationKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/application_key/{key}",
                "operation_id": "delete_application_key",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "key",
                ],
                "required": [
                    "key",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "key": (str, ),
                },
                "attribute_map": {
                    "key": "key",
                },
                "location_map": {
                    "key": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_api_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApiKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/api_key/{key}",
                "operation_id": "get_api_key",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "key",
                ],
                "required": [
                    "key",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "key": (str, ),
                },
                "attribute_map": {
                    "key": "key",
                },
                "location_map": {
                    "key": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_application_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApplicationKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/application_key/{key}",
                "operation_id": "get_application_key",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "key",
                ],
                "required": [
                    "key",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "key": (str, ),
                },
                "attribute_map": {
                    "key": "key",
                },
                "location_map": {
                    "key": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_api_keys_endpoint = _Endpoint(
            settings={
                "response_type": (ApiKeyListResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/api_key",
                "operation_id": "list_api_keys",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": []
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_application_keys_endpoint = _Endpoint(
            settings={
                "response_type": (ApplicationKeyListResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/application_key",
                "operation_id": "list_application_keys",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": []
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_api_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApiKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/api_key/{key}",
                "operation_id": "update_api_key",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "key",
                    "body",
                ],
                "required": [
                    "key",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "key": (str, ),
                    "body": (ApiKey, ),
                },
                "attribute_map": {
                    "key": "key",
                },
                "location_map": {
                    "key": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._update_application_key_endpoint = _Endpoint(
            settings={
                "response_type": (ApplicationKeyResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/application_key/{key}",
                "operation_id": "update_application_key",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "key",
                    "body",
                ],
                "required": [
                    "key",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "key": (str, ),
                    "body": (ApplicationKey, ),
                },
                "attribute_map": {
                    "key": "key",
                },
                "location_map": {
                    "key": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_api_key(self, body, **kwargs):
            """Create an API key  # noqa: E501

            Creates an API key with a given name.  # 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_api_key(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (ApiKey):

            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 (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.
                _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:
                ApiKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_api_key = Endpoint(settings={
            'response_type': (ApiKeyResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/api_key',
            'operation_id': 'create_api_key',
            'http_method': 'POST',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'body',
                                           ],
                                           'required': [
                                               'body',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'body': (ApiKey, ),
                                           },
                                           'attribute_map': {},
                                           'location_map': {
                                               'body': 'body',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type':
                                           ['application/json']
                                       },
                                       api_client=api_client,
                                       callable=__create_api_key)

        def __create_application_key(self, body, **kwargs):
            """Create an application key  # noqa: E501

            Create an application key with a given name.  # 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_application_key(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (ApplicationKey):

            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 (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.
                _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:
                ApplicationKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_application_key = Endpoint(
            settings={
                'response_type': (ApplicationKeyResponse, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/application_key',
                'operation_id': 'create_application_key',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (ApplicationKey, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__create_application_key)

        def __delete_api_key(self, key, **kwargs):
            """Delete an API key  # noqa: E501

            Delete a given API key.  # 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_api_key(key, async_req=True)
            >>> result = thread.get()

            Args:
                key (str): The specific API key you are working with.

            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 (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.
                _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:
                ApiKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['key'] = \
                key
            return self.call_with_http_info(**kwargs)

        self.delete_api_key = Endpoint(settings={
            'response_type': (ApiKeyResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/api_key/{key}',
            'operation_id': 'delete_api_key',
            'http_method': 'DELETE',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'key',
                                           ],
                                           'required': [
                                               'key',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'key': (str, ),
                                           },
                                           'attribute_map': {
                                               'key': 'key',
                                           },
                                           'location_map': {
                                               'key': 'path',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__delete_api_key)

        def __delete_application_key(self, key, **kwargs):
            """Delete an application key  # noqa: E501

            Delete a given application key.  # 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_application_key(key, async_req=True)
            >>> result = thread.get()

            Args:
                key (str): The specific APP key you are working with.

            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 (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.
                _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:
                ApplicationKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['key'] = \
                key
            return self.call_with_http_info(**kwargs)

        self.delete_application_key = Endpoint(
            settings={
                'response_type': (ApplicationKeyResponse, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/application_key/{key}',
                'operation_id': 'delete_application_key',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'key',
                ],
                'required': [
                    'key',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'key': (str, ),
                },
                'attribute_map': {
                    'key': 'key',
                },
                'location_map': {
                    'key': 'path',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_application_key)

        def __get_api_key(self, key, **kwargs):
            """Get API key  # noqa: E501

            Get a given API key.  # 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_api_key(key, async_req=True)
            >>> result = thread.get()

            Args:
                key (str): The specific API key you are working with.

            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 (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.
                _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:
                ApiKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['key'] = \
                key
            return self.call_with_http_info(**kwargs)

        self.get_api_key = Endpoint(settings={
            'response_type': (ApiKeyResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/api_key/{key}',
            'operation_id': 'get_api_key',
            'http_method': 'GET',
            'servers': None,
        },
                                    params_map={
                                        'all': [
                                            'key',
                                        ],
                                        'required': [
                                            'key',
                                        ],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {
                                            'key': (str, ),
                                        },
                                        'attribute_map': {
                                            'key': 'key',
                                        },
                                        'location_map': {
                                            'key': 'path',
                                        },
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': [],
                                    },
                                    api_client=api_client,
                                    callable=__get_api_key)

        def __get_application_key(self, key, **kwargs):
            """Get an application key  # noqa: E501

            Get a given application key.  # 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_application_key(key, async_req=True)
            >>> result = thread.get()

            Args:
                key (str): The specific APP key you are working with.

            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 (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.
                _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:
                ApplicationKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['key'] = \
                key
            return self.call_with_http_info(**kwargs)

        self.get_application_key = Endpoint(settings={
            'response_type': (ApplicationKeyResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/application_key/{key}',
            'operation_id':
            'get_application_key',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                            params_map={
                                                'all': [
                                                    'key',
                                                ],
                                                'required': [
                                                    'key',
                                                ],
                                                'nullable': [],
                                                'enum': [],
                                                'validation': []
                                            },
                                            root_map={
                                                'validations': {},
                                                'allowed_values': {},
                                                'openapi_types': {
                                                    'key': (str, ),
                                                },
                                                'attribute_map': {
                                                    'key': 'key',
                                                },
                                                'location_map': {
                                                    'key': 'path',
                                                },
                                                'collection_format_map': {}
                                            },
                                            headers_map={
                                                'accept': ['application/json'],
                                                'content_type': [],
                                            },
                                            api_client=api_client,
                                            callable=__get_application_key)

        def __list_api_keys(self, **kwargs):
            """Get all API keys  # noqa: E501

            Get all API keys available for your 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.list_api_keys(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                ApiKeyListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_api_keys = Endpoint(settings={
            'response_type': (ApiKeyListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/api_key',
            'operation_id': 'list_api_keys',
            'http_method': 'GET',
            'servers': None,
        },
                                      params_map={
                                          'all': [],
                                          'required': [],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {},
                                          'attribute_map': {},
                                          'location_map': {},
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__list_api_keys)

        def __list_application_keys(self, **kwargs):
            """Get all application keys  # noqa: E501

            Get all application keys available for your Datadog 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.list_application_keys(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                ApplicationKeyListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_application_keys = Endpoint(settings={
            'response_type': (ApplicationKeyListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/application_key',
            'operation_id':
            'list_application_keys',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                              params_map={
                                                  'all': [],
                                                  'required': [],
                                                  'nullable': [],
                                                  'enum': [],
                                                  'validation': []
                                              },
                                              root_map={
                                                  'validations': {},
                                                  'allowed_values': {},
                                                  'openapi_types': {},
                                                  'attribute_map': {},
                                                  'location_map': {},
                                                  'collection_format_map': {}
                                              },
                                              headers_map={
                                                  'accept':
                                                  ['application/json'],
                                                  'content_type': [],
                                              },
                                              api_client=api_client,
                                              callable=__list_application_keys)

        def __update_api_key(self, key, body, **kwargs):
            """Edit an API key  # noqa: E501

            Edit an API key name.  # 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_api_key(key, body, async_req=True)
            >>> result = thread.get()

            Args:
                key (str): The specific API key you are working with.
                body (ApiKey):

            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 (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.
                _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:
                ApiKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['key'] = \
                key
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_api_key = Endpoint(settings={
            'response_type': (ApiKeyResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/api_key/{key}',
            'operation_id': 'update_api_key',
            'http_method': 'PUT',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'key',
                                               'body',
                                           ],
                                           'required': [
                                               'key',
                                               'body',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'key': (str, ),
                                               'body': (ApiKey, ),
                                           },
                                           'attribute_map': {
                                               'key': 'key',
                                           },
                                           'location_map': {
                                               'key': 'path',
                                               'body': 'body',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type':
                                           ['application/json']
                                       },
                                       api_client=api_client,
                                       callable=__update_api_key)

        def __update_application_key(self, key, body, **kwargs):
            """Edit an application key  # noqa: E501

            Edit an application key name.  # 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_application_key(key, body, async_req=True)
            >>> result = thread.get()

            Args:
                key (str): The specific APP key you are working with.
                body (ApplicationKey):

            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 (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.
                _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:
                ApplicationKeyResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['key'] = \
                key
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_application_key = Endpoint(
            settings={
                'response_type': (ApplicationKeyResponse, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/application_key/{key}',
                'operation_id': 'update_application_key',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'key',
                    'body',
                ],
                'required': [
                    'key',
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'key': (str, ),
                    'body': (ApplicationKey, ),
                },
                'attribute_map': {
                    'key': 'key',
                },
                'location_map': {
                    'key': 'path',
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__update_application_key)
Exemplo n.º 5
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._get_graph_snapshot_endpoint = _Endpoint(
            settings={
                "response_type": (GraphSnapshot, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/graph/snapshot",
                "operation_id": "get_graph_snapshot",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "start",
                    "end",
                    "metric_query",
                    "event_query",
                    "graph_def",
                    "title",
                ],
                "required": [
                    "start",
                    "end",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "start": (int, ),
                    "end": (int, ),
                    "metric_query": (str, ),
                    "event_query": (str, ),
                    "graph_def": (str, ),
                    "title": (str, ),
                },
                "attribute_map": {
                    "start": "start",
                    "end": "end",
                    "metric_query": "metric_query",
                    "event_query": "event_query",
                    "graph_def": "graph_def",
                    "title": "title",
                },
                "location_map": {
                    "start": "query",
                    "end": "query",
                    "metric_query": "query",
                    "event_query": "query",
                    "graph_def": "query",
                    "title": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )
Exemplo n.º 6
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __check_can_delete_monitor(self, monitor_ids, **kwargs):
            """Check if a monitor can be deleted  # noqa: E501

            Check if the given monitors can be deleted.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.check_can_delete_monitor(monitor_ids, async_req=True)
            >>> result = thread.get()

            Args:
                monitor_ids ([int]): The IDs of the monitor to check.

            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 (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.
                _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:
                CheckCanDeleteMonitorResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['monitor_ids'] = \
                monitor_ids
            return self.call_with_http_info(**kwargs)

        self.check_can_delete_monitor = Endpoint(
            settings={
                'response_type': (CheckCanDeleteMonitorResponse, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/monitor/can_delete',
                'operation_id': 'check_can_delete_monitor',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'monitor_ids',
                ],
                'required': [
                    'monitor_ids',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'monitor_ids': ([int], ),
                },
                'attribute_map': {
                    'monitor_ids': 'monitor_ids',
                },
                'location_map': {
                    'monitor_ids': 'query',
                },
                'collection_format_map': {
                    'monitor_ids': 'multi',
                }
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__check_can_delete_monitor)

        def __create_monitor(self, body, **kwargs):
            """Create a monitor  # noqa: E501

            Create a monitor using the specified options.  #### Monitor Types  The type of monitor chosen from:  - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - watchdog: `event alert`  #### Query Types  **Metric Alert Query**  Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #`  - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` being 5, 10, 15, or 30) or `last_#h`(with `#` being 1, 2, or 4), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold  If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with:  - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (1, 5, 10, 15, or 30), last\\_#h (1, 2, or 4), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago  Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0`  **Service Check Query**  Example: `\"check\".over(tags).last(count).count_by_status()`  - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")` - **`count`** must be at >= your max threshold (defined in the `options`). e.g. if you want to notify on 1 critical, 3 ok and 2 warn statuses count should be 3. It is limited to 100.  **Event Alert Query**  Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"`  - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 60s, 4h. Supported timeframes: s, m, h and d. This value should not exceed 48 hours.  **Process Alert Query**  Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #`  - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 60s, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold  **Logs Alert Query**  Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #`  - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold.  **Composite Query**  Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors  * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI.  # 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_monitor(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (Monitor): Create a monitor request body.

            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 (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.
                _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:
                Monitor
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_monitor = Endpoint(settings={
            'response_type': (Monitor, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/monitor',
            'operation_id': 'create_monitor',
            'http_method': 'POST',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'body',
                                           ],
                                           'required': [
                                               'body',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'body': (Monitor, ),
                                           },
                                           'attribute_map': {},
                                           'location_map': {
                                               'body': 'body',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type':
                                           ['application/json']
                                       },
                                       api_client=api_client,
                                       callable=__create_monitor)

        def __delete_monitor(self, monitor_id, **kwargs):
            """Delete a monitor  # noqa: E501

            Delete the specified monitor  # 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_monitor(monitor_id, async_req=True)
            >>> result = thread.get()

            Args:
                monitor_id (int): The ID of the monitor.

            Keyword Args:
                force (str): Delete the monitor even if it&#39;s referenced by other resources (e.g. SLO, composite monitor).. [optional]
                _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 (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.
                _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:
                DeletedMonitor
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['monitor_id'] = \
                monitor_id
            return self.call_with_http_info(**kwargs)

        self.delete_monitor = Endpoint(settings={
            'response_type': (DeletedMonitor, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/monitor/{monitor_id}',
            'operation_id': 'delete_monitor',
            'http_method': 'DELETE',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'monitor_id',
                                               'force',
                                           ],
                                           'required': [
                                               'monitor_id',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'monitor_id': (int, ),
                                               'force': (str, ),
                                           },
                                           'attribute_map': {
                                               'monitor_id': 'monitor_id',
                                               'force': 'force',
                                           },
                                           'location_map': {
                                               'monitor_id': 'path',
                                               'force': 'query',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__delete_monitor)

        def __get_monitor(self, monitor_id, **kwargs):
            """Get a monitor's details  # noqa: E501

            Get details about the specified monitor from your organization.  # 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_monitor(monitor_id, async_req=True)
            >>> result = thread.get()

            Args:
                monitor_id (int): The ID of the monitor

            Keyword Args:
                group_states (str): When specified, shows additional information about the group states. Choose one or more from &#x60;all&#x60;, &#x60;alert&#x60;, &#x60;warn&#x60;, and &#x60;no data&#x60;.. [optional]
                _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 (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.
                _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:
                Monitor
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['monitor_id'] = \
                monitor_id
            return self.call_with_http_info(**kwargs)

        self.get_monitor = Endpoint(settings={
            'response_type': (Monitor, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/monitor/{monitor_id}',
            'operation_id': 'get_monitor',
            'http_method': 'GET',
            'servers': None,
        },
                                    params_map={
                                        'all': [
                                            'monitor_id',
                                            'group_states',
                                        ],
                                        'required': [
                                            'monitor_id',
                                        ],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {
                                            'monitor_id': (int, ),
                                            'group_states': (str, ),
                                        },
                                        'attribute_map': {
                                            'monitor_id': 'monitor_id',
                                            'group_states': 'group_states',
                                        },
                                        'location_map': {
                                            'monitor_id': 'path',
                                            'group_states': 'query',
                                        },
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': [],
                                    },
                                    api_client=api_client,
                                    callable=__get_monitor)

        def __list_monitors(self, **kwargs):
            """Get all monitor details  # noqa: E501

            Get details about the specified monitor from your organization.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_monitors(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                group_states (str): When specified, shows additional information about the group states. Choose one or more from &#x60;all&#x60;, &#x60;alert&#x60;, &#x60;warn&#x60;, and &#x60;no data&#x60;.. [optional]
                name (str): A string to filter monitors by name.. [optional]
                tags (str): A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. For example, &#x60;host:host0&#x60;.. [optional]
                monitor_tags (str): A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors. Tags created in the Datadog UI automatically have the service key prepended. For example, &#x60;service:my-app&#x60;.. [optional]
                with_downtimes (bool): If this argument is set to true, then the returned data includes all current downtimes for each monitor.. [optional]
                id_offset (int): Monitor ID offset.. [optional]
                page (int): The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination.. [optional]
                page_size (int): The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a &#x60;page_size&#x60; limit. However, if page is specified and &#x60;page_size&#x60; is not, the argument defaults to 100.. [optional]
                _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 (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.
                _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:
                [Monitor]
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_monitors = Endpoint(settings={
            'response_type': ([Monitor], ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/monitor',
            'operation_id': 'list_monitors',
            'http_method': 'GET',
            'servers': None,
        },
                                      params_map={
                                          'all': [
                                              'group_states',
                                              'name',
                                              'tags',
                                              'monitor_tags',
                                              'with_downtimes',
                                              'id_offset',
                                              'page',
                                              'page_size',
                                          ],
                                          'required': [],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': [
                                              'page_size',
                                          ]
                                      },
                                      root_map={
                                          'validations': {
                                              ('page_size', ): {
                                                  'inclusive_maximum': 1000,
                                              },
                                          },
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'group_states': (str, ),
                                              'name': (str, ),
                                              'tags': (str, ),
                                              'monitor_tags': (str, ),
                                              'with_downtimes': (bool, ),
                                              'id_offset': (int, ),
                                              'page': (int, ),
                                              'page_size': (int, ),
                                          },
                                          'attribute_map': {
                                              'group_states': 'group_states',
                                              'name': 'name',
                                              'tags': 'tags',
                                              'monitor_tags': 'monitor_tags',
                                              'with_downtimes':
                                              'with_downtimes',
                                              'id_offset': 'id_offset',
                                              'page': 'page',
                                              'page_size': 'page_size',
                                          },
                                          'location_map': {
                                              'group_states': 'query',
                                              'name': 'query',
                                              'tags': 'query',
                                              'monitor_tags': 'query',
                                              'with_downtimes': 'query',
                                              'id_offset': 'query',
                                              'page': 'query',
                                              'page_size': 'query',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__list_monitors)

        def __update_monitor(self, monitor_id, body, **kwargs):
            """Edit a monitor  # noqa: E501

            Edit the specified monitor.  # 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_monitor(monitor_id, body, async_req=True)
            >>> result = thread.get()

            Args:
                monitor_id (int): The ID of the monitor.
                body (MonitorUpdateRequest): Edit a monitor request body.

            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 (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.
                _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:
                Monitor
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['monitor_id'] = \
                monitor_id
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_monitor = Endpoint(settings={
            'response_type': (Monitor, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/monitor/{monitor_id}',
            'operation_id': 'update_monitor',
            'http_method': 'PUT',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'monitor_id',
                                               'body',
                                           ],
                                           'required': [
                                               'monitor_id',
                                               'body',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'monitor_id': (int, ),
                                               'body':
                                               (MonitorUpdateRequest, ),
                                           },
                                           'attribute_map': {
                                               'monitor_id': 'monitor_id',
                                           },
                                           'location_map': {
                                               'monitor_id': 'path',
                                               'body': 'body',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type':
                                           ['application/json']
                                       },
                                       api_client=api_client,
                                       callable=__update_monitor)

        def __validate_monitor(self, body, **kwargs):
            """Validate a monitor  # noqa: E501

            Validate the monitor provided in the request.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.validate_monitor(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (Monitor): Monitor request object

            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 (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.
                _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:
                Monitor
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.validate_monitor = Endpoint(settings={
            'response_type': (Monitor, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/monitor/validate',
            'operation_id': 'validate_monitor',
            'http_method': 'POST',
            'servers': None,
        },
                                         params_map={
                                             'all': [
                                                 'body',
                                             ],
                                             'required': [
                                                 'body',
                                             ],
                                             'nullable': [],
                                             'enum': [],
                                             'validation': []
                                         },
                                         root_map={
                                             'validations': {},
                                             'allowed_values': {},
                                             'openapi_types': {
                                                 'body': (Monitor, ),
                                             },
                                             'attribute_map': {},
                                             'location_map': {
                                                 'body': 'body',
                                             },
                                             'collection_format_map': {}
                                         },
                                         headers_map={
                                             'accept': ['application/json'],
                                             'content_type':
                                             ['application/json']
                                         },
                                         api_client=api_client,
                                         callable=__validate_monitor)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_user(self, body, **kwargs):
            """Create a user  # noqa: E501

            Create a user for your organization.  **Note**: Users can only be created with the admin access role if application keys belong to administrators.  # 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_user(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (User): User object that needs to be created.

            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 (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.
                _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:
                UserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_user = Endpoint(settings={
            'response_type': (UserResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/user',
            'operation_id': 'create_user',
            'http_method': 'POST',
            'servers': None,
        },
                                    params_map={
                                        'all': [
                                            'body',
                                        ],
                                        'required': [
                                            'body',
                                        ],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {
                                            'body': (User, ),
                                        },
                                        'attribute_map': {},
                                        'location_map': {
                                            'body': 'body',
                                        },
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': ['application/json']
                                    },
                                    api_client=api_client,
                                    callable=__create_user)

        def __disable_user(self, user_handle, **kwargs):
            """Disable a user  # noqa: E501

            Delete a user from an organization.  **Note**: This endpoint can only be used with application keys belonging to administrators.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.disable_user(user_handle, async_req=True)
            >>> result = thread.get()

            Args:
                user_handle (str): The handle of the user.

            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 (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.
                _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:
                UserDisableResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['user_handle'] = \
                user_handle
            return self.call_with_http_info(**kwargs)

        self.disable_user = Endpoint(settings={
            'response_type': (UserDisableResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/user/{user_handle}',
            'operation_id': 'disable_user',
            'http_method': 'DELETE',
            'servers': None,
        },
                                     params_map={
                                         'all': [
                                             'user_handle',
                                         ],
                                         'required': [
                                             'user_handle',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'user_handle': (str, ),
                                         },
                                         'attribute_map': {
                                             'user_handle': 'user_handle',
                                         },
                                         'location_map': {
                                             'user_handle': 'path',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__disable_user)

        def __get_user(self, user_handle, **kwargs):
            """Get user details  # noqa: E501

            Get a user's details.  # 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_user(user_handle, async_req=True)
            >>> result = thread.get()

            Args:
                user_handle (str): The ID of the user.

            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 (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.
                _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:
                UserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['user_handle'] = \
                user_handle
            return self.call_with_http_info(**kwargs)

        self.get_user = Endpoint(settings={
            'response_type': (UserResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/user/{user_handle}',
            'operation_id': 'get_user',
            'http_method': 'GET',
            'servers': None,
        },
                                 params_map={
                                     'all': [
                                         'user_handle',
                                     ],
                                     'required': [
                                         'user_handle',
                                     ],
                                     'nullable': [],
                                     'enum': [],
                                     'validation': []
                                 },
                                 root_map={
                                     'validations': {},
                                     'allowed_values': {},
                                     'openapi_types': {
                                         'user_handle': (str, ),
                                     },
                                     'attribute_map': {
                                         'user_handle': 'user_handle',
                                     },
                                     'location_map': {
                                         'user_handle': 'path',
                                     },
                                     'collection_format_map': {}
                                 },
                                 headers_map={
                                     'accept': ['application/json'],
                                     'content_type': [],
                                 },
                                 api_client=api_client,
                                 callable=__get_user)

        def __list_users(self, **kwargs):
            """List all users  # noqa: E501

            List all users for your organization.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_users(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                UserListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_users = Endpoint(settings={
            'response_type': (UserListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/user',
            'operation_id': 'list_users',
            'http_method': 'GET',
            'servers': None,
        },
                                   params_map={
                                       'all': [],
                                       'required': [],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {},
                                       'attribute_map': {},
                                       'location_map': {},
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': [],
                                   },
                                   api_client=api_client,
                                   callable=__list_users)

        def __update_user(self, user_handle, body, **kwargs):
            """Update a user  # noqa: E501

            Update a user information.  **Note**: It can only be used with application keys belonging to administrators.  # 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_user(user_handle, body, async_req=True)
            >>> result = thread.get()

            Args:
                user_handle (str): The ID of the user.
                body (User): Description of the update.

            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 (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.
                _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:
                UserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['user_handle'] = \
                user_handle
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_user = Endpoint(settings={
            'response_type': (UserResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/user/{user_handle}',
            'operation_id': 'update_user',
            'http_method': 'PUT',
            'servers': None,
        },
                                    params_map={
                                        'all': [
                                            'user_handle',
                                            'body',
                                        ],
                                        'required': [
                                            'user_handle',
                                            'body',
                                        ],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {
                                            'user_handle': (str, ),
                                            'body': (User, ),
                                        },
                                        'attribute_map': {
                                            'user_handle': 'user_handle',
                                        },
                                        'location_map': {
                                            'user_handle': 'path',
                                            'body': 'body',
                                        },
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': ['application/json']
                                    },
                                    api_client=api_client,
                                    callable=__update_user)
Exemplo n.º 8
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._create_child_org_endpoint = _Endpoint(
            settings={
                "response_type": (OrganizationCreateResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/org",
                "operation_id": "create_child_org",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (OrganizationCreateBody, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._get_org_endpoint = _Endpoint(
            settings={
                "response_type": (OrganizationResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/org/{public_id}",
                "operation_id": "get_org",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "public_id",
                ],
                "required": [
                    "public_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "public_id": (str, ),
                },
                "attribute_map": {
                    "public_id": "public_id",
                },
                "location_map": {
                    "public_id": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_orgs_endpoint = _Endpoint(
            settings={
                "response_type": (OrganizationListResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/org",
                "operation_id": "list_orgs",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": []
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_org_endpoint = _Endpoint(
            settings={
                "response_type": (OrganizationResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/org/{public_id}",
                "operation_id": "update_org",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "public_id",
                    "body",
                ],
                "required": [
                    "public_id",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "public_id": (str, ),
                    "body": (Organization, ),
                },
                "attribute_map": {
                    "public_id": "public_id",
                },
                "location_map": {
                    "public_id": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._upload_id_p_for_org_endpoint = _Endpoint(
            settings={
                "response_type": (IdpResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/org/{public_id}/idp_metadata",
                "operation_id": "upload_id_p_for_org",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "public_id",
                    "idp_file",
                ],
                "required": [
                    "public_id",
                    "idp_file",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "public_id": (str, ),
                    "idp_file": (file_type, ),
                },
                "attribute_map": {
                    "public_id": "public_id",
                    "idp_file": "idp_file",
                },
                "location_map": {
                    "public_id": "path",
                    "idp_file": "form",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["multipart/form-data"]
            },
            api_client=api_client,
        )
Exemplo n.º 9
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_child_org(self, body, **kwargs):
            """Create a child organization  # noqa: E501

            Create a child organization.  This endpoint requires the [multi-organization account](https://docs.datadoghq.com/account_management/multi_organization/) feature and must be enabled by [contacting support](https://docs.datadoghq.com/help/).  Once a new child organization is created, you can interact with it by using the `org.public_id`, `pi_key.key`, and `application_key.hash` provided in the response.  # 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_child_org(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (OrganizationCreateBody): Organization object that needs to be created

            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 (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.
                _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:
                OrganizationCreateResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_child_org = Endpoint(settings={
            'response_type': (OrganizationCreateResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/org',
            'operation_id':
            'create_child_org',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                         params_map={
                                             'all': [
                                                 'body',
                                             ],
                                             'required': [
                                                 'body',
                                             ],
                                             'nullable': [],
                                             'enum': [],
                                             'validation': []
                                         },
                                         root_map={
                                             'validations': {},
                                             'allowed_values': {},
                                             'openapi_types': {
                                                 'body':
                                                 (OrganizationCreateBody, ),
                                             },
                                             'attribute_map': {},
                                             'location_map': {
                                                 'body': 'body',
                                             },
                                             'collection_format_map': {}
                                         },
                                         headers_map={
                                             'accept': ['application/json'],
                                             'content_type':
                                             ['application/json']
                                         },
                                         api_client=api_client,
                                         callable=__create_child_org)

        def __get_org(self, public_id, **kwargs):
            """Get organization information  # noqa: E501

            Get organization information.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_org(public_id, async_req=True)
            >>> result = thread.get()

            Args:
                public_id (str): The &#x60;public_id&#x60; of the organization you are operating within.

            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 (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.
                _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:
                OrganizationResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['public_id'] = \
                public_id
            return self.call_with_http_info(**kwargs)

        self.get_org = Endpoint(settings={
            'response_type': (OrganizationResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/org/{public_id}',
            'operation_id': 'get_org',
            'http_method': 'GET',
            'servers': None,
        },
                                params_map={
                                    'all': [
                                        'public_id',
                                    ],
                                    'required': [
                                        'public_id',
                                    ],
                                    'nullable': [],
                                    'enum': [],
                                    'validation': []
                                },
                                root_map={
                                    'validations': {},
                                    'allowed_values': {},
                                    'openapi_types': {
                                        'public_id': (str, ),
                                    },
                                    'attribute_map': {
                                        'public_id': 'public_id',
                                    },
                                    'location_map': {
                                        'public_id': 'path',
                                    },
                                    'collection_format_map': {}
                                },
                                headers_map={
                                    'accept': ['application/json'],
                                    'content_type': [],
                                },
                                api_client=api_client,
                                callable=__get_org)

        def __list_orgs(self, **kwargs):
            """List your managed organizations  # noqa: E501

            List your managed organizations.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_orgs(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                OrganizationListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_orgs = Endpoint(settings={
            'response_type': (OrganizationListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/org',
            'operation_id': 'list_orgs',
            'http_method': 'GET',
            'servers': None,
        },
                                  params_map={
                                      'all': [],
                                      'required': [],
                                      'nullable': [],
                                      'enum': [],
                                      'validation': []
                                  },
                                  root_map={
                                      'validations': {},
                                      'allowed_values': {},
                                      'openapi_types': {},
                                      'attribute_map': {},
                                      'location_map': {},
                                      'collection_format_map': {}
                                  },
                                  headers_map={
                                      'accept': ['application/json'],
                                      'content_type': [],
                                  },
                                  api_client=api_client,
                                  callable=__list_orgs)

        def __update_org(self, public_id, body, **kwargs):
            """Update your organization  # noqa: E501

            Update your organization.  # 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_org(public_id, body, async_req=True)
            >>> result = thread.get()

            Args:
                public_id (str): The &#x60;public_id&#x60; of the organization you are operating within.
                body (Organization):

            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 (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.
                _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:
                OrganizationResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['public_id'] = \
                public_id
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_org = Endpoint(settings={
            'response_type': (OrganizationResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/org/{public_id}',
            'operation_id': 'update_org',
            'http_method': 'PUT',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'public_id',
                                           'body',
                                       ],
                                       'required': [
                                           'public_id',
                                           'body',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'public_id': (str, ),
                                           'body': (Organization, ),
                                       },
                                       'attribute_map': {
                                           'public_id': 'public_id',
                                       },
                                       'location_map': {
                                           'public_id': 'path',
                                           'body': 'body',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': ['application/json']
                                   },
                                   api_client=api_client,
                                   callable=__update_org)

        def __upload_id_p_for_org(self, public_id, idp_file, **kwargs):
            """Upload IdP metadata  # noqa: E501

            There are a couple of options for updating the Identity Provider (IdP) metadata from your SAML IdP.  * **Multipart Form-Data**: Post the IdP metadata file using a form post.  * **XML Body:** Post the IdP metadata file as the body of the request.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.upload_id_p_for_org(public_id, idp_file, async_req=True)
            >>> result = thread.get()

            Args:
                public_id (str): The &#x60;public_id&#x60; of the organization you are operating with
                idp_file (file_type): The path to the XML metadata file you wish to upload.

            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 (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.
                _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:
                IdpResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['public_id'] = \
                public_id
            kwargs['idp_file'] = \
                idp_file
            return self.call_with_http_info(**kwargs)

        self.upload_id_p_for_org = Endpoint(settings={
            'response_type': (IdpResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/org/{public_id}/idp_metadata',
            'operation_id':
            'upload_id_p_for_org',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                            params_map={
                                                'all': [
                                                    'public_id',
                                                    'idp_file',
                                                ],
                                                'required': [
                                                    'public_id',
                                                    'idp_file',
                                                ],
                                                'nullable': [],
                                                'enum': [],
                                                'validation': []
                                            },
                                            root_map={
                                                'validations': {},
                                                'allowed_values': {},
                                                'openapi_types': {
                                                    'public_id': (str, ),
                                                    'idp_file': (file_type, ),
                                                },
                                                'attribute_map': {
                                                    'public_id': 'public_id',
                                                    'idp_file': 'idp_file',
                                                },
                                                'location_map': {
                                                    'public_id': 'path',
                                                    'idp_file': 'form',
                                                },
                                                'collection_format_map': {}
                                            },
                                            headers_map={
                                                'accept': ['application/json'],
                                                'content_type':
                                                ['multipart/form-data']
                                            },
                                            api_client=api_client,
                                            callable=__upload_id_p_for_org)
Exemplo n.º 10
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._check_aws_logs_lambda_async_endpoint = _Endpoint(
            settings={
                "response_type": (AWSLogsAsyncResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs/check_async",
                "operation_id": "check_aws_logs_lambda_async",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (AWSAccountAndLambdaRequest,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._check_aws_logs_services_async_endpoint = _Endpoint(
            settings={
                "response_type": (AWSLogsAsyncResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs/services_async",
                "operation_id": "check_aws_logs_services_async",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (AWSLogsServicesRequest,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._create_aws_lambda_arn_endpoint = _Endpoint(
            settings={
                "response_type": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs",
                "operation_id": "create_aws_lambda_arn",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (AWSAccountAndLambdaRequest,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._delete_aws_lambda_arn_endpoint = _Endpoint(
            settings={
                "response_type": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs",
                "operation_id": "delete_aws_lambda_arn",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (AWSAccountAndLambdaRequest,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._enable_aws_log_services_endpoint = _Endpoint(
            settings={
                "response_type": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs/services",
                "operation_id": "enable_aws_log_services",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (AWSLogsServicesRequest,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._list_aws_logs_integrations_endpoint = _Endpoint(
            settings={
                "response_type": ([AWSLogsListResponse],),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs",
                "operation_id": "list_aws_logs_integrations",
                "http_method": "GET",
                "servers": None,
            },
            params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []},
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_aws_logs_services_endpoint = _Endpoint(
            settings={
                "response_type": ([AWSLogsListServicesResponse],),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/aws/logs/services",
                "operation_id": "list_aws_logs_services",
                "http_method": "GET",
                "servers": None,
            },
            params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []},
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._create_slack_integration_channel_endpoint = _Endpoint(
            settings={
                "response_type": (SlackIntegrationChannel, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/slack/configuration/accounts/{account_name}/channels",
                "operation_id": "create_slack_integration_channel",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "account_name",
                    "body",
                ],
                "required": [
                    "account_name",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "account_name": (str, ),
                    "body": (SlackIntegrationChannel, ),
                },
                "attribute_map": {
                    "account_name": "account_name",
                },
                "location_map": {
                    "account_name": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._get_slack_integration_channel_endpoint = _Endpoint(
            settings={
                "response_type": (SlackIntegrationChannel, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}",
                "operation_id": "get_slack_integration_channel",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "account_name",
                    "channel_name",
                ],
                "required": [
                    "account_name",
                    "channel_name",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "account_name": (str, ),
                    "channel_name": (str, ),
                },
                "attribute_map": {
                    "account_name": "account_name",
                    "channel_name": "channel_name",
                },
                "location_map": {
                    "account_name": "path",
                    "channel_name": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_slack_integration_channels_endpoint = _Endpoint(
            settings={
                "response_type": (SlackIntegrationChannels, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/slack/configuration/accounts/{account_name}/channels",
                "operation_id": "get_slack_integration_channels",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "account_name",
                ],
                "required": [
                    "account_name",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "account_name": (str, ),
                },
                "attribute_map": {
                    "account_name": "account_name",
                },
                "location_map": {
                    "account_name": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._remove_slack_integration_channel_endpoint = _Endpoint(
            settings={
                "response_type": None,
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}",
                "operation_id": "remove_slack_integration_channel",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "account_name",
                    "channel_name",
                ],
                "required": [
                    "account_name",
                    "channel_name",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "account_name": (str, ),
                    "channel_name": (str, ),
                },
                "attribute_map": {
                    "account_name": "account_name",
                    "channel_name": "channel_name",
                },
                "location_map": {
                    "account_name": "path",
                    "channel_name": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_slack_integration_channel_endpoint = _Endpoint(
            settings={
                "response_type": (SlackIntegrationChannel, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}",
                "operation_id": "update_slack_integration_channel",
                "http_method": "PATCH",
                "servers": None,
            },
            params_map={
                "all": [
                    "account_name",
                    "channel_name",
                    "body",
                ],
                "required": [
                    "account_name",
                    "channel_name",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "account_name": (str, ),
                    "channel_name": (str, ),
                    "body": (SlackIntegrationChannel, ),
                },
                "attribute_map": {
                    "account_name": "account_name",
                    "channel_name": "channel_name",
                },
                "location_map": {
                    "account_name": "path",
                    "channel_name": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __cancel_downtime(self, downtime_id, **kwargs):
            """Cancel a downtime  # noqa: E501

            Cancel a downtime.  # 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_downtime(downtime_id, async_req=True)
            >>> result = thread.get()

            Args:
                downtime_id (int): ID of the downtime to cancel.

            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 (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.
                _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:
                None
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['downtime_id'] = \
                downtime_id
            return self.call_with_http_info(**kwargs)

        self.cancel_downtime = Endpoint(settings={
            'response_type': None,
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/downtime/{downtime_id}',
            'operation_id': 'cancel_downtime',
            'http_method': 'DELETE',
            'servers': None,
        },
                                        params_map={
                                            'all': [
                                                'downtime_id',
                                            ],
                                            'required': [
                                                'downtime_id',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'downtime_id': (int, ),
                                            },
                                            'attribute_map': {
                                                'downtime_id': 'downtime_id',
                                            },
                                            'location_map': {
                                                'downtime_id': 'path',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type': [],
                                        },
                                        api_client=api_client,
                                        callable=__cancel_downtime)

        def __cancel_downtimes_by_scope(self, body, **kwargs):
            """Cancel downtimes by scope  # noqa: E501

            Delete all downtimes that match the scope of `X`.  # 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_downtimes_by_scope(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (CancelDowntimesByScopeRequest): Scope to cancel downtimes for.

            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 (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.
                _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:
                CanceledDowntimesIds
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.cancel_downtimes_by_scope = Endpoint(
            settings={
                'response_type': (CanceledDowntimesIds, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/downtime/cancel/by_scope',
                'operation_id': 'cancel_downtimes_by_scope',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (CancelDowntimesByScopeRequest, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__cancel_downtimes_by_scope)

        def __create_downtime(self, body, **kwargs):
            """Schedule a downtime  # noqa: E501

            Schedule a downtime.  # 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_downtime(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (Downtime): Schedule a downtime request body.

            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 (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.
                _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:
                Downtime
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_downtime = Endpoint(settings={
            'response_type': (Downtime, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/downtime',
            'operation_id': 'create_downtime',
            'http_method': 'POST',
            'servers': None,
        },
                                        params_map={
                                            'all': [
                                                'body',
                                            ],
                                            'required': [
                                                'body',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'body': (Downtime, ),
                                            },
                                            'attribute_map': {},
                                            'location_map': {
                                                'body': 'body',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type':
                                            ['application/json']
                                        },
                                        api_client=api_client,
                                        callable=__create_downtime)

        def __get_downtime(self, downtime_id, **kwargs):
            """Get a downtime  # noqa: E501

            Get downtime detail by `downtime_id`.  # 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_downtime(downtime_id, async_req=True)
            >>> result = thread.get()

            Args:
                downtime_id (int): ID of the downtime to fetch.

            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 (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.
                _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:
                Downtime
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['downtime_id'] = \
                downtime_id
            return self.call_with_http_info(**kwargs)

        self.get_downtime = Endpoint(settings={
            'response_type': (Downtime, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/downtime/{downtime_id}',
            'operation_id': 'get_downtime',
            'http_method': 'GET',
            'servers': None,
        },
                                     params_map={
                                         'all': [
                                             'downtime_id',
                                         ],
                                         'required': [
                                             'downtime_id',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'downtime_id': (int, ),
                                         },
                                         'attribute_map': {
                                             'downtime_id': 'downtime_id',
                                         },
                                         'location_map': {
                                             'downtime_id': 'path',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__get_downtime)

        def __list_downtimes(self, **kwargs):
            """Get all downtimes  # noqa: E501

            Get all scheduled downtimes.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_downtimes(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                current_only (bool): Only return downtimes that are active when the request is made.. [optional]
                _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 (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.
                _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:
                [Downtime]
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_downtimes = Endpoint(settings={
            'response_type': ([Downtime], ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/downtime',
            'operation_id': 'list_downtimes',
            'http_method': 'GET',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'current_only',
                                           ],
                                           'required': [],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'current_only': (bool, ),
                                           },
                                           'attribute_map': {
                                               'current_only': 'current_only',
                                           },
                                           'location_map': {
                                               'current_only': 'query',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__list_downtimes)

        def __update_downtime(self, downtime_id, body, **kwargs):
            """Update a downtime  # noqa: E501

            Update a single downtime by `downtime_id`.  # 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_downtime(downtime_id, body, async_req=True)
            >>> result = thread.get()

            Args:
                downtime_id (int): ID of the downtime to update.
                body (Downtime): Update a downtime request body.

            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 (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.
                _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:
                Downtime
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['downtime_id'] = \
                downtime_id
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_downtime = Endpoint(settings={
            'response_type': (Downtime, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/downtime/{downtime_id}',
            'operation_id': 'update_downtime',
            'http_method': 'PUT',
            'servers': None,
        },
                                        params_map={
                                            'all': [
                                                'downtime_id',
                                                'body',
                                            ],
                                            'required': [
                                                'downtime_id',
                                                'body',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'downtime_id': (int, ),
                                                'body': (Downtime, ),
                                            },
                                            'attribute_map': {
                                                'downtime_id': 'downtime_id',
                                            },
                                            'location_map': {
                                                'downtime_id': 'path',
                                                'body': 'body',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type':
                                            ['application/json']
                                        },
                                        api_client=api_client,
                                        callable=__update_downtime)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_logs_pipeline(
            self,
            body,
            **kwargs
        ):
            """Create a pipeline  # noqa: E501

            Create a pipeline in your organization.  # 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_logs_pipeline(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (LogsPipeline): Definition of the new pipeline.

            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 (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.
                _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:
                LogsPipeline
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_logs_pipeline = Endpoint(
            settings={
                'response_type': (LogsPipeline,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipelines',
                'operation_id': 'create_logs_pipeline',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (LogsPipeline,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_logs_pipeline
        )

        def __delete_logs_pipeline(
            self,
            pipeline_id,
            **kwargs
        ):
            """Delete a pipeline  # noqa: E501

            Delete a given pipeline from your organization. This endpoint takes no JSON arguments.  # 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_logs_pipeline(pipeline_id, async_req=True)
            >>> result = thread.get()

            Args:
                pipeline_id (str): ID of the pipeline to delete.

            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 (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.
                _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:
                None
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['pipeline_id'] = \
                pipeline_id
            return self.call_with_http_info(**kwargs)

        self.delete_logs_pipeline = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipelines/{pipeline_id}',
                'operation_id': 'delete_logs_pipeline',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'pipeline_id',
                ],
                'required': [
                    'pipeline_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'pipeline_id':
                        (str,),
                },
                'attribute_map': {
                    'pipeline_id': 'pipeline_id',
                },
                'location_map': {
                    'pipeline_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_logs_pipeline
        )

        def __get_logs_pipeline(
            self,
            pipeline_id,
            **kwargs
        ):
            """Get a pipeline  # noqa: E501

            Get a specific pipeline from your organization. This endpoint takes no JSON arguments.  # 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_logs_pipeline(pipeline_id, async_req=True)
            >>> result = thread.get()

            Args:
                pipeline_id (str): ID of the pipeline to get.

            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 (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.
                _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:
                LogsPipeline
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['pipeline_id'] = \
                pipeline_id
            return self.call_with_http_info(**kwargs)

        self.get_logs_pipeline = Endpoint(
            settings={
                'response_type': (LogsPipeline,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipelines/{pipeline_id}',
                'operation_id': 'get_logs_pipeline',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'pipeline_id',
                ],
                'required': [
                    'pipeline_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'pipeline_id':
                        (str,),
                },
                'attribute_map': {
                    'pipeline_id': 'pipeline_id',
                },
                'location_map': {
                    'pipeline_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_logs_pipeline
        )

        def __get_logs_pipeline_order(
            self,
            **kwargs
        ):
            """Get pipeline order  # noqa: E501

            Get the current order of your pipelines. This endpoint takes no JSON arguments.  # 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_logs_pipeline_order(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                LogsPipelinesOrder
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_logs_pipeline_order = Endpoint(
            settings={
                'response_type': (LogsPipelinesOrder,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipeline-order',
                'operation_id': 'get_logs_pipeline_order',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                },
                'attribute_map': {
                },
                'location_map': {
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_logs_pipeline_order
        )

        def __list_logs_pipelines(
            self,
            **kwargs
        ):
            """Get all pipelines  # noqa: E501

            Get all pipelines from your organization. This endpoint takes no JSON arguments.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_logs_pipelines(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                LogsPipelineList
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_logs_pipelines = Endpoint(
            settings={
                'response_type': (LogsPipelineList,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipelines',
                'operation_id': 'list_logs_pipelines',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                },
                'attribute_map': {
                },
                'location_map': {
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_logs_pipelines
        )

        def __update_logs_pipeline(
            self,
            pipeline_id,
            body,
            **kwargs
        ):
            """Update a pipeline  # noqa: E501

            Update a given pipeline configuration to change it’s processors or their order.  **Note**: Using this method updates your pipeline configuration by **replacing** your current configuration with the new one sent to your Datadog organization.  # 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_logs_pipeline(pipeline_id, body, async_req=True)
            >>> result = thread.get()

            Args:
                pipeline_id (str): ID of the pipeline to delete.
                body (LogsPipeline): New definition of the pipeline.

            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 (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.
                _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:
                LogsPipeline
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['pipeline_id'] = \
                pipeline_id
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_logs_pipeline = Endpoint(
            settings={
                'response_type': (LogsPipeline,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipelines/{pipeline_id}',
                'operation_id': 'update_logs_pipeline',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'pipeline_id',
                    'body',
                ],
                'required': [
                    'pipeline_id',
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'pipeline_id':
                        (str,),
                    'body':
                        (LogsPipeline,),
                },
                'attribute_map': {
                    'pipeline_id': 'pipeline_id',
                },
                'location_map': {
                    'pipeline_id': 'path',
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_logs_pipeline
        )

        def __update_logs_pipeline_order(
            self,
            body,
            **kwargs
        ):
            """Update pipeline order  # noqa: E501

            Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change the structure and content of the data processed by other pipelines and their processors.  **Note**: Using the `PUT` method updates your pipeline order by replacing your current order with the new one sent to your Datadog organization.  # 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_logs_pipeline_order(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (LogsPipelinesOrder): Object containing the new ordered list of pipeline IDs.

            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 (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.
                _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:
                LogsPipelinesOrder
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_logs_pipeline_order = Endpoint(
            settings={
                'response_type': (LogsPipelinesOrder,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/pipeline-order',
                'operation_id': 'update_logs_pipeline_order',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (LogsPipelinesOrder,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_logs_pipeline_order
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_pager_duty_integration_service(
            self,
            body,
            **kwargs
        ):
            """Create a new service object  # noqa: E501

            Create a new service object in the PagerDuty integration.  # 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_pager_duty_integration_service(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (PagerDutyService): Create a new service object request body.

            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 (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.
                _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:
                PagerDutyServiceName
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_pager_duty_integration_service = Endpoint(
            settings={
                'response_type': (PagerDutyServiceName,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/pagerduty/configuration/services',
                'operation_id': 'create_pager_duty_integration_service',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (PagerDutyService,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_pager_duty_integration_service
        )

        def __delete_pager_duty_integration_service(
            self,
            service_name,
            **kwargs
        ):
            """Delete a single service object  # noqa: E501

            Delete a single service object in the Datadog-PagerDuty integration.  # 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_pager_duty_integration_service(service_name, async_req=True)
            >>> result = thread.get()

            Args:
                service_name (str): The service name

            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 (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.
                _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:
                None
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['service_name'] = \
                service_name
            return self.call_with_http_info(**kwargs)

        self.delete_pager_duty_integration_service = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/pagerduty/configuration/services/{service_name}',
                'operation_id': 'delete_pager_duty_integration_service',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'service_name',
                ],
                'required': [
                    'service_name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'service_name':
                        (str,),
                },
                'attribute_map': {
                    'service_name': 'service_name',
                },
                'location_map': {
                    'service_name': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_pager_duty_integration_service
        )

        def __get_pager_duty_integration_service(
            self,
            service_name,
            **kwargs
        ):
            """Get a single service object  # noqa: E501

            Get service name in the Datadog-PagerDuty integration.  # 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_pager_duty_integration_service(service_name, async_req=True)
            >>> result = thread.get()

            Args:
                service_name (str): The service name.

            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 (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.
                _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:
                PagerDutyServiceName
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['service_name'] = \
                service_name
            return self.call_with_http_info(**kwargs)

        self.get_pager_duty_integration_service = Endpoint(
            settings={
                'response_type': (PagerDutyServiceName,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/pagerduty/configuration/services/{service_name}',
                'operation_id': 'get_pager_duty_integration_service',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'service_name',
                ],
                'required': [
                    'service_name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'service_name':
                        (str,),
                },
                'attribute_map': {
                    'service_name': 'service_name',
                },
                'location_map': {
                    'service_name': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_pager_duty_integration_service
        )

        def __update_pager_duty_integration_service(
            self,
            service_name,
            body,
            **kwargs
        ):
            """Update a single service object  # noqa: E501

            Update a single service object in the Datadog-PagerDuty integration.  # 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_pager_duty_integration_service(service_name, body, async_req=True)
            >>> result = thread.get()

            Args:
                service_name (str): The service name
                body (PagerDutyServiceKey): Update an existing service object request body.

            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 (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.
                _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:
                None
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['service_name'] = \
                service_name
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_pager_duty_integration_service = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/pagerduty/configuration/services/{service_name}',
                'operation_id': 'update_pager_duty_integration_service',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'service_name',
                    'body',
                ],
                'required': [
                    'service_name',
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'service_name':
                        (str,),
                    'body':
                        (PagerDutyServiceKey,),
                },
                'attribute_map': {
                    'service_name': 'service_name',
                },
                'location_map': {
                    'service_name': 'path',
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_pager_duty_integration_service
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_graph_snapshot(self, start, end, **kwargs):
            """Take graph snapshots  # noqa: E501

            Take graph snapshots. **Note**: When a snapshot is created, there is some delay before it is available.  # 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_graph_snapshot(start, end, async_req=True)
            >>> result = thread.get()

            Args:
                start (int): The POSIX timestamp of the start of the query.
                end (int): The POSIX timestamp of the end of the query.

            Keyword Args:
                metric_query (str): The metric query.. [optional]
                event_query (str): A query that adds event bands to the graph.. [optional]
                graph_def (str): A JSON document defining the graph. `graph_def` can be used instead of `metric_query`. The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) and should be formatted to a single line then URL encoded.. [optional]
                title (str): A title for the graph. If no title is specified, the graph does not have a title.. [optional]
                _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 (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.
                _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:
                GraphSnapshot
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['start'] = \
                start
            kwargs['end'] = \
                end
            return self.call_with_http_info(**kwargs)

        self.get_graph_snapshot = Endpoint(settings={
            'response_type': (GraphSnapshot, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/graph/snapshot',
            'operation_id': 'get_graph_snapshot',
            'http_method': 'GET',
            'servers': None,
        },
                                           params_map={
                                               'all': [
                                                   'start',
                                                   'end',
                                                   'metric_query',
                                                   'event_query',
                                                   'graph_def',
                                                   'title',
                                               ],
                                               'required': [
                                                   'start',
                                                   'end',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'start': (int, ),
                                                   'end': (int, ),
                                                   'metric_query': (str, ),
                                                   'event_query': (str, ),
                                                   'graph_def': (str, ),
                                                   'title': (str, ),
                                               },
                                               'attribute_map': {
                                                   'start': 'start',
                                                   'end': 'end',
                                                   'metric_query':
                                                   'metric_query',
                                                   'event_query':
                                                   'event_query',
                                                   'graph_def': 'graph_def',
                                                   'title': 'title',
                                               },
                                               'location_map': {
                                                   'start': 'query',
                                                   'end': 'query',
                                                   'metric_query': 'query',
                                                   'event_query': 'query',
                                                   'graph_def': 'query',
                                                   'title': 'query',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type': [],
                                           },
                                           api_client=api_client,
                                           callable=__get_graph_snapshot)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._create_logs_pipeline_endpoint = _Endpoint(
            settings={
                "response_type": (LogsPipeline,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipelines",
                "operation_id": "create_logs_pipeline",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (LogsPipeline,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._delete_logs_pipeline_endpoint = _Endpoint(
            settings={
                "response_type": None,
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipelines/{pipeline_id}",
                "operation_id": "delete_logs_pipeline",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "pipeline_id",
                ],
                "required": [
                    "pipeline_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "pipeline_id": (str,),
                },
                "attribute_map": {
                    "pipeline_id": "pipeline_id",
                },
                "location_map": {
                    "pipeline_id": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_logs_pipeline_endpoint = _Endpoint(
            settings={
                "response_type": (LogsPipeline,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipelines/{pipeline_id}",
                "operation_id": "get_logs_pipeline",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "pipeline_id",
                ],
                "required": [
                    "pipeline_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "pipeline_id": (str,),
                },
                "attribute_map": {
                    "pipeline_id": "pipeline_id",
                },
                "location_map": {
                    "pipeline_id": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_logs_pipeline_order_endpoint = _Endpoint(
            settings={
                "response_type": (LogsPipelinesOrder,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipeline-order",
                "operation_id": "get_logs_pipeline_order",
                "http_method": "GET",
                "servers": None,
            },
            params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []},
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_logs_pipelines_endpoint = _Endpoint(
            settings={
                "response_type": (LogsPipelineList,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipelines",
                "operation_id": "list_logs_pipelines",
                "http_method": "GET",
                "servers": None,
            },
            params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []},
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_logs_pipeline_endpoint = _Endpoint(
            settings={
                "response_type": (LogsPipeline,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipelines/{pipeline_id}",
                "operation_id": "update_logs_pipeline",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "pipeline_id",
                    "body",
                ],
                "required": [
                    "pipeline_id",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "pipeline_id": (str,),
                    "body": (LogsPipeline,),
                },
                "attribute_map": {
                    "pipeline_id": "pipeline_id",
                },
                "location_map": {
                    "pipeline_id": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._update_logs_pipeline_order_endpoint = _Endpoint(
            settings={
                "response_type": (LogsPipelinesOrder,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/logs/config/pipeline-order",
                "operation_id": "update_logs_pipeline_order",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (LogsPipelinesOrder,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )
Exemplo n.º 17
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_logs_index(
            self,
            name,
            **kwargs
        ):
            """Get an index  # noqa: E501

            Get one log index from your organization. This endpoint takes no JSON arguments.  # 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_logs_index(name, async_req=True)
            >>> result = thread.get()

            Args:
                name (str): Name of the log index.

            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 (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.
                _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:
                LogsIndex
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['name'] = \
                name
            return self.call_with_http_info(**kwargs)

        self.get_logs_index = Endpoint(
            settings={
                'response_type': (LogsIndex,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/indexes/{name}',
                'operation_id': 'get_logs_index',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'name',
                ],
                'required': [
                    'name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'name':
                        (str,),
                },
                'attribute_map': {
                    'name': 'name',
                },
                'location_map': {
                    'name': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_logs_index
        )

        def __get_logs_index_order(
            self,
            **kwargs
        ):
            """Get indexes order  # noqa: E501

            Get the current order of your log indexes. This endpoint takes no JSON arguments.  # 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_logs_index_order(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                LogsIndexesOrder
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_logs_index_order = Endpoint(
            settings={
                'response_type': (LogsIndexesOrder,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/index-order',
                'operation_id': 'get_logs_index_order',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                },
                'attribute_map': {
                },
                'location_map': {
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_logs_index_order
        )

        def __list_log_indexes(
            self,
            **kwargs
        ):
            """Get all indexes  # noqa: E501

            The Index object describes the configuration of a log index. This endpoint returns an array of the `LogIndex` objects of your organization.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_log_indexes(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                LogsIndexListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_log_indexes = Endpoint(
            settings={
                'response_type': (LogsIndexListResponse,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/indexes',
                'operation_id': 'list_log_indexes',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                },
                'attribute_map': {
                },
                'location_map': {
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_log_indexes
        )

        def __update_logs_index(
            self,
            name,
            **kwargs
        ):
            """Update an index  # noqa: E501

            Update an index as identified by its name. Returns the Index object passed in the request body when the request is successful.  Using the `PUT` method updates your index’s configuration by **replacing** your current configuration with the new one sent to your Datadog organization.  # 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_logs_index(name, async_req=True)
            >>> result = thread.get()

            Args:
                name (str): Name of the log index.

            Keyword Args:
                body (LogsIndex): Object containing the new &#x60;LogsIndex&#x60;.. [optional]
                _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 (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.
                _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:
                LogsIndex
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['name'] = \
                name
            return self.call_with_http_info(**kwargs)

        self.update_logs_index = Endpoint(
            settings={
                'response_type': (LogsIndex,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/indexes/{name}',
                'operation_id': 'update_logs_index',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'name',
                    'body',
                ],
                'required': [
                    'name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'name':
                        (str,),
                    'body':
                        (LogsIndex,),
                },
                'attribute_map': {
                    'name': 'name',
                },
                'location_map': {
                    'name': 'path',
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_logs_index
        )

        def __update_logs_index_order(
            self,
            **kwargs
        ):
            """Update indexes order  # noqa: E501

            This endpoint updates the index order of your organization. It returns the index order object passed in the request body when the request is successful.  # 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_logs_index_order(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                body (LogsIndexesOrder): Object containing the new ordered list of index names. [optional]
                _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 (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.
                _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:
                LogsIndexesOrder
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.update_logs_index_order = Endpoint(
            settings={
                'response_type': (LogsIndexesOrder,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/logs/config/index-order',
                'operation_id': 'update_logs_index_order',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (LogsIndexesOrder,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_logs_index_order
        )
Exemplo n.º 18
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_ip_ranges(self, **kwargs):
            """List IP Ranges  # noqa: E501

            Get information about Datadog IP ranges.  # 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_ip_ranges(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                IPRanges
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_ip_ranges = Endpoint(settings={
            'response_type': (IPRanges, ),
            'auth': [],
            'endpoint_path':
            '/',
            'operation_id':
            'get_ip_ranges',
            'http_method':
            'GET',
            'servers': [
                {
                    'url': "https://{subdomain}.{site}",
                    'description': "No description provided",
                    'variables': {
                        'site': {
                            'description':
                            "The regional site for our customers.",
                            'default_value': "datadoghq.com",
                            'enum_values': ["datadoghq.com", "datadoghq.eu"]
                        },
                        'subdomain': {
                            'description':
                            "The subdomain where the API is deployed.",
                            'default_value': "ip-ranges",
                        }
                    }
                },
                {
                    'url': "{protocol}://{name}",
                    'description': "No description provided",
                    'variables': {
                        'name': {
                            'description': "Full site DNS name.",
                            'default_value': "ip-ranges.datadoghq.com",
                        },
                        'protocol': {
                            'description':
                            "The protocol for accessing the API.",
                            'default_value': "https",
                        }
                    }
                },
            ]
        },
                                      params_map={
                                          'all': [],
                                          'required': [],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {},
                                          'attribute_map': {},
                                          'location_map': {},
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__get_ip_ranges)
Exemplo n.º 19
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._get_host_totals_endpoint = _Endpoint(
            settings={
                "response_type": (HostTotals,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/hosts/totals",
                "operation_id": "get_host_totals",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "_from",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "_from": (int,),
                },
                "attribute_map": {
                    "_from": "from",
                },
                "location_map": {
                    "_from": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_hosts_endpoint = _Endpoint(
            settings={
                "response_type": (HostListResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/hosts",
                "operation_id": "list_hosts",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "filter",
                    "sort_field",
                    "sort_dir",
                    "start",
                    "count",
                    "_from",
                    "include_muted_hosts_data",
                    "include_hosts_metadata",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "filter": (str,),
                    "sort_field": (str,),
                    "sort_dir": (str,),
                    "start": (int,),
                    "count": (int,),
                    "_from": (int,),
                    "include_muted_hosts_data": (bool,),
                    "include_hosts_metadata": (bool,),
                },
                "attribute_map": {
                    "filter": "filter",
                    "sort_field": "sort_field",
                    "sort_dir": "sort_dir",
                    "start": "start",
                    "count": "count",
                    "_from": "from",
                    "include_muted_hosts_data": "include_muted_hosts_data",
                    "include_hosts_metadata": "include_hosts_metadata",
                },
                "location_map": {
                    "filter": "query",
                    "sort_field": "query",
                    "sort_dir": "query",
                    "start": "query",
                    "count": "query",
                    "_from": "query",
                    "include_muted_hosts_data": "query",
                    "include_hosts_metadata": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._mute_host_endpoint = _Endpoint(
            settings={
                "response_type": (HostMuteResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/host/{host_name}/mute",
                "operation_id": "mute_host",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "host_name",
                    "body",
                ],
                "required": [
                    "host_name",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "host_name": (str,),
                    "body": (HostMuteSettings,),
                },
                "attribute_map": {
                    "host_name": "host_name",
                },
                "location_map": {
                    "host_name": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._unmute_host_endpoint = _Endpoint(
            settings={
                "response_type": (HostMuteResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/host/{host_name}/unmute",
                "operation_id": "unmute_host",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "host_name",
                ],
                "required": [
                    "host_name",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "host_name": (str,),
                },
                "attribute_map": {
                    "host_name": "host_name",
                },
                "location_map": {
                    "host_name": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )
Exemplo n.º 20
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_gcp_integration(self, body, **kwargs):
            """Create a GCP integration  # noqa: E501

            Create a Datadog-GCP integration.  # 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_gcp_integration(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (GCPAccount): Create a Datadog-GCP integration.

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_gcp_integration = Endpoint(
            settings={
                'response_type': ({
                    str: (bool, date, datetime, dict, float, int, list, str,
                          none_type)
                }, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path':
                '/api/v1/integration/gcp',
                'operation_id':
                'create_gcp_integration',
                'http_method':
                'POST',
                'servers':
                None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (GCPAccount, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__create_gcp_integration)

        def __delete_gcp_integration(self, body, **kwargs):
            """Delete a GCP integration  # noqa: E501

            Delete a given Datadog-GCP integration.  # 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_gcp_integration(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (GCPAccount): Delete a given Datadog-GCP integration.

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.delete_gcp_integration = Endpoint(
            settings={
                'response_type': ({
                    str: (bool, date, datetime, dict, float, int, list, str,
                          none_type)
                }, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path':
                '/api/v1/integration/gcp',
                'operation_id':
                'delete_gcp_integration',
                'http_method':
                'DELETE',
                'servers':
                None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (GCPAccount, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__delete_gcp_integration)

        def __list_gcp_integration(self, **kwargs):
            """List all GCP integrations  # noqa: E501

            List all Datadog-GCP integrations configured in your Datadog 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.list_gcp_integration(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                GCPAccountListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_gcp_integration = Endpoint(settings={
            'response_type': (GCPAccountListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/integration/gcp',
            'operation_id':
            'list_gcp_integration',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                             params_map={
                                                 'all': [],
                                                 'required': [],
                                                 'nullable': [],
                                                 'enum': [],
                                                 'validation': []
                                             },
                                             root_map={
                                                 'validations': {},
                                                 'allowed_values': {},
                                                 'openapi_types': {},
                                                 'attribute_map': {},
                                                 'location_map': {},
                                                 'collection_format_map': {}
                                             },
                                             headers_map={
                                                 'accept':
                                                 ['application/json'],
                                                 'content_type': [],
                                             },
                                             api_client=api_client,
                                             callable=__list_gcp_integration)

        def __update_gcp_integration(self, body, **kwargs):
            """Update a GCP integration  # noqa: E501

            Update a Datadog-GCP integrations host_filters and/or auto-mute. Requires a `project_id` and `client_email`, however these fields cannot be updated. If you need to update these fields, delete and use the create (`POST`) endpoint. The unspecified fields will keep their original values.  # 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_gcp_integration(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (GCPAccount): Update a Datadog-GCP integration.

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_gcp_integration = Endpoint(
            settings={
                'response_type': ({
                    str: (bool, date, datetime, dict, float, int, list, str,
                          none_type)
                }, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path':
                '/api/v1/integration/gcp',
                'operation_id':
                'update_gcp_integration',
                'http_method':
                'PUT',
                'servers':
                None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (GCPAccount, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__update_gcp_integration)
Exemplo n.º 21
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_host_totals(
            self,
            **kwargs
        ):
            """Get the total number of active hosts  # noqa: E501

            This endpoint returns the total number of active and up hosts in your Datadog account. Active means the host has reported in the past hour, and up means it has reported in the past two hours.  # 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_host_totals(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                _from (int): Number of seconds from which you want to get total number of active hosts.. [optional]
                _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 (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.
                _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:
                HostTotals
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_host_totals = Endpoint(
            settings={
                'response_type': (HostTotals,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/hosts/totals',
                'operation_id': 'get_host_totals',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    '_from',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    '_from':
                        (int,),
                },
                'attribute_map': {
                    '_from': 'from',
                },
                'location_map': {
                    '_from': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_host_totals
        )

        def __list_hosts(
            self,
            **kwargs
        ):
            """Get all hosts for your organization  # noqa: E501

            This endpoint allows searching for hosts by name, alias, or tag. Hosts live within the past 3 hours are included by default. Retention is 7 days. Results are paginated with a max of 1000 results at a time.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_hosts(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                filter (str): String to filter search results.. [optional]
                sort_field (str): Sort hosts by this field.. [optional]
                sort_dir (str): Direction of sort. Options include &#x60;asc&#x60; and &#x60;desc&#x60;.. [optional]
                start (int): Host result to start search from.. [optional]
                count (int): Number of hosts to return. Max 1000.. [optional]
                _from (int): Number of seconds since UNIX epoch from which you want to search your hosts.. [optional]
                include_muted_hosts_data (bool): Include information on the muted status of hosts and when the mute expires.. [optional]
                include_hosts_metadata (bool): Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.).. [optional]
                _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 (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.
                _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:
                HostListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_hosts = Endpoint(
            settings={
                'response_type': (HostListResponse,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/hosts',
                'operation_id': 'list_hosts',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'filter',
                    'sort_field',
                    'sort_dir',
                    'start',
                    'count',
                    '_from',
                    'include_muted_hosts_data',
                    'include_hosts_metadata',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'filter':
                        (str,),
                    'sort_field':
                        (str,),
                    'sort_dir':
                        (str,),
                    'start':
                        (int,),
                    'count':
                        (int,),
                    '_from':
                        (int,),
                    'include_muted_hosts_data':
                        (bool,),
                    'include_hosts_metadata':
                        (bool,),
                },
                'attribute_map': {
                    'filter': 'filter',
                    'sort_field': 'sort_field',
                    'sort_dir': 'sort_dir',
                    'start': 'start',
                    'count': 'count',
                    '_from': 'from',
                    'include_muted_hosts_data': 'include_muted_hosts_data',
                    'include_hosts_metadata': 'include_hosts_metadata',
                },
                'location_map': {
                    'filter': 'query',
                    'sort_field': 'query',
                    'sort_dir': 'query',
                    'start': 'query',
                    'count': 'query',
                    '_from': 'query',
                    'include_muted_hosts_data': 'query',
                    'include_hosts_metadata': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_hosts
        )

        def __mute_host(
            self,
            host_name,
            **kwargs
        ):
            """Mute a host  # noqa: E501

            Mute a host.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.mute_host(host_name, async_req=True)
            >>> result = thread.get()

            Args:
                host_name (str): Name of the host to mute.

            Keyword Args:
                body (HostMuteSettings): Mute a host request body.. [optional]
                _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 (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.
                _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:
                HostMuteResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['host_name'] = \
                host_name
            return self.call_with_http_info(**kwargs)

        self.mute_host = Endpoint(
            settings={
                'response_type': (HostMuteResponse,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/host/{host_name}/mute',
                'operation_id': 'mute_host',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'host_name',
                    'body',
                ],
                'required': [
                    'host_name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'host_name':
                        (str,),
                    'body':
                        (HostMuteSettings,),
                },
                'attribute_map': {
                    'host_name': 'host_name',
                },
                'location_map': {
                    'host_name': 'path',
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__mute_host
        )

        def __unmute_host(
            self,
            host_name,
            **kwargs
        ):
            """Unmute a host  # noqa: E501

            Unmutes a host. This endpoint takes no JSON arguments.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.unmute_host(host_name, async_req=True)
            >>> result = thread.get()

            Args:
                host_name (str): Name of the host to unmute.

            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 (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.
                _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:
                HostMuteResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['host_name'] = \
                host_name
            return self.call_with_http_info(**kwargs)

        self.unmute_host = Endpoint(
            settings={
                'response_type': (HostMuteResponse,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/host/{host_name}/unmute',
                'operation_id': 'unmute_host',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'host_name',
                ],
                'required': [
                    'host_name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'host_name':
                        (str,),
                },
                'attribute_map': {
                    'host_name': 'host_name',
                },
                'location_map': {
                    'host_name': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__unmute_host
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __validate(self, **kwargs):
            """Validate API key  # noqa: E501

            Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.validate(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                AuthenticationValidationResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.validate = Endpoint(settings={
            'response_type': (AuthenticationValidationResponse, ),
            'auth': ['apiKeyAuth'],
            'endpoint_path':
            '/api/v1/validate',
            'operation_id':
            'validate',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                 params_map={
                                     'all': [],
                                     'required': [],
                                     'nullable': [],
                                     'enum': [],
                                     'validation': []
                                 },
                                 root_map={
                                     'validations': {},
                                     'allowed_values': {},
                                     'openapi_types': {},
                                     'attribute_map': {},
                                     'location_map': {},
                                     'collection_format_map': {}
                                 },
                                 headers_map={
                                     'accept': ['application/json'],
                                     'content_type': [],
                                 },
                                 api_client=api_client,
                                 callable=__validate)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_host_tags(self, host_name, body, **kwargs):
            """Add tags to a host  # noqa: E501

            This endpoint allows you to add new tags to a host, optionally specifying where these tags come from.  # 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_host_tags(host_name, body, async_req=True)
            >>> result = thread.get()

            Args:
                host_name (str): This endpoint allows you to add new tags to a host, optionally specifying where the tags came from.
                body (HostTags): Update host tags request body.

            Keyword Args:
                source (str): The source of the tags. [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).. [optional]
                _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 (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.
                _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:
                HostTags
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['host_name'] = \
                host_name
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_host_tags = Endpoint(settings={
            'response_type': (HostTags, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/tags/hosts/{host_name}',
            'operation_id': 'create_host_tags',
            'http_method': 'POST',
            'servers': None,
        },
                                         params_map={
                                             'all': [
                                                 'host_name',
                                                 'body',
                                                 'source',
                                             ],
                                             'required': [
                                                 'host_name',
                                                 'body',
                                             ],
                                             'nullable': [],
                                             'enum': [],
                                             'validation': []
                                         },
                                         root_map={
                                             'validations': {},
                                             'allowed_values': {},
                                             'openapi_types': {
                                                 'host_name': (str, ),
                                                 'body': (HostTags, ),
                                                 'source': (str, ),
                                             },
                                             'attribute_map': {
                                                 'host_name': 'host_name',
                                                 'source': 'source',
                                             },
                                             'location_map': {
                                                 'host_name': 'path',
                                                 'body': 'body',
                                                 'source': 'query',
                                             },
                                             'collection_format_map': {}
                                         },
                                         headers_map={
                                             'accept': ['application/json'],
                                             'content_type':
                                             ['application/json']
                                         },
                                         api_client=api_client,
                                         callable=__create_host_tags)

        def __delete_host_tags(self, host_name, **kwargs):
            """Remove host tags  # noqa: E501

            This endpoint allows you to remove all user-assigned tags for a single host.  # 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_host_tags(host_name, async_req=True)
            >>> result = thread.get()

            Args:
                host_name (str): This endpoint allows you to remove all user-assigned tags for a single host.

            Keyword Args:
                source (str): The source of the tags (e.g. chef, puppet). [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).. [optional]
                _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 (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.
                _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:
                None
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['host_name'] = \
                host_name
            return self.call_with_http_info(**kwargs)

        self.delete_host_tags = Endpoint(settings={
            'response_type': None,
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/tags/hosts/{host_name}',
            'operation_id': 'delete_host_tags',
            'http_method': 'DELETE',
            'servers': None,
        },
                                         params_map={
                                             'all': [
                                                 'host_name',
                                                 'source',
                                             ],
                                             'required': [
                                                 'host_name',
                                             ],
                                             'nullable': [],
                                             'enum': [],
                                             'validation': []
                                         },
                                         root_map={
                                             'validations': {},
                                             'allowed_values': {},
                                             'openapi_types': {
                                                 'host_name': (str, ),
                                                 'source': (str, ),
                                             },
                                             'attribute_map': {
                                                 'host_name': 'host_name',
                                                 'source': 'source',
                                             },
                                             'location_map': {
                                                 'host_name': 'path',
                                                 'source': 'query',
                                             },
                                             'collection_format_map': {}
                                         },
                                         headers_map={
                                             'accept': ['application/json'],
                                             'content_type': [],
                                         },
                                         api_client=api_client,
                                         callable=__delete_host_tags)

        def __get_host_tags(self, host_name, **kwargs):
            """Get host tags  # noqa: E501

            Return the list of tags that apply to a given host.  # 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_host_tags(host_name, async_req=True)
            >>> result = thread.get()

            Args:
                host_name (str): When specified, filters list of tags to those tags with the specified source.

            Keyword Args:
                source (str): Source to filter.. [optional]
                _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 (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.
                _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:
                HostTags
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['host_name'] = \
                host_name
            return self.call_with_http_info(**kwargs)

        self.get_host_tags = Endpoint(settings={
            'response_type': (HostTags, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/tags/hosts/{host_name}',
            'operation_id': 'get_host_tags',
            'http_method': 'GET',
            'servers': None,
        },
                                      params_map={
                                          'all': [
                                              'host_name',
                                              'source',
                                          ],
                                          'required': [
                                              'host_name',
                                          ],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'host_name': (str, ),
                                              'source': (str, ),
                                          },
                                          'attribute_map': {
                                              'host_name': 'host_name',
                                              'source': 'source',
                                          },
                                          'location_map': {
                                              'host_name': 'path',
                                              'source': 'query',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__get_host_tags)

        def __list_host_tags(self, **kwargs):
            """Get Tags  # noqa: E501

            Return a mapping of tags to hosts for your whole infrastructure.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_host_tags(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                source (str): When specified, filters host list to those tags with the specified source.. [optional]
                _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 (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.
                _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:
                TagToHosts
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_host_tags = Endpoint(settings={
            'response_type': (TagToHosts, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/tags/hosts',
            'operation_id': 'list_host_tags',
            'http_method': 'GET',
            'servers': None,
        },
                                       params_map={
                                           'all': [
                                               'source',
                                           ],
                                           'required': [],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'source': (str, ),
                                           },
                                           'attribute_map': {
                                               'source': 'source',
                                           },
                                           'location_map': {
                                               'source': 'query',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__list_host_tags)

        def __update_host_tags(self, host_name, body, **kwargs):
            """Update host tags  # noqa: E501

            This endpoint allows you to update/replace all tags in an integration source with those supplied in the request.  # 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_host_tags(host_name, body, async_req=True)
            >>> result = thread.get()

            Args:
                host_name (str): This endpoint allows you to update/replace all in an integration source with those supplied in the request.
                body (HostTags): Add tags to host

            Keyword Args:
                source (str): The source of the tags (e.g. chef, puppet). [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value). [optional]
                _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 (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.
                _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:
                HostTags
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['host_name'] = \
                host_name
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_host_tags = Endpoint(settings={
            'response_type': (HostTags, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/tags/hosts/{host_name}',
            'operation_id': 'update_host_tags',
            'http_method': 'PUT',
            'servers': None,
        },
                                         params_map={
                                             'all': [
                                                 'host_name',
                                                 'body',
                                                 'source',
                                             ],
                                             'required': [
                                                 'host_name',
                                                 'body',
                                             ],
                                             'nullable': [],
                                             'enum': [],
                                             'validation': []
                                         },
                                         root_map={
                                             'validations': {},
                                             'allowed_values': {},
                                             'openapi_types': {
                                                 'host_name': (str, ),
                                                 'body': (HostTags, ),
                                                 'source': (str, ),
                                             },
                                             'attribute_map': {
                                                 'host_name': 'host_name',
                                                 'source': 'source',
                                             },
                                             'location_map': {
                                                 'host_name': 'path',
                                                 'body': 'body',
                                                 'source': 'query',
                                             },
                                             'collection_format_map': {}
                                         },
                                         headers_map={
                                             'accept': ['application/json'],
                                             'content_type':
                                             ['application/json']
                                         },
                                         api_client=api_client,
                                         callable=__update_host_tags)
Exemplo n.º 24
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._create_notebook_endpoint = _Endpoint(
            settings={
                "response_type": (NotebookResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/notebooks",
                "operation_id": "create_notebook",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (NotebookCreateRequest, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._delete_notebook_endpoint = _Endpoint(
            settings={
                "response_type": None,
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/notebooks/{notebook_id}",
                "operation_id": "delete_notebook",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "notebook_id",
                ],
                "required": [
                    "notebook_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "notebook_id": (int, ),
                },
                "attribute_map": {
                    "notebook_id": "notebook_id",
                },
                "location_map": {
                    "notebook_id": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_notebook_endpoint = _Endpoint(
            settings={
                "response_type": (NotebookResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/notebooks/{notebook_id}",
                "operation_id": "get_notebook",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "notebook_id",
                ],
                "required": [
                    "notebook_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "notebook_id": (int, ),
                },
                "attribute_map": {
                    "notebook_id": "notebook_id",
                },
                "location_map": {
                    "notebook_id": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_notebooks_endpoint = _Endpoint(
            settings={
                "response_type": (NotebooksResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/notebooks",
                "operation_id": "list_notebooks",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "author_handle",
                    "exclude_author_handle",
                    "start",
                    "count",
                    "sort_field",
                    "sort_dir",
                    "query",
                    "include_cells",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "author_handle": (str, ),
                    "exclude_author_handle": (str, ),
                    "start": (int, ),
                    "count": (int, ),
                    "sort_field": (str, ),
                    "sort_dir": (str, ),
                    "query": (str, ),
                    "include_cells": (bool, ),
                },
                "attribute_map": {
                    "author_handle": "author_handle",
                    "exclude_author_handle": "exclude_author_handle",
                    "start": "start",
                    "count": "count",
                    "sort_field": "sort_field",
                    "sort_dir": "sort_dir",
                    "query": "query",
                    "include_cells": "include_cells",
                },
                "location_map": {
                    "author_handle": "query",
                    "exclude_author_handle": "query",
                    "start": "query",
                    "count": "query",
                    "sort_field": "query",
                    "sort_dir": "query",
                    "query": "query",
                    "include_cells": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_notebook_endpoint = _Endpoint(
            settings={
                "response_type": (NotebookResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/notebooks/{notebook_id}",
                "operation_id": "update_notebook",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "notebook_id",
                    "body",
                ],
                "required": [
                    "notebook_id",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "notebook_id": (int, ),
                    "body": (NotebookUpdateRequest, ),
                },
                "attribute_map": {
                    "notebook_id": "notebook_id",
                },
                "location_map": {
                    "notebook_id": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._create_gcp_integration_endpoint = _Endpoint(
            settings={
                "response_type": ({
                    str: (bool, date, datetime, dict, float, int, list, str,
                          none_type)
                }, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/gcp",
                "operation_id":
                "create_gcp_integration",
                "http_method":
                "POST",
                "servers":
                None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (GCPAccount, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._delete_gcp_integration_endpoint = _Endpoint(
            settings={
                "response_type": ({
                    str: (bool, date, datetime, dict, float, int, list, str,
                          none_type)
                }, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/gcp",
                "operation_id":
                "delete_gcp_integration",
                "http_method":
                "DELETE",
                "servers":
                None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (GCPAccount, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )

        self._list_gcp_integration_endpoint = _Endpoint(
            settings={
                "response_type": (GCPAccountListResponse, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/integration/gcp",
                "operation_id": "list_gcp_integration",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": []
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_gcp_integration_endpoint = _Endpoint(
            settings={
                "response_type": ({
                    str: (bool, date, datetime, dict, float, int, list, str,
                          none_type)
                }, ),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path":
                "/api/v1/integration/gcp",
                "operation_id":
                "update_gcp_integration",
                "http_method":
                "PUT",
                "servers":
                None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (GCPAccount, ),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": ["application/json"]
            },
            api_client=api_client,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __check_aws_logs_lambda_async(
            self,
            body,
            **kwargs
        ):
            """Check that an AWS Lambda Function exists  # noqa: E501

            Test if permissions are present to add a log-forwarding triggers for the given services and AWS account. The input is the same as for Enable an AWS service log collection. Subsequent requests will always repeat the above, so this endpoint can be polled intermittently instead of blocking.  - Returns a status of 'created' when it's checking if the Lambda exists in the account. - Returns a status of 'waiting' while checking. - Returns a status of 'checked and ok' if the Lambda exists. - Returns a status of 'error' if the Lambda does not exist.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.check_aws_logs_lambda_async(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccountAndLambdaRequest): Check AWS Log Lambda Async request body.

            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 (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.
                _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:
                AWSLogsAsyncResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.check_aws_logs_lambda_async = Endpoint(
            settings={
                'response_type': (AWSLogsAsyncResponse,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs/check_async',
                'operation_id': 'check_aws_logs_lambda_async',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (AWSAccountAndLambdaRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__check_aws_logs_lambda_async
        )

        def __check_aws_logs_services_async(
            self,
            body,
            **kwargs
        ):
            """Check permissions for log services  # noqa: E501

            Test if permissions are present to add log-forwarding triggers for the given services and AWS account. Input is the same as for `EnableAWSLogServices`. Done async, so can be repeatedly polled in a non-blocking fashion until the async request completes.  - Returns a status of `created` when it's checking if the permissions exists   in the AWS account. - Returns a status of `waiting` while checking. - Returns a status of `checked and ok` if the Lambda exists. - Returns a status of `error` if the Lambda does not exist.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.check_aws_logs_services_async(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSLogsServicesRequest): Check AWS Logs Async Services request body.

            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 (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.
                _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:
                AWSLogsAsyncResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.check_aws_logs_services_async = Endpoint(
            settings={
                'response_type': (AWSLogsAsyncResponse,),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs/services_async',
                'operation_id': 'check_aws_logs_services_async',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (AWSLogsServicesRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__check_aws_logs_services_async
        )

        def __create_aws_lambda_arn(
            self,
            body,
            **kwargs
        ):
            """Add AWS Log Lambda ARN  # noqa: E501

            Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection.  # 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_aws_lambda_arn(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccountAndLambdaRequest): AWS Log Lambda Async request body.

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_aws_lambda_arn = Endpoint(
            settings={
                'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs',
                'operation_id': 'create_aws_lambda_arn',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (AWSAccountAndLambdaRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_aws_lambda_arn
        )

        def __delete_aws_lambda_arn(
            self,
            body,
            **kwargs
        ):
            """Delete an AWS Logs integration  # noqa: E501

            Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS 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.delete_aws_lambda_arn(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccountAndLambdaRequest): Delete AWS Lambda ARN request body.

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.delete_aws_lambda_arn = Endpoint(
            settings={
                'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs',
                'operation_id': 'delete_aws_lambda_arn',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (AWSAccountAndLambdaRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__delete_aws_lambda_arn
        )

        def __enable_aws_log_services(
            self,
            body,
            **kwargs
        ):
            """Enable an AWS Logs integration  # noqa: E501

            Enable automatic log collection for a list of services. This should be run after running `CreateAWSLambdaARN` to save the configuration.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.enable_aws_log_services(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSLogsServicesRequest): Enable AWS Log Services request body.

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.enable_aws_log_services = Endpoint(
            settings={
                'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs/services',
                'operation_id': 'enable_aws_log_services',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'body':
                        (AWSLogsServicesRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__enable_aws_log_services
        )

        def __list_aws_logs_integrations(
            self,
            **kwargs
        ):
            """List all AWS Logs integrations  # noqa: E501

            List all Datadog-AWS Logs integrations configured in your Datadog 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.list_aws_logs_integrations(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                [AWSLogsListResponse]
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_aws_logs_integrations = Endpoint(
            settings={
                'response_type': ([AWSLogsListResponse],),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs',
                'operation_id': 'list_aws_logs_integrations',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                },
                'attribute_map': {
                },
                'location_map': {
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_aws_logs_integrations
        )

        def __list_aws_logs_services(
            self,
            **kwargs
        ):
            """Get list of AWS log ready services  # noqa: E501

            Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_aws_logs_services(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                [AWSLogsListServicesResponse]
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_aws_logs_services = Endpoint(
            settings={
                'response_type': ([AWSLogsListServicesResponse],),
                'auth': [
                    'apiKeyAuth',
                    'appKeyAuth'
                ],
                'endpoint_path': '/api/v1/integration/aws/logs/services',
                'operation_id': 'list_aws_logs_services',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                },
                'attribute_map': {
                },
                'location_map': {
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_aws_logs_services
        )
Exemplo n.º 27
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_aws_account(self, body, **kwargs):
            """Create an AWS integration  # noqa: E501

            Create a Datadog-Amazon Web Services integration. Using the `POST` method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization. A unique AWS Account ID for role based authentication.  # 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_aws_account(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccount): AWS Request Object

            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 (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.
                _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:
                AWSAccountCreateResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_aws_account = Endpoint(settings={
            'response_type': (AWSAccountCreateResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/integration/aws',
            'operation_id':
            'create_aws_account',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                           params_map={
                                               'all': [
                                                   'body',
                                               ],
                                               'required': [
                                                   'body',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'body': (AWSAccount, ),
                                               },
                                               'attribute_map': {},
                                               'location_map': {
                                                   'body': 'body',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__create_aws_account)

        def __create_new_aws_external_id(self, body, **kwargs):
            """Generate a new external ID  # noqa: E501

            Generate a new AWS external ID for a given AWS account ID and role name pair.  # 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_new_aws_external_id(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccount): Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://github.com/DataDog/documentation/blob/master/integrations/amazon_web_services/#installation).

            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 (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.
                _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:
                AWSAccountCreateResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_new_aws_external_id = Endpoint(
            settings={
                'response_type': (AWSAccountCreateResponse, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path':
                '/api/v1/integration/aws/generate_new_external_id',
                'operation_id': 'create_new_aws_external_id',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (AWSAccount, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__create_new_aws_external_id)

        def __delete_aws_account(self, body, **kwargs):
            """Delete an AWS integration  # noqa: E501

            Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`.  # 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_aws_account(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccount): AWS request object

            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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.delete_aws_account = Endpoint(settings={
            'response_type': ({
                str:
                (bool, date, datetime, dict, float, int, list, str, none_type)
            }, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/integration/aws',
            'operation_id':
            'delete_aws_account',
            'http_method':
            'DELETE',
            'servers':
            None,
        },
                                           params_map={
                                               'all': [
                                                   'body',
                                               ],
                                               'required': [
                                                   'body',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'body': (AWSAccount, ),
                                               },
                                               'attribute_map': {},
                                               'location_map': {
                                                   'body': 'body',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__delete_aws_account)

        def __list_available_aws_namespaces(self, **kwargs):
            """List namespace rules  # noqa: E501

            List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_available_aws_namespaces(async_req=True)
            >>> result = thread.get()


            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 (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.
                _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:
                [str]
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_available_aws_namespaces = Endpoint(
            settings={
                'response_type': ([str], ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path':
                '/api/v1/integration/aws/available_namespace_rules',
                'operation_id': 'list_available_aws_namespaces',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [],
                'required': [],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {},
                'attribute_map': {},
                'location_map': {},
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_available_aws_namespaces)

        def __list_aws_accounts(self, **kwargs):
            """List all AWS integrations  # noqa: E501

            List all Datadog-AWS integrations available in your Datadog organization.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_aws_accounts(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                account_id (str): Only return AWS accounts that matches this &#x60;account_id&#x60;.. [optional]
                role_name (str): Only return AWS accounts that matches this role_name.. [optional]
                access_key_id (str): Only return AWS accounts that matches this &#x60;access_key_id&#x60;.. [optional]
                _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 (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.
                _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:
                AWSAccountListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.list_aws_accounts = Endpoint(settings={
            'response_type': (AWSAccountListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/integration/aws',
            'operation_id':
            'list_aws_accounts',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                          params_map={
                                              'all': [
                                                  'account_id',
                                                  'role_name',
                                                  'access_key_id',
                                              ],
                                              'required': [],
                                              'nullable': [],
                                              'enum': [],
                                              'validation': []
                                          },
                                          root_map={
                                              'validations': {},
                                              'allowed_values': {},
                                              'openapi_types': {
                                                  'account_id': (str, ),
                                                  'role_name': (str, ),
                                                  'access_key_id': (str, ),
                                              },
                                              'attribute_map': {
                                                  'account_id': 'account_id',
                                                  'role_name': 'role_name',
                                                  'access_key_id':
                                                  'access_key_id',
                                              },
                                              'location_map': {
                                                  'account_id': 'query',
                                                  'role_name': 'query',
                                                  'access_key_id': 'query',
                                              },
                                              'collection_format_map': {}
                                          },
                                          headers_map={
                                              'accept': ['application/json'],
                                              'content_type': [],
                                          },
                                          api_client=api_client,
                                          callable=__list_aws_accounts)

        def __update_aws_account(self, body, **kwargs):
            """Update an AWS integration  # noqa: E501

            Update a Datadog-Amazon Web Services integration.  # 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_aws_account(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (AWSAccount): AWS request object

            Keyword Args:
                account_id (str): Only return AWS accounts that matches this &#x60;account_id&#x60;.. [optional]
                role_name (str): Only return AWS accounts that match this &#x60;role_name&#x60;. Required if &#x60;account_id&#x60; is specified.. [optional]
                access_key_id (str): Only return AWS accounts that matches this &#x60;access_key_id&#x60;. Required if none of the other two options are specified.. [optional]
                _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 (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.
                _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:
                {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_aws_account = Endpoint(settings={
            'response_type': ({
                str:
                (bool, date, datetime, dict, float, int, list, str, none_type)
            }, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/integration/aws',
            'operation_id':
            'update_aws_account',
            'http_method':
            'PUT',
            'servers':
            None,
        },
                                           params_map={
                                               'all': [
                                                   'body',
                                                   'account_id',
                                                   'role_name',
                                                   'access_key_id',
                                               ],
                                               'required': [
                                                   'body',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'body': (AWSAccount, ),
                                                   'account_id': (str, ),
                                                   'role_name': (str, ),
                                                   'access_key_id': (str, ),
                                               },
                                               'attribute_map': {
                                                   'account_id':
                                                   'account_id',
                                                   'role_name':
                                                   'role_name',
                                                   'access_key_id':
                                                   'access_key_id',
                                               },
                                               'location_map': {
                                                   'body': 'body',
                                                   'account_id': 'query',
                                                   'role_name': 'query',
                                                   'access_key_id': 'query',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__update_aws_account)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_metric_metadata(self, metric_name, **kwargs):
            """Get metric metadata  # noqa: E501

            Get metadata about a specific metric.  # 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_metric_metadata(metric_name, async_req=True)
            >>> result = thread.get()

            Args:
                metric_name (str): Name of the metric for which to get metadata.

            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 (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.
                _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:
                MetricMetadata
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['metric_name'] = \
                metric_name
            return self.call_with_http_info(**kwargs)

        self.get_metric_metadata = Endpoint(settings={
            'response_type': (MetricMetadata, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/metrics/{metric_name}',
            'operation_id':
            'get_metric_metadata',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                            params_map={
                                                'all': [
                                                    'metric_name',
                                                ],
                                                'required': [
                                                    'metric_name',
                                                ],
                                                'nullable': [],
                                                'enum': [],
                                                'validation': []
                                            },
                                            root_map={
                                                'validations': {},
                                                'allowed_values': {},
                                                'openapi_types': {
                                                    'metric_name': (str, ),
                                                },
                                                'attribute_map': {
                                                    'metric_name':
                                                    'metric_name',
                                                },
                                                'location_map': {
                                                    'metric_name': 'path',
                                                },
                                                'collection_format_map': {}
                                            },
                                            headers_map={
                                                'accept': ['application/json'],
                                                'content_type': [],
                                            },
                                            api_client=api_client,
                                            callable=__get_metric_metadata)

        def __list_active_metrics(self, _from, **kwargs):
            """Get active metrics list  # noqa: E501

            Get the list of actively reporting metrics from a given time until now.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_active_metrics(_from, async_req=True)
            >>> result = thread.get()

            Args:
                _from (int): Seconds since the Unix epoch.

            Keyword Args:
                host (str): Hostname for filtering the list of metrics returned. If set, metrics retrieved are those with the corresponding hostname tag.. [optional]
                _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 (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.
                _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:
                MetricsListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['_from'] = \
                _from
            return self.call_with_http_info(**kwargs)

        self.list_active_metrics = Endpoint(settings={
            'response_type': (MetricsListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/metrics',
            'operation_id':
            'list_active_metrics',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                            params_map={
                                                'all': [
                                                    '_from',
                                                    'host',
                                                ],
                                                'required': [
                                                    '_from',
                                                ],
                                                'nullable': [],
                                                'enum': [],
                                                'validation': []
                                            },
                                            root_map={
                                                'validations': {},
                                                'allowed_values': {},
                                                'openapi_types': {
                                                    '_from': (int, ),
                                                    'host': (str, ),
                                                },
                                                'attribute_map': {
                                                    '_from': 'from',
                                                    'host': 'host',
                                                },
                                                'location_map': {
                                                    '_from': 'query',
                                                    'host': 'query',
                                                },
                                                'collection_format_map': {}
                                            },
                                            headers_map={
                                                'accept': ['application/json'],
                                                'content_type': [],
                                            },
                                            api_client=api_client,
                                            callable=__list_active_metrics)

        def __list_metrics(self, q, **kwargs):
            """Search metrics  # noqa: E501

            Search for metrics from the last 24 hours in Datadog.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_metrics(q, async_req=True)
            >>> result = thread.get()

            Args:
                q (str): Query string to search metrics upon. Must be prefixed with `metrics:`.

            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 (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.
                _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:
                MetricSearchResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['q'] = \
                q
            return self.call_with_http_info(**kwargs)

        self.list_metrics = Endpoint(settings={
            'response_type': (MetricSearchResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/search',
            'operation_id': 'list_metrics',
            'http_method': 'GET',
            'servers': None,
        },
                                     params_map={
                                         'all': [
                                             'q',
                                         ],
                                         'required': [
                                             'q',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'q': (str, ),
                                         },
                                         'attribute_map': {
                                             'q': 'q',
                                         },
                                         'location_map': {
                                             'q': 'query',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__list_metrics)

        def __query_metrics(self, _from, to, query, **kwargs):
            """Query timeseries points  # noqa: E501

            Query timeseries points.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.query_metrics(_from, to, query, async_req=True)
            >>> result = thread.get()

            Args:
                _from (int): Start of the queried time period, seconds since the Unix epoch.
                to (int): End of the queried time period, seconds since the Unix epoch.
                query (str): Query string.

            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 (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.
                _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:
                MetricsQueryResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['_from'] = \
                _from
            kwargs['to'] = \
                to
            kwargs['query'] = \
                query
            return self.call_with_http_info(**kwargs)

        self.query_metrics = Endpoint(settings={
            'response_type': (MetricsQueryResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/query',
            'operation_id': 'query_metrics',
            'http_method': 'GET',
            'servers': None,
        },
                                      params_map={
                                          'all': [
                                              '_from',
                                              'to',
                                              'query',
                                          ],
                                          'required': [
                                              '_from',
                                              'to',
                                              'query',
                                          ],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {
                                              '_from': (int, ),
                                              'to': (int, ),
                                              'query': (str, ),
                                          },
                                          'attribute_map': {
                                              '_from': 'from',
                                              'to': 'to',
                                              'query': 'query',
                                          },
                                          'location_map': {
                                              '_from': 'query',
                                              'to': 'query',
                                              'query': 'query',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__query_metrics)

        def __update_metric_metadata(self, metric_name, body, **kwargs):
            """Edit metric metadata  # noqa: E501

            Edit metadata of a specific metric. Find out more about [supported types](https://docs.datadoghq.com/developers/metrics).  # 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_metric_metadata(metric_name, body, async_req=True)
            >>> result = thread.get()

            Args:
                metric_name (str): Name of the metric for which to edit metadata.
                body (MetricMetadata): New metadata.

            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 (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.
                _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:
                MetricMetadata
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['metric_name'] = \
                metric_name
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_metric_metadata = Endpoint(
            settings={
                'response_type': (MetricMetadata, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/metrics/{metric_name}',
                'operation_id': 'update_metric_metadata',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'metric_name',
                    'body',
                ],
                'required': [
                    'metric_name',
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'metric_name': (str, ),
                    'body': (MetricMetadata, ),
                },
                'attribute_map': {
                    'metric_name': 'metric_name',
                },
                'location_map': {
                    'metric_name': 'path',
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__update_metric_metadata)
Exemplo n.º 29
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        self._check_can_delete_slo_endpoint = _Endpoint(
            settings={
                "response_type": (CheckCanDeleteSLOResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo/can_delete",
                "operation_id": "check_can_delete_slo",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "ids",
                ],
                "required": [
                    "ids",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "ids": (str,),
                },
                "attribute_map": {
                    "ids": "ids",
                },
                "location_map": {
                    "ids": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._create_slo_endpoint = _Endpoint(
            settings={
                "response_type": (SLOListResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo",
                "operation_id": "create_slo",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (ServiceLevelObjectiveRequest,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._delete_slo_endpoint = _Endpoint(
            settings={
                "response_type": (SLODeleteResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo/{slo_id}",
                "operation_id": "delete_slo",
                "http_method": "DELETE",
                "servers": None,
            },
            params_map={
                "all": [
                    "slo_id",
                    "force",
                ],
                "required": [
                    "slo_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "slo_id": (str,),
                    "force": (str,),
                },
                "attribute_map": {
                    "slo_id": "slo_id",
                    "force": "force",
                },
                "location_map": {
                    "slo_id": "path",
                    "force": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._delete_slo_timeframe_in_bulk_endpoint = _Endpoint(
            settings={
                "response_type": (SLOBulkDeleteResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo/bulk_delete",
                "operation_id": "delete_slo_timeframe_in_bulk",
                "http_method": "POST",
                "servers": None,
            },
            params_map={
                "all": [
                    "body",
                ],
                "required": [
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "body": (SLOBulkDelete,),
                },
                "attribute_map": {},
                "location_map": {
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )

        self._get_slo_endpoint = _Endpoint(
            settings={
                "response_type": (SLOResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo/{slo_id}",
                "operation_id": "get_slo",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "slo_id",
                    "with_configured_alert_ids",
                ],
                "required": [
                    "slo_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "slo_id": (str,),
                    "with_configured_alert_ids": (bool,),
                },
                "attribute_map": {
                    "slo_id": "slo_id",
                    "with_configured_alert_ids": "with_configured_alert_ids",
                },
                "location_map": {
                    "slo_id": "path",
                    "with_configured_alert_ids": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._get_slo_history_endpoint = _Endpoint(
            settings={
                "response_type": (SLOHistoryResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo/{slo_id}/history",
                "operation_id": "get_slo_history",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "slo_id",
                    "from_ts",
                    "to_ts",
                    "target",
                ],
                "required": [
                    "slo_id",
                    "from_ts",
                    "to_ts",
                ],
                "nullable": [],
                "enum": [],
                "validation": [
                    "target",
                ],
            },
            root_map={
                "validations": {
                    ("target",): {
                        "exclusive_maximum": 100,
                        "exclusive_minimum": 0,
                    },
                },
                "allowed_values": {},
                "openapi_types": {
                    "slo_id": (str,),
                    "from_ts": (int,),
                    "to_ts": (int,),
                    "target": (float,),
                },
                "attribute_map": {
                    "slo_id": "slo_id",
                    "from_ts": "from_ts",
                    "to_ts": "to_ts",
                    "target": "target",
                },
                "location_map": {
                    "slo_id": "path",
                    "from_ts": "query",
                    "to_ts": "query",
                    "target": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._list_slos_endpoint = _Endpoint(
            settings={
                "response_type": (SLOListResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo",
                "operation_id": "list_slos",
                "http_method": "GET",
                "servers": None,
            },
            params_map={
                "all": [
                    "ids",
                    "query",
                    "tags_query",
                    "metrics_query",
                    "limit",
                    "offset",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "ids": (str,),
                    "query": (str,),
                    "tags_query": (str,),
                    "metrics_query": (str,),
                    "limit": (int,),
                    "offset": (int,),
                },
                "attribute_map": {
                    "ids": "ids",
                    "query": "query",
                    "tags_query": "tags_query",
                    "metrics_query": "metrics_query",
                    "limit": "limit",
                    "offset": "offset",
                },
                "location_map": {
                    "ids": "query",
                    "query": "query",
                    "tags_query": "query",
                    "metrics_query": "query",
                    "limit": "query",
                    "offset": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/json"],
                "content_type": [],
            },
            api_client=api_client,
        )

        self._update_slo_endpoint = _Endpoint(
            settings={
                "response_type": (SLOListResponse,),
                "auth": ["apiKeyAuth", "appKeyAuth"],
                "endpoint_path": "/api/v1/slo/{slo_id}",
                "operation_id": "update_slo",
                "http_method": "PUT",
                "servers": None,
            },
            params_map={
                "all": [
                    "slo_id",
                    "body",
                ],
                "required": [
                    "slo_id",
                    "body",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "slo_id": (str,),
                    "body": (ServiceLevelObjective,),
                },
                "attribute_map": {
                    "slo_id": "slo_id",
                },
                "location_map": {
                    "slo_id": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
            api_client=api_client,
        )
Exemplo n.º 30
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __check_can_delete_slo(self, ids, **kwargs):
            """Check if SLOs can be safely deleted  # noqa: E501

            Check if a SLO can be safely deleted. For example, assure an SLO can be deleted without disrupting a dashboard.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.check_can_delete_slo(ids, async_req=True)
            >>> result = thread.get()

            Args:
                ids (str): A comma separated list of the IDs of the service level objectives objects.

            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 (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.
                _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:
                CheckCanDeleteSLOResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['ids'] = \
                ids
            return self.call_with_http_info(**kwargs)

        self.check_can_delete_slo = Endpoint(settings={
            'response_type': (CheckCanDeleteSLOResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path':
            '/api/v1/slo/can_delete',
            'operation_id':
            'check_can_delete_slo',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                             params_map={
                                                 'all': [
                                                     'ids',
                                                 ],
                                                 'required': [
                                                     'ids',
                                                 ],
                                                 'nullable': [],
                                                 'enum': [],
                                                 'validation': []
                                             },
                                             root_map={
                                                 'validations': {},
                                                 'allowed_values': {},
                                                 'openapi_types': {
                                                     'ids': (str, ),
                                                 },
                                                 'attribute_map': {
                                                     'ids': 'ids',
                                                 },
                                                 'location_map': {
                                                     'ids': 'query',
                                                 },
                                                 'collection_format_map': {}
                                             },
                                             headers_map={
                                                 'accept':
                                                 ['application/json'],
                                                 'content_type': [],
                                             },
                                             api_client=api_client,
                                             callable=__check_can_delete_slo)

        def __create_slo(self, body, **kwargs):
            """Create a SLO object  # noqa: E501

            Create a service level objective object.  # 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_slo(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (ServiceLevelObjectiveRequest): Service level objective request object.

            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 (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.
                _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:
                SLOListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.create_slo = Endpoint(settings={
            'response_type': (SLOListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/slo',
            'operation_id': 'create_slo',
            'http_method': 'POST',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'body',
                                       ],
                                       'required': [
                                           'body',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'body':
                                           (ServiceLevelObjectiveRequest, ),
                                       },
                                       'attribute_map': {},
                                       'location_map': {
                                           'body': 'body',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': ['application/json']
                                   },
                                   api_client=api_client,
                                   callable=__create_slo)

        def __delete_slo(self, slo_id, **kwargs):
            """Delete a SLO  # noqa: E501

            Permanently delete the specified service level objective object.  If an SLO is used in a dashboard, the `DELETE /v1/slo/` endpoint returns a 409 conflict error because the SLO is referenced in a dashboard.  # 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_slo(slo_id, async_req=True)
            >>> result = thread.get()

            Args:
                slo_id (str): The ID of the service level objective.

            Keyword Args:
                force (str): Delete the monitor even if it's referenced by other resources (e.g. SLO, composite monitor).. [optional]
                _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 (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.
                _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:
                SLODeleteResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['slo_id'] = \
                slo_id
            return self.call_with_http_info(**kwargs)

        self.delete_slo = Endpoint(settings={
            'response_type': (SLODeleteResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/slo/{slo_id}',
            'operation_id': 'delete_slo',
            'http_method': 'DELETE',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'slo_id',
                                           'force',
                                       ],
                                       'required': [
                                           'slo_id',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'slo_id': (str, ),
                                           'force': (str, ),
                                       },
                                       'attribute_map': {
                                           'slo_id': 'slo_id',
                                           'force': 'force',
                                       },
                                       'location_map': {
                                           'slo_id': 'path',
                                           'force': 'query',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': [],
                                   },
                                   api_client=api_client,
                                   callable=__delete_slo)

        def __delete_slo_timeframe_in_bulk(self, body, **kwargs):
            """Bulk Delete SLO Timeframes  # noqa: E501

            Delete (or partially delete) multiple service level objective objects.  This endpoint facilitates deletion of one or more thresholds for one or more service level objective objects. If all thresholds are deleted, the service level objective object is deleted as well.  # 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_slo_timeframe_in_bulk(body, async_req=True)
            >>> result = thread.get()

            Args:
                body (SLOBulkDelete): Delete multiple service level objective objects request body.

            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 (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.
                _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:
                SLOBulkDeleteResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.delete_slo_timeframe_in_bulk = Endpoint(
            settings={
                'response_type': (SLOBulkDeleteResponse, ),
                'auth': ['apiKeyAuth', 'appKeyAuth'],
                'endpoint_path': '/api/v1/slo/bulk_delete',
                'operation_id': 'delete_slo_timeframe_in_bulk',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'body',
                ],
                'required': [
                    'body',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'body': (SLOBulkDelete, ),
                },
                'attribute_map': {},
                'location_map': {
                    'body': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__delete_slo_timeframe_in_bulk)

        def __get_slo(self, slo_id, **kwargs):
            """Get a SLO's details  # noqa: E501

            Get a service level objective object.  # 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_slo(slo_id, async_req=True)
            >>> result = thread.get()

            Args:
                slo_id (str): The ID of the service level objective object.

            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 (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.
                _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:
                SLOResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['slo_id'] = \
                slo_id
            return self.call_with_http_info(**kwargs)

        self.get_slo = Endpoint(settings={
            'response_type': (SLOResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/slo/{slo_id}',
            'operation_id': 'get_slo',
            'http_method': 'GET',
            'servers': None,
        },
                                params_map={
                                    'all': [
                                        'slo_id',
                                    ],
                                    'required': [
                                        'slo_id',
                                    ],
                                    'nullable': [],
                                    'enum': [],
                                    'validation': []
                                },
                                root_map={
                                    'validations': {},
                                    'allowed_values': {},
                                    'openapi_types': {
                                        'slo_id': (str, ),
                                    },
                                    'attribute_map': {
                                        'slo_id': 'slo_id',
                                    },
                                    'location_map': {
                                        'slo_id': 'path',
                                    },
                                    'collection_format_map': {}
                                },
                                headers_map={
                                    'accept': ['application/json'],
                                    'content_type': [],
                                },
                                api_client=api_client,
                                callable=__get_slo)

        def __get_slo_history(self, slo_id, from_ts, to_ts, **kwargs):
            """Get an SLO's history  # noqa: E501

            Get a specific SLO’s history, regardless of its SLO type.  The detailed history data is structured according to the source data type. For example, metric data is included for event SLOs that use the metric source, and monitor SLO types include the monitor transition history.  **Note:** There are different response formats for event based and time based SLOs. Examples of both are shown.  # 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_slo_history(slo_id, from_ts, to_ts, async_req=True)
            >>> result = thread.get()

            Args:
                slo_id (str): The ID of the service level objective object.
                from_ts (int): The `from` timestamp for the query window in epoch seconds.
                to_ts (int): The `to` timestamp for the query window in epoch seconds.

            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 (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.
                _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:
                SLOHistoryResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['slo_id'] = \
                slo_id
            kwargs['from_ts'] = \
                from_ts
            kwargs['to_ts'] = \
                to_ts
            return self.call_with_http_info(**kwargs)

        self.get_slo_history = Endpoint(settings={
            'response_type': (SLOHistoryResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/slo/{slo_id}/history',
            'operation_id': 'get_slo_history',
            'http_method': 'GET',
            'servers': None,
        },
                                        params_map={
                                            'all': [
                                                'slo_id',
                                                'from_ts',
                                                'to_ts',
                                            ],
                                            'required': [
                                                'slo_id',
                                                'from_ts',
                                                'to_ts',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'slo_id': (str, ),
                                                'from_ts': (int, ),
                                                'to_ts': (int, ),
                                            },
                                            'attribute_map': {
                                                'slo_id': 'slo_id',
                                                'from_ts': 'from_ts',
                                                'to_ts': 'to_ts',
                                            },
                                            'location_map': {
                                                'slo_id': 'path',
                                                'from_ts': 'query',
                                                'to_ts': 'query',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type': [],
                                        },
                                        api_client=api_client,
                                        callable=__get_slo_history)

        def __list_sl_os(self, ids, **kwargs):
            """Search SLOs  # noqa: E501

            Get multiple service level objective objects by their IDs.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_sl_os(ids, async_req=True)
            >>> result = thread.get()

            Args:
                ids (str): A comma separated list of the IDs of the service level objectives objects.

            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 (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.
                _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:
                SLOListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['ids'] = \
                ids
            return self.call_with_http_info(**kwargs)

        self.list_sl_os = Endpoint(settings={
            'response_type': (SLOListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/slo',
            'operation_id': 'list_sl_os',
            'http_method': 'GET',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'ids',
                                       ],
                                       'required': [
                                           'ids',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'ids': (str, ),
                                       },
                                       'attribute_map': {
                                           'ids': 'ids',
                                       },
                                       'location_map': {
                                           'ids': 'query',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': [],
                                   },
                                   api_client=api_client,
                                   callable=__list_sl_os)

        def __update_slo(self, slo_id, body, **kwargs):
            """Update a SLO  # noqa: E501

            Update the specified service level objective object.  # 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_slo(slo_id, body, async_req=True)
            >>> result = thread.get()

            Args:
                slo_id (str): The ID of the service level objective object.
                body (ServiceLevelObjective): The edited service level objective request object.

            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 (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.
                _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:
                SLOListResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['slo_id'] = \
                slo_id
            kwargs['body'] = \
                body
            return self.call_with_http_info(**kwargs)

        self.update_slo = Endpoint(settings={
            'response_type': (SLOListResponse, ),
            'auth': ['apiKeyAuth', 'appKeyAuth'],
            'endpoint_path': '/api/v1/slo/{slo_id}',
            'operation_id': 'update_slo',
            'http_method': 'PUT',
            'servers': None,
        },
                                   params_map={
                                       'all': [
                                           'slo_id',
                                           'body',
                                       ],
                                       'required': [
                                           'slo_id',
                                           'body',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'slo_id': (str, ),
                                           'body': (ServiceLevelObjective, ),
                                       },
                                       'attribute_map': {
                                           'slo_id': 'slo_id',
                                       },
                                       'location_map': {
                                           'slo_id': 'path',
                                           'body': 'body',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': ['application/json']
                                   },
                                   api_client=api_client,
                                   callable=__update_slo)