vrchatapi 1.20.7

VRChat API Client for Rust
Documentation
/*
 * VRChat API Documentation
 *
 *
 * Contact: vrchatapi.lpv0t@aries.fyi
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Feedback {
    /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
    #[serde(rename = "commenterId")]
    pub commenter_id: String,
    #[serde(rename = "commenterName")]
    pub commenter_name: String,
    /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
    #[serde(rename = "contentAuthorId")]
    pub content_author_id: String,
    #[serde(rename = "contentAuthorName", deserialize_with = "Option::deserialize")]
    pub content_author_name: Option<String>,
    #[serde(rename = "contentId")]
    pub content_id: String,
    #[serde(rename = "contentName", skip_serializing_if = "Option::is_none")]
    pub content_name: Option<String>,
    #[serde(rename = "contentType")]
    pub content_type: String,
    #[serde(rename = "contentVersion", deserialize_with = "Option::deserialize")]
    pub content_version: Option<i32>,
    #[serde(
        rename = "description",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<Option<String>>,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "reason")]
    pub reason: String,
    #[serde(rename = "tags")]
    pub tags: Vec<String>,
    #[serde(rename = "type")]
    pub r#type: String,
}

impl Feedback {
    pub fn new(
        commenter_id: String,
        commenter_name: String,
        content_author_id: String,
        content_author_name: Option<String>,
        content_id: String,
        content_type: String,
        content_version: Option<i32>,
        id: String,
        reason: String,
        tags: Vec<String>,
        r#type: String,
    ) -> Feedback {
        Feedback {
            commenter_id,
            commenter_name,
            content_author_id,
            content_author_name,
            content_id,
            content_name: None,
            content_type,
            content_version,
            description: None,
            id,
            reason,
            tags,
            r#type,
        }
    }
}