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 AgreementRequest {
    #[serde(rename = "agreementCode")]
    pub agreement_code: models::AgreementCode,
    /// The full text of the agreement (currently `By clicking OK, I certify that I have the necessary rights to upload this content and that it will not infringe on any third-party legal or intellectual property rights.`).
    #[serde(rename = "agreementFulltext")]
    pub agreement_fulltext: String,
    /// The id of the content being uploaded, such as a WorldID, AvatarID, or PropID.
    #[serde(rename = "contentId")]
    pub content_id: String,
    /// The version of the agreement (currently `1`).
    #[serde(rename = "version")]
    pub version: i32,
}

impl AgreementRequest {
    pub fn new(
        agreement_code: models::AgreementCode,
        agreement_fulltext: String,
        content_id: String,
        version: i32,
    ) -> AgreementRequest {
        AgreementRequest {
            agreement_code,
            agreement_fulltext,
            content_id,
            version,
        }
    }
}