marlowe_client 0.0.5

HTTP client for the Marlowe Runtime REST API
Documentation
/*
 * Marlowe Runtime REST API
 *
 * REST API for Marlowe Runtime
 *
 * The version of the OpenAPI document: 0.0.5.1
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct MetadataAndScript {
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<crate::models::TokenMetadata>,
    /// The type of script receiving the role token.
    #[serde(rename = "script")]
    pub script: Script,
}

impl MetadataAndScript {
    pub fn new(script: Script) -> MetadataAndScript {
        MetadataAndScript {
            metadata: None,
            script,
        }
    }
}

/// The type of script receiving the role token.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Script {
    #[serde(rename = "OpenRole")]
    OpenRole,
}

impl Default for Script {
    fn default() -> Script {
        Self::OpenRole
    }
}