gitea_rs/models/
node_info.rs

1/*
2 * Gitea API.
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.19.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// NodeInfo : NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct NodeInfo {
17    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
18    pub metadata: Option<serde_json::Value>,
19    #[serde(rename = "openRegistrations", skip_serializing_if = "Option::is_none")]
20    pub open_registrations: Option<bool>,
21    #[serde(rename = "protocols", skip_serializing_if = "Option::is_none")]
22    pub protocols: Option<Vec<String>>,
23    #[serde(rename = "services", skip_serializing_if = "Option::is_none")]
24    pub services: Option<Box<crate::models::NodeInfoServices>>,
25    #[serde(rename = "software", skip_serializing_if = "Option::is_none")]
26    pub software: Option<Box<crate::models::NodeInfoSoftware>>,
27    #[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
28    pub usage: Option<Box<crate::models::NodeInfoUsage>>,
29    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
30    pub version: Option<String>,
31}
32
33impl NodeInfo {
34    /// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks
35    pub fn new() -> NodeInfo {
36        NodeInfo {
37            metadata: None,
38            open_registrations: None,
39            protocols: None,
40            services: None,
41            software: None,
42            usage: None,
43            version: None,
44        }
45    }
46}
47
48