Skip to main content

hanzo_client/models/
invocation_view.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 InvocationView {
16    /// how long it took
17    #[serde(rename = "durationMs", skip_serializing_if = "Option::is_none")]
18    pub duration_ms: Option<i32>,
19    /// the invocation's handle
20    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21    pub id: Option<String>,
22    /// the HTTP method that triggered it
23    #[serde(rename = "method", skip_serializing_if = "Option::is_none")]
24    pub method: Option<String>,
25    /// how the run ended: ok, error or timeout
26    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
27    pub status: Option<String>,
28    /// Code is the status the function's OWN code answered with, which is not the status of the reply — a program can answer 500 through a healthy sandbox.
29    #[serde(rename = "statusCode", skip_serializing_if = "Option::is_none")]
30    pub status_code: Option<i32>,
31    /// when it ran, RFC3339
32    #[serde(rename = "time", skip_serializing_if = "Option::is_none")]
33    pub time: Option<String>,
34}
35
36impl InvocationView {
37    pub fn new() -> InvocationView {
38        InvocationView {
39            duration_ms: None,
40            id: None,
41            method: None,
42            status: None,
43            status_code: None,
44            time: None,
45        }
46    }
47}
48