hanzo_client/models/test_result.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TestResult {
16 /// Delivered is whether the subscriber accepted the test POST. It is the whole answer: the send is synchronous and is not retried.
17 #[serde(rename = "delivered", skip_serializing_if = "Option::is_none")]
18 pub delivered: Option<bool>,
19 /// DurationMs is how long the single attempt took, in MILLISECONDS.
20 #[serde(rename = "durationMs", skip_serializing_if = "Option::is_none")]
21 pub duration_ms: Option<i32>,
22 /// Error says what stopped it. Empty when delivered.
23 #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
24 pub error: Option<String>,
25 /// HTTPStatus is what the subscriber answered, or 0 if it never answered.
26 #[serde(rename = "httpStatus", skip_serializing_if = "Option::is_none")]
27 pub http_status: Option<i32>,
28}
29
30impl TestResult {
31 pub fn new() -> TestResult {
32 TestResult {
33 delivered: None,
34 duration_ms: None,
35 error: None,
36 http_status: None,
37 }
38 }
39}
40