openapi_github/models/
webhook_workflow_dispatch.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 WebhookWorkflowDispatch {
16    #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
17    pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
18    #[serde(rename = "inputs", deserialize_with = "Option::deserialize")]
19    pub inputs: Option<std::collections::HashMap<String, serde_json::Value>>,
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 = "ref")]
25    pub r#ref: String,
26    #[serde(rename = "repository")]
27    pub repository: Box<models::RepositoryWebhooks>,
28    #[serde(rename = "sender")]
29    pub sender: Box<models::SimpleUserWebhooks>,
30    #[serde(rename = "workflow")]
31    pub workflow: String,
32}
33
34impl WebhookWorkflowDispatch {
35    pub fn new(inputs: Option<std::collections::HashMap<String, serde_json::Value>>, r#ref: String, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks, workflow: String) -> WebhookWorkflowDispatch {
36        WebhookWorkflowDispatch {
37            enterprise: None,
38            inputs,
39            installation: None,
40            organization: None,
41            r#ref,
42            repository: Box::new(repository),
43            sender: Box::new(sender),
44            workflow,
45        }
46    }
47}
48