def modify_intrusion_prevention_application_type_on_computer_with_http_info()

in functions/source/deepsecurity/api/computer_intrusion_prevention_application_type_details_api.py [0:0]


    def modify_intrusion_prevention_application_type_on_computer_with_http_info(self, computer_id, application_type_id, application_type, api_version, **kwargs):  # noqa: E501
        """Modify an intrusion prevention application type  # noqa: E501

        Modify an intrusion prevention application type assigned to a computer. Any unset elements will be left unchanged.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.modify_intrusion_prevention_application_type_on_computer_with_http_info(computer_id, application_type_id, application_type, api_version, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int computer_id: The ID number of the computer. (required)
        :param int application_type_id: The ID number of the application type to modify. (required)
        :param ApplicationType application_type: The settings of the application type to modify. (required)
        :param str api_version: The version of the api being called. (required)
        :param bool overrides: Show only overrides defined for the current computer.
        :return: ApplicationType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['computer_id', 'application_type_id', 'application_type', 'api_version', 'overrides']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        if 'computer_id' in params and not re.search('\\d+', str(params['computer_id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `computer_id` when calling `modify_intrusion_prevention_application_type_on_computer`, must conform to the pattern `/\\d+/`")  # noqa: E501
        if 'application_type_id' in params and not re.search('\\d+', str(params['application_type_id'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `application_type_id` when calling `modify_intrusion_prevention_application_type_on_computer`, must conform to the pattern `/\\d+/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'computer_id' in params:
            path_params['computerID'] = params['computer_id']  # noqa: E501
        if 'application_type_id' in params:
            path_params['applicationTypeID'] = params['application_type_id']  # noqa: E501

        query_params = []
        if 'overrides' in params:
            query_params.append(('overrides', params['overrides']))  # noqa: E501

        header_params = {}
        if 'api_version' in params:
            header_params['api-version'] = params['api_version']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

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

        return self.api_client.call_api(
            '/computers/{computerID}/intrusionprevention/applicationtypes/{applicationTypeID}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ApplicationType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)