openapi_github/models/
marketplace_account.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MarketplaceAccount {
16    #[serde(rename = "url")]
17    pub url: String,
18    #[serde(rename = "id")]
19    pub id: i32,
20    #[serde(rename = "type")]
21    pub r#type: String,
22    #[serde(rename = "node_id", skip_serializing_if = "Option::is_none")]
23    pub node_id: Option<String>,
24    #[serde(rename = "login")]
25    pub login: String,
26    #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub email: Option<Option<String>>,
28    #[serde(rename = "organization_billing_email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub organization_billing_email: Option<Option<String>>,
30}
31
32impl MarketplaceAccount {
33    pub fn new(url: String, id: i32, r#type: String, login: String) -> MarketplaceAccount {
34        MarketplaceAccount {
35            url,
36            id,
37            r#type,
38            node_id: None,
39            login,
40            email: None,
41            organization_billing_email: None,
42        }
43    }
44}
45