/*
 * 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 ExportedInstanceGroup {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<String>,
    #[serde(rename = "emails", skip_serializing_if = "Option::is_none")]
    pub emails: Option<Vec<String>>,
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "scim_display_name", skip_serializing_if = "Option::is_none")]
    pub scim_display_name: Option<String>,
    #[serde(rename = "external_id", skip_serializing_if = "Option::is_none")]
    pub external_id: Option<String>,
    #[serde(rename = "instance_role", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub instance_role: Option<Option<InstanceRole>>,
}

impl ExportedInstanceGroup {
    pub fn new(name: String) -> ExportedInstanceGroup {
        ExportedInstanceGroup {
            name,
            summary: None,
            emails: None,
            id: None,
            scim_display_name: None,
            external_id: None,
            instance_role: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum InstanceRole {
    #[serde(rename = "superadmin")]
    Superadmin,
    #[serde(rename = "devops")]
    Devops,
}

impl Default for InstanceRole {
    fn default() -> InstanceRole {
        Self::Superadmin
    }
}

