Google Cloud Web Risk v1 API - Class WebRiskService.WebRiskServiceClient (2.3.0)

public class WebRiskService.WebRiskServiceClient : ClientBase<WebRiskService.WebRiskServiceClient>

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

Client for WebRiskService

Inheritance

object > ClientBase > ClientBaseWebRiskServiceWebRiskServiceClient > WebRiskService.WebRiskServiceClient

Namespace

Google.Cloud.WebRisk.V1

Assembly

Google.Cloud.WebRisk.V1.dll

Constructors

WebRiskServiceClient()

protected WebRiskServiceClient()

Protected parameterless constructor to allow creation of test doubles.

WebRiskServiceClient(CallInvoker)

public WebRiskServiceClient(CallInvoker callInvoker)

Creates a new client for WebRiskService that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

WebRiskServiceClient(ChannelBase)

public WebRiskServiceClient(ChannelBase channel)

Creates a new client for WebRiskService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

WebRiskServiceClient(ClientBaseConfiguration)

protected WebRiskServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

ComputeThreatListDiff(ComputeThreatListDiffRequest, CallOptions)

public virtual ComputeThreatListDiffResponse ComputeThreatListDiff(ComputeThreatListDiffRequest request, CallOptions options)

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
NameDescription
requestComputeThreatListDiffRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ComputeThreatListDiffResponse

The response received from the server.

ComputeThreatListDiff(ComputeThreatListDiffRequest, Metadata, DateTime?, CancellationToken)

public virtual ComputeThreatListDiffResponse ComputeThreatListDiff(ComputeThreatListDiffRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestComputeThreatListDiffRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ComputeThreatListDiffResponse

The response received from the server.

ComputeThreatListDiffAsync(ComputeThreatListDiffRequest, CallOptions)

public virtual AsyncUnaryCall<ComputeThreatListDiffResponse> ComputeThreatListDiffAsync(ComputeThreatListDiffRequest request, CallOptions options)

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
NameDescription
requestComputeThreatListDiffRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallComputeThreatListDiffResponse

The call object.

ComputeThreatListDiffAsync(ComputeThreatListDiffRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ComputeThreatListDiffResponse> ComputeThreatListDiffAsync(ComputeThreatListDiffRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestComputeThreatListDiffRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallComputeThreatListDiffResponse

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

CreateSubmission(CreateSubmissionRequest, CallOptions)

public virtual Submission CreateSubmission(CreateSubmissionRequest request, CallOptions options)

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
NameDescription
requestCreateSubmissionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Submission

The response received from the server.

CreateSubmission(CreateSubmissionRequest, Metadata, DateTime?, CancellationToken)

public virtual Submission CreateSubmission(CreateSubmissionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestCreateSubmissionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Submission

The response received from the server.

CreateSubmissionAsync(CreateSubmissionRequest, CallOptions)

public virtual AsyncUnaryCall<Submission> CreateSubmissionAsync(CreateSubmissionRequest request, CallOptions options)

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
NameDescription
requestCreateSubmissionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSubmission

The call object.

CreateSubmissionAsync(CreateSubmissionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Submission> CreateSubmissionAsync(CreateSubmissionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestCreateSubmissionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallSubmission

The call object.

NewInstance(ClientBaseConfiguration)

protected override WebRiskService.WebRiskServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
WebRiskServiceWebRiskServiceClient
Overrides

SearchHashes(SearchHashesRequest, CallOptions)

public virtual SearchHashesResponse SearchHashes(SearchHashesRequest request, CallOptions options)

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
NameDescription
requestSearchHashesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SearchHashesResponse

The response received from the server.

SearchHashes(SearchHashesRequest, Metadata, DateTime?, CancellationToken)

public virtual SearchHashesResponse SearchHashes(SearchHashesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestSearchHashesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
SearchHashesResponse

The response received from the server.

SearchHashesAsync(SearchHashesRequest, CallOptions)

public virtual AsyncUnaryCall<SearchHashesResponse> SearchHashesAsync(SearchHashesRequest request, CallOptions options)

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
NameDescription
requestSearchHashesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSearchHashesResponse

The call object.

SearchHashesAsync(SearchHashesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SearchHashesResponse> SearchHashesAsync(SearchHashesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestSearchHashesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallSearchHashesResponse

The call object.

SearchUris(SearchUrisRequest, CallOptions)

public virtual SearchUrisResponse SearchUris(SearchUrisRequest request, CallOptions options)

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
NameDescription
requestSearchUrisRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
SearchUrisResponse

The response received from the server.

SearchUris(SearchUrisRequest, Metadata, DateTime?, CancellationToken)

public virtual SearchUrisResponse SearchUris(SearchUrisRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestSearchUrisRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
SearchUrisResponse

The response received from the server.

SearchUrisAsync(SearchUrisRequest, CallOptions)

public virtual AsyncUnaryCall<SearchUrisResponse> SearchUrisAsync(SearchUrisRequest request, CallOptions options)

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
NameDescription
requestSearchUrisRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallSearchUrisResponse

The call object.

SearchUrisAsync(SearchUrisRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SearchUrisResponse> SearchUrisAsync(SearchUrisRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestSearchUrisRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallSearchUrisResponse

The call object.

SubmitUri(SubmitUriRequest, CallOptions)

public virtual Operation SubmitUri(SubmitUriRequest request, CallOptions options)

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
NameDescription
requestSubmitUriRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

SubmitUri(SubmitUriRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation SubmitUri(SubmitUriRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestSubmitUriRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

SubmitUriAsync(SubmitUriRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> SubmitUriAsync(SubmitUriRequest request, CallOptions options)

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
NameDescription
requestSubmitUriRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

SubmitUriAsync(SubmitUriRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> SubmitUriAsync(SubmitUriRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestSubmitUriRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.