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

/// PullRequestReview : Pull Request Reviews are reviews on pull requests.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PullRequestReview {
    /// Unique identifier of the review
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "user", deserialize_with = "Option::deserialize")]
    pub user: Option<Box<models::NullableSimpleUser>>,
    /// The text of the review.
    #[serde(rename = "body")]
    pub body: 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. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`.
    #[serde(rename = "commit_id", deserialize_with = "Option::deserialize")]
    pub commit_id: Option<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 PullRequestReview {
    /// Pull Request Reviews are reviews on pull requests.
    pub fn new(id: i32, node_id: String, user: Option<models::NullableSimpleUser>, body: String, state: String, html_url: String, pull_request_url: String, _links: models::TimelineReviewedEventLinks, commit_id: Option<String>, author_association: models::AuthorAssociation) -> PullRequestReview {
        PullRequestReview {
            id,
            node_id,
            user: user.map(Box::new),
            body,
            state,
            html_url,
            pull_request_url,
            _links: Box::new(_links),
            submitted_at: None,
            commit_id,
            body_html: None,
            body_text: None,
            author_association,
        }
    }
}