vrchatapi 1.20.8-nightly.11

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserNote {
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "note")]
    pub note: String,
    #[serde(rename = "targetUser", skip_serializing_if = "Option::is_none")]
    pub target_user: Option<models::UserNoteTargetUser>,
    /// 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 = "targetUserId")]
    pub target_user_id: 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 = "userId")]
    pub user_id: String,
}

impl UserNote {
    pub fn new(
        created_at: String,
        id: String,
        note: String,
        target_user_id: String,
        user_id: String,
    ) -> UserNote {
        UserNote {
            created_at,
            id,
            note,
            target_user: None,
            target_user_id,
            user_id,
        }
    }
}