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
61
62
63
64
65
66
67
68
69
70
71
use serde::{Deserialize, Serialize};
use super::headers::Headers;
/// Execution
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq)]
pub struct Execution {
/// Execution ID.
#[serde(rename = "$id")]
pub id: String,
/// Execution creation date in ISO 8601 format.
#[serde(rename = "$createdAt")]
pub created_at: String,
/// Execution upate date in ISO 8601 format.
#[serde(rename = "$updatedAt")]
pub updated_at: String,
/// Execution roles.
#[serde(rename = "$permissions")]
pub permissions: Vec<String>,
/// Function ID.
#[serde(rename = "functionId")]
pub function_id: String,
/// The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
pub trigger: String,
/// The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
pub status: String,
/// HTTP request method type.
#[serde(rename = "requestMethod")]
pub request_method: String,
/// HTTP request path and query.
#[serde(rename = "requestPath")]
pub request_path: String,
/// HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
#[serde(rename = "requestHeaders")]
pub request_headers: Vec<Headers>,
/// HTTP response status code.
#[serde(rename = "responseStatusCode")]
pub response_status_code: usize,
/// HTTP response body. This will return empty unless execution is created as synchronous.
#[serde(rename = "responseBody")]
pub response_body: String,
/// HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
#[serde(rename = "responseHeaders")]
pub response_headers: Vec<Headers>,
/// Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
pub logs: String,
/// Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
pub errors: String,
/// Function execution duration in seconds.
pub duration: f64,
/// The scheduled time for execution. If left empty, execution will be queued immediately.
#[serde(rename = "scheduleAt")]
pub schedule_at: Option<String>,
}