openapi_github/models/
integration_installation_request_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 IntegrationInstallationRequestAccount {
16    /// The name of the enterprise.
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub email: Option<Option<String>>,
21    #[serde(rename = "login")]
22    pub login: String,
23    /// Unique identifier of the enterprise
24    #[serde(rename = "id")]
25    pub id: i32,
26    #[serde(rename = "node_id")]
27    pub node_id: String,
28    #[serde(rename = "avatar_url")]
29    pub avatar_url: String,
30    #[serde(rename = "gravatar_id", deserialize_with = "Option::deserialize")]
31    pub gravatar_id: Option<String>,
32    #[serde(rename = "url")]
33    pub url: String,
34    #[serde(rename = "html_url")]
35    pub html_url: String,
36    #[serde(rename = "followers_url")]
37    pub followers_url: String,
38    #[serde(rename = "following_url")]
39    pub following_url: String,
40    #[serde(rename = "gists_url")]
41    pub gists_url: String,
42    #[serde(rename = "starred_url")]
43    pub starred_url: String,
44    #[serde(rename = "subscriptions_url")]
45    pub subscriptions_url: String,
46    #[serde(rename = "organizations_url")]
47    pub organizations_url: String,
48    #[serde(rename = "repos_url")]
49    pub repos_url: String,
50    #[serde(rename = "events_url")]
51    pub events_url: String,
52    #[serde(rename = "received_events_url")]
53    pub received_events_url: String,
54    #[serde(rename = "type")]
55    pub r#type: String,
56    #[serde(rename = "site_admin")]
57    pub site_admin: bool,
58    #[serde(rename = "starred_at", skip_serializing_if = "Option::is_none")]
59    pub starred_at: Option<String>,
60    /// A short description of the enterprise.
61    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
62    pub description: Option<Option<String>>,
63    /// The enterprise's website URL.
64    #[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
65    pub website_url: Option<Option<String>>,
66    /// The slug url identifier for the enterprise.
67    #[serde(rename = "slug")]
68    pub slug: String,
69    #[serde(rename = "created_at", deserialize_with = "Option::deserialize")]
70    pub created_at: Option<String>,
71    #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
72    pub updated_at: Option<String>,
73}
74
75impl IntegrationInstallationRequestAccount {
76    pub fn new(name: String, login: String, id: i32, node_id: String, avatar_url: String, gravatar_id: Option<String>, url: String, html_url: String, followers_url: String, following_url: String, gists_url: String, starred_url: String, subscriptions_url: String, organizations_url: String, repos_url: String, events_url: String, received_events_url: String, r#type: String, site_admin: bool, slug: String, created_at: Option<String>, updated_at: Option<String>) -> IntegrationInstallationRequestAccount {
77        IntegrationInstallationRequestAccount {
78            name,
79            email: None,
80            login,
81            id,
82            node_id,
83            avatar_url,
84            gravatar_id,
85            url,
86            html_url,
87            followers_url,
88            following_url,
89            gists_url,
90            starred_url,
91            subscriptions_url,
92            organizations_url,
93            repos_url,
94            events_url,
95            received_events_url,
96            r#type,
97            site_admin,
98            starred_at: None,
99            description: None,
100            website_url: None,
101            slug,
102            created_at,
103            updated_at,
104        }
105    }
106}
107