예제 #1
0
 /// <summary>Snippet for CreateSubmission</summary>
 public void CreateSubmission()
 {
     // Snippet: CreateSubmission(string, Submission, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     string     parent     = "projects/[PROJECT]";
     Submission submission = new Submission();
     // Make the request
     Submission response = webRiskServiceClient.CreateSubmission(parent, submission);
     // End snippet
 }
예제 #2
0
 /// <summary>Snippet for CreateSubmission</summary>
 public void CreateSubmissionResourceNames()
 {
     // Snippet: CreateSubmission(ProjectName, Submission, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     ProjectName parent     = ProjectName.FromProject("[PROJECT]");
     Submission  submission = new Submission();
     // Make the request
     Submission response = webRiskServiceClient.CreateSubmission(parent, submission);
     // End snippet
 }
예제 #3
0
        /// <summary>Snippet for ComputeThreatListDiff</summary>
        public void ComputeThreatListDiff()
        {
            // Snippet: ComputeThreatListDiff(ThreatType, ByteString, ComputeThreatListDiffRequest.Types.Constraints, CallSettings)
            // Create client
            WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.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 = webRiskServiceClient.ComputeThreatListDiff(threatType, versionToken, constraints);
            // End snippet
        }
예제 #4
0
 /// <summary>Snippet for CreateSubmission</summary>
 public void CreateSubmissionRequestObject()
 {
     // Snippet: CreateSubmission(CreateSubmissionRequest, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     CreateSubmissionRequest request = new CreateSubmissionRequest
     {
         ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
         Submission          = new Submission(),
     };
     // Make the request
     Submission response = webRiskServiceClient.CreateSubmission(request);
     // End snippet
 }
예제 #5
0
 /// <summary>Snippet for SearchHashes</summary>
 public void SearchHashes()
 {
     // Snippet: SearchHashes(ByteString, IEnumerable<ThreatType>, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     ByteString hashPrefix = ByteString.Empty;
     IEnumerable <ThreatType> threatTypes = new ThreatType[]
     {
         ThreatType.Unspecified,
     };
     // Make the request
     SearchHashesResponse response = webRiskServiceClient.SearchHashes(hashPrefix, threatTypes);
     // End snippet
 }
예제 #6
0
 /// <summary>Snippet for SearchUris</summary>
 public void SearchUris()
 {
     // Snippet: SearchUris(string, IEnumerable<ThreatType>, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     string uri = "";
     IEnumerable <ThreatType> threatTypes = new ThreatType[]
     {
         ThreatType.Unspecified,
     };
     // Make the request
     SearchUrisResponse response = webRiskServiceClient.SearchUris(uri, threatTypes);
     // End snippet
 }
예제 #7
0
 /// <summary>Snippet for ComputeThreatListDiff</summary>
 public void ComputeThreatListDiffRequestObject()
 {
     // Snippet: ComputeThreatListDiff(ComputeThreatListDiffRequest, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     ComputeThreatListDiffRequest request = new ComputeThreatListDiffRequest
     {
         ThreatType   = ThreatType.Unspecified,
         VersionToken = ByteString.Empty,
         Constraints  = new ComputeThreatListDiffRequest.Types.Constraints(),
     };
     // Make the request
     ComputeThreatListDiffResponse response = webRiskServiceClient.ComputeThreatListDiff(request);
     // End snippet
 }
예제 #8
0
 /// <summary>Snippet for SearchHashes</summary>
 public void SearchHashesRequestObject()
 {
     // Snippet: SearchHashes(SearchHashesRequest, CallSettings)
     // Create client
     WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.Create();
     // Initialize request argument(s)
     SearchHashesRequest request = new SearchHashesRequest
     {
         HashPrefix  = ByteString.Empty,
         ThreatTypes =
         {
             ThreatType.Unspecified,
         },
     };
     // Make the request
     SearchHashesResponse response = webRiskServiceClient.SearchHashes(request);
     // End snippet
 }