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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
* Appwrite
*
* Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
*
* The version of the OpenAPI document: 1.4.9
* Contact: team@appwrite.io
* Generated by: https://openapi-generator.tech
*/
/// Execution : Execution
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Execution {
/// Execution ID.
#[serde(rename = "$id")]
pub dollar_id: String,
/// Execution creation date in ISO 8601 format.
#[serde(rename = "$createdAt")]
pub dollar_created_at: String,
/// Execution upate date in ISO 8601 format.
#[serde(rename = "$updatedAt")]
pub dollar_updated_at: String,
/// Execution roles.
#[serde(rename = "$permissions")]
pub dollar_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`.
#[serde(rename = "trigger")]
pub trigger: String,
/// The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
#[serde(rename = "status")]
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<crate::models::Headers>,
/// HTTP response status code.
#[serde(rename = "responseStatusCode")]
pub response_status_code: i32,
/// 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<crate::models::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.
#[serde(rename = "logs")]
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.
#[serde(rename = "errors")]
pub errors: String,
/// Function execution duration in seconds.
#[serde(rename = "duration")]
pub duration: f64,
}
impl Execution {
/// Execution
pub fn new(dollar_id: String, dollar_created_at: String, dollar_updated_at: String, dollar_permissions: Vec<String>, function_id: String, trigger: String, status: String, request_method: String, request_path: String, request_headers: Vec<crate::models::Headers>, response_status_code: i32, response_body: String, response_headers: Vec<crate::models::Headers>, logs: String, errors: String, duration: f64) -> Execution {
Execution {
dollar_id,
dollar_created_at,
dollar_updated_at,
dollar_permissions,
function_id,
trigger,
status,
request_method,
request_path,
request_headers,
response_status_code,
response_body,
response_headers,
logs,
errors,
duration,
}
}
}