fastcomments-sdk 2.0.0

Official FastComments Rust SDK (Typed API Client & Utilities)
Documentation
/*
 * fastcomments
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::client::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApiPage {
    #[serde(rename = "isClosed", skip_serializing_if = "Option::is_none")]
    pub is_closed: Option<bool>,
    #[serde(rename = "accessibleByGroupIds", skip_serializing_if = "Option::is_none")]
    pub accessible_by_group_ids: Option<Vec<String>>,
    #[serde(rename = "rootCommentCount")]
    pub root_comment_count: i64,
    #[serde(rename = "commentCount")]
    pub comment_count: i64,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "title")]
    pub title: String,
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "urlId")]
    pub url_id: String,
    #[serde(rename = "id")]
    pub id: String,
}

impl ApiPage {
    pub fn new(root_comment_count: i64, comment_count: i64, created_at: chrono::DateTime<chrono::FixedOffset>, title: String, url_id: String, id: String) -> ApiPage {
        ApiPage {
            is_closed: None,
            accessible_by_group_ids: None,
            root_comment_count,
            comment_count,
            created_at,
            title,
            url: None,
            url_id,
            id,
        }
    }
}