/// <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 }
/// <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 }
/// <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 }
/// <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 }
/// <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 }
/// <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 }
/// <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 }
/// <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 }