openapi_github/models/
app_15.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/// App15 : GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct App15 {
17    #[serde(rename = "created_at", deserialize_with = "Option::deserialize")]
18    pub created_at: Option<String>,
19    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
20    pub description: Option<String>,
21    /// The list of events for the GitHub app
22    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
23    pub events: Option<Vec<Events>>,
24    #[serde(rename = "external_url", deserialize_with = "Option::deserialize")]
25    pub external_url: Option<String>,
26    #[serde(rename = "html_url")]
27    pub html_url: String,
28    /// Unique identifier of the GitHub app
29    #[serde(rename = "id", deserialize_with = "Option::deserialize")]
30    pub id: Option<i32>,
31    /// The name of the GitHub app
32    #[serde(rename = "name")]
33    pub name: String,
34    #[serde(rename = "node_id")]
35    pub node_id: String,
36    #[serde(rename = "owner", deserialize_with = "Option::deserialize")]
37    pub owner: Option<Box<models::User>>,
38    #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
39    pub permissions: Option<Box<models::AppPermissions>>,
40    /// The slug name of the GitHub app
41    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
42    pub slug: Option<String>,
43    #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
44    pub updated_at: Option<String>,
45}
46
47impl App15 {
48    /// GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
49    pub fn new(created_at: Option<String>, description: Option<String>, external_url: Option<String>, html_url: String, id: Option<i32>, name: String, node_id: String, owner: Option<models::User>, updated_at: Option<String>) -> App15 {
50        App15 {
51            created_at,
52            description,
53            events: None,
54            external_url,
55            html_url,
56            id,
57            name,
58            node_id,
59            owner: owner.map(Box::new),
60            permissions: None,
61            slug: None,
62            updated_at,
63        }
64    }
65}
66/// The list of events for the GitHub app
67#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
68pub enum Events {
69    #[serde(rename = "branch_protection_rule")]
70    BranchProtectionRule,
71    #[serde(rename = "check_run")]
72    CheckRun,
73    #[serde(rename = "check_suite")]
74    CheckSuite,
75    #[serde(rename = "code_scanning_alert")]
76    CodeScanningAlert,
77    #[serde(rename = "commit_comment")]
78    CommitComment,
79    #[serde(rename = "content_reference")]
80    ContentReference,
81    #[serde(rename = "create")]
82    Create,
83    #[serde(rename = "delete")]
84    Delete,
85    #[serde(rename = "deployment")]
86    Deployment,
87    #[serde(rename = "deployment_review")]
88    DeploymentReview,
89    #[serde(rename = "deployment_status")]
90    DeploymentStatus,
91    #[serde(rename = "deploy_key")]
92    DeployKey,
93    #[serde(rename = "discussion")]
94    Discussion,
95    #[serde(rename = "discussion_comment")]
96    DiscussionComment,
97    #[serde(rename = "fork")]
98    Fork,
99    #[serde(rename = "gollum")]
100    Gollum,
101    #[serde(rename = "issues")]
102    Issues,
103    #[serde(rename = "issue_comment")]
104    IssueComment,
105    #[serde(rename = "label")]
106    Label,
107    #[serde(rename = "member")]
108    Member,
109    #[serde(rename = "membership")]
110    Membership,
111    #[serde(rename = "milestone")]
112    Milestone,
113    #[serde(rename = "organization")]
114    Organization,
115    #[serde(rename = "org_block")]
116    OrgBlock,
117    #[serde(rename = "page_build")]
118    PageBuild,
119    #[serde(rename = "project")]
120    Project,
121    #[serde(rename = "project_card")]
122    ProjectCard,
123    #[serde(rename = "project_column")]
124    ProjectColumn,
125    #[serde(rename = "public")]
126    Public,
127    #[serde(rename = "pull_request")]
128    PullRequest,
129    #[serde(rename = "pull_request_review")]
130    PullRequestReview,
131    #[serde(rename = "pull_request_review_comment")]
132    PullRequestReviewComment,
133    #[serde(rename = "push")]
134    Push,
135    #[serde(rename = "registry_package")]
136    RegistryPackage,
137    #[serde(rename = "release")]
138    Release,
139    #[serde(rename = "repository")]
140    Repository,
141    #[serde(rename = "repository_dispatch")]
142    RepositoryDispatch,
143    #[serde(rename = "secret_scanning_alert")]
144    SecretScanningAlert,
145    #[serde(rename = "star")]
146    Star,
147    #[serde(rename = "status")]
148    Status,
149    #[serde(rename = "team")]
150    Team,
151    #[serde(rename = "team_add")]
152    TeamAdd,
153    #[serde(rename = "watch")]
154    Watch,
155    #[serde(rename = "workflow_dispatch")]
156    WorkflowDispatch,
157    #[serde(rename = "workflow_run")]
158    WorkflowRun,
159    #[serde(rename = "reminder")]
160    Reminder,
161}
162
163impl Default for Events {
164    fn default() -> Events {
165        Self::BranchProtectionRule
166    }
167}
168