appwrite_openapi 1.0.0

AUTO-GENERATED client for Appwrite. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
Documentation
/*
 * 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,
        }
    }
}