hanzo_client/models/session_user.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
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)]
15pub struct SessionUser {
16 /// 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.
17 #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
18 pub groups: Option<Vec<String>>,
19 /// 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.
20 #[serde(rename = "iss", skip_serializing_if = "Option::is_none")]
21 pub iss: Option<String>,
22 /// LoggedIn reports whether this browser holds a session this console accepts.
23 #[serde(rename = "loggedIn", skip_serializing_if = "Option::is_none")]
24 pub logged_in: Option<bool>,
25 /// LoginURL is where an anonymous caller signs in. Absent once signed in.
26 #[serde(rename = "loginUrl", skip_serializing_if = "Option::is_none")]
27 pub login_url: Option<String>,
28 /// LogoutURL is where a signed-in caller ends the session. Absent when anonymous.
29 #[serde(rename = "logoutUrl", skip_serializing_if = "Option::is_none")]
30 pub logout_url: Option<String>,
31 /// 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.
32 #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
33 pub username: Option<String>,
34}
35
36impl SessionUser {
37 pub fn new() -> SessionUser {
38 SessionUser {
39 groups: None,
40 iss: None,
41 logged_in: None,
42 login_url: None,
43 logout_url: None,
44 username: None,
45 }
46 }
47}
48