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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAgentWorkspaceLicence200Response {
    #[serde(rename = "mode")]
    pub mode: Mode,
    #[serde(rename = "instance_uid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub instance_uid: Option<Option<String>>,
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    #[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub token: Option<Option<Box<models::GetAgentWorkspaceLicence200ResponseToken>>>,
    #[serde(rename = "missing_since", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub missing_since: Option<Option<String>>,
}

impl GetAgentWorkspaceLicence200Response {
    pub fn new(mode: Mode, workspace_id: String) -> GetAgentWorkspaceLicence200Response {
        GetAgentWorkspaceLicence200Response {
            mode,
            instance_uid: None,
            workspace_id,
            token: None,
            missing_since: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Mode {
    #[serde(rename = "instance")]
    Instance,
    #[serde(rename = "managed")]
    Managed,
}

impl Default for Mode {
    fn default() -> Mode {
        Self::Instance
    }
}