Class MockDlpServiceConnection (2.32.0-rc)

A class to mock DlpServiceConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type DlpServiceClient. To do so, construct an object of type DlpServiceClient 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 InspectContent(google::privacy::dlp::v2::InspectContentRequest 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::privacy::dlp::v2::InspectContentRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::InspectContentResponse >

virtual RedactImage(google::privacy::dlp::v2::RedactImageRequest 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::privacy::dlp::v2::RedactImageRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::RedactImageResponse >

virtual DeidentifyContent(google::privacy::dlp::v2::DeidentifyContentRequest 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::privacy::dlp::v2::DeidentifyContentRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DeidentifyContentResponse >

virtual ReidentifyContent(google::privacy::dlp::v2::ReidentifyContentRequest 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::privacy::dlp::v2::ReidentifyContentRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::ReidentifyContentResponse >

virtual ListInfoTypes(google::privacy::dlp::v2::ListInfoTypesRequest 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::privacy::dlp::v2::ListInfoTypesRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::ListInfoTypesResponse >

virtual CreateInspectTemplate(google::privacy::dlp::v2::CreateInspectTemplateRequest 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::privacy::dlp::v2::CreateInspectTemplateRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::InspectTemplate >

virtual UpdateInspectTemplate(google::privacy::dlp::v2::UpdateInspectTemplateRequest 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::privacy::dlp::v2::UpdateInspectTemplateRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::InspectTemplate >

virtual GetInspectTemplate(google::privacy::dlp::v2::GetInspectTemplateRequest 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::privacy::dlp::v2::GetInspectTemplateRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::InspectTemplate >

virtual ListInspectTemplates(google::privacy::dlp::v2::ListInspectTemplatesRequest)

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::privacy::dlp::v2::ListInspectTemplatesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::InspectTemplate >

virtual DeleteInspectTemplate(google::privacy::dlp::v2::DeleteInspectTemplateRequest 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::privacy::dlp::v2::DeleteInspectTemplateRequest const &
Returns
Type Description
Status

virtual CreateDeidentifyTemplate(google::privacy::dlp::v2::CreateDeidentifyTemplateRequest 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::privacy::dlp::v2::CreateDeidentifyTemplateRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DeidentifyTemplate >

virtual UpdateDeidentifyTemplate(google::privacy::dlp::v2::UpdateDeidentifyTemplateRequest 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::privacy::dlp::v2::UpdateDeidentifyTemplateRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DeidentifyTemplate >

virtual GetDeidentifyTemplate(google::privacy::dlp::v2::GetDeidentifyTemplateRequest 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::privacy::dlp::v2::GetDeidentifyTemplateRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DeidentifyTemplate >

virtual ListDeidentifyTemplates(google::privacy::dlp::v2::ListDeidentifyTemplatesRequest)

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::privacy::dlp::v2::ListDeidentifyTemplatesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::DeidentifyTemplate >

virtual DeleteDeidentifyTemplate(google::privacy::dlp::v2::DeleteDeidentifyTemplateRequest 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::privacy::dlp::v2::DeleteDeidentifyTemplateRequest const &
Returns
Type Description
Status

virtual CreateJobTrigger(google::privacy::dlp::v2::CreateJobTriggerRequest 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::privacy::dlp::v2::CreateJobTriggerRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::JobTrigger >

virtual UpdateJobTrigger(google::privacy::dlp::v2::UpdateJobTriggerRequest 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::privacy::dlp::v2::UpdateJobTriggerRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::JobTrigger >

virtual HybridInspectJobTrigger(google::privacy::dlp::v2::HybridInspectJobTriggerRequest 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::privacy::dlp::v2::HybridInspectJobTriggerRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::HybridInspectResponse >

virtual GetJobTrigger(google::privacy::dlp::v2::GetJobTriggerRequest 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::privacy::dlp::v2::GetJobTriggerRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::JobTrigger >

virtual ListJobTriggers(google::privacy::dlp::v2::ListJobTriggersRequest)

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::privacy::dlp::v2::ListJobTriggersRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::JobTrigger >

virtual DeleteJobTrigger(google::privacy::dlp::v2::DeleteJobTriggerRequest 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::privacy::dlp::v2::DeleteJobTriggerRequest const &
Returns
Type Description
Status

virtual ActivateJobTrigger(google::privacy::dlp::v2::ActivateJobTriggerRequest 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::privacy::dlp::v2::ActivateJobTriggerRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DlpJob >

virtual CreateDiscoveryConfig(google::privacy::dlp::v2::CreateDiscoveryConfigRequest 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::privacy::dlp::v2::CreateDiscoveryConfigRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DiscoveryConfig >

virtual UpdateDiscoveryConfig(google::privacy::dlp::v2::UpdateDiscoveryConfigRequest 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::privacy::dlp::v2::UpdateDiscoveryConfigRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DiscoveryConfig >

virtual GetDiscoveryConfig(google::privacy::dlp::v2::GetDiscoveryConfigRequest 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::privacy::dlp::v2::GetDiscoveryConfigRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DiscoveryConfig >

virtual ListDiscoveryConfigs(google::privacy::dlp::v2::ListDiscoveryConfigsRequest)

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::privacy::dlp::v2::ListDiscoveryConfigsRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::DiscoveryConfig >

virtual DeleteDiscoveryConfig(google::privacy::dlp::v2::DeleteDiscoveryConfigRequest 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::privacy::dlp::v2::DeleteDiscoveryConfigRequest const &
Returns
Type Description
Status

virtual CreateDlpJob(google::privacy::dlp::v2::CreateDlpJobRequest 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::privacy::dlp::v2::CreateDlpJobRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DlpJob >

virtual ListDlpJobs(google::privacy::dlp::v2::ListDlpJobsRequest)

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::privacy::dlp::v2::ListDlpJobsRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::DlpJob >

virtual GetDlpJob(google::privacy::dlp::v2::GetDlpJobRequest 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::privacy::dlp::v2::GetDlpJobRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::DlpJob >

virtual DeleteDlpJob(google::privacy::dlp::v2::DeleteDlpJobRequest 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::privacy::dlp::v2::DeleteDlpJobRequest const &
Returns
Type Description
Status

virtual CancelDlpJob(google::privacy::dlp::v2::CancelDlpJobRequest 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::privacy::dlp::v2::CancelDlpJobRequest const &
Returns
Type Description
Status

virtual CreateStoredInfoType(google::privacy::dlp::v2::CreateStoredInfoTypeRequest 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::privacy::dlp::v2::CreateStoredInfoTypeRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::StoredInfoType >

virtual UpdateStoredInfoType(google::privacy::dlp::v2::UpdateStoredInfoTypeRequest 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::privacy::dlp::v2::UpdateStoredInfoTypeRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::StoredInfoType >

virtual GetStoredInfoType(google::privacy::dlp::v2::GetStoredInfoTypeRequest 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::privacy::dlp::v2::GetStoredInfoTypeRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::StoredInfoType >

virtual ListStoredInfoTypes(google::privacy::dlp::v2::ListStoredInfoTypesRequest)

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::privacy::dlp::v2::ListStoredInfoTypesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::StoredInfoType >

virtual DeleteStoredInfoType(google::privacy::dlp::v2::DeleteStoredInfoTypeRequest 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::privacy::dlp::v2::DeleteStoredInfoTypeRequest const &
Returns
Type Description
Status

virtual ListProjectDataProfiles(google::privacy::dlp::v2::ListProjectDataProfilesRequest)

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::privacy::dlp::v2::ListProjectDataProfilesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::ProjectDataProfile >

virtual ListTableDataProfiles(google::privacy::dlp::v2::ListTableDataProfilesRequest)

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::privacy::dlp::v2::ListTableDataProfilesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::TableDataProfile >

virtual ListColumnDataProfiles(google::privacy::dlp::v2::ListColumnDataProfilesRequest)

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::privacy::dlp::v2::ListColumnDataProfilesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::ColumnDataProfile >

virtual GetProjectDataProfile(google::privacy::dlp::v2::GetProjectDataProfileRequest 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::privacy::dlp::v2::GetProjectDataProfileRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::ProjectDataProfile >

virtual ListFileStoreDataProfiles(google::privacy::dlp::v2::ListFileStoreDataProfilesRequest)

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::privacy::dlp::v2::ListFileStoreDataProfilesRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::FileStoreDataProfile >

virtual GetFileStoreDataProfile(google::privacy::dlp::v2::GetFileStoreDataProfileRequest 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::privacy::dlp::v2::GetFileStoreDataProfileRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::FileStoreDataProfile >

virtual DeleteFileStoreDataProfile(google::privacy::dlp::v2::DeleteFileStoreDataProfileRequest 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::privacy::dlp::v2::DeleteFileStoreDataProfileRequest const &
Returns
Type Description
Status

virtual GetTableDataProfile(google::privacy::dlp::v2::GetTableDataProfileRequest 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::privacy::dlp::v2::GetTableDataProfileRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::TableDataProfile >

virtual GetColumnDataProfile(google::privacy::dlp::v2::GetColumnDataProfileRequest 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::privacy::dlp::v2::GetColumnDataProfileRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::ColumnDataProfile >

virtual DeleteTableDataProfile(google::privacy::dlp::v2::DeleteTableDataProfileRequest 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::privacy::dlp::v2::DeleteTableDataProfileRequest const &
Returns
Type Description
Status

virtual HybridInspectDlpJob(google::privacy::dlp::v2::HybridInspectDlpJobRequest 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::privacy::dlp::v2::HybridInspectDlpJobRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::HybridInspectResponse >

virtual FinishDlpJob(google::privacy::dlp::v2::FinishDlpJobRequest 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::privacy::dlp::v2::FinishDlpJobRequest const &
Returns
Type Description
Status

virtual CreateConnection(google::privacy::dlp::v2::CreateConnectionRequest 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::privacy::dlp::v2::CreateConnectionRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::Connection >

virtual GetConnection(google::privacy::dlp::v2::GetConnectionRequest 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::privacy::dlp::v2::GetConnectionRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::Connection >

virtual ListConnections(google::privacy::dlp::v2::ListConnectionsRequest)

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::privacy::dlp::v2::ListConnectionsRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::Connection >

virtual SearchConnections(google::privacy::dlp::v2::SearchConnectionsRequest)

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::privacy::dlp::v2::SearchConnectionsRequest
Returns
Type Description
StreamRange< google::privacy::dlp::v2::Connection >

virtual DeleteConnection(google::privacy::dlp::v2::DeleteConnectionRequest 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::privacy::dlp::v2::DeleteConnectionRequest const &
Returns
Type Description
Status

virtual UpdateConnection(google::privacy::dlp::v2::UpdateConnectionRequest 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::privacy::dlp::v2::UpdateConnectionRequest const &
Returns
Type Description
StatusOr< google::privacy::dlp::v2::Connection >