Google Cloud Web Risk v1 API - Class WebRiskServiceClientImpl (2.5.0)

public sealed class WebRiskServiceClientImpl : WebRiskServiceClient

Reference documentation and code samples for the Google Cloud Web Risk v1 API class WebRiskServiceClientImpl.

WebRiskService client wrapper implementation, for convenient use.

Inheritance

object > WebRiskServiceClient > WebRiskServiceClientImpl

Namespace

Google.Cloud.WebRisk.V1

Assembly

Google.Cloud.WebRisk.V1.dll

Remarks

Web Risk API defines an interface to detect malicious URLs on your website and in client applications.

Constructors

WebRiskServiceClientImpl(WebRiskServiceClient, WebRiskServiceSettings, ILogger)

public WebRiskServiceClientImpl(WebRiskService.WebRiskServiceClient grpcClient, WebRiskServiceSettings settings, ILogger logger)

Constructs a client wrapper for the WebRiskService service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient WebRiskServiceWebRiskServiceClient

The underlying gRPC client.

settings WebRiskServiceSettings

The base WebRiskServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override WebRiskService.WebRiskServiceClient GrpcClient { get; }

The underlying gRPC WebRiskService client

Property Value
Type Description
WebRiskServiceWebRiskServiceClient
Overrides

SubmitUriOperationsClient

public override OperationsClient SubmitUriOperationsClient { get; }

The long-running operations client for SubmitUri.

Property Value
Type Description
OperationsClient
Overrides

Methods

ComputeThreatListDiff(ComputeThreatListDiffRequest, CallSettings)

public override ComputeThreatListDiffResponse ComputeThreatListDiff(ComputeThreatListDiffRequest request, CallSettings callSettings = null)

Gets the most recent threat list diffs. These diffs should be applied to a local database of hashes to keep it up-to-date. If the local database is empty or excessively out-of-date, a complete snapshot of the database will be returned. This Method only updates a single ThreatList at a time. To update multiple ThreatList databases, this method needs to be called once for each list.

Parameters
Name Description
request ComputeThreatListDiffRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ComputeThreatListDiffResponse

The RPC response.

Overrides

ComputeThreatListDiffAsync(ComputeThreatListDiffRequest, CallSettings)

public override Task<ComputeThreatListDiffResponse> ComputeThreatListDiffAsync(ComputeThreatListDiffRequest request, CallSettings callSettings = null)

Gets the most recent threat list diffs. These diffs should be applied to a local database of hashes to keep it up-to-date. If the local database is empty or excessively out-of-date, a complete snapshot of the database will be returned. This Method only updates a single ThreatList at a time. To update multiple ThreatList databases, this method needs to be called once for each list.

Parameters
Name Description
request ComputeThreatListDiffRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskComputeThreatListDiffResponse

A Task containing the RPC response.

Overrides

CreateSubmission(CreateSubmissionRequest, CallSettings)

public override Submission CreateSubmission(CreateSubmissionRequest request, CallSettings callSettings = null)

Creates a Submission of a URI suspected of containing phishing content to be reviewed. If the result verifies the existence of malicious phishing content, the site will be added to the Google's Social Engineering lists in order to protect users that could get exposed to this threat in the future. Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.

Parameters
Name Description
request CreateSubmissionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Submission

The RPC response.

Overrides

CreateSubmissionAsync(CreateSubmissionRequest, CallSettings)

public override Task<Submission> CreateSubmissionAsync(CreateSubmissionRequest request, CallSettings callSettings = null)

Creates a Submission of a URI suspected of containing phishing content to be reviewed. If the result verifies the existence of malicious phishing content, the site will be added to the Google's Social Engineering lists in order to protect users that could get exposed to this threat in the future. Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.

Parameters
Name Description
request CreateSubmissionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSubmission

A Task containing the RPC response.

Overrides

SearchHashes(SearchHashesRequest, CallSettings)

public override SearchHashesResponse SearchHashes(SearchHashesRequest request, CallSettings callSettings = null)

Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat.

Parameters
Name Description
request SearchHashesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SearchHashesResponse

The RPC response.

Overrides

SearchHashesAsync(SearchHashesRequest, CallSettings)

public override Task<SearchHashesResponse> SearchHashesAsync(SearchHashesRequest request, CallSettings callSettings = null)

Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat.

Parameters
Name Description
request SearchHashesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSearchHashesResponse

A Task containing the RPC response.

Overrides

SearchUris(SearchUrisRequest, CallSettings)

public override SearchUrisResponse SearchUris(SearchUrisRequest request, CallSettings callSettings = null)

This method is used to check whether a URI is on a given threatList. Multiple threatLists may be searched in a single query. The response will list all requested threatLists the URI was found to match. If the URI is not found on any of the requested ThreatList an empty response will be returned.

Parameters
Name Description
request SearchUrisRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SearchUrisResponse

The RPC response.

Overrides

SearchUrisAsync(SearchUrisRequest, CallSettings)

public override Task<SearchUrisResponse> SearchUrisAsync(SearchUrisRequest request, CallSettings callSettings = null)

This method is used to check whether a URI is on a given threatList. Multiple threatLists may be searched in a single query. The response will list all requested threatLists the URI was found to match. If the URI is not found on any of the requested ThreatList an empty response will be returned.

Parameters
Name Description
request SearchUrisRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSearchUrisResponse

A Task containing the RPC response.

Overrides

SubmitUri(SubmitUriRequest, CallSettings)

public override Operation<Submission, SubmitUriMetadata> SubmitUri(SubmitUriRequest request, CallSettings callSettings = null)

Submits a URI suspected of containing malicious content to be reviewed. Returns a google.longrunning.Operation which, once the review is complete, is updated with its result. You can use the Pub/Sub API to receive notifications for the returned Operation. If the result verifies the existence of malicious content, the site will be added to the Google's Social Engineering lists in order to protect users that could get exposed to this threat in the future. Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.

Parameters
Name Description
request SubmitUriRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationSubmissionSubmitUriMetadata

The RPC response.

Overrides

SubmitUriAsync(SubmitUriRequest, CallSettings)

public override Task<Operation<Submission, SubmitUriMetadata>> SubmitUriAsync(SubmitUriRequest request, CallSettings callSettings = null)

Submits a URI suspected of containing malicious content to be reviewed. Returns a google.longrunning.Operation which, once the review is complete, is updated with its result. You can use the Pub/Sub API to receive notifications for the returned Operation. If the result verifies the existence of malicious content, the site will be added to the Google's Social Engineering lists in order to protect users that could get exposed to this threat in the future. Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.

Parameters
Name Description
request SubmitUriRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationSubmissionSubmitUriMetadata

A Task containing the RPC response.

Overrides