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 AgreementStatus {
    /// Whether the user has agreed for this content.
    #[serde(rename = "agreed")]
    pub agreed: bool,
    #[serde(rename = "agreementCode")]
    pub agreement_code: models::AgreementCode,
    /// The id of the content being uploaded, such as a WorldID, AvatarID, or PropID.
    #[serde(rename = "contentId")]
    pub content_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,
    /// The version of the agreement.
    #[serde(rename = "version")]
    pub version: i32,
}

impl AgreementStatus {
    pub fn new(
        agreed: bool,
        agreement_code: models::AgreementCode,
        content_id: String,
        user_id: String,
        version: i32,
    ) -> AgreementStatus {
        AgreementStatus {
            agreed,
            agreement_code,
            content_id,
            user_id,
            version,
        }
    }
}