openapi_github/models/
community_profile.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CommunityProfile : Community Profile
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CommunityProfile {
17    #[serde(rename = "health_percentage")]
18    pub health_percentage: i32,
19    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
20    pub description: Option<String>,
21    #[serde(rename = "documentation", deserialize_with = "Option::deserialize")]
22    pub documentation: Option<String>,
23    #[serde(rename = "files")]
24    pub files: Box<models::CommunityProfileFiles>,
25    #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
26    pub updated_at: Option<String>,
27    #[serde(rename = "content_reports_enabled", skip_serializing_if = "Option::is_none")]
28    pub content_reports_enabled: Option<bool>,
29}
30
31impl CommunityProfile {
32    /// Community Profile
33    pub fn new(health_percentage: i32, description: Option<String>, documentation: Option<String>, files: models::CommunityProfileFiles, updated_at: Option<String>) -> CommunityProfile {
34        CommunityProfile {
35            health_percentage,
36            description,
37            documentation,
38            files: Box::new(files),
39            updated_at,
40            content_reports_enabled: None,
41        }
42    }
43}
44