trieve-client 0.11.7

Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
Documentation
/*
 * Trieve API
 *
 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
 *
 * The version of the OpenAPI document: 0.11.7
 * Contact: developers@trieve.ai
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SlimUser {
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub name: Option<Option<String>>,
    #[serde(rename = "orgs")]
    pub orgs: Vec<models::Organization>,
    #[serde(rename = "user_orgs")]
    pub user_orgs: Vec<models::UserOrganization>,
}

impl SlimUser {
    pub fn new(email: String, id: uuid::Uuid, orgs: Vec<models::Organization>, user_orgs: Vec<models::UserOrganization>) -> SlimUser {
        SlimUser {
            email,
            id,
            name: None,
            orgs,
            user_orgs,
        }
    }
}