orvanta-api 1.7.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: 1.7.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

/// BpmnTokenState : where a token is parked between step passes, tagged by `type`
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BpmnTokenState {
    #[serde(rename = "type")]
    pub r#type: Type,
    /// only present when type = waiting_for_timer
    #[serde(rename = "fire_at", skip_serializing_if = "Option::is_none")]
    pub fire_at: Option<String>,
    /// only present when type = waiting_for_scope
    #[serde(rename = "scope_id", skip_serializing_if = "Option::is_none")]
    pub scope_id: Option<uuid::Uuid>,
}

impl BpmnTokenState {
    /// where a token is parked between step passes, tagged by `type`
    pub fn new(r#type: Type) -> BpmnTokenState {
        BpmnTokenState {
            r#type,
            fire_at: None,
            scope_id: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "waiting_for_job")]
    WaitingForJob,
    #[serde(rename = "waiting_for_event")]
    WaitingForEvent,
    #[serde(rename = "waiting_for_timer")]
    WaitingForTimer,
    #[serde(rename = "waiting_for_scope")]
    WaitingForScope,
    #[serde(rename = "consumed")]
    Consumed,
}

impl Default for Type {
    fn default() -> Type {
        Self::Active
    }
}