openapi_github/models/
repos_create_webhook_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 ReposCreateWebhookRequest {
16    /// Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`.
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
20    pub config: Option<Box<models::ReposCreateWebhookRequestConfig>>,
21    /// Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.
22    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
23    pub events: Option<Vec<String>>,
24    /// Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
25    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
26    pub active: Option<bool>,
27}
28
29impl ReposCreateWebhookRequest {
30    pub fn new() -> ReposCreateWebhookRequest {
31        ReposCreateWebhookRequest {
32            name: None,
33            config: None,
34            events: None,
35            active: None,
36        }
37    }
38}
39