fastcomments_sdk/client/src/models/
pin_comment_200_response.rs

1/*
2 * fastcomments
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::client::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PinComment200Response {
16    /// Construct a type with a set of properties K of type T
17    #[serde(rename = "commentPositions")]
18    pub comment_positions: std::collections::HashMap<String, models::RecordStringBeforeStringOrNullAfterStringOrNullValue>,
19    #[serde(rename = "status")]
20    pub status: models::ApiStatus,
21    #[serde(rename = "reason")]
22    pub reason: String,
23    #[serde(rename = "code")]
24    pub code: String,
25    #[serde(rename = "secondaryCode", skip_serializing_if = "Option::is_none")]
26    pub secondary_code: Option<String>,
27    #[serde(rename = "bannedUntil", skip_serializing_if = "Option::is_none")]
28    pub banned_until: Option<i64>,
29    #[serde(rename = "maxCharacterLength", skip_serializing_if = "Option::is_none")]
30    pub max_character_length: Option<i32>,
31    #[serde(rename = "translatedError", skip_serializing_if = "Option::is_none")]
32    pub translated_error: Option<String>,
33    #[serde(rename = "customConfig", skip_serializing_if = "Option::is_none")]
34    pub custom_config: Option<Box<models::CustomConfigParameters>>,
35}
36
37impl PinComment200Response {
38    pub fn new(comment_positions: std::collections::HashMap<String, models::RecordStringBeforeStringOrNullAfterStringOrNullValue>, status: models::ApiStatus, reason: String, code: String) -> PinComment200Response {
39        PinComment200Response {
40            comment_positions,
41            status,
42            reason,
43            code,
44            secondary_code: None,
45            banned_until: None,
46            max_character_length: None,
47            translated_error: None,
48            custom_config: None,
49        }
50    }
51}
52