mirror of
https://github.com/tribufu/sdk-rust
synced 2026-02-04 01:13:07 +00:00
Release v1.3.0
This commit is contained in:
@@ -5,38 +5,45 @@ src/models/account.rs
|
||||
src/models/application.rs
|
||||
src/models/application_type.rs
|
||||
src/models/authorize_request.rs
|
||||
src/models/client.rs
|
||||
src/models/client_info.rs
|
||||
src/models/client_type.rs
|
||||
src/models/code_challenge_method.rs
|
||||
src/models/code_response.rs
|
||||
src/models/create_user.rs
|
||||
src/models/crypto_view_model.rs
|
||||
src/models/game.rs
|
||||
src/models/game_server.rs
|
||||
src/models/game_server_cluster.rs
|
||||
src/models/game_server_query.rs
|
||||
src/models/game_server_status.rs
|
||||
src/models/grant_type.rs
|
||||
src/models/group.rs
|
||||
src/models/group_game.rs
|
||||
src/models/group_application.rs
|
||||
src/models/group_member.rs
|
||||
src/models/group_rank.rs
|
||||
src/models/hash_view_model.rs
|
||||
src/models/introspect_request.rs
|
||||
src/models/introspect_response.rs
|
||||
src/models/ip_address.rs
|
||||
src/models/leaderboard_item.rs
|
||||
src/models/leaderboard_order.rs
|
||||
src/models/login_provider.rs
|
||||
src/models/login_request.rs
|
||||
src/models/login_response.rs
|
||||
src/models/mod.rs
|
||||
src/models/package.rs
|
||||
src/models/package_release.rs
|
||||
src/models/product.rs
|
||||
src/models/product_price.rs
|
||||
src/models/product_type.rs
|
||||
src/models/profile.rs
|
||||
src/models/profile_game.rs
|
||||
src/models/profile_group.rs
|
||||
src/models/refresh_request.rs
|
||||
src/models/register_request.rs
|
||||
src/models/response_type.rs
|
||||
src/models/revoke_request.rs
|
||||
src/models/search_request.rs
|
||||
src/models/search.rs
|
||||
src/models/search_type.rs
|
||||
src/models/server_metrics.rs
|
||||
src/models/server_status.rs
|
||||
src/models/subscription.rs
|
||||
src/models/storage_file.rs
|
||||
src/models/token_hint_type.rs
|
||||
src/models/token_request.rs
|
||||
src/models/token_response.rs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tribufu"
|
||||
version = "1.1.0"
|
||||
version = "1.3.0"
|
||||
description = "REST API to access Tribufu services."
|
||||
repository = "https://github.com/tribufu/tribufu-rust"
|
||||
authors = ["Tribufu <contact@tribufu.com>"]
|
||||
@@ -19,7 +19,6 @@ exclude = [
|
||||
".vscode/",
|
||||
"examples/",
|
||||
"scripts/",
|
||||
"scripts/",
|
||||
]
|
||||
|
||||
[workspace]
|
||||
@@ -33,7 +32,7 @@ crate-type = ["rlib"]
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
tribufu-constants = { version = "0.0.5", path = "./src/constants" }
|
||||
tribufu-constants = { version = "1.3.0", path = "./src/constants" }
|
||||
async-trait = "^0.1"
|
||||
reqwest = { version = "^0.12", features = ["json", "multipart"] }
|
||||
serde = { version = "^1.0", features = ["derive"] }
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
$crates = @(
|
||||
"tribufu-types",
|
||||
"tribufu-constants",
|
||||
"tribufu-api",
|
||||
"tribufu-error",
|
||||
"tribufu-json",
|
||||
"tribufu-log",
|
||||
"tribufu-platform",
|
||||
"tribufu"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -40,7 +40,7 @@ impl Default for Configuration {
|
||||
fn default() -> Self {
|
||||
Configuration {
|
||||
base_path: "http://localhost".to_owned(),
|
||||
user_agent: Some("OpenAPI-Generator/1.1.0/rust".to_owned()),
|
||||
user_agent: Some("OpenAPI-Generator/1.3.0/rust".to_owned()),
|
||||
client: reqwest::Client::new(),
|
||||
basic_auth: None,
|
||||
oauth_access_token: None,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,12 @@
|
||||
[package]
|
||||
name = "tribufu-constants"
|
||||
version = "0.0.5"
|
||||
version = "1.3.0"
|
||||
description = "Tribufu Constants"
|
||||
repository = "https://github.com/tribufu/tribufu-rust"
|
||||
authors = ["Tribufu <contact@tribufu.com>"]
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
publish = true
|
||||
|
||||
[lib]
|
||||
name = "tribufu_constants"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
[package]
|
||||
name = "tribufu-error"
|
||||
version = "0.0.5"
|
||||
version = "1.3.0"
|
||||
description = "Tribufu Error"
|
||||
repository = "https://github.com/tribufu/tribufu-rust"
|
||||
authors = ["Tribufu <contact@tribufu.com>"]
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
publish = true
|
||||
|
||||
[lib]
|
||||
name = "tribufu_error"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
[package]
|
||||
name = "tribufu-json"
|
||||
version = "0.0.5"
|
||||
version = "1.3.0"
|
||||
description = "Tribufu Json"
|
||||
repository = "https://github.com/tribufu/tribufu-rust"
|
||||
authors = ["Tribufu <contact@tribufu.com>"]
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
publish = true
|
||||
|
||||
[lib]
|
||||
name = "tribufu_json"
|
||||
@@ -13,6 +14,6 @@ crate-type = ["rlib"]
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
tribufu-error = { version = "0.0.5", path = "../error" }
|
||||
tribufu-error = { version = "1.3.0", path = "../error" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
[package]
|
||||
name = "tribufu-log"
|
||||
version = "0.0.5"
|
||||
version = "1.3.0"
|
||||
description = "Tribufu Log"
|
||||
repository = "https://github.com/tribufu/tribufu-rust"
|
||||
authors = ["Tribufu <contact@tribufu.com>"]
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
publish = true
|
||||
|
||||
[lib]
|
||||
name = "tribufu_log"
|
||||
@@ -13,7 +14,7 @@ crate-type = ["rlib"]
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
tribufu-error = { version = "0.0.5", path = "../error" }
|
||||
tribufu-error = { version = "1.3.0", path = "../error" }
|
||||
chrono = "0.4.23"
|
||||
env_logger = "0.10.1"
|
||||
log = "0.4"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,12 +13,12 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Account {
|
||||
#[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<Option<String>>,
|
||||
#[serde(rename = "id", deserialize_with = "Option::deserialize")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
|
||||
pub provider: Option<models::LoginProvider>,
|
||||
#[serde(rename = "provider")]
|
||||
pub provider: models::LoginProvider,
|
||||
#[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
|
||||
pub user_id: Option<String>,
|
||||
#[serde(rename = "authorized", skip_serializing_if = "Option::is_none")]
|
||||
@@ -32,11 +32,11 @@ pub struct Account {
|
||||
}
|
||||
|
||||
impl Account {
|
||||
pub fn new() -> Account {
|
||||
pub fn new(id: Option<String>, provider: models::LoginProvider) -> Account {
|
||||
Account {
|
||||
id: None,
|
||||
id,
|
||||
name: None,
|
||||
provider: None,
|
||||
provider,
|
||||
user_id: None,
|
||||
authorized: None,
|
||||
fields: None,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct Application {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
@@ -31,24 +31,8 @@ pub struct Application {
|
||||
pub capsule_image_url: Option<Option<String>>,
|
||||
#[serde(rename = "library_image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub library_image_url: Option<Option<String>>,
|
||||
#[serde(rename = "parent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub parent_id: Option<Option<String>>,
|
||||
#[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub slug: Option<Option<String>>,
|
||||
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
|
||||
pub visibility: Option<i32>,
|
||||
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub password: Option<Option<String>>,
|
||||
#[serde(rename = "primary", skip_serializing_if = "Option::is_none")]
|
||||
pub primary: Option<i32>,
|
||||
#[serde(rename = "user_count", skip_serializing_if = "Option::is_none")]
|
||||
pub user_count: Option<i32>,
|
||||
#[serde(rename = "achievement_count", skip_serializing_if = "Option::is_none")]
|
||||
pub achievement_count: Option<i32>,
|
||||
#[serde(rename = "badge_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub badge_count: Option<Option<i32>>,
|
||||
#[serde(rename = "download_count", skip_serializing_if = "Option::is_none")]
|
||||
pub download_count: Option<i32>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -56,10 +40,10 @@ pub struct Application {
|
||||
}
|
||||
|
||||
impl Application {
|
||||
pub fn new() -> Application {
|
||||
pub fn new(name: Option<String>) -> Application {
|
||||
Application {
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
r#type: None,
|
||||
organization_id: None,
|
||||
@@ -67,15 +51,7 @@ impl Application {
|
||||
banner_url: None,
|
||||
capsule_image_url: None,
|
||||
library_image_url: None,
|
||||
parent_id: None,
|
||||
slug: None,
|
||||
visibility: None,
|
||||
password: None,
|
||||
primary: None,
|
||||
user_count: None,
|
||||
achievement_count: None,
|
||||
badge_count: None,
|
||||
download_count: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -15,14 +15,14 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct AuthorizeRequest {
|
||||
#[serde(rename = "response_type", skip_serializing_if = "Option::is_none")]
|
||||
pub response_type: Option<models::ResponseType>,
|
||||
#[serde(rename = "client_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub client_id: Option<Option<String>>,
|
||||
#[serde(rename = "client_id")]
|
||||
pub client_id: String,
|
||||
#[serde(rename = "code_challenge", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub code_challenge: Option<Option<String>>,
|
||||
#[serde(rename = "code_challenge_method", skip_serializing_if = "Option::is_none")]
|
||||
pub code_challenge_method: Option<models::CodeChallengeMethod>,
|
||||
#[serde(rename = "redirect_uri", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub redirect_uri: Option<Option<String>>,
|
||||
#[serde(rename = "redirect_uri", deserialize_with = "Option::deserialize")]
|
||||
pub redirect_uri: Option<String>,
|
||||
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub scope: Option<Option<String>>,
|
||||
#[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -30,13 +30,13 @@ pub struct AuthorizeRequest {
|
||||
}
|
||||
|
||||
impl AuthorizeRequest {
|
||||
pub fn new() -> AuthorizeRequest {
|
||||
pub fn new(client_id: String, redirect_uri: Option<String>) -> AuthorizeRequest {
|
||||
AuthorizeRequest {
|
||||
response_type: None,
|
||||
client_id: None,
|
||||
client_id,
|
||||
code_challenge: None,
|
||||
code_challenge_method: None,
|
||||
redirect_uri: None,
|
||||
redirect_uri,
|
||||
scope: None,
|
||||
state: None,
|
||||
}
|
||||
|
||||
63
src/models/client.rs
Normal file
63
src/models/client.rs
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Client {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
pub r#type: Option<models::ClientType>,
|
||||
#[serde(rename = "organization_id", skip_serializing_if = "Option::is_none")]
|
||||
pub organization_id: Option<String>,
|
||||
#[serde(rename = "trusted", skip_serializing_if = "Option::is_none")]
|
||||
pub trusted: Option<bool>,
|
||||
#[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub website_url: Option<Option<String>>,
|
||||
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub photo_url: Option<Option<String>>,
|
||||
#[serde(rename = "background_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub background_url: Option<Option<String>>,
|
||||
#[serde(rename = "redirects", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub redirects: Option<Option<String>>,
|
||||
#[serde(rename = "scopes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub scopes: Option<Option<String>>,
|
||||
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub permissions: Option<Option<Vec<String>>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl Client {
|
||||
pub fn new(name: Option<String>) -> Client {
|
||||
Client {
|
||||
id: None,
|
||||
name,
|
||||
r#type: None,
|
||||
organization_id: None,
|
||||
trusted: None,
|
||||
website_url: None,
|
||||
photo_url: None,
|
||||
background_url: None,
|
||||
redirects: None,
|
||||
scopes: None,
|
||||
permissions: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
39
src/models/client_info.rs
Normal file
39
src/models/client_info.rs
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ClientInfo {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
pub r#type: Option<models::ClientType>,
|
||||
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub photo_url: Option<Option<String>>,
|
||||
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub permissions: Option<Option<Vec<String>>>,
|
||||
}
|
||||
|
||||
impl ClientInfo {
|
||||
pub fn new(name: Option<String>) -> ClientInfo {
|
||||
ClientInfo {
|
||||
id: None,
|
||||
name,
|
||||
r#type: None,
|
||||
photo_url: None,
|
||||
permissions: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
41
src/models/client_type.rs
Normal file
41
src/models/client_type.rs
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum ClientType {
|
||||
#[serde(rename = "web")]
|
||||
Web,
|
||||
#[serde(rename = "desktop")]
|
||||
Desktop,
|
||||
#[serde(rename = "mobile")]
|
||||
Mobile,
|
||||
|
||||
}
|
||||
|
||||
impl std::fmt::Display for ClientType {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Web => write!(f, "web"),
|
||||
Self::Desktop => write!(f, "desktop"),
|
||||
Self::Mobile => write!(f, "mobile"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ClientType {
|
||||
fn default() -> ClientType {
|
||||
Self::Web
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
30
src/models/code_response.rs
Normal file
30
src/models/code_response.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CodeResponse {
|
||||
#[serde(rename = "code", deserialize_with = "Option::deserialize")]
|
||||
pub code: Option<String>,
|
||||
#[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub state: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl CodeResponse {
|
||||
pub fn new(code: Option<String>) -> CodeResponse {
|
||||
CodeResponse {
|
||||
code,
|
||||
state: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
51
src/models/create_user.rs
Normal file
51
src/models/create_user.rs
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct CreateUser {
|
||||
#[serde(rename = "uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub uuid: Option<Option<uuid::Uuid>>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<Option<String>>,
|
||||
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub email: Option<Option<String>>,
|
||||
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub password: Option<Option<String>>,
|
||||
#[serde(rename = "language", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub language: Option<Option<String>>,
|
||||
#[serde(rename = "timezone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub timezone: Option<Option<String>>,
|
||||
#[serde(rename = "currency", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub currency: Option<Option<String>>,
|
||||
#[serde(rename = "ip_address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub ip_address: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl CreateUser {
|
||||
pub fn new(name: String) -> CreateUser {
|
||||
CreateUser {
|
||||
uuid: None,
|
||||
name,
|
||||
display_name: None,
|
||||
email: None,
|
||||
password: None,
|
||||
language: None,
|
||||
timezone: None,
|
||||
currency: None,
|
||||
ip_address: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,32 +13,10 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Game {
|
||||
#[serde(rename = "game_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub game_port: Option<Option<i32>>,
|
||||
#[serde(rename = "query_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub query_port: Option<Option<i32>>,
|
||||
#[serde(rename = "rcon_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rcon_port: Option<Option<i32>>,
|
||||
#[serde(rename = "server_count", skip_serializing_if = "Option::is_none")]
|
||||
pub server_count: Option<i32>,
|
||||
#[serde(rename = "steam_app_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub steam_app_id: Option<Option<i32>>,
|
||||
#[serde(rename = "steam_server_app_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub steam_server_app_id: Option<Option<i32>>,
|
||||
#[serde(rename = "enable_servers", skip_serializing_if = "Option::is_none")]
|
||||
pub enable_servers: Option<bool>,
|
||||
#[serde(rename = "rust_gamedig_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rust_gamedig_id: Option<Option<String>>,
|
||||
#[serde(rename = "node_gamedig_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub node_gamedig_id: Option<Option<String>>,
|
||||
#[serde(rename = "server_connect_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub server_connect_url: Option<Option<String>>,
|
||||
#[serde(rename = "server_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub server_tags: Option<Option<String>>,
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
@@ -53,46 +31,33 @@ pub struct Game {
|
||||
pub capsule_image_url: Option<Option<String>>,
|
||||
#[serde(rename = "library_image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub library_image_url: Option<Option<String>>,
|
||||
#[serde(rename = "parent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub parent_id: Option<Option<String>>,
|
||||
#[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub slug: Option<Option<String>>,
|
||||
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
|
||||
pub visibility: Option<i32>,
|
||||
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub password: Option<Option<String>>,
|
||||
#[serde(rename = "primary", skip_serializing_if = "Option::is_none")]
|
||||
pub primary: Option<i32>,
|
||||
#[serde(rename = "user_count", skip_serializing_if = "Option::is_none")]
|
||||
pub user_count: Option<i32>,
|
||||
#[serde(rename = "achievement_count", skip_serializing_if = "Option::is_none")]
|
||||
pub achievement_count: Option<i32>,
|
||||
#[serde(rename = "badge_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub badge_count: Option<Option<i32>>,
|
||||
#[serde(rename = "download_count", skip_serializing_if = "Option::is_none")]
|
||||
pub download_count: Option<i32>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<Option<String>>,
|
||||
#[serde(rename = "enable_servers", skip_serializing_if = "Option::is_none")]
|
||||
pub enable_servers: Option<bool>,
|
||||
#[serde(rename = "game_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub game_port: Option<Option<i32>>,
|
||||
#[serde(rename = "query_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub query_port: Option<Option<i32>>,
|
||||
#[serde(rename = "rcon_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rcon_port: Option<Option<i32>>,
|
||||
#[serde(rename = "gamedig_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub gamedig_id: Option<Option<String>>,
|
||||
#[serde(rename = "steam_app_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub steam_app_id: Option<Option<i32>>,
|
||||
#[serde(rename = "steam_server_app_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub steam_server_app_id: Option<Option<i32>>,
|
||||
}
|
||||
|
||||
impl Game {
|
||||
pub fn new() -> Game {
|
||||
pub fn new(name: Option<String>) -> Game {
|
||||
Game {
|
||||
game_port: None,
|
||||
query_port: None,
|
||||
rcon_port: None,
|
||||
server_count: None,
|
||||
steam_app_id: None,
|
||||
steam_server_app_id: None,
|
||||
enable_servers: None,
|
||||
rust_gamedig_id: None,
|
||||
node_gamedig_id: None,
|
||||
server_connect_url: None,
|
||||
server_tags: None,
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
r#type: None,
|
||||
organization_id: None,
|
||||
@@ -100,17 +65,16 @@ impl Game {
|
||||
banner_url: None,
|
||||
capsule_image_url: None,
|
||||
library_image_url: None,
|
||||
parent_id: None,
|
||||
slug: None,
|
||||
visibility: None,
|
||||
password: None,
|
||||
primary: None,
|
||||
user_count: None,
|
||||
achievement_count: None,
|
||||
badge_count: None,
|
||||
download_count: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
enable_servers: None,
|
||||
game_port: None,
|
||||
query_port: None,
|
||||
rcon_port: None,
|
||||
gamedig_id: None,
|
||||
steam_app_id: None,
|
||||
steam_server_app_id: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -15,50 +15,34 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct GameServer {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub address: Option<Option<String>>,
|
||||
#[serde(rename = "owner_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub owner_id: Option<Option<String>>,
|
||||
#[serde(rename = "address", deserialize_with = "Option::deserialize")]
|
||||
pub address: Option<String>,
|
||||
#[serde(rename = "query_port")]
|
||||
pub query_port: i32,
|
||||
#[serde(rename = "game_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub game_port: Option<Option<i32>>,
|
||||
#[serde(rename = "query_port", skip_serializing_if = "Option::is_none")]
|
||||
pub query_port: Option<i32>,
|
||||
#[serde(rename = "map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub map: Option<Option<String>>,
|
||||
#[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub version: Option<Option<String>>,
|
||||
#[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
|
||||
pub game_id: Option<String>,
|
||||
#[serde(rename = "game_icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub game_icon_url: Option<Option<String>>,
|
||||
#[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub version: Option<Option<String>>,
|
||||
#[serde(rename = "featured", skip_serializing_if = "Option::is_none")]
|
||||
pub featured: Option<bool>,
|
||||
#[serde(rename = "cluster_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub cluster_id: Option<Option<String>>,
|
||||
#[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub website_url: Option<Option<String>>,
|
||||
#[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub banner_url: Option<Option<String>>,
|
||||
#[serde(rename = "owner_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub owner_id: Option<Option<String>>,
|
||||
#[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
|
||||
pub uptime: Option<f64>,
|
||||
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||
pub status: Option<models::ServerStatus>,
|
||||
#[serde(rename = "ping", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub ping: Option<Option<i32>>,
|
||||
#[serde(rename = "map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub map: Option<Option<String>>,
|
||||
#[serde(rename = "used_slots", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub used_slots: Option<Option<i32>>,
|
||||
#[serde(rename = "max_slots", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub max_slots: Option<Option<i32>>,
|
||||
#[serde(rename = "motd", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub motd: Option<Option<String>>,
|
||||
#[serde(rename = "players", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub players: Option<Option<String>>,
|
||||
#[serde(rename = "last_online", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_online: Option<Option<String>>,
|
||||
#[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub country: Option<Option<String>>,
|
||||
#[serde(rename = "steam", skip_serializing_if = "Option::is_none")]
|
||||
@@ -67,10 +51,6 @@ pub struct GameServer {
|
||||
pub discord_server_id: Option<Option<String>>,
|
||||
#[serde(rename = "youtube_video_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub youtube_video_url: Option<Option<String>>,
|
||||
#[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub tags: Option<Option<String>>,
|
||||
#[serde(rename = "comment_count", skip_serializing_if = "Option::is_none")]
|
||||
pub comment_count: Option<i32>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -78,37 +58,27 @@ pub struct GameServer {
|
||||
}
|
||||
|
||||
impl GameServer {
|
||||
pub fn new() -> GameServer {
|
||||
pub fn new(name: Option<String>, address: Option<String>, query_port: i32) -> GameServer {
|
||||
GameServer {
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
address: None,
|
||||
owner_id: None,
|
||||
address,
|
||||
query_port,
|
||||
game_port: None,
|
||||
query_port: None,
|
||||
map: None,
|
||||
version: None,
|
||||
game_id: None,
|
||||
game_icon_url: None,
|
||||
version: None,
|
||||
featured: None,
|
||||
cluster_id: None,
|
||||
website_url: None,
|
||||
banner_url: None,
|
||||
owner_id: None,
|
||||
uptime: None,
|
||||
status: None,
|
||||
ping: None,
|
||||
map: None,
|
||||
used_slots: None,
|
||||
max_slots: None,
|
||||
motd: None,
|
||||
players: None,
|
||||
last_online: None,
|
||||
country: None,
|
||||
steam: None,
|
||||
discord_server_id: None,
|
||||
youtube_video_url: None,
|
||||
tags: None,
|
||||
comment_count: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -15,8 +15,8 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct GameServerCluster {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
|
||||
@@ -44,10 +44,10 @@ pub struct GameServerCluster {
|
||||
}
|
||||
|
||||
impl GameServerCluster {
|
||||
pub fn new() -> GameServerCluster {
|
||||
pub fn new(name: Option<String>) -> GameServerCluster {
|
||||
GameServerCluster {
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
game_id: None,
|
||||
website_url: None,
|
||||
|
||||
48
src/models/game_server_query.rs
Normal file
48
src/models/game_server_query.rs
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct GameServerQuery {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
|
||||
pub server_id: Option<String>,
|
||||
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||
pub status: Option<models::GameServerStatus>,
|
||||
#[serde(rename = "ping", skip_serializing_if = "Option::is_none")]
|
||||
pub ping: Option<i32>,
|
||||
#[serde(rename = "current_players", skip_serializing_if = "Option::is_none")]
|
||||
pub current_players: Option<i32>,
|
||||
#[serde(rename = "max_players", skip_serializing_if = "Option::is_none")]
|
||||
pub max_players: Option<i32>,
|
||||
#[serde(rename = "motd", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub motd: Option<Option<String>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
}
|
||||
|
||||
impl GameServerQuery {
|
||||
pub fn new() -> GameServerQuery {
|
||||
GameServerQuery {
|
||||
id: None,
|
||||
server_id: None,
|
||||
status: None,
|
||||
ping: None,
|
||||
current_players: None,
|
||||
max_players: None,
|
||||
motd: None,
|
||||
created: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum ServerStatus {
|
||||
pub enum GameServerStatus {
|
||||
#[serde(rename = "unknown")]
|
||||
Unknown,
|
||||
#[serde(rename = "offline")]
|
||||
@@ -23,7 +23,7 @@ pub enum ServerStatus {
|
||||
|
||||
}
|
||||
|
||||
impl std::fmt::Display for ServerStatus {
|
||||
impl std::fmt::Display for GameServerStatus {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Unknown => write!(f, "unknown"),
|
||||
@@ -33,8 +33,8 @@ impl std::fmt::Display for ServerStatus {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ServerStatus {
|
||||
fn default() -> ServerStatus {
|
||||
impl Default for GameServerStatus {
|
||||
fn default() -> GameServerStatus {
|
||||
Self::Unknown
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -17,8 +17,8 @@ pub struct Group {
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
||||
pub uuid: Option<uuid::Uuid>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "tag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub tag: Option<Option<String>>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -48,11 +48,11 @@ pub struct Group {
|
||||
}
|
||||
|
||||
impl Group {
|
||||
pub fn new() -> Group {
|
||||
pub fn new(name: Option<String>) -> Group {
|
||||
Group {
|
||||
id: None,
|
||||
uuid: None,
|
||||
name: None,
|
||||
name,
|
||||
tag: None,
|
||||
description: None,
|
||||
r#type: None,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -12,9 +12,9 @@ use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct GroupGame {
|
||||
#[serde(rename = "group_id", skip_serializing_if = "Option::is_none")]
|
||||
pub group_id: Option<String>,
|
||||
pub struct GroupApplication {
|
||||
#[serde(rename = "group_id")]
|
||||
pub group_id: String,
|
||||
#[serde(rename = "group", skip_serializing_if = "Option::is_none")]
|
||||
pub group: Option<Box<models::Group>>,
|
||||
#[serde(rename = "application_id", skip_serializing_if = "Option::is_none")]
|
||||
@@ -29,10 +29,10 @@ pub struct GroupGame {
|
||||
pub last_used: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl GroupGame {
|
||||
pub fn new() -> GroupGame {
|
||||
GroupGame {
|
||||
group_id: None,
|
||||
impl GroupApplication {
|
||||
pub fn new(group_id: String) -> GroupApplication {
|
||||
GroupApplication {
|
||||
group_id,
|
||||
group: None,
|
||||
application_id: None,
|
||||
application: None,
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,14 +13,14 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct HashViewModel {
|
||||
#[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub value: Option<Option<String>>,
|
||||
#[serde(rename = "value", deserialize_with = "Option::deserialize")]
|
||||
pub value: Option<String>,
|
||||
}
|
||||
|
||||
impl HashViewModel {
|
||||
pub fn new() -> HashViewModel {
|
||||
pub fn new(value: Option<String>) -> HashViewModel {
|
||||
HashViewModel {
|
||||
value: None,
|
||||
value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,17 +13,17 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct IntrospectRequest {
|
||||
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub token: Option<Option<String>>,
|
||||
#[serde(rename = "token_type_hint", skip_serializing_if = "Option::is_none")]
|
||||
pub token_type_hint: Option<models::TokenHintType>,
|
||||
#[serde(rename = "token", deserialize_with = "Option::deserialize")]
|
||||
pub token: Option<String>,
|
||||
#[serde(rename = "token_type_hint")]
|
||||
pub token_type_hint: models::TokenHintType,
|
||||
}
|
||||
|
||||
impl IntrospectRequest {
|
||||
pub fn new() -> IntrospectRequest {
|
||||
pub fn new(token: Option<String>, token_type_hint: models::TokenHintType) -> IntrospectRequest {
|
||||
IntrospectRequest {
|
||||
token: None,
|
||||
token_type_hint: None,
|
||||
token,
|
||||
token_type_hint,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
60
src/models/introspect_response.rs
Normal file
60
src/models/introspect_response.rs
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct IntrospectResponse {
|
||||
#[serde(rename = "jti", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub jti: Option<Option<String>>,
|
||||
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
|
||||
pub active: Option<bool>,
|
||||
#[serde(rename = "token_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub token_type: Option<Option<String>>,
|
||||
#[serde(rename = "client_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub client_id: Option<Option<String>>,
|
||||
#[serde(rename = "sub", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub sub: Option<Option<String>>,
|
||||
#[serde(rename = "username", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub username: Option<Option<String>>,
|
||||
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub scope: Option<Option<String>>,
|
||||
#[serde(rename = "iss", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub iss: Option<Option<String>>,
|
||||
#[serde(rename = "aud", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub aud: Option<Option<String>>,
|
||||
#[serde(rename = "iat", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub iat: Option<Option<i64>>,
|
||||
#[serde(rename = "exp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub exp: Option<Option<i64>>,
|
||||
#[serde(rename = "nbf", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub nbf: Option<Option<i64>>,
|
||||
}
|
||||
|
||||
impl IntrospectResponse {
|
||||
pub fn new() -> IntrospectResponse {
|
||||
IntrospectResponse {
|
||||
jti: None,
|
||||
active: None,
|
||||
token_type: None,
|
||||
client_id: None,
|
||||
sub: None,
|
||||
username: None,
|
||||
scope: None,
|
||||
iss: None,
|
||||
aud: None,
|
||||
iat: None,
|
||||
exp: None,
|
||||
nbf: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -21,6 +21,8 @@ pub struct IpAddress {
|
||||
pub network: Option<Option<String>>,
|
||||
#[serde(rename = "reserved", skip_serializing_if = "Option::is_none")]
|
||||
pub reserved: Option<bool>,
|
||||
#[serde(rename = "banned", skip_serializing_if = "Option::is_none")]
|
||||
pub banned: Option<bool>,
|
||||
#[serde(rename = "asn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub asn: Option<Option<String>>,
|
||||
#[serde(rename = "isp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -29,8 +31,8 @@ pub struct IpAddress {
|
||||
pub continent: Option<Option<String>>,
|
||||
#[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub country: Option<Option<String>>,
|
||||
#[serde(rename = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub region: Option<Option<String>>,
|
||||
#[serde(rename = "province", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub province: Option<Option<String>>,
|
||||
#[serde(rename = "city", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub city: Option<Option<String>>,
|
||||
#[serde(rename = "postal_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -58,11 +60,12 @@ impl IpAddress {
|
||||
version: None,
|
||||
network: None,
|
||||
reserved: None,
|
||||
banned: None,
|
||||
asn: None,
|
||||
isp: None,
|
||||
continent: None,
|
||||
country: None,
|
||||
region: None,
|
||||
province: None,
|
||||
city: None,
|
||||
postal_code: None,
|
||||
calling_code: None,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct LoginRequest {
|
||||
#[serde(rename = "login", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub login: Option<Option<String>>,
|
||||
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub password: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl LoginRequest {
|
||||
pub fn new() -> LoginRequest {
|
||||
LoginRequest {
|
||||
login: None,
|
||||
password: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct LoginResponse {
|
||||
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
|
||||
pub user: Option<Box<models::UserInfo>>,
|
||||
#[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub access_token: Option<Option<String>>,
|
||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub refresh_token: Option<Option<String>>,
|
||||
#[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
|
||||
pub expires_in: Option<i64>,
|
||||
}
|
||||
|
||||
impl LoginResponse {
|
||||
pub fn new() -> LoginResponse {
|
||||
LoginResponse {
|
||||
user: None,
|
||||
access_token: None,
|
||||
refresh_token: None,
|
||||
expires_in: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,18 @@ pub mod application_type;
|
||||
pub use self::application_type::ApplicationType;
|
||||
pub mod authorize_request;
|
||||
pub use self::authorize_request::AuthorizeRequest;
|
||||
pub mod client;
|
||||
pub use self::client::Client;
|
||||
pub mod client_info;
|
||||
pub use self::client_info::ClientInfo;
|
||||
pub mod client_type;
|
||||
pub use self::client_type::ClientType;
|
||||
pub mod code_challenge_method;
|
||||
pub use self::code_challenge_method::CodeChallengeMethod;
|
||||
pub mod code_response;
|
||||
pub use self::code_response::CodeResponse;
|
||||
pub mod create_user;
|
||||
pub use self::create_user::CreateUser;
|
||||
pub mod crypto_view_model;
|
||||
pub use self::crypto_view_model::CryptoViewModel;
|
||||
pub mod game;
|
||||
@@ -16,12 +26,16 @@ pub mod game_server;
|
||||
pub use self::game_server::GameServer;
|
||||
pub mod game_server_cluster;
|
||||
pub use self::game_server_cluster::GameServerCluster;
|
||||
pub mod game_server_query;
|
||||
pub use self::game_server_query::GameServerQuery;
|
||||
pub mod game_server_status;
|
||||
pub use self::game_server_status::GameServerStatus;
|
||||
pub mod grant_type;
|
||||
pub use self::grant_type::GrantType;
|
||||
pub mod group;
|
||||
pub use self::group::Group;
|
||||
pub mod group_game;
|
||||
pub use self::group_game::GroupGame;
|
||||
pub mod group_application;
|
||||
pub use self::group_application::GroupApplication;
|
||||
pub mod group_member;
|
||||
pub use self::group_member::GroupMember;
|
||||
pub mod group_rank;
|
||||
@@ -30,6 +44,8 @@ pub mod hash_view_model;
|
||||
pub use self::hash_view_model::HashViewModel;
|
||||
pub mod introspect_request;
|
||||
pub use self::introspect_request::IntrospectRequest;
|
||||
pub mod introspect_response;
|
||||
pub use self::introspect_response::IntrospectResponse;
|
||||
pub mod ip_address;
|
||||
pub use self::ip_address::IpAddress;
|
||||
pub mod leaderboard_item;
|
||||
@@ -38,36 +54,34 @@ pub mod leaderboard_order;
|
||||
pub use self::leaderboard_order::LeaderboardOrder;
|
||||
pub mod login_provider;
|
||||
pub use self::login_provider::LoginProvider;
|
||||
pub mod login_request;
|
||||
pub use self::login_request::LoginRequest;
|
||||
pub mod login_response;
|
||||
pub use self::login_response::LoginResponse;
|
||||
pub mod package;
|
||||
pub use self::package::Package;
|
||||
pub mod package_release;
|
||||
pub use self::package_release::PackageRelease;
|
||||
pub mod product;
|
||||
pub use self::product::Product;
|
||||
pub mod product_price;
|
||||
pub use self::product_price::ProductPrice;
|
||||
pub mod product_type;
|
||||
pub use self::product_type::ProductType;
|
||||
pub mod profile;
|
||||
pub use self::profile::Profile;
|
||||
pub mod profile_game;
|
||||
pub use self::profile_game::ProfileGame;
|
||||
pub mod profile_group;
|
||||
pub use self::profile_group::ProfileGroup;
|
||||
pub mod refresh_request;
|
||||
pub use self::refresh_request::RefreshRequest;
|
||||
pub mod register_request;
|
||||
pub use self::register_request::RegisterRequest;
|
||||
pub mod response_type;
|
||||
pub use self::response_type::ResponseType;
|
||||
pub mod revoke_request;
|
||||
pub use self::revoke_request::RevokeRequest;
|
||||
pub mod search_request;
|
||||
pub use self::search_request::SearchRequest;
|
||||
pub mod search;
|
||||
pub use self::search::Search;
|
||||
pub mod search_type;
|
||||
pub use self::search_type::SearchType;
|
||||
pub mod server_metrics;
|
||||
pub use self::server_metrics::ServerMetrics;
|
||||
pub mod server_status;
|
||||
pub use self::server_status::ServerStatus;
|
||||
pub mod subscription;
|
||||
pub use self::subscription::Subscription;
|
||||
pub mod storage_file;
|
||||
pub use self::storage_file::StorageFile;
|
||||
pub mod token_hint_type;
|
||||
pub use self::token_hint_type::TokenHintType;
|
||||
pub mod token_request;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -15,24 +15,24 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct Package {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image_url: Option<Option<String>>,
|
||||
#[serde(rename = "author_id", skip_serializing_if = "Option::is_none")]
|
||||
pub author_id: Option<String>,
|
||||
#[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub version: Option<Option<String>>,
|
||||
#[serde(rename = "file_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub file_url: Option<Option<String>>,
|
||||
#[serde(rename = "raw_size", skip_serializing_if = "Option::is_none")]
|
||||
pub raw_size: Option<f64>,
|
||||
#[serde(rename = "image_url", deserialize_with = "Option::deserialize")]
|
||||
pub image_url: Option<String>,
|
||||
#[serde(rename = "application_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub application_id: Option<Option<String>>,
|
||||
#[serde(rename = "category_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub category_id: Option<Option<String>>,
|
||||
#[serde(rename = "download_count", skip_serializing_if = "Option::is_none")]
|
||||
pub download_count: Option<i32>,
|
||||
#[serde(rename = "last_download", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_download: Option<Option<String>>,
|
||||
#[serde(rename = "releases", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub releases: Option<Option<Vec<models::PackageRelease>>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -40,18 +40,18 @@ pub struct Package {
|
||||
}
|
||||
|
||||
impl Package {
|
||||
pub fn new() -> Package {
|
||||
pub fn new(name: Option<String>, image_url: Option<String>) -> Package {
|
||||
Package {
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
image_url: None,
|
||||
author_id: None,
|
||||
version: None,
|
||||
file_url: None,
|
||||
raw_size: None,
|
||||
image_url,
|
||||
application_id: None,
|
||||
category_id: None,
|
||||
download_count: None,
|
||||
last_download: None,
|
||||
releases: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
|
||||
45
src/models/package_release.rs
Normal file
45
src/models/package_release.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PackageRelease {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "version", deserialize_with = "Option::deserialize")]
|
||||
pub version: Option<String>,
|
||||
#[serde(rename = "package_id", skip_serializing_if = "Option::is_none")]
|
||||
pub package_id: Option<String>,
|
||||
#[serde(rename = "notes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub notes: Option<Option<String>>,
|
||||
#[serde(rename = "files", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub files: Option<Option<Vec<models::StorageFile>>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl PackageRelease {
|
||||
pub fn new(version: Option<String>) -> PackageRelease {
|
||||
PackageRelease {
|
||||
id: None,
|
||||
version,
|
||||
package_id: None,
|
||||
notes: None,
|
||||
files: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -12,30 +12,39 @@ use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Subscription {
|
||||
pub struct Product {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
pub r#type: Option<models::ProductType>,
|
||||
#[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub slug: Option<Option<String>>,
|
||||
#[serde(rename = "image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image_url: Option<Option<String>>,
|
||||
#[serde(rename = "is_physical", skip_serializing_if = "Option::is_none")]
|
||||
pub is_physical: Option<bool>,
|
||||
#[serde(rename = "prices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub prices: Option<Option<std::collections::HashMap<String, f64>>>,
|
||||
pub prices: Option<Option<Vec<models::ProductPrice>>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl Subscription {
|
||||
pub fn new() -> Subscription {
|
||||
Subscription {
|
||||
impl Product {
|
||||
pub fn new(name: Option<String>) -> Product {
|
||||
Product {
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
r#type: None,
|
||||
slug: None,
|
||||
image_url: None,
|
||||
is_physical: None,
|
||||
prices: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
33
src/models/product_price.rs
Normal file
33
src/models/product_price.rs
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ProductPrice {
|
||||
#[serde(rename = "currency", deserialize_with = "Option::deserialize")]
|
||||
pub currency: Option<String>,
|
||||
#[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
|
||||
pub amount: Option<f64>,
|
||||
#[serde(rename = "renewal", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub renewal: Option<Option<f64>>,
|
||||
}
|
||||
|
||||
impl ProductPrice {
|
||||
pub fn new(currency: Option<String>) -> ProductPrice {
|
||||
ProductPrice {
|
||||
currency,
|
||||
amount: None,
|
||||
renewal: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
38
src/models/product_type.rs
Normal file
38
src/models/product_type.rs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum ProductType {
|
||||
#[serde(rename = "product")]
|
||||
Product,
|
||||
#[serde(rename = "subscription")]
|
||||
Subscription,
|
||||
|
||||
}
|
||||
|
||||
impl std::fmt::Display for ProductType {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Product => write!(f, "product"),
|
||||
Self::Subscription => write!(f, "subscription"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ProductType {
|
||||
fn default() -> ProductType {
|
||||
Self::Product
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RefreshRequest {
|
||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub refresh_token: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl RefreshRequest {
|
||||
pub fn new() -> RefreshRequest {
|
||||
RefreshRequest {
|
||||
refresh_token: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RegisterRequest {
|
||||
#[serde(rename = "uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub uuid: Option<Option<uuid::Uuid>>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub email: Option<Option<String>>,
|
||||
#[serde(rename = "password")]
|
||||
pub password: String,
|
||||
}
|
||||
|
||||
impl RegisterRequest {
|
||||
pub fn new(name: String, password: String) -> RegisterRequest {
|
||||
RegisterRequest {
|
||||
uuid: None,
|
||||
name,
|
||||
email: None,
|
||||
password,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,17 +13,17 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RevokeRequest {
|
||||
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub token: Option<Option<String>>,
|
||||
#[serde(rename = "token_type_hint", skip_serializing_if = "Option::is_none")]
|
||||
pub token_type_hint: Option<models::TokenHintType>,
|
||||
#[serde(rename = "token", deserialize_with = "Option::deserialize")]
|
||||
pub token: Option<String>,
|
||||
#[serde(rename = "token_type_hint")]
|
||||
pub token_type_hint: models::TokenHintType,
|
||||
}
|
||||
|
||||
impl RevokeRequest {
|
||||
pub fn new() -> RevokeRequest {
|
||||
pub fn new(token: Option<String>, token_type_hint: models::TokenHintType) -> RevokeRequest {
|
||||
RevokeRequest {
|
||||
token: None,
|
||||
token_type_hint: None,
|
||||
token,
|
||||
token_type_hint,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -12,22 +12,22 @@ use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct SearchRequest {
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
pub r#type: Option<models::SearchType>,
|
||||
#[serde(rename = "query", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub query: Option<Option<String>>,
|
||||
pub struct Search {
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: models::SearchType,
|
||||
#[serde(rename = "query", deserialize_with = "Option::deserialize")]
|
||||
pub query: Option<String>,
|
||||
#[serde(rename = "page", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub page: Option<Option<i32>>,
|
||||
#[serde(rename = "game_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub game_id: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl SearchRequest {
|
||||
pub fn new() -> SearchRequest {
|
||||
SearchRequest {
|
||||
r#type: None,
|
||||
query: None,
|
||||
impl Search {
|
||||
pub fn new(r#type: models::SearchType, query: Option<String>) -> Search {
|
||||
Search {
|
||||
r#type,
|
||||
query,
|
||||
page: None,
|
||||
game_id: None,
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -18,10 +18,10 @@ pub enum SearchType {
|
||||
User,
|
||||
#[serde(rename = "group")]
|
||||
Group,
|
||||
#[serde(rename = "server")]
|
||||
Server,
|
||||
#[serde(rename = "cluster")]
|
||||
Cluster,
|
||||
#[serde(rename = "game_server")]
|
||||
GameServer,
|
||||
#[serde(rename = "game_server_cluster")]
|
||||
GameServerCluster,
|
||||
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ impl std::fmt::Display for SearchType {
|
||||
match self {
|
||||
Self::User => write!(f, "user"),
|
||||
Self::Group => write!(f, "group"),
|
||||
Self::Server => write!(f, "server"),
|
||||
Self::Cluster => write!(f, "cluster"),
|
||||
Self::GameServer => write!(f, "game_server"),
|
||||
Self::GameServerCluster => write!(f, "game_server_cluster"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
51
src/models/storage_file.rs
Normal file
51
src/models/storage_file.rs
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct StorageFile {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "content_type", deserialize_with = "Option::deserialize")]
|
||||
pub content_type: Option<String>,
|
||||
#[serde(rename = "url", deserialize_with = "Option::deserialize")]
|
||||
pub url: Option<String>,
|
||||
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||
pub size: Option<i64>,
|
||||
#[serde(rename = "hash", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub hash: Option<Option<String>>,
|
||||
#[serde(rename = "etag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub etag: Option<Option<String>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl StorageFile {
|
||||
pub fn new(name: Option<String>, content_type: Option<String>, url: Option<String>) -> StorageFile {
|
||||
StorageFile {
|
||||
id: None,
|
||||
name,
|
||||
content_type,
|
||||
url,
|
||||
size: None,
|
||||
hash: None,
|
||||
etag: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -23,8 +23,6 @@ pub struct TokenRequest {
|
||||
pub password: Option<Option<String>>,
|
||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub refresh_token: Option<Option<String>>,
|
||||
#[serde(rename = "client_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub client_id: Option<Option<String>>,
|
||||
#[serde(rename = "redirect_uri", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub redirect_uri: Option<Option<String>>,
|
||||
#[serde(rename = "code_verifier", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -39,7 +37,6 @@ impl TokenRequest {
|
||||
username: None,
|
||||
password: None,
|
||||
refresh_token: None,
|
||||
client_id: None,
|
||||
redirect_uri: None,
|
||||
code_verifier: None,
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,10 +13,10 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct TokenResponse {
|
||||
#[serde(rename = "token_type", skip_serializing_if = "Option::is_none")]
|
||||
pub token_type: Option<models::TokenType>,
|
||||
#[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub access_token: Option<Option<String>>,
|
||||
#[serde(rename = "token_type")]
|
||||
pub token_type: models::TokenType,
|
||||
#[serde(rename = "access_token", deserialize_with = "Option::deserialize")]
|
||||
pub access_token: Option<String>,
|
||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub refresh_token: Option<Option<String>>,
|
||||
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -28,10 +28,10 @@ pub struct TokenResponse {
|
||||
}
|
||||
|
||||
impl TokenResponse {
|
||||
pub fn new() -> TokenResponse {
|
||||
pub fn new(token_type: models::TokenType, access_token: Option<String>) -> TokenResponse {
|
||||
TokenResponse {
|
||||
token_type: None,
|
||||
access_token: None,
|
||||
token_type,
|
||||
access_token,
|
||||
refresh_token: None,
|
||||
scope: None,
|
||||
state: None,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -13,16 +13,16 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct UpdateProfile {
|
||||
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<Option<String>>,
|
||||
#[serde(rename = "display_name", deserialize_with = "Option::deserialize")]
|
||||
pub display_name: Option<String>,
|
||||
#[serde(rename = "biography", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub biography: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl UpdateProfile {
|
||||
pub fn new() -> UpdateProfile {
|
||||
pub fn new(display_name: Option<String>) -> UpdateProfile {
|
||||
UpdateProfile {
|
||||
display_name: None,
|
||||
display_name,
|
||||
biography: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -17,32 +17,16 @@ pub struct UserInfo {
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
||||
pub uuid: Option<uuid::Uuid>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<Option<String>>,
|
||||
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub email: Option<Option<String>>,
|
||||
#[serde(rename = "email_verified", skip_serializing_if = "Option::is_none")]
|
||||
pub email_verified: Option<bool>,
|
||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||
pub r#type: Option<models::UserType>,
|
||||
#[serde(rename = "flags", skip_serializing_if = "Option::is_none")]
|
||||
pub flags: Option<String>,
|
||||
#[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
|
||||
pub permissions: Option<String>,
|
||||
#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
|
||||
pub verified: Option<bool>,
|
||||
#[serde(rename = "level", skip_serializing_if = "Option::is_none")]
|
||||
pub level: Option<i32>,
|
||||
#[serde(rename = "experience", skip_serializing_if = "Option::is_none")]
|
||||
pub experience: Option<f64>,
|
||||
#[serde(rename = "public_birthday", skip_serializing_if = "Option::is_none")]
|
||||
pub public_birthday: Option<bool>,
|
||||
#[serde(rename = "birthday", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub birthday: Option<Option<String>>,
|
||||
#[serde(rename = "points", skip_serializing_if = "Option::is_none")]
|
||||
pub points: Option<f64>,
|
||||
#[serde(rename = "location", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub location: Option<Option<String>>,
|
||||
#[serde(rename = "language", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub language: Option<Option<String>>,
|
||||
#[serde(rename = "timezone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -51,14 +35,8 @@ pub struct UserInfo {
|
||||
pub currency: Option<Option<String>>,
|
||||
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub photo_url: Option<Option<String>>,
|
||||
#[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub banner_url: Option<Option<String>>,
|
||||
#[serde(rename = "last_online", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_online: Option<Option<String>>,
|
||||
#[serde(rename = "biography", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub biography: Option<Option<String>>,
|
||||
#[serde(rename = "view_count", skip_serializing_if = "Option::is_none")]
|
||||
pub view_count: Option<i32>,
|
||||
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub permissions: Option<Option<Vec<String>>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
@@ -66,31 +44,20 @@ pub struct UserInfo {
|
||||
}
|
||||
|
||||
impl UserInfo {
|
||||
pub fn new() -> UserInfo {
|
||||
pub fn new(name: Option<String>) -> UserInfo {
|
||||
UserInfo {
|
||||
id: None,
|
||||
uuid: None,
|
||||
name: None,
|
||||
name,
|
||||
display_name: None,
|
||||
email: None,
|
||||
email_verified: None,
|
||||
r#type: None,
|
||||
flags: None,
|
||||
permissions: None,
|
||||
verified: None,
|
||||
level: None,
|
||||
experience: None,
|
||||
public_birthday: None,
|
||||
birthday: None,
|
||||
points: None,
|
||||
location: None,
|
||||
language: None,
|
||||
timezone: None,
|
||||
currency: None,
|
||||
photo_url: None,
|
||||
banner_url: None,
|
||||
last_online: None,
|
||||
biography: None,
|
||||
view_count: None,
|
||||
permissions: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
[package]
|
||||
name = "tribufu-platform"
|
||||
version = "0.0.5"
|
||||
version = "1.3.0"
|
||||
description = "Tribufu Platform"
|
||||
repository = "https://github.com/tribufu/tribufu-rust"
|
||||
authors = ["Tribufu <contact@tribufu.com>"]
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
publish = true
|
||||
|
||||
[lib]
|
||||
name = "tribufu_platform"
|
||||
@@ -13,7 +14,7 @@ crate-type = ["rlib"]
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
tribufu-error = { version = "0.0.5", path = "../error" }
|
||||
tribufu-error = { version = "1.3.0", path = "../error" }
|
||||
dunce = "1.0.4"
|
||||
|
||||
[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies]
|
||||
|
||||
Reference in New Issue
Block a user