orvanta-api 6.5.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 6.5.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CmmnCaseModel : A case model joined with its latest version — the `get/{path}` shape. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CmmnCaseModel {
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "summary")]
    pub summary: String,
    #[serde(rename = "description")]
    pub description: String,
    /// The CMMN 1.1 XML, byte-for-byte as deployed
    #[serde(rename = "cmmn_xml")]
    pub cmmn_xml: String,
    /// The case's input schema, when the author declared one. Free-form here rather than a `$ref`: it is the same JSON-Schema-shaped object scripts and flows use, and it has no component of its own. 
    #[serde(rename = "schema", skip_serializing_if = "Option::is_none")]
    pub schema: Option<serde_json::Value>,
    #[serde(rename = "edited_by")]
    pub edited_by: String,
    #[serde(rename = "edited_at")]
    pub edited_at: String,
    #[serde(rename = "archived")]
    pub archived: bool,
    #[serde(rename = "extra_perms")]
    pub extra_perms: std::collections::HashMap<String, bool>,
    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
    pub draft_only: Option<bool>,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
    /// The `cmmn_case_model_version.id` this response was read from. A running case pins this id, never the path — which is what makes a rename safe (#1343). 
    #[serde(rename = "version_id")]
    pub version_id: i64,
}

impl CmmnCaseModel {
    /// A case model joined with its latest version — the `get/{path}` shape. 
    pub fn new(workspace_id: String, path: String, summary: String, description: String, cmmn_xml: String, edited_by: String, edited_at: String, archived: bool, extra_perms: std::collections::HashMap<String, bool>, version_id: i64) -> CmmnCaseModel {
        CmmnCaseModel {
            workspace_id,
            path,
            summary,
            description,
            cmmn_xml,
            schema: None,
            edited_by,
            edited_at,
            archived,
            extra_perms,
            draft_only: None,
            labels: None,
            version_id,
        }
    }
}