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};

/// TeamDiscussionComment : A reply to a discussion within a team.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TeamDiscussionComment {
    #[serde(rename = "author", deserialize_with = "Option::deserialize")]
    pub author: Option<Box<models::NullableSimpleUser>>,
    /// The main text of the comment.
    #[serde(rename = "body")]
    pub body: String,
    #[serde(rename = "body_html")]
    pub body_html: String,
    /// The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
    #[serde(rename = "body_version")]
    pub body_version: String,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "last_edited_at", deserialize_with = "Option::deserialize")]
    pub last_edited_at: Option<String>,
    #[serde(rename = "discussion_url")]
    pub discussion_url: String,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "node_id")]
    pub node_id: String,
    /// The unique sequence number of a team discussion comment.
    #[serde(rename = "number")]
    pub number: i32,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "reactions", skip_serializing_if = "Option::is_none")]
    pub reactions: Option<Box<models::ReactionRollup>>,
}

impl TeamDiscussionComment {
    /// A reply to a discussion within a team.
    pub fn new(author: Option<models::NullableSimpleUser>, body: String, body_html: String, body_version: String, created_at: String, last_edited_at: Option<String>, discussion_url: String, html_url: String, node_id: String, number: i32, updated_at: String, url: String) -> TeamDiscussionComment {
        TeamDiscussionComment {
            author: author.map(Box::new),
            body,
            body_html,
            body_version,
            created_at,
            last_edited_at,
            discussion_url,
            html_url,
            node_id,
            number,
            updated_at,
            url,
            reactions: None,
        }
    }
}