langfuse_client/models/
scim_create_user_request.rs

1/*
2 * langfuse
3 *
4 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Postman collection: https://cloud.langfuse.com/generated/postman/collection.json
5 *
6 * The version of the OpenAPI document: 
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15#[cfg_attr(feature="bon", derive(bon::Builder))]
16pub struct ScimCreateUserRequest {
17    /// User's email address (required)
18    #[serde(rename = "userName")]
19    pub user_name: String,
20    #[serde(rename = "name")]
21    pub name: models::ScimName,
22    /// User's email addresses
23    #[serde(rename = "emails", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub emails: Option<Option<Vec<models::ScimEmail>>>,
25    /// Whether the user is active
26    #[serde(rename = "active", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub active: Option<Option<bool>>,
28    /// Initial password for the user
29    #[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub password: Option<Option<String>>,
31}
32
33impl ScimCreateUserRequest {
34    pub fn new(user_name: String, name: models::ScimName) -> ScimCreateUserRequest {
35        ScimCreateUserRequest {
36            user_name,
37            name,
38            emails: None,
39            active: None,
40            password: None,
41        }
42    }
43}
44