Class MockVmMigrationConnection (2.13.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
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListSourcesRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetSourceRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateSourceRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::UpdateSourceRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::DeleteSourceRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::FetchInventoryRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListUtilizationReportsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetUtilizationReportRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateUtilizationReportRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::DeleteUtilizationReportRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListDatacenterConnectorsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetDatacenterConnectorRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateDatacenterConnectorRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::DeleteDatacenterConnectorRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::UpgradeApplianceRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateMigratingVmRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListMigratingVmsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetMigratingVmRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::UpdateMigratingVmRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::DeleteMigratingVmRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::StartMigrationRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ResumeMigrationRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::PauseMigrationRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::FinalizeMigrationRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateCloneJobRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CancelCloneJobRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListCloneJobsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetCloneJobRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateCutoverJobRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CancelCutoverJobRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListCutoverJobsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetCutoverJobRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListGroupsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetGroupRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateGroupRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::UpdateGroupRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::DeleteGroupRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::AddGroupMigrationRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::RemoveGroupMigrationRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListTargetProjectsRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetTargetProjectRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::CreateTargetProjectRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::UpdateTargetProjectRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::DeleteTargetProjectRequest const &
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::ListReplicationCyclesRequest
Returns
Type Description
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
Name Description
request google::cloud::vmmigration::v1::GetReplicationCycleRequest const &
Returns
Type Description
StatusOr< google::cloud::vmmigration::v1::ReplicationCycle >