hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SessionUser {
    /// Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups. Absent for an anonymous caller.
    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<String>>,
    /// Iss is the token issuer as the SPA expects to see it — the literal \"argocd\", so the UI never triggers an SSO redirect of its own. Absent for an anonymous caller.
    #[serde(rename = "iss", skip_serializing_if = "Option::is_none")]
    pub iss: Option<String>,
    /// LoggedIn reports whether this browser holds a session this console accepts.
    #[serde(rename = "loggedIn", skip_serializing_if = "Option::is_none")]
    pub logged_in: Option<bool>,
    /// LoginURL is where an anonymous caller signs in. Absent once signed in.
    #[serde(rename = "loginUrl", skip_serializing_if = "Option::is_none")]
    pub login_url: Option<String>,
    /// LogoutURL is where a signed-in caller ends the session. Absent when anonymous.
    #[serde(rename = "logoutUrl", skip_serializing_if = "Option::is_none")]
    pub logout_url: Option<String>,
    /// Username is the validated principal's user ID — the opaque gateway id, which is what argocd's UI renders as the signed-in user here — or \"admin\" when the principal carries none. Absent when anonymous.
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
}

impl SessionUser {
    pub fn new() -> SessionUser {
        SessionUser {
            groups: None,
            iss: None,
            logged_in: None,
            login_url: None,
            logout_url: None,
            username: None,
        }
    }
}