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

/// Thread : Thread
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Thread {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "repository")]
    pub repository: Box<models::MinimalRepository>,
    #[serde(rename = "subject")]
    pub subject: Box<models::ThreadSubject>,
    #[serde(rename = "reason")]
    pub reason: String,
    #[serde(rename = "unread")]
    pub unread: bool,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "last_read_at", deserialize_with = "Option::deserialize")]
    pub last_read_at: Option<String>,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "subscription_url")]
    pub subscription_url: String,
}

impl Thread {
    /// Thread
    pub fn new(id: String, repository: models::MinimalRepository, subject: models::ThreadSubject, reason: String, unread: bool, updated_at: String, last_read_at: Option<String>, url: String, subscription_url: String) -> Thread {
        Thread {
            id,
            repository: Box::new(repository),
            subject: Box::new(subject),
            reason,
            unread,
            updated_at,
            last_read_at,
            url,
            subscription_url,
        }
    }
}