Class MockNetAppConnection (2.23.0)

A class to mock NetAppConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type NetAppClient. To do so, construct an object of type NetAppClient 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 ListStoragePools(google::cloud::netapp::v1::ListStoragePoolsRequest)

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::netapp::v1::ListStoragePoolsRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::StoragePool >

virtual CreateStoragePool(google::cloud::netapp::v1::CreateStoragePoolRequest 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::netapp::v1::CreateStoragePoolRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::StoragePool > >

virtual GetStoragePool(google::cloud::netapp::v1::GetStoragePoolRequest 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::netapp::v1::GetStoragePoolRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::StoragePool >

virtual UpdateStoragePool(google::cloud::netapp::v1::UpdateStoragePoolRequest 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::netapp::v1::UpdateStoragePoolRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::StoragePool > >

virtual DeleteStoragePool(google::cloud::netapp::v1::DeleteStoragePoolRequest 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::netapp::v1::DeleteStoragePoolRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual ListVolumes(google::cloud::netapp::v1::ListVolumesRequest)

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::netapp::v1::ListVolumesRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::Volume >

virtual GetVolume(google::cloud::netapp::v1::GetVolumeRequest 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::netapp::v1::GetVolumeRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::Volume >

virtual CreateVolume(google::cloud::netapp::v1::CreateVolumeRequest 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::netapp::v1::CreateVolumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Volume > >

virtual UpdateVolume(google::cloud::netapp::v1::UpdateVolumeRequest 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::netapp::v1::UpdateVolumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Volume > >

virtual DeleteVolume(google::cloud::netapp::v1::DeleteVolumeRequest 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::netapp::v1::DeleteVolumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual RevertVolume(google::cloud::netapp::v1::RevertVolumeRequest 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::netapp::v1::RevertVolumeRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Volume > >

virtual ListSnapshots(google::cloud::netapp::v1::ListSnapshotsRequest)

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::netapp::v1::ListSnapshotsRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::Snapshot >

virtual GetSnapshot(google::cloud::netapp::v1::GetSnapshotRequest 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::netapp::v1::GetSnapshotRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::Snapshot >

virtual CreateSnapshot(google::cloud::netapp::v1::CreateSnapshotRequest 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::netapp::v1::CreateSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Snapshot > >

virtual DeleteSnapshot(google::cloud::netapp::v1::DeleteSnapshotRequest 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::netapp::v1::DeleteSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual UpdateSnapshot(google::cloud::netapp::v1::UpdateSnapshotRequest 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::netapp::v1::UpdateSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Snapshot > >

virtual ListActiveDirectories(google::cloud::netapp::v1::ListActiveDirectoriesRequest)

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::netapp::v1::ListActiveDirectoriesRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::ActiveDirectory >

virtual GetActiveDirectory(google::cloud::netapp::v1::GetActiveDirectoryRequest 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::netapp::v1::GetActiveDirectoryRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::ActiveDirectory >

virtual CreateActiveDirectory(google::cloud::netapp::v1::CreateActiveDirectoryRequest 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::netapp::v1::CreateActiveDirectoryRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::ActiveDirectory > >

virtual UpdateActiveDirectory(google::cloud::netapp::v1::UpdateActiveDirectoryRequest 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::netapp::v1::UpdateActiveDirectoryRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::ActiveDirectory > >

virtual DeleteActiveDirectory(google::cloud::netapp::v1::DeleteActiveDirectoryRequest 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::netapp::v1::DeleteActiveDirectoryRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual ListKmsConfigs(google::cloud::netapp::v1::ListKmsConfigsRequest)

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::netapp::v1::ListKmsConfigsRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::KmsConfig >

virtual CreateKmsConfig(google::cloud::netapp::v1::CreateKmsConfigRequest 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::netapp::v1::CreateKmsConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::KmsConfig > >

virtual GetKmsConfig(google::cloud::netapp::v1::GetKmsConfigRequest 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::netapp::v1::GetKmsConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::KmsConfig >

virtual UpdateKmsConfig(google::cloud::netapp::v1::UpdateKmsConfigRequest 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::netapp::v1::UpdateKmsConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::KmsConfig > >

virtual EncryptVolumes(google::cloud::netapp::v1::EncryptVolumesRequest 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::netapp::v1::EncryptVolumesRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::KmsConfig > >

virtual VerifyKmsConfig(google::cloud::netapp::v1::VerifyKmsConfigRequest 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::netapp::v1::VerifyKmsConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::VerifyKmsConfigResponse >

virtual DeleteKmsConfig(google::cloud::netapp::v1::DeleteKmsConfigRequest 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::netapp::v1::DeleteKmsConfigRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual ListReplications(google::cloud::netapp::v1::ListReplicationsRequest)

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::netapp::v1::ListReplicationsRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::Replication >

virtual GetReplication(google::cloud::netapp::v1::GetReplicationRequest 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::netapp::v1::GetReplicationRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::Replication >

virtual CreateReplication(google::cloud::netapp::v1::CreateReplicationRequest 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::netapp::v1::CreateReplicationRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Replication > >

virtual DeleteReplication(google::cloud::netapp::v1::DeleteReplicationRequest 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::netapp::v1::DeleteReplicationRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual UpdateReplication(google::cloud::netapp::v1::UpdateReplicationRequest 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::netapp::v1::UpdateReplicationRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Replication > >

virtual StopReplication(google::cloud::netapp::v1::StopReplicationRequest 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::netapp::v1::StopReplicationRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Replication > >

virtual ResumeReplication(google::cloud::netapp::v1::ResumeReplicationRequest 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::netapp::v1::ResumeReplicationRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Replication > >

virtual ReverseReplicationDirection(google::cloud::netapp::v1::ReverseReplicationDirectionRequest 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::netapp::v1::ReverseReplicationDirectionRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Replication > >

virtual CreateBackupVault(google::cloud::netapp::v1::CreateBackupVaultRequest 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::netapp::v1::CreateBackupVaultRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::BackupVault > >

virtual GetBackupVault(google::cloud::netapp::v1::GetBackupVaultRequest 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::netapp::v1::GetBackupVaultRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::BackupVault >

virtual ListBackupVaults(google::cloud::netapp::v1::ListBackupVaultsRequest)

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::netapp::v1::ListBackupVaultsRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::BackupVault >

virtual UpdateBackupVault(google::cloud::netapp::v1::UpdateBackupVaultRequest 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::netapp::v1::UpdateBackupVaultRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::BackupVault > >

virtual DeleteBackupVault(google::cloud::netapp::v1::DeleteBackupVaultRequest 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::netapp::v1::DeleteBackupVaultRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual CreateBackup(google::cloud::netapp::v1::CreateBackupRequest 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::netapp::v1::CreateBackupRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Backup > >

virtual GetBackup(google::cloud::netapp::v1::GetBackupRequest 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::netapp::v1::GetBackupRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::Backup >

virtual ListBackups(google::cloud::netapp::v1::ListBackupsRequest)

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::netapp::v1::ListBackupsRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::Backup >

virtual DeleteBackup(google::cloud::netapp::v1::DeleteBackupRequest 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::netapp::v1::DeleteBackupRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >

virtual UpdateBackup(google::cloud::netapp::v1::UpdateBackupRequest 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::netapp::v1::UpdateBackupRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::Backup > >

virtual CreateBackupPolicy(google::cloud::netapp::v1::CreateBackupPolicyRequest 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::netapp::v1::CreateBackupPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::BackupPolicy > >

virtual GetBackupPolicy(google::cloud::netapp::v1::GetBackupPolicyRequest 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::netapp::v1::GetBackupPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::netapp::v1::BackupPolicy >

virtual ListBackupPolicies(google::cloud::netapp::v1::ListBackupPoliciesRequest)

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::netapp::v1::ListBackupPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::netapp::v1::BackupPolicy >

virtual UpdateBackupPolicy(google::cloud::netapp::v1::UpdateBackupPolicyRequest 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::netapp::v1::UpdateBackupPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::BackupPolicy > >

virtual DeleteBackupPolicy(google::cloud::netapp::v1::DeleteBackupPolicyRequest 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::netapp::v1::DeleteBackupPolicyRequest const &
Returns
Type Description
future< StatusOr< google::cloud::netapp::v1::OperationMetadata > >