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 Agreement {
    #[serde(rename = "agreementCode")]
    pub agreement_code: models::AgreementCode,
    /// The full text of the agreement.
    #[serde(rename = "agreementFulltext", skip_serializing_if = "Option::is_none")]
    pub agreement_fulltext: Option<String>,
    /// The id of the content being uploaded, such as a WorldID, AvatarID, or PropID.
    #[serde(rename = "contentId")]
    pub content_id: String,
    /// When the agreement was created
    #[serde(rename = "created")]
    pub created: String,
    /// The id of the agreement.
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "tags")]
    pub tags: Vec<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 Agreement {
    pub fn new(
        agreement_code: models::AgreementCode,
        content_id: String,
        created: String,
        id: String,
        tags: Vec<String>,
        user_id: String,
        version: i32,
    ) -> Agreement {
        Agreement {
            agreement_code,
            agreement_fulltext: None,
            content_id,
            created,
            id,
            tags,
            user_id,
            version,
        }
    }
}