openapi_github/models/
webhook_workflow_job_queued.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookWorkflowJobQueued {
16 #[serde(rename = "action")]
17 pub action: Action,
18 #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
19 pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
20 #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
21 pub installation: Option<Box<models::SimpleInstallation>>,
22 #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
23 pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
24 #[serde(rename = "repository")]
25 pub repository: Box<models::RepositoryWebhooks>,
26 #[serde(rename = "sender")]
27 pub sender: Box<models::SimpleUserWebhooks>,
28 #[serde(rename = "workflow_job")]
29 pub workflow_job: Box<models::WebhookWorkflowJobQueuedWorkflowJob>,
30 #[serde(rename = "deployment", skip_serializing_if = "Option::is_none")]
31 pub deployment: Option<Box<models::Deployment>>,
32}
33
34impl WebhookWorkflowJobQueued {
35 pub fn new(action: Action, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks, workflow_job: models::WebhookWorkflowJobQueuedWorkflowJob) -> WebhookWorkflowJobQueued {
36 WebhookWorkflowJobQueued {
37 action,
38 enterprise: None,
39 installation: None,
40 organization: None,
41 repository: Box::new(repository),
42 sender: Box::new(sender),
43 workflow_job: Box::new(workflow_job),
44 deployment: None,
45 }
46 }
47}
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Action {
51 #[serde(rename = "queued")]
52 Queued,
53}
54
55impl Default for Action {
56 fn default() -> Action {
57 Self::Queued
58 }
59}
60