/// <summary>
 /// Gets the most recent threat list diffs.
 /// </summary>
 /// <param name="threatType">
 /// Required. The ThreatList to update.
 /// </param>
 /// <param name="versionToken">
 /// The current version token of the client for the requested list (the
 /// client version that was received from the last successful diff).
 /// </param>
 /// <param name="constraints">
 /// The constraints associated with this request.
 /// </param>
 /// <param name="cancellationToken">
 /// A <see cref="st::CancellationToken"/> to use for this RPC.
 /// </param>
 /// <returns>
 /// A Task containing the RPC response.
 /// </returns>
 public virtual stt::Task <ComputeThreatListDiffResponse> ComputeThreatListDiffAsync(
     ThreatType threatType,
     pb::ByteString versionToken,
     ComputeThreatListDiffRequest.Types.Constraints constraints,
     st::CancellationToken cancellationToken) => ComputeThreatListDiffAsync(
     threatType,
     versionToken,
     constraints,
     gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
 /// <summary>
 /// Gets the most recent threat list diffs.
 /// </summary>
 /// <param name="threatType">
 /// Required. The ThreatList to update.
 /// </param>
 /// <param name="versionToken">
 /// The current version token of the client for the requested list (the
 /// client version that was received from the last successful diff).
 /// </param>
 /// <param name="constraints">
 /// The constraints associated with this request.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// The RPC response.
 /// </returns>
 public virtual ComputeThreatListDiffResponse ComputeThreatListDiff(
     ThreatType threatType,
     pb::ByteString versionToken,
     ComputeThreatListDiffRequest.Types.Constraints constraints,
     gaxgrpc::CallSettings callSettings = null) => ComputeThreatListDiff(
     new ComputeThreatListDiffRequest
 {
     ThreatType   = threatType,
     VersionToken = versionToken ?? pb::ByteString.Empty,         // Optional
     Constraints  = gax::GaxPreconditions.CheckNotNull(constraints, nameof(constraints)),
 },
     callSettings);
예제 #3
0
        /// <summary>Snippet for ComputeThreatListDiff</summary>
        public void ComputeThreatListDiff()
        {
            // Snippet: ComputeThreatListDiff(ThreatType, ByteString, ComputeThreatListDiffRequest.Types.Constraints, CallSettings)
            // Create client
            WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.Create();
            // Initialize request argument(s)
            ThreatType threatType   = ThreatType.Unspecified;
            ByteString versionToken = ByteString.Empty;

            ComputeThreatListDiffRequest.Types.Constraints constraints = new ComputeThreatListDiffRequest.Types.Constraints();
            // Make the request
            ComputeThreatListDiffResponse response = webRiskServiceV1Beta1Client.ComputeThreatListDiff(threatType, versionToken, constraints);
            // End snippet
        }
예제 #4
0
        /// <summary>Snippet for ComputeThreatListDiffAsync</summary>
        public async Task ComputeThreatListDiffAsync()
        {
            // Snippet: ComputeThreatListDiffAsync(ThreatType, ByteString, ComputeThreatListDiffRequest.Types.Constraints, CallSettings)
            // Additional: ComputeThreatListDiffAsync(ThreatType, ByteString, ComputeThreatListDiffRequest.Types.Constraints, CancellationToken)
            // Create client
            WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = await WebRiskServiceV1Beta1Client.CreateAsync();

            // Initialize request argument(s)
            ThreatType threatType   = ThreatType.Unspecified;
            ByteString versionToken = ByteString.Empty;

            ComputeThreatListDiffRequest.Types.Constraints constraints = new ComputeThreatListDiffRequest.Types.Constraints();
            // Make the request
            ComputeThreatListDiffResponse response = await webRiskServiceV1Beta1Client.ComputeThreatListDiffAsync(threatType, versionToken, constraints);

            // End snippet
        }