/*
* 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 QuestionConfig {
#[serde(rename = "_id")]
pub _id: String,
#[serde(rename = "tenantId")]
pub tenant_id: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "question")]
pub question: String,
#[serde(rename = "summaryLabel", skip_serializing_if = "Option::is_none")]
pub summary_label: Option<String>,
#[serde(rename = "helpText")]
pub help_text: String,
#[serde(rename = "createdAt")]
pub created_at: chrono::DateTime<chrono::FixedOffset>,
#[serde(rename = "createdBy")]
pub created_by: String,
#[serde(rename = "usedCount")]
pub used_count: f64,
#[serde(rename = "lastUsed")]
pub last_used: chrono::DateTime<chrono::FixedOffset>,
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "numStars")]
pub num_stars: f64,
#[serde(rename = "min")]
pub min: f64,
#[serde(rename = "max")]
pub max: f64,
#[serde(rename = "defaultValue")]
pub default_value: f64,
#[serde(rename = "labelNegative")]
pub label_negative: String,
#[serde(rename = "labelPositive")]
pub label_positive: String,
#[serde(rename = "customOptions")]
pub custom_options: Vec<models::QuestionConfigCustomOptionsInner>,
#[serde(rename = "subQuestionIds")]
pub sub_question_ids: Vec<String>,
#[serde(rename = "alwaysShowSubQuestions")]
pub always_show_sub_questions: bool,
#[serde(rename = "reportingOrder")]
pub reporting_order: f64,
}
impl QuestionConfig {
pub fn new(_id: String, tenant_id: String, name: String, question: String, help_text: String, created_at: chrono::DateTime<chrono::FixedOffset>, created_by: String, used_count: f64, last_used: chrono::DateTime<chrono::FixedOffset>, 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 {
QuestionConfig {
_id,
tenant_id,
name,
question,
summary_label: None,
help_text,
created_at,
created_by,
used_count,
last_used,
r#type,
num_stars,
min,
max,
default_value,
label_negative,
label_positive,
custom_options,
sub_question_ids,
always_show_sub_questions,
reporting_order,
}
}
}