openapi_github/models/
email.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Email : Email
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Email {
17    #[serde(rename = "email")]
18    pub email: String,
19    #[serde(rename = "primary")]
20    pub primary: bool,
21    #[serde(rename = "verified")]
22    pub verified: bool,
23    #[serde(rename = "visibility", deserialize_with = "Option::deserialize")]
24    pub visibility: Option<String>,
25}
26
27impl Email {
28    /// Email
29    pub fn new(email: String, primary: bool, verified: bool, visibility: Option<String>) -> Email {
30        Email {
31            email,
32            primary,
33            verified,
34            visibility,
35        }
36    }
37}
38