openapi_github/models/
community_profile.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[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 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