openapi-github 0.1.0

OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
Documentation
/*
 * GitHub's official OpenAPI spec + Octokit extension
 *
 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
 *
 * The version of the OpenAPI document: 16.6.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookGollumPagesInner {
    /// The action that was performed on the page. Can be `created` or `edited`.
    #[serde(rename = "action")]
    pub action: Action,
    /// Points to the HTML wiki page.
    #[serde(rename = "html_url")]
    pub html_url: String,
    /// The name of the page.
    #[serde(rename = "page_name")]
    pub page_name: String,
    /// The latest commit SHA of the page.
    #[serde(rename = "sha")]
    pub sha: String,
    #[serde(rename = "summary", deserialize_with = "Option::deserialize")]
    pub summary: Option<String>,
    /// The current page title.
    #[serde(rename = "title")]
    pub title: String,
}

impl WebhookGollumPagesInner {
    pub fn new(action: Action, html_url: String, page_name: String, sha: String, summary: Option<String>, title: String) -> WebhookGollumPagesInner {
        WebhookGollumPagesInner {
            action,
            html_url,
            page_name,
            sha,
            summary,
            title,
        }
    }
}
/// The action that was performed on the page. Can be `created` or `edited`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Action {
    #[serde(rename = "created")]
    Created,
    #[serde(rename = "edited")]
    Edited,
}

impl Default for Action {
    fn default() -> Action {
        Self::Created
    }
}