fastcomments_sdk/client/src/models/
question_config.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 QuestionConfig {
16    #[serde(rename = "_id")]
17    pub _id: String,
18    #[serde(rename = "tenantId")]
19    pub tenant_id: String,
20    #[serde(rename = "name")]
21    pub name: String,
22    #[serde(rename = "question")]
23    pub question: String,
24    #[serde(rename = "summaryLabel", skip_serializing_if = "Option::is_none")]
25    pub summary_label: Option<String>,
26    #[serde(rename = "helpText")]
27    pub help_text: String,
28    #[serde(rename = "createdAt")]
29    pub created_at: String,
30    #[serde(rename = "createdBy")]
31    pub created_by: String,
32    #[serde(rename = "usedCount")]
33    pub used_count: f64,
34    #[serde(rename = "lastUsed")]
35    pub last_used: String,
36    #[serde(rename = "type")]
37    pub r#type: String,
38    #[serde(rename = "numStars")]
39    pub num_stars: f64,
40    #[serde(rename = "min")]
41    pub min: f64,
42    #[serde(rename = "max")]
43    pub max: f64,
44    #[serde(rename = "defaultValue")]
45    pub default_value: f64,
46    #[serde(rename = "labelNegative")]
47    pub label_negative: String,
48    #[serde(rename = "labelPositive")]
49    pub label_positive: String,
50    #[serde(rename = "customOptions")]
51    pub custom_options: Vec<models::QuestionConfigCustomOptionsInner>,
52    #[serde(rename = "subQuestionIds")]
53    pub sub_question_ids: Vec<String>,
54    #[serde(rename = "alwaysShowSubQuestions")]
55    pub always_show_sub_questions: bool,
56    #[serde(rename = "reportingOrder")]
57    pub reporting_order: f64,
58}
59
60impl QuestionConfig {
61    pub fn new(_id: String, tenant_id: String, name: String, question: String, help_text: String, created_at: String, created_by: String, used_count: f64, last_used: String, r#type: String, num_stars: f64, min: f64, max: f64, default_value: f64, label_negative: String, label_positive: String, custom_options: Vec<models::QuestionConfigCustomOptionsInner>, sub_question_ids: Vec<String>, always_show_sub_questions: bool, reporting_order: f64) -> QuestionConfig {
62        QuestionConfig {
63            _id,
64            tenant_id,
65            name,
66            question,
67            summary_label: None,
68            help_text,
69            created_at,
70            created_by,
71            used_count,
72            last_used,
73            r#type,
74            num_stars,
75            min,
76            max,
77            default_value,
78            label_negative,
79            label_positive,
80            custom_options,
81            sub_question_ids,
82            always_show_sub_questions,
83            reporting_order,
84        }
85    }
86}
87