fastcomments-sdk 3.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 SaveCommentsBulkResponse {
    #[serde(rename = "status")]
    pub status: models::ApiStatus,
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<Box<models::ApiComment>>,
    #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub user: Option<Option<Box<models::UserSessionInfo>>>,
    /// Construct a type with a set of properties K of type T
    #[serde(rename = "moduleData", skip_serializing_if = "Option::is_none")]
    pub module_data: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    #[serde(rename = "secondaryCode", skip_serializing_if = "Option::is_none")]
    pub secondary_code: Option<String>,
    #[serde(rename = "bannedUntil", skip_serializing_if = "Option::is_none")]
    pub banned_until: Option<i64>,
    #[serde(rename = "maxCharacterLength", skip_serializing_if = "Option::is_none")]
    pub max_character_length: Option<i32>,
    #[serde(rename = "translatedError", skip_serializing_if = "Option::is_none")]
    pub translated_error: Option<String>,
    #[serde(rename = "customConfig", skip_serializing_if = "Option::is_none")]
    pub custom_config: Option<Box<models::CustomConfigParameters>>,
}

impl SaveCommentsBulkResponse {
    pub fn new(status: models::ApiStatus) -> SaveCommentsBulkResponse {
        SaveCommentsBulkResponse {
            status,
            comment: None,
            user: None,
            module_data: None,
            reason: None,
            code: None,
            secondary_code: None,
            banned_until: None,
            max_character_length: None,
            translated_error: None,
            custom_config: None,
        }
    }
}