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

/// TimelineReviewedEvent : Timeline Reviewed Event
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TimelineReviewedEvent {
    #[serde(rename = "event")]
    pub event: String,
    /// Unique identifier of the review
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "user")]
    pub user: Box<models::SimpleUser>,
    /// The text of the review.
    #[serde(rename = "body", deserialize_with = "Option::deserialize")]
    pub body: Option<String>,
    #[serde(rename = "state")]
    pub state: String,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "pull_request_url")]
    pub pull_request_url: String,
    #[serde(rename = "_links")]
    pub _links: Box<models::TimelineReviewedEventLinks>,
    #[serde(rename = "submitted_at", skip_serializing_if = "Option::is_none")]
    pub submitted_at: Option<String>,
    /// A commit SHA for the review.
    #[serde(rename = "commit_id")]
    pub commit_id: String,
    #[serde(rename = "body_html", skip_serializing_if = "Option::is_none")]
    pub body_html: Option<String>,
    #[serde(rename = "body_text", skip_serializing_if = "Option::is_none")]
    pub body_text: Option<String>,
    #[serde(rename = "author_association")]
    pub author_association: models::AuthorAssociation,
}

impl TimelineReviewedEvent {
    /// Timeline Reviewed Event
    pub fn new(event: String, id: i32, node_id: String, user: models::SimpleUser, body: Option<String>, state: String, html_url: String, pull_request_url: String, _links: models::TimelineReviewedEventLinks, commit_id: String, author_association: models::AuthorAssociation) -> TimelineReviewedEvent {
        TimelineReviewedEvent {
            event,
            id,
            node_id,
            user: Box::new(user),
            body,
            state,
            html_url,
            pull_request_url,
            _links: Box::new(_links),
            submitted_at: None,
            commit_id,
            body_html: None,
            body_text: None,
            author_association,
        }
    }
}