/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * 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 UserWorkspaceListWorkspacesInner {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "username")]
    pub username: String,
    #[serde(rename = "color")]
    pub color: String,
    #[serde(rename = "operator_settings", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub operator_settings: Option<Option<Box<models::OperatorSettings>>>,
    #[serde(rename = "parent_workspace_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub parent_workspace_id: Option<Option<String>>,
    #[serde(rename = "created_by", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub created_by: Option<Option<String>>,
    #[serde(rename = "disabled")]
    pub disabled: bool,
}

impl UserWorkspaceListWorkspacesInner {
    pub fn new(id: String, name: String, username: String, color: String, disabled: bool) -> UserWorkspaceListWorkspacesInner {
        UserWorkspaceListWorkspacesInner {
            id,
            name,
            username,
            color,
            operator_settings: None,
            parent_workspace_id: None,
            created_by: None,
            disabled,
        }
    }
}

