windmill-api 1.713.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.713.1
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateServiceAccountRequest {
    #[serde(rename = "username")]
    pub username: String,
    /// Grant the service account workspace admin. Defaults to false. Cannot be combined with operator=true.
    #[serde(rename = "is_admin", skip_serializing_if = "Option::is_none")]
    pub is_admin: Option<bool>,
    /// Make the service account an operator. Defaults to true for backward compatibility. Set to false to count as a developer (1 seat) instead of 0.5 seat.
    #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
    pub operator: Option<bool>,
    /// Add the service account to the workspace `wm_deployers` group on creation. Recommended when the account will be used as a CLI sync / CI deploy identity so it can deploy on behalf of other users.
    #[serde(rename = "add_to_deployers", skip_serializing_if = "Option::is_none")]
    pub add_to_deployers: Option<bool>,
}

impl CreateServiceAccountRequest {
    pub fn new(username: String) -> CreateServiceAccountRequest {
        CreateServiceAccountRequest {
            username,
            is_admin: None,
            operator: None,
            add_to_deployers: None,
        }
    }
}