123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- syntax = "proto3";
- package google.cloud.webrisk.v1beta1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/protobuf/timestamp.proto";
- option csharp_namespace = "Google.Cloud.WebRisk.V1Beta1";
- option go_package = "google.golang.org/genproto/googleapis/cloud/webrisk/v1beta1;webrisk";
- option java_multiple_files = true;
- option java_outer_classname = "WebRiskProto";
- option java_package = "com.google.webrisk.v1beta1";
- option objc_class_prefix = "GCWR";
- option php_namespace = "Google\\Cloud\\WebRisk\\V1beta1";
- option ruby_package = "Google::Cloud::WebRisk::V1beta1";
- service WebRiskServiceV1Beta1 {
- option (google.api.default_host) = "webrisk.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
-
- rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) returns (ComputeThreatListDiffResponse) {
- option (google.api.http) = {
- get: "/v1beta1/threatLists:computeDiff"
- };
- option (google.api.method_signature) = "threat_type,version_token,constraints";
- }
-
- rpc SearchUris(SearchUrisRequest) returns (SearchUrisResponse) {
- option (google.api.http) = {
- get: "/v1beta1/uris:search"
- };
- option (google.api.method_signature) = "uri,threat_types";
- }
-
-
-
-
-
- rpc SearchHashes(SearchHashesRequest) returns (SearchHashesResponse) {
- option (google.api.http) = {
- get: "/v1beta1/hashes:search"
- };
- option (google.api.method_signature) = "hash_prefix,threat_types";
- }
- }
- message ComputeThreatListDiffRequest {
-
- message Constraints {
-
-
-
- int32 max_diff_entries = 1;
-
-
-
- int32 max_database_entries = 2;
-
- repeated CompressionType supported_compressions = 3;
- }
-
- ThreatType threat_type = 1 [(google.api.field_behavior) = REQUIRED];
-
-
- bytes version_token = 2;
-
- Constraints constraints = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message ComputeThreatListDiffResponse {
-
- message Checksum {
-
-
- bytes sha256 = 1;
- }
-
- enum ResponseType {
-
- RESPONSE_TYPE_UNSPECIFIED = 0;
-
- DIFF = 1;
-
-
-
- RESET = 2;
- }
-
-
- ResponseType response_type = 4;
-
- ThreatEntryAdditions additions = 5;
-
-
- ThreatEntryRemovals removals = 6;
-
- bytes new_version_token = 7;
-
-
-
-
- Checksum checksum = 8;
-
-
-
-
- google.protobuf.Timestamp recommended_next_diff = 2;
- }
- message SearchUrisRequest {
-
- string uri = 1 [(google.api.field_behavior) = REQUIRED];
-
- repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message SearchUrisResponse {
-
- message ThreatUri {
-
- repeated ThreatType threat_types = 1;
-
-
- google.protobuf.Timestamp expire_time = 2;
- }
-
- ThreatUri threat = 1;
- }
- message SearchHashesRequest {
-
-
- bytes hash_prefix = 1;
-
- repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message SearchHashesResponse {
-
- message ThreatHash {
-
-
- repeated ThreatType threat_types = 1;
-
-
- bytes hash = 2;
-
-
- google.protobuf.Timestamp expire_time = 3;
- }
-
-
- repeated ThreatHash threats = 1;
-
-
- google.protobuf.Timestamp negative_expire_time = 2;
- }
- message ThreatEntryAdditions {
-
-
- repeated RawHashes raw_hashes = 1;
-
-
-
- RiceDeltaEncoding rice_hashes = 2;
- }
- message ThreatEntryRemovals {
-
- RawIndices raw_indices = 1;
-
-
-
-
- RiceDeltaEncoding rice_indices = 2;
- }
- enum ThreatType {
-
- THREAT_TYPE_UNSPECIFIED = 0;
-
- MALWARE = 1;
-
- SOCIAL_ENGINEERING = 2;
-
- UNWANTED_SOFTWARE = 3;
- }
- enum CompressionType {
-
- COMPRESSION_TYPE_UNSPECIFIED = 0;
-
- RAW = 1;
-
- RICE = 2;
- }
- message RawIndices {
-
- repeated int32 indices = 1;
- }
- message RawHashes {
-
-
- int32 prefix_size = 1;
-
-
-
- bytes raw_hashes = 2;
- }
- message RiceDeltaEncoding {
-
-
-
- int64 first_value = 1;
-
-
- int32 rice_parameter = 2;
-
-
-
- int32 entry_count = 3;
-
- bytes encoded_data = 4;
- }
|