def _delete_index(self, index_name: str) -> None:
    delete_request_url = f"{self.options['es_url'].rstrip('/')}/{index_name}/"
    self.logger.debug(f'Calling Elasticsearch API to delete the index, URL: {delete_request_url}')
    delete_response = self._http_request(delete_request_url, 'DELETE')
    delete_response_data = json.loads(delete_response['data'].decode('utf-8'))
    self.logger.debug(f"Response received, status: {delete_response['status']}")
    self.logger.debug(f"Response headers: {delete_response['headers']}")
    self.logger.debug(f'Response data: {delete_response_data}')
    if ((delete_response['status'] == 200) and (delete_response_data.get('acknowledged', None) is True)):
        self.logger.debug('Index deleted')
    elif ((delete_response['status'] == 404) and (delete_response_data.get('error', {}).get('type', '') == 'index_not_found_exception')):
        self.logger.debug('Index does not exist')
    else:
        error_message = 'Failed to delete the index'
        self.logger.error(f'{error_message}')
        raise RuntimeError(f'{error_message}')
    return None
def _delete_index(self, index_name: str) -> None:
    delete_request_url = f"{self.options['es_url'].rstrip('/')}/{index_name}/"
    self.logger.debug(f'Calling Elasticsearch API to delete the index, URL: {delete_request_url}')
    delete_response = self._http_request(delete_request_url, 'DELETE')
    delete_response_data = json.loads(delete_response['data'].decode('utf-8'))
    self.logger.debug(f"Response received, status: {delete_response['status']}")
    self.logger.debug(f"Response headers: {delete_response['headers']}")
    self.logger.debug(f'Response data: {delete_response_data}')
    if ((delete_response['status'] == 200) and (delete_response_data.get('acknowledged', None) is True)):
        self.logger.debug('Index deleted')
    elif ((delete_response['status'] == 404) and (delete_response_data.get('error', {}).get('type', ) == 'index_not_found_exception')):
        self.logger.debug('Index does not exist')
    else:
        error_message = 'Failed to delete the index'
        self.logger.error(f'{error_message}')
        raise RuntimeError(f'{error_message}')
    return None