assembly_xml/
universe_config.rs

1#![cfg(feature = "serialize")]
2
3//! Data returned from `UniverseConfig.svc`
4
5use serde::{Deserialize, Serialize};
6
7/// Information on account registration
8#[derive(Debug, Deserialize, Serialize)]
9pub struct AccountInfo {
10    /// Unknown
11    #[serde(rename = "SendPasswordUrl")]
12    pub send_password_url: String,
13    /// URL to log into an account
14    #[serde(rename = "SignInUrl")]
15    pub sign_in_url: String,
16    /// URL to sign up for an account
17    #[serde(rename = "SignUpUrl")]
18    pub sign_up_url: String,
19}
20
21/// Information on the game
22#[derive(Debug, Deserialize, Serialize)]
23pub struct GameInfo {
24    /// URL for login to subscription management
25    #[serde(rename = "AuthenticationUrl")]
26    pub authentication_url: String,
27    /// URL for registration as a user
28    #[serde(rename = "ClientUrl")]
29    pub client_url: String,
30    /// URL to submit crash logs
31    #[serde(rename = "CrashLogUrl")]
32    pub crash_log_url: String,
33    /// Old launcher URL?
34    #[serde(rename = "LauncherUrl")]
35    pub launcher_url: String,
36    /// URL of the website shown in the patcher
37    #[serde(rename = "LauncherUrl2")]
38    pub launcher_url2: String,
39}
40
41/// Information on downloading the game
42#[derive(Debug, Deserialize, Serialize)]
43pub struct PatcherInfo {
44    /// Manifest of files specific to running Windows programs on Mac
45    #[serde(rename = "CiderUrl")]
46    pub cider_url: String,
47    /// Configuration for the patching process
48    #[serde(rename = "ConfigUrl")]
49    pub config_url: String,
50    /// URL of the installer for major updates
51    #[serde(rename = "InstallUrl")]
52    pub install_url: String,
53}
54
55/// Information on the CDN client
56#[derive(Debug, Deserialize, Serialize)]
57pub struct CdnInfo {
58    /// An ID for the Akamai CDN
59    #[serde(rename = "CpCode")]
60    pub cp_code: i32,
61    /// The patcher subdirectory
62    #[serde(rename = "PatcherDir")]
63    pub patcher_dir: String,
64    /// The patch server
65    #[serde(rename = "PatcherUrl")]
66    pub patcher_url: String,
67    /// Whether to use https (?)
68    #[serde(rename = "Secure")]
69    pub secure: bool,
70    /// Whether to use the Akamai download manager
71    #[serde(rename = "UseDlm")]
72    pub use_dlm: bool,
73}
74
75/// A single server (*Universe*) that can be selected
76#[derive(Debug, Deserialize, Serialize)]
77pub struct Server {
78    /// URL of the auth server
79    #[serde(rename = "AuthenticationIP")]
80    pub authentication_ip: String,
81    /// Information for the CDN client
82    #[serde(rename = "CdnInfo")]
83    pub cdn_info: CdnInfo,
84    /// Info for moderation (?)
85    #[serde(rename = "CrispInfo")]
86    pub crisp_info: String,
87    /// ID of the data center
88    #[serde(rename = "DataCenterId")]
89    pub data_center_id: u32,
90    /// URL for the game API
91    #[serde(rename = "GameApiUrl")]
92    pub game_api_url: String,
93    /// URL for game content
94    #[serde(rename = "GameContentApiUrl")]
95    pub game_content_api_url: String,
96    /// Language Tag of the server
97    #[serde(rename = "Language")]
98    pub language: String,
99    /// Log level
100    #[serde(rename = "LogLevel")]
101    pub log_level: i32,
102    /// URL of the metrics server
103    #[serde(rename = "MetricsDataServiceUrl")]
104    pub metrics_data_service_url: String,
105    /// Display name of the server
106    #[serde(rename = "Name")]
107    pub name: String,
108    /// Whether this server is available
109    #[serde(rename = "Online")]
110    pub online: bool,
111    /// Whether this server is selected by default
112    #[serde(rename = "Suggested")]
113    pub suggested: bool,
114    /// URL for the UGC controller
115    #[serde(rename = "UGCControllerServicesUrl")]
116    pub ugc_controller_services_url: String,
117    /// CDN info for user generated content
118    #[serde(rename = "UgcCdnInfo")]
119    pub ugc_cdn_info: CdnInfo,
120    /// Whether to use online model conversion
121    #[serde(rename = "Use3DServices")]
122    pub use3d_services: bool,
123    /// Current version of the game
124    #[serde(rename = "Version")]
125    pub version: String,
126    /// Type of version dir (default 0)
127    #[serde(rename = "VersionDirType")]
128    pub version_dir_type: String,
129    /// API url (?)
130    #[serde(rename = "WebApiUrl")]
131    pub web_api_url: String,
132}
133
134/// The list of servers
135#[derive(Debug, Deserialize, Serialize)]
136pub struct Servers {
137    /// The list of servers
138    #[serde(rename = "Server")]
139    pub servers: Vec<Server>,
140}
141
142/// The root of the `EnvironmentInfo` endpoint
143#[derive(Debug, Deserialize, Serialize)]
144pub struct Environment {
145    /// Information on accounts
146    #[serde(rename = "AccountInfo")]
147    pub account_info: AccountInfo,
148    /// Information on the game
149    #[serde(rename = "GameInfo")]
150    pub game_info: GameInfo,
151    /// Information on the general patcher process
152    #[serde(rename = "PatcherInfo")]
153    pub patcher_info: PatcherInfo,
154    /// Information on individual servers/universes
155    #[serde(rename = "Servers")]
156    pub servers: Servers,
157}