# Path: tenable_io/api/bulk_operations.py
# class BulkOpAddAgentRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             items=None
#     ):
#         """Request for BulkOperationsApi.bulk_add_agent.
# 
#         :param items: list of agent ids or uuids to add to the group.
#         :type items: list[int].
#         """
#         self.items = items
# 
# class BulkOpRemoveAgentRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             items=None
#     ):
#         """Request for BulkOperationsApi.bulk_remove_agent.
# 
#         :param items: list of agent ids or uuids to add to the group.
#         :type items: list[int].
#         """
#         self.items = items
# 
# class BulkOpUnlinkAgentRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             items=None
#     ):
#         """Request for BulkOperationsApi.bulk_unlink_agent.
# 
#         :param items: list of agent ids or uuids to add to the group.
#         :type items: list[int].
#         """
#         self.items = items
# 
# Path: tenable_io/api/models.py
# class BulkOpTask(BaseModel):
# 
#     STATUS_NEW = u'NEW'
#     STATUS_RUNNING = u'RUNNING'
#     STATUS_COMPLETED = u'COMPLETED'
#     STATUS_FAILED = u'FAILED'
# 
#     def __init__(
#             self,
#             task_id=None,
#             container_uuid=None,
#             status=None,
#             message=None,
#             start_time=None,
#             end_time=None,
#             last_update_time=None,
#             total_work_units=None,
#             total_work_units_completed=None,
#             completion_percentage=None
#     ):
#         self.task_id = task_id
#         self.container_uuid = container_uuid
#         self.status = status
#         self.message = message
#         self.start_time = start_time
#         self.end_time = end_time
#         self.last_update_time = last_update_time
#         self.total_work_units = total_work_units
#         self.total_work_units_completed = total_work_units_completed
#         self.completion_percentage = completion_percentage


import pytest
from tenable_io.api.bulk_operations import BulkOpAddAgentRequest, BulkOpRemoveAgentRequest, BulkOpUnlinkAgentRequest
from tenable_io.api.models import BulkOpTask
    add_agent_task = client.bulk_operations_api.bulk_add_agent(
        new_agent_group,
        BulkOpAddAgentRequest(
            items=[fetch_agent]
        )
    )
    assert isinstance(add_agent_task, BulkOpTask), u'The `bulk_add_agent` method did not return type `BulkOpTask`.'
    agent_status = client.bulk_operations_api.bulk_agent_status(add_agent_task.task_id)
    assert isinstance(agent_status,
                      BulkOpTask), u'The `bulk_agent_status` method did not return type `BulkOpTask`.'

@pytest.mark.vcr()
def test_bulk_operations_bulk_agent_remove_and_status(client, new_agent_group, fetch_agent):
    remove_agent_task = client.bulk_operations_api.bulk_remove_agent(
        new_agent_group,
        BulkOpRemoveAgentRequest(
            items=[fetch_agent]
        )
    )
    assert isinstance(remove_agent_task,
                      BulkOpTask), u'The `bulk_remove_agent` method did not return type `BulkOpTask`.'
    group_status = client.bulk_operations_api.bulk_agent_group_status(new_agent_group, remove_agent_task.task_id)
    assert isinstance(group_status,
                      BulkOpTask), u'The `bulk_agent_group_status` method did not return type `BulkOpTask`.'

@pytest.mark.vcr()
def test_bulk_operations_bulk_agent_unlink(client, fetch_agent):
    unlink_agent_task = client.bulk_operations_api.bulk_unlink_agent(
        BulkOpUnlinkAgentRequest(items=[fetch_agent]))
    assert isinstance(unlink_agent_task,

# Path: tenable_io/api/bulk_operations.py
# class BulkOpAddAgentRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             items=None
#     ):
#         """Request for BulkOperationsApi.bulk_add_agent.
# 
#         :param items: list of agent ids or uuids to add to the group.
#         :type items: list[int].
#         """
#         self.items = items
# 
# class BulkOpRemoveAgentRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             items=None
#     ):
#         """Request for BulkOperationsApi.bulk_remove_agent.
# 
#         :param items: list of agent ids or uuids to add to the group.
#         :type items: list[int].
#         """
#         self.items = items
# 
# class BulkOpUnlinkAgentRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             items=None
#     ):
#         """Request for BulkOperationsApi.bulk_unlink_agent.
# 
#         :param items: list of agent ids or uuids to add to the group.
#         :type items: list[int].
#         """
#         self.items = items
# 
# Path: tenable_io/api/models.py
# class BulkOpTask(BaseModel):
# 
#     STATUS_NEW = u'NEW'
#     STATUS_RUNNING = u'RUNNING'
#     STATUS_COMPLETED = u'COMPLETED'
#     STATUS_FAILED = u'FAILED'
# 
#     def __init__(
#             self,
#             task_id=None,
#             container_uuid=None,
#             status=None,
#             message=None,
#             start_time=None,
#             end_time=None,
#             last_update_time=None,
#             total_work_units=None,
#             total_work_units_completed=None,
#             completion_percentage=None
#     ):
#         self.task_id = task_id
#         self.container_uuid = container_uuid
#         self.status = status
#         self.message = message
#         self.start_time = start_time
#         self.end_time = end_time
#         self.last_update_time = last_update_time
#         self.total_work_units = total_work_units
#         self.total_work_units_completed = total_work_units_completed
#         self.completion_percentage = completion_percentage


# Path: tests/integration/api/test_bulk_operations.py
import pytest
from tenable_io.api.bulk_operations import BulkOpAddAgentRequest, BulkOpRemoveAgentRequest, BulkOpUnlinkAgentRequest
from tenable_io.api.models import BulkOpTask

    add_agent_task = client.bulk_operations_api.bulk_add_agent(
        new_agent_group,
        BulkOpAddAgentRequest(
            items=[fetch_agent]
        )
    )
    assert isinstance(add_agent_task, BulkOpTask), u'The `bulk_add_agent` method did not return type `BulkOpTask`.'
    agent_status = client.bulk_operations_api.bulk_agent_status(add_agent_task.task_id)
    assert isinstance(agent_status,
                      BulkOpTask), u'The `bulk_agent_status` method did not return type `BulkOpTask`.'

@pytest.mark.vcr()
def test_bulk_operations_bulk_agent_remove_and_status(client, new_agent_group, fetch_agent):
    remove_agent_task = client.bulk_operations_api.bulk_remove_agent(
        new_agent_group,
        BulkOpRemoveAgentRequest(
            items=[fetch_agent]
        )
    )
    assert isinstance(remove_agent_task,
                      BulkOpTask), u'The `bulk_remove_agent` method did not return type `BulkOpTask`.'
    group_status = client.bulk_operations_api.bulk_agent_group_status(new_agent_group, remove_agent_task.task_id)
    assert isinstance(group_status,
                      BulkOpTask), u'The `bulk_agent_group_status` method did not return type `BulkOpTask`.'

@pytest.mark.vcr()
def test_bulk_operations_bulk_agent_unlink(client, fetch_agent):
    unlink_agent_task = client.bulk_operations_api.bulk_unlink_agent(
        BulkOpUnlinkAgentRequest(items=[fetch_agent]))
    assert isinstance(unlink_agent_task,

                      BulkOpTask), u'The `bulk_unlink_agent` method did not return type `BulkOpTask`.'