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};

/// CmmnCaseDetail : one case instance --- its identity, and its persisted engine state
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CmmnCaseDetail {
    /// The instance id; also the id of the job running it.
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    #[serde(rename = "cmmn_case_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub cmmn_case_path: Option<Option<String>>,
    #[serde(rename = "cmmn_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub cmmn_version: Option<Option<i64>>,
    #[serde(rename = "business_key", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub business_key: Option<Option<String>>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// The full engine state. `null` only in the window between the job being pushed and its first step committing.
    #[serde(rename = "case_status", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub case_status: Option<Option<Box<models::CmmnCaseStatus>>>,
}

impl CmmnCaseDetail {
    /// one case instance --- its identity, and its persisted engine state
    pub fn new(id: uuid::Uuid, workspace_id: String, created_at: String) -> CmmnCaseDetail {
        CmmnCaseDetail {
            id,
            workspace_id,
            cmmn_case_path: None,
            cmmn_version: None,
            business_key: None,
            created_at,
            case_status: None,
        }
    }
}