openapi_github/models/
webhook_meta_deleted_hook_config.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 WebhookMetaDeletedHookConfig {
16    #[serde(rename = "content_type")]
17    pub content_type: ContentType,
18    #[serde(rename = "insecure_ssl")]
19    pub insecure_ssl: String,
20    #[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
21    pub secret: Option<String>,
22    #[serde(rename = "url")]
23    pub url: String,
24}
25
26impl WebhookMetaDeletedHookConfig {
27    pub fn new(content_type: ContentType, insecure_ssl: String, url: String) -> WebhookMetaDeletedHookConfig {
28        WebhookMetaDeletedHookConfig {
29            content_type,
30            insecure_ssl,
31            secret: None,
32            url,
33        }
34    }
35}
36/// 
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum ContentType {
39    #[serde(rename = "json")]
40    Json,
41    #[serde(rename = "form")]
42    Form,
43}
44
45impl Default for ContentType {
46    fn default() -> ContentType {
47        Self::Json
48    }
49}
50