/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

/// AutoInviteConfig : Configuration for auto-inviting users to the workspace
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AutoInviteConfig {
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
    pub domain: Option<String>,
    /// If true, auto-invited users are added as operators. If false, they are added as developers.
    #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
    pub operator: Option<bool>,
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<Mode>,
    #[serde(rename = "instance_groups", skip_serializing_if = "Option::is_none")]
    pub instance_groups: Option<Vec<String>>,
    #[serde(rename = "instance_groups_roles", skip_serializing_if = "Option::is_none")]
    pub instance_groups_roles: Option<std::collections::HashMap<String, String>>,
}

impl AutoInviteConfig {
    /// Configuration for auto-inviting users to the workspace
    pub fn new() -> AutoInviteConfig {
        AutoInviteConfig {
            enabled: None,
            domain: None,
            operator: None,
            mode: None,
            instance_groups: None,
            instance_groups_roles: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Mode {
    #[serde(rename = "invite")]
    Invite,
    #[serde(rename = "add")]
    Add,
}

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

