vrchatapi 1.20.8-nightly.15

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

/// ServiceStatus : Status information for a service request
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceStatus {
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// The id of this service, NOT the id of the thing this service was requested for.
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "progress")]
    pub progress: Vec<serde_json::Value>,
    /// 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 = "requesterUserId")]
    pub requester_user_id: String,
    #[serde(rename = "state")]
    pub state: String,
    /// The id of the thing this service was requested for.
    #[serde(rename = "subjectId")]
    pub subject_id: String,
    /// The kind of the thing this service was requested for.
    #[serde(rename = "subjectType")]
    pub subject_type: String,
    /// The kind of service that was requested.
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
}

impl ServiceStatus {
    /// Status information for a service request
    pub fn new(
        created_at: String,
        id: String,
        progress: Vec<serde_json::Value>,
        requester_user_id: String,
        state: String,
        subject_id: String,
        subject_type: String,
        r#type: String,
        updated_at: String,
    ) -> ServiceStatus {
        ServiceStatus {
            created_at,
            id,
            progress,
            requester_user_id,
            state,
            subject_id,
            subject_type,
            r#type,
            updated_at,
        }
    }
}