syntax = "proto3"; package common; message Payload { string content_type = 1; map headers = 2; bytes body = 3; } message Action { oneof action { Webhook webhook = 1; //Tunnel tunnel = 2; } } enum HttpMethod { HttpMethod_UNKNOWN = 0; GET = 1; POST = 2; PUT = 3; DELETE = 4; HEAD = 5; PATCH = 6; } message SimpleRetry { uint32 max_num_attempts = 1; double delay_s = 2; } message ExponentialBackoffRetry { uint32 max_num_attempts = 1; double delay_s = 2; double max_delay_s = 3; } message RetryConfig { oneof policy { SimpleRetry simple = 1; ExponentialBackoffRetry exponential_backoff = 2; } } message Webhook { HttpMethod http_method = 1; string url = 2; double timeout_s = 3; RetryConfig retry = 4; } message PaginationIn { int32 limit = 1; optional string cursor = 2; } message PaginationOut { optional string next_cursor = 1; bool has_more = 2; } message Etag { string value = 1; } message RequestPrecondition { enum PreconditionType { PreconditionType_UNKNOWN = 0; // Only perform operation if the resource exists. Only makes sense in PUT // operations. MUST_EXIST = 2; // Only perform operation if the resource does **not** exist. Only makes sense // in PUT operations. MUST_NOT_EXIST = 3; // Only perform operation if existing resource matches the provided etag. MUST_MATCH = 4; // Only perform operation if existing resource does **not** match the // provided etag. MUST_NOT_MATCH = 5; } PreconditionType precondition_type = 1; // Only set on IF_MATCH and IF_NOT_MATCH. Etag etag = 2; } enum UpsertEffect { UpsertEffect_UNKNOWN = 0; CREATED = 1; MODIFIED = 2; // aka. OK NOT_MODIFIED = 3; // No change } message DateTime { string rfc3339 = 1; } // Model Ids message ProjectId { string value = 1; } message TriggerId { string value = 1; } message RunId { string value = 1; } message AttemptId { string value = 1; }