hanzo_client/models/user_optin_view.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 UserOptinView {
16 /// CanSet is false when the caller's ledger identity cannot be resolved (no user name on the principal). Writing the preference would fail, so hide the control.
17 #[serde(rename = "canSet", skip_serializing_if = "Option::is_none")]
18 pub can_set: Option<bool>,
19 /// Handle is the display name on the caller's listed row. Empty when they never chose one; opting in without a handle sets it to their username, so a listed row is never blank.
20 #[serde(rename = "handle", skip_serializing_if = "Option::is_none")]
21 pub handle: Option<String>,
22 /// Listed is true when the caller's board row is published under Handle to other viewers. False — the default for anyone who never opted in — anonymizes the row; the metric still counts, only the name is withheld.
23 #[serde(rename = "listed", skip_serializing_if = "Option::is_none")]
24 pub listed: Option<bool>,
25}
26
27impl UserOptinView {
28 pub fn new() -> UserOptinView {
29 UserOptinView {
30 can_set: None,
31 handle: None,
32 listed: None,
33 }
34 }
35}
36