1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.709.0
* 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,
}
}
}