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

/// TopicSearchResultItem : Topic Search Result Item
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TopicSearchResultItem {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "display_name", deserialize_with = "Option::deserialize")]
    pub display_name: Option<String>,
    #[serde(rename = "short_description", deserialize_with = "Option::deserialize")]
    pub short_description: Option<String>,
    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
    pub description: Option<String>,
    #[serde(rename = "created_by", deserialize_with = "Option::deserialize")]
    pub created_by: Option<String>,
    #[serde(rename = "released", deserialize_with = "Option::deserialize")]
    pub released: Option<String>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "featured")]
    pub featured: bool,
    #[serde(rename = "curated")]
    pub curated: bool,
    #[serde(rename = "score")]
    pub score: f64,
    #[serde(rename = "repository_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub repository_count: Option<Option<i32>>,
    #[serde(rename = "logo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub logo_url: Option<Option<String>>,
    #[serde(rename = "text_matches", skip_serializing_if = "Option::is_none")]
    pub text_matches: Option<Vec<models::SearchResultTextMatchesInner>>,
    #[serde(rename = "related", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub related: Option<Option<Vec<models::TopicSearchResultItemRelatedInner>>>,
    #[serde(rename = "aliases", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub aliases: Option<Option<Vec<models::TopicSearchResultItemRelatedInner>>>,
}

impl TopicSearchResultItem {
    /// Topic Search Result Item
    pub fn new(name: String, display_name: Option<String>, short_description: Option<String>, description: Option<String>, created_by: Option<String>, released: Option<String>, created_at: String, updated_at: String, featured: bool, curated: bool, score: f64) -> TopicSearchResultItem {
        TopicSearchResultItem {
            name,
            display_name,
            short_description,
            description,
            created_by,
            released,
            created_at,
            updated_at,
            featured,
            curated,
            score,
            repository_count: None,
            logo_url: None,
            text_matches: None,
            related: None,
            aliases: None,
        }
    }
}