Class MockVmMigrationConnection (2.15.0)

A class to mock VmMigrationConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type VmMigrationClient. To do so, construct an object of type VmMigrationClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See Also

This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
Options

virtual ListSources(google::cloud::vmmigration::v1::ListSourcesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListSourcesRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::Source >

virtual GetSource(google::cloud::vmmigration::v1::GetSourceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetSourceRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::Source >

virtual CreateSource(google::cloud::vmmigration::v1::CreateSourceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateSourceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::Source > >

virtual UpdateSource(google::cloud::vmmigration::v1::UpdateSourceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::UpdateSourceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::Source > >

virtual DeleteSource(google::cloud::vmmigration::v1::DeleteSourceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::DeleteSourceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::OperationMetadata > >

virtual FetchInventory(google::cloud::vmmigration::v1::FetchInventoryRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::FetchInventoryRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::FetchInventoryResponse >

virtual ListUtilizationReports(google::cloud::vmmigration::v1::ListUtilizationReportsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListUtilizationReportsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::UtilizationReport >

virtual GetUtilizationReport(google::cloud::vmmigration::v1::GetUtilizationReportRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetUtilizationReportRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::UtilizationReport >

virtual CreateUtilizationReport(google::cloud::vmmigration::v1::CreateUtilizationReportRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateUtilizationReportRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::UtilizationReport > >

virtual DeleteUtilizationReport(google::cloud::vmmigration::v1::DeleteUtilizationReportRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::DeleteUtilizationReportRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::OperationMetadata > >

virtual ListDatacenterConnectors(google::cloud::vmmigration::v1::ListDatacenterConnectorsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListDatacenterConnectorsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::DatacenterConnector >

virtual GetDatacenterConnector(google::cloud::vmmigration::v1::GetDatacenterConnectorRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetDatacenterConnectorRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::DatacenterConnector >

virtual CreateDatacenterConnector(google::cloud::vmmigration::v1::CreateDatacenterConnectorRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateDatacenterConnectorRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::DatacenterConnector > >

virtual DeleteDatacenterConnector(google::cloud::vmmigration::v1::DeleteDatacenterConnectorRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::DeleteDatacenterConnectorRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::OperationMetadata > >

virtual UpgradeAppliance(google::cloud::vmmigration::v1::UpgradeApplianceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::UpgradeApplianceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::UpgradeApplianceResponse > >

virtual CreateMigratingVm(google::cloud::vmmigration::v1::CreateMigratingVmRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateMigratingVmRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::MigratingVm > >

virtual ListMigratingVms(google::cloud::vmmigration::v1::ListMigratingVmsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListMigratingVmsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::MigratingVm >

virtual GetMigratingVm(google::cloud::vmmigration::v1::GetMigratingVmRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetMigratingVmRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::MigratingVm >

virtual UpdateMigratingVm(google::cloud::vmmigration::v1::UpdateMigratingVmRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::UpdateMigratingVmRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::MigratingVm > >

virtual DeleteMigratingVm(google::cloud::vmmigration::v1::DeleteMigratingVmRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::DeleteMigratingVmRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::OperationMetadata > >

virtual StartMigration(google::cloud::vmmigration::v1::StartMigrationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::StartMigrationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::StartMigrationResponse > >

virtual ResumeMigration(google::cloud::vmmigration::v1::ResumeMigrationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ResumeMigrationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::ResumeMigrationResponse > >

virtual PauseMigration(google::cloud::vmmigration::v1::PauseMigrationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::PauseMigrationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::PauseMigrationResponse > >

virtual FinalizeMigration(google::cloud::vmmigration::v1::FinalizeMigrationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::FinalizeMigrationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::FinalizeMigrationResponse > >

virtual CreateCloneJob(google::cloud::vmmigration::v1::CreateCloneJobRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateCloneJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::CloneJob > >

virtual CancelCloneJob(google::cloud::vmmigration::v1::CancelCloneJobRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CancelCloneJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::CancelCloneJobResponse > >

virtual ListCloneJobs(google::cloud::vmmigration::v1::ListCloneJobsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListCloneJobsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::CloneJob >

virtual GetCloneJob(google::cloud::vmmigration::v1::GetCloneJobRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetCloneJobRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::CloneJob >

virtual CreateCutoverJob(google::cloud::vmmigration::v1::CreateCutoverJobRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateCutoverJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::CutoverJob > >

virtual CancelCutoverJob(google::cloud::vmmigration::v1::CancelCutoverJobRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CancelCutoverJobRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::CancelCutoverJobResponse > >

virtual ListCutoverJobs(google::cloud::vmmigration::v1::ListCutoverJobsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListCutoverJobsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::CutoverJob >

virtual GetCutoverJob(google::cloud::vmmigration::v1::GetCutoverJobRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetCutoverJobRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::CutoverJob >

virtual ListGroups(google::cloud::vmmigration::v1::ListGroupsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListGroupsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::Group >

virtual GetGroup(google::cloud::vmmigration::v1::GetGroupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetGroupRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::Group >

virtual CreateGroup(google::cloud::vmmigration::v1::CreateGroupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::Group > >

virtual UpdateGroup(google::cloud::vmmigration::v1::UpdateGroupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::UpdateGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::Group > >

virtual DeleteGroup(google::cloud::vmmigration::v1::DeleteGroupRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::DeleteGroupRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::OperationMetadata > >

virtual AddGroupMigration(google::cloud::vmmigration::v1::AddGroupMigrationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::AddGroupMigrationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::AddGroupMigrationResponse > >

virtual RemoveGroupMigration(google::cloud::vmmigration::v1::RemoveGroupMigrationRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::RemoveGroupMigrationRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::RemoveGroupMigrationResponse > >

virtual ListTargetProjects(google::cloud::vmmigration::v1::ListTargetProjectsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListTargetProjectsRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::TargetProject >

virtual GetTargetProject(google::cloud::vmmigration::v1::GetTargetProjectRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetTargetProjectRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::TargetProject >

virtual CreateTargetProject(google::cloud::vmmigration::v1::CreateTargetProjectRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::CreateTargetProjectRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::TargetProject > >

virtual UpdateTargetProject(google::cloud::vmmigration::v1::UpdateTargetProjectRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::UpdateTargetProjectRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::TargetProject > >

virtual DeleteTargetProject(google::cloud::vmmigration::v1::DeleteTargetProjectRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::DeleteTargetProjectRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::vmmigration::v1::OperationMetadata > >

virtual ListReplicationCycles(google::cloud::vmmigration::v1::ListReplicationCyclesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::ListReplicationCyclesRequest
Returns
TypeDescription
StreamRange< google::cloud::vmmigration::v1::ReplicationCycle >

virtual GetReplicationCycle(google::cloud::vmmigration::v1::GetReplicationCycleRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::vmmigration::v1::GetReplicationCycleRequest const &
Returns
TypeDescription
StatusOr< google::cloud::vmmigration::v1::ReplicationCycle >