1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* 
 * Sematext Cloud API
 *
 * API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
 *
 * OpenAPI spec version: v3
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */


#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct UserInfo {
  #[serde(rename = "loginName")]
  login_name: Option<String>
}

impl UserInfo {
  pub fn new() -> UserInfo {
    UserInfo {
      login_name: None
    }
  }

  pub fn set_login_name(&mut self, login_name: String) {
    self.login_name = Some(login_name);
  }

  pub fn with_login_name(mut self, login_name: String) -> UserInfo {
    self.login_name = Some(login_name);
    self
  }

  pub fn login_name(&self) -> Option<&String> {
    self.login_name.as_ref()
  }

  pub fn reset_login_name(&mut self) {
    self.login_name = None;
  }

}