1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeliveryRow {
/// Attempt is which try this row is, starting at 1. The ladder waits 1s, then 5s, then 25s before the next one.
#[serde(rename = "attempt", skip_serializing_if = "Option::is_none")]
pub attempt: Option<i32>,
/// Created is when the attempt was made, RFC3339 in UTC.
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
pub created: Option<String>,
/// DeliveryID groups the attempts for ONE event to ONE endpoint. Rows sharing it are the same delivery being retried, not separate events.
#[serde(rename = "delivery", skip_serializing_if = "Option::is_none")]
pub delivery: Option<String>,
/// DurationMs is how long this attempt took end to end, in MILLISECONDS.
#[serde(rename = "durationMs", skip_serializing_if = "Option::is_none")]
pub duration_ms: Option<i32>,
/// EndpointID is which subscriber this attempt was for.
#[serde(rename = "endpoint", skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
/// Error says what went wrong on a non-ok attempt. Empty on success.
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
/// HTTPStatus is what the subscriber answered. ZERO means it never answered — a refused connection, a DNS failure or a timeout — which is why a zero here is not a 200.
#[serde(rename = "httpStatus", skip_serializing_if = "Option::is_none")]
pub http_status: Option<i32>,
/// Status is \"ok\" when the subscriber accepted it, \"retrying\" while a further attempt will follow, and \"failed\" when none will. Exactly one row of a delivery is terminal.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Subject is the event that was delivered (\"commerce.order.created\"). A manual test send carries \"webhook.test\".
#[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
}
impl DeliveryRow {
pub fn new() -> DeliveryRow {
DeliveryRow {
attempt: None,
created: None,
delivery: None,
duration_ms: None,
endpoint: None,
error: None,
http_status: None,
status: None,
subject: None,
}
}
}