Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection Class Reference

A class to mock DatabaseAdminConnection. More...

#include <google/cloud/spanner/admin/mocks/mock_database_admin_connection.h>

Public Member Functions

 MOCK_METHOD (Options, options,(),(override))
 
 MOCK_METHOD (StreamRange< google::spanner::admin::database::v1::Database >, ListDatabases,(google::spanner::admin::database::v1::ListDatabasesRequest request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Database > >, CreateDatabase,(google::spanner::admin::database::v1::CreateDatabaseRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::Database >, GetDatabase,(google::spanner::admin::database::v1::GetDatabaseRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Database > >, UpdateDatabase,(google::spanner::admin::database::v1::UpdateDatabaseRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >, UpdateDatabaseDdl,(google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &request),(override))
 
 MOCK_METHOD (Status, DropDatabase,(google::spanner::admin::database::v1::DropDatabaseRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >, GetDatabaseDdl,(google::spanner::admin::database::v1::GetDatabaseDdlRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, SetIamPolicy,(google::iam::v1::SetIamPolicyRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, GetIamPolicy,(google::iam::v1::GetIamPolicyRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::TestIamPermissionsResponse >, TestIamPermissions,(google::iam::v1::TestIamPermissionsRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Backup > >, CreateBackup,(google::spanner::admin::database::v1::CreateBackupRequest const &request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Backup > >, CopyBackup,(google::spanner::admin::database::v1::CopyBackupRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::Backup >, GetBackup,(google::spanner::admin::database::v1::GetBackupRequest const &request),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::Backup >, UpdateBackup,(google::spanner::admin::database::v1::UpdateBackupRequest const &request),(override))
 
 MOCK_METHOD (Status, DeleteBackup,(google::spanner::admin::database::v1::DeleteBackupRequest const &request),(override))
 
 MOCK_METHOD (StreamRange< google::spanner::admin::database::v1::Backup >, ListBackups,(google::spanner::admin::database::v1::ListBackupsRequest request),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Database > >, RestoreDatabase,(google::spanner::admin::database::v1::RestoreDatabaseRequest const &request),(override))
 
 MOCK_METHOD (StreamRange< google::longrunning::Operation >, ListDatabaseOperations,(google::spanner::admin::database::v1::ListDatabaseOperationsRequest request),(override))
 
 MOCK_METHOD (StreamRange< google::longrunning::Operation >, ListBackupOperations,(google::spanner::admin::database::v1::ListBackupOperationsRequest request),(override))
 
 MOCK_METHOD (StreamRange< google::spanner::admin::database::v1::DatabaseRole >, ListDatabaseRoles,(google::spanner::admin::database::v1::ListDatabaseRolesRequest request),(override))
 
virtual Options options ()
 
virtual StreamRange< google::spanner::admin::database::v1::Database > ListDatabases (google::spanner::admin::database::v1::ListDatabasesRequest request)
 
virtual future< StatusOr< google::spanner::admin::database::v1::Database > > CreateDatabase (google::spanner::admin::database::v1::CreateDatabaseRequest const &request)
 
virtual StatusOr< google::spanner::admin::database::v1::Database > GetDatabase (google::spanner::admin::database::v1::GetDatabaseRequest const &request)
 
virtual future< StatusOr< google::spanner::admin::database::v1::Database > > UpdateDatabase (google::spanner::admin::database::v1::UpdateDatabaseRequest const &request)
 
virtual future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > > UpdateDatabaseDdl (google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &request)
 
virtual Status DropDatabase (google::spanner::admin::database::v1::DropDatabaseRequest const &request)
 
virtual StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse > GetDatabaseDdl (google::spanner::admin::database::v1::GetDatabaseDdlRequest const &request)
 
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy (google::iam::v1::SetIamPolicyRequest const &request)
 
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy (google::iam::v1::GetIamPolicyRequest const &request)
 
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions (google::iam::v1::TestIamPermissionsRequest const &request)
 
virtual future< StatusOr< google::spanner::admin::database::v1::Backup > > CreateBackup (google::spanner::admin::database::v1::CreateBackupRequest const &request)
 
virtual future< StatusOr< google::spanner::admin::database::v1::Backup > > CopyBackup (google::spanner::admin::database::v1::CopyBackupRequest const &request)
 
virtual StatusOr< google::spanner::admin::database::v1::Backup > GetBackup (google::spanner::admin::database::v1::GetBackupRequest const &request)
 
virtual StatusOr< google::spanner::admin::database::v1::Backup > UpdateBackup (google::spanner::admin::database::v1::UpdateBackupRequest const &request)
 
virtual Status DeleteBackup (google::spanner::admin::database::v1::DeleteBackupRequest const &request)
 
virtual StreamRange< google::spanner::admin::database::v1::Backup > ListBackups (google::spanner::admin::database::v1::ListBackupsRequest request)
 
virtual future< StatusOr< google::spanner::admin::database::v1::Database > > RestoreDatabase (google::spanner::admin::database::v1::RestoreDatabaseRequest const &request)
 
virtual StreamRange< google::longrunning::Operation > ListDatabaseOperations (google::spanner::admin::database::v1::ListDatabaseOperationsRequest request)
 
virtual StreamRange< google::longrunning::Operation > ListBackupOperations (google::spanner::admin::database::v1::ListBackupOperationsRequest request)
 
virtual StreamRange< google::spanner::admin::database::v1::DatabaseRole > ListDatabaseRoles (google::spanner::admin::database::v1::ListDatabaseRolesRequest request)
 

Detailed Description

A class to mock DatabaseAdminConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type DatabaseAdminClient. To do so, construct an object of type DatabaseAdminClient 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.

Member Function Documentation

◆ CopyBackup()

virtual future< StatusOr< google::spanner::admin::database::v1::Backup > > google::cloud::spanner_admin::DatabaseAdminConnection::CopyBackup ( google::spanner::admin::database::v1::CopyBackupRequest const &  request)
virtualinherited

◆ CreateBackup()

virtual future< StatusOr< google::spanner::admin::database::v1::Backup > > google::cloud::spanner_admin::DatabaseAdminConnection::CreateBackup ( google::spanner::admin::database::v1::CreateBackupRequest const &  request)
virtualinherited

◆ CreateDatabase()

virtual future< StatusOr< google::spanner::admin::database::v1::Database > > google::cloud::spanner_admin::DatabaseAdminConnection::CreateDatabase ( google::spanner::admin::database::v1::CreateDatabaseRequest const &  request)
virtualinherited

◆ DeleteBackup()

virtual Status google::cloud::spanner_admin::DatabaseAdminConnection::DeleteBackup ( google::spanner::admin::database::v1::DeleteBackupRequest const &  request)
virtualinherited

◆ DropDatabase()

virtual Status google::cloud::spanner_admin::DatabaseAdminConnection::DropDatabase ( google::spanner::admin::database::v1::DropDatabaseRequest const &  request)
virtualinherited

◆ GetBackup()

virtual StatusOr< google::spanner::admin::database::v1::Backup > google::cloud::spanner_admin::DatabaseAdminConnection::GetBackup ( google::spanner::admin::database::v1::GetBackupRequest const &  request)
virtualinherited

◆ GetDatabase()

virtual StatusOr< google::spanner::admin::database::v1::Database > google::cloud::spanner_admin::DatabaseAdminConnection::GetDatabase ( google::spanner::admin::database::v1::GetDatabaseRequest const &  request)
virtualinherited

◆ GetDatabaseDdl()

virtual StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse > google::cloud::spanner_admin::DatabaseAdminConnection::GetDatabaseDdl ( google::spanner::admin::database::v1::GetDatabaseDdlRequest const &  request)
virtualinherited

◆ GetIamPolicy()

virtual StatusOr< google::iam::v1::Policy > google::cloud::spanner_admin::DatabaseAdminConnection::GetIamPolicy ( google::iam::v1::GetIamPolicyRequest const &  request)
virtualinherited

◆ ListBackupOperations()

virtual StreamRange< google::longrunning::Operation > google::cloud::spanner_admin::DatabaseAdminConnection::ListBackupOperations ( google::spanner::admin::database::v1::ListBackupOperationsRequest  request)
virtualinherited

◆ ListBackups()

virtual StreamRange< google::spanner::admin::database::v1::Backup > google::cloud::spanner_admin::DatabaseAdminConnection::ListBackups ( google::spanner::admin::database::v1::ListBackupsRequest  request)
virtualinherited

◆ ListDatabaseOperations()

virtual StreamRange< google::longrunning::Operation > google::cloud::spanner_admin::DatabaseAdminConnection::ListDatabaseOperations ( google::spanner::admin::database::v1::ListDatabaseOperationsRequest  request)
virtualinherited

◆ ListDatabaseRoles()

virtual StreamRange< google::spanner::admin::database::v1::DatabaseRole > google::cloud::spanner_admin::DatabaseAdminConnection::ListDatabaseRoles ( google::spanner::admin::database::v1::ListDatabaseRolesRequest  request)
virtualinherited

◆ ListDatabases()

virtual StreamRange< google::spanner::admin::database::v1::Database > google::cloud::spanner_admin::DatabaseAdminConnection::ListDatabases ( google::spanner::admin::database::v1::ListDatabasesRequest  request)
virtualinherited

◆ MOCK_METHOD() [1/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Backup > >  ,
CopyBackup  ,
(google::spanner::admin::database::v1::CopyBackupRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [2/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Backup > >  ,
CreateBackup  ,
(google::spanner::admin::database::v1::CreateBackupRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [3/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Database > >  ,
CreateDatabase  ,
(google::spanner::admin::database::v1::CreateDatabaseRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [4/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Database > >  ,
RestoreDatabase  ,
(google::spanner::admin::database::v1::RestoreDatabaseRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [5/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Database > >  ,
UpdateDatabase  ,
(google::spanner::admin::database::v1::UpdateDatabaseRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [6/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >  ,
UpdateDatabaseDdl  ,
(google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [7/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( Options  ,
options  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [8/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( Status  ,
DeleteBackup  ,
(google::spanner::admin::database::v1::DeleteBackupRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [9/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( Status  ,
DropDatabase  ,
(google::spanner::admin::database::v1::DropDatabaseRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [10/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
GetIamPolicy  ,
(google::iam::v1::GetIamPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [11/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
SetIamPolicy  ,
(google::iam::v1::SetIamPolicyRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [12/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::TestIamPermissionsResponse >  ,
TestIamPermissions  ,
(google::iam::v1::TestIamPermissionsRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [13/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::Backup >  ,
GetBackup  ,
(google::spanner::admin::database::v1::GetBackupRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [14/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::Backup >  ,
UpdateBackup  ,
(google::spanner::admin::database::v1::UpdateBackupRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [15/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::Database >  ,
GetDatabase  ,
(google::spanner::admin::database::v1::GetDatabaseRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [16/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >  ,
GetDatabaseDdl  ,
(google::spanner::admin::database::v1::GetDatabaseDdlRequest const &request)  ,
(override)   
)

◆ MOCK_METHOD() [17/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StreamRange< google::longrunning::Operation >  ,
ListBackupOperations  ,
(google::spanner::admin::database::v1::ListBackupOperationsRequest request)  ,
(override)   
)

◆ MOCK_METHOD() [18/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StreamRange< google::longrunning::Operation >  ,
ListDatabaseOperations  ,
(google::spanner::admin::database::v1::ListDatabaseOperationsRequest request)  ,
(override)   
)

◆ MOCK_METHOD() [19/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StreamRange< google::spanner::admin::database::v1::Backup >  ,
ListBackups  ,
(google::spanner::admin::database::v1::ListBackupsRequest request)  ,
(override)   
)

◆ MOCK_METHOD() [20/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StreamRange< google::spanner::admin::database::v1::Database >  ,
ListDatabases  ,
(google::spanner::admin::database::v1::ListDatabasesRequest request)  ,
(override)   
)

◆ MOCK_METHOD() [21/21]

google::cloud::spanner_admin_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StreamRange< google::spanner::admin::database::v1::DatabaseRole >  ,
ListDatabaseRoles  ,
(google::spanner::admin::database::v1::ListDatabaseRolesRequest request)  ,
(override)   
)

◆ options()

virtual Options google::cloud::spanner_admin::DatabaseAdminConnection::options ( )
inlinevirtualinherited

◆ RestoreDatabase()

virtual future< StatusOr< google::spanner::admin::database::v1::Database > > google::cloud::spanner_admin::DatabaseAdminConnection::RestoreDatabase ( google::spanner::admin::database::v1::RestoreDatabaseRequest const &  request)
virtualinherited

◆ SetIamPolicy()

virtual StatusOr< google::iam::v1::Policy > google::cloud::spanner_admin::DatabaseAdminConnection::SetIamPolicy ( google::iam::v1::SetIamPolicyRequest const &  request)
virtualinherited

◆ TestIamPermissions()

virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > google::cloud::spanner_admin::DatabaseAdminConnection::TestIamPermissions ( google::iam::v1::TestIamPermissionsRequest const &  request)
virtualinherited

◆ UpdateBackup()

virtual StatusOr< google::spanner::admin::database::v1::Backup > google::cloud::spanner_admin::DatabaseAdminConnection::UpdateBackup ( google::spanner::admin::database::v1::UpdateBackupRequest const &  request)
virtualinherited

◆ UpdateDatabase()

virtual future< StatusOr< google::spanner::admin::database::v1::Database > > google::cloud::spanner_admin::DatabaseAdminConnection::UpdateDatabase ( google::spanner::admin::database::v1::UpdateDatabaseRequest const &  request)
virtualinherited

◆ UpdateDatabaseDdl()

virtual future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > > google::cloud::spanner_admin::DatabaseAdminConnection::UpdateDatabaseDdl ( google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &  request)
virtualinherited