openapi_github/models/
repos_create_dispatch_event_request.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 ReposCreateDispatchEventRequest {
16    /// A custom webhook event name. Must be 100 characters or fewer.
17    #[serde(rename = "event_type")]
18    pub event_type: String,
19    /// JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10.
20    #[serde(rename = "client_payload", skip_serializing_if = "Option::is_none")]
21    pub client_payload: Option<std::collections::HashMap<String, serde_json::Value>>,
22}
23
24impl ReposCreateDispatchEventRequest {
25    pub fn new(event_type: String) -> ReposCreateDispatchEventRequest {
26        ReposCreateDispatchEventRequest {
27            event_type,
28            client_payload: None,
29        }
30    }
31}
32