vrchatapi 1.20.8-nightly.15

VRChat API Client for Rust
Documentation
use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ModerationReport {
    /// Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`.
    #[serde(rename = "category")]
    pub category: String,
    #[serde(rename = "contentId")]
    pub content_id: String,
    #[serde(rename = "contentName")]
    pub content_name: String,
    #[serde(
        rename = "contentThumbnailImageUrl",
        deserialize_with = "Option::deserialize"
    )]
    pub content_thumbnail_image_url: Option<String>,
    /// The subjective reason for the report
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "evidenceRequired")]
    pub evidence_required: bool,
    #[serde(rename = "id")]
    pub id: String,
    /// Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`.
    #[serde(rename = "reason")]
    pub reason: String,
    #[serde(rename = "supportRequired")]
    pub support_required: bool,
    /// Valid values are the keys of the object `$.reportOptions` from `GET /config`.
    #[serde(rename = "type")]
    pub r#type: String,
}

impl ModerationReport {
    pub fn new(
        category: String,
        content_id: String,
        content_name: String,
        content_thumbnail_image_url: Option<String>,
        description: String,
        evidence_required: bool,
        id: String,
        reason: String,
        support_required: bool,
        r#type: String,
    ) -> ModerationReport {
        ModerationReport {
            category,
            content_id,
            content_name,
            content_thumbnail_image_url,
            description,
            evidence_required,
            id,
            reason,
            support_required,
            r#type,
        }
    }
}