syntax = "proto3"; package proofpoint.esm.scoringapi.v1; option go_package = "hq-stash.corp.proofpoint.com/epa/grpc-apis-go/scoringapi/v1"; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "ESM Scoring API"; version: "v1.0.0"; contact: { name: "ESM Team"; email: "x-d4-esm@proofpoint.com"; }; }; external_docs: { url: "https://proofpoint.atlassian.net/wiki/spaces/TSPBU/pages/132430684/EPA+Design+Draft"; description: "More about the EMail Protection API Project"; } schemes: HTTPS; schemes: HTTP; consumes: "application/json"; produces: "application/json"; }; service Scoring { rpc Score(ScoreRequest) returns (ScoreResponse) { option (google.api.http) = { post : "/api/epa/scoringapi/v1/score" additional_bindings { post : "/v2/score" } }; } }; message ScoreRequest { string reverse = 1 [json_name = "reverse"]; string orig_guid = 2 [json_name = "origGuid"]; string sender = 3 [json_name = "sender"]; repeated MessagePart message_parts = 4 [json_name = "messageParts"]; repeated string urls = 5 [json_name = "urls"]; string from = 6 [json_name = "from"]; string reply_to = 7 [json_name = "replyTo"]; string uuid = 8 [json_name = "uuid"]; string msg_time = 9 [json_name = "msgTime"]; repeated string recipients = 10 [json_name = "recipients"]; string customer_guid = 11 [json_name = "customerGuid"]; Parameters parameters = 12 [json_name = "parameters"]; int64 message_length = 13 [json_name = "messageLength"]; string customer_id = 14 [json_name = "customerId"]; string clx_data = 15 [json_name = "clxData"]; string helo = 16 [json_name = "helo"]; string sender_ip = 17 [json_name = "senderIp"]; string sender_country = 18 [json_name = "senderCountry"]; message MessagePart { string disposition = 1 [json_name = "disposition"]; int64 size_decoded_bytes = 2 [json_name = "sizeDecodedBytes"]; string detected_mime = 3 [json_name = "detectedMime"]; int64 protected = 4 [json_name = "protected"]; string md5 = 5 [json_name = "md5"]; string sha256 = 6 [json_name = "sha256"]; string labeled_name = 7 [json_name = "labeledName"]; string detected_ext = 8 [json_name = "detectedExt"]; } message Parameters { bool is_rflect = 1 [json_name = "isReflect"]; string pressure_any = 2 [json_name = "pressureAny"]; string pressure_anywait = 3 [json_name = "pressureAnywait"]; string message_id = 4 [json_name = "messageId"]; google.protobuf.Any auth_result = 5 [json_name = "authResult"]; bool hashing_enabled = 6 [json_name = "hashingEnabled"]; } } message ScoreResponse { MessageHold message_hold = 1 [json_name = "messageHold"]; string orig_guid = 2 [json_name = "origGuid"]; google.protobuf.Struct annotations = 3 [json_name = "annotations"]; google.protobuf.Timestamp msg_time = 4 [json_name = "msgTime"]; map classifiers = 5 [json_name = "classifiers"]; FinalClassifier final_classifier = 6 [json_name = "finalClassifier"]; int64 pressure_any = 7 [json_name = "pressureAny"]; float pressure_any_wait = 8 [json_name = "pressureAnywait"]; string supernova_process_time = 9 [json_name = "supernovaProcessTime"]; string guid = 10 [json_name = "guid"]; google.protobuf.Timestamp response_time = 11 [json_name = "responseTime"]; message MessageHold { HoldReasons hold_reasons = 1 [json_name = "holdReasons"]; string message_hold_recommendation = 2 [json_name = "messageHoldRecommendation"]; string status = 3 [json_name = "status"]; float score = 4 [json_name = "score"]; message HoldReasons { UdHold ud_hold = 1 [json_name = "udHold"]; message UdHold { repeated string urls = 1 [json_name = "urls"]; } } } message FinalClassifier { google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp"]; string mode = 2 [json_name = "mode"]; string version = 3 [json_name = "version"]; string status = 4 [json_name = "status"]; string detection_stage = 5 [json_name = "detectionStage"]; Explainability explainability = 6 [json_name = "explainability"]; string name = 7 [json_name = "name"]; repeated Classification classifications = 8 [json_name = "classifications"]; message Explainability { repeated string supportive_classifiers = 1 [json_name = "supportiveClassifiers"]; } } message Classifier { google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp"]; string mode = 2 [json_name = "mode"]; string version = 3 [json_name = "version"]; string status = 4 [json_name = "status"]; string detection_stage = 5 [json_name = "detectionStage"]; map metadata = 6 [json_name = "metadata"]; Explainability explainability = 7 [json_name = "explainability"]; string name = 8 [json_name = "name"]; repeated Classification classifications = 9 [json_name = "classifications"]; google.protobuf.Any error = 10 [json_name = "error,omitempty"]; } message Classification { float confidence = 1 [json_name = "confidence"]; string classification = 2 [json_name = "classification"]; } message Explainability { string reason = 1 [json_name = "reason"]; map metadata = 2 [json_name = "metadata"]; repeated string themes = 3 [json_name = "themes"]; string deception = 4 [json_name = "deception"]; } }