openapi_github/models/
repos_update_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 ReposUpdateWebhookRequest {
16    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
17    pub config: Option<Box<models::WebhookConfig>>,
18    /// Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.
19    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
20    pub events: Option<Vec<String>>,
21    /// Determines a list of events to be added to the list of events that the Hook triggers for.
22    #[serde(rename = "add_events", skip_serializing_if = "Option::is_none")]
23    pub add_events: Option<Vec<String>>,
24    /// Determines a list of events to be removed from the list of events that the Hook triggers for.
25    #[serde(rename = "remove_events", skip_serializing_if = "Option::is_none")]
26    pub remove_events: Option<Vec<String>>,
27    /// Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
28    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
29    pub active: Option<bool>,
30}
31
32impl ReposUpdateWebhookRequest {
33    pub fn new() -> ReposUpdateWebhookRequest {
34        ReposUpdateWebhookRequest {
35            config: None,
36            events: None,
37            add_events: None,
38            remove_events: None,
39            active: None,
40        }
41    }
42}
43