mirror of
https://github.com/tribufu/sdk-rust
synced 2026-02-04 17:33:07 +00:00
Compare commits
3 Commits
1.3.0
...
openapi-ge
| Author | SHA1 | Date | |
|---|---|---|---|
| 431db65471 | |||
| 7cbe6e451d | |||
| 0b32ab460c |
@@ -1,14 +0,0 @@
|
|||||||
[build]
|
|
||||||
rustflags = ["--cfg", "uuid_unstable"]
|
|
||||||
|
|
||||||
[profile.dev]
|
|
||||||
lto = "off"
|
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = "thin"
|
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")']
|
|
||||||
rustflags = ["-C", "target-feature=+crt-static"]
|
|
||||||
|
|
||||||
[target.'cfg(target_family = "wasm")']
|
|
||||||
rustflags = ["--cfg", "web_sys_unstable_apis"]
|
|
||||||
221
.clang-format
221
.clang-format
@@ -1,221 +0,0 @@
|
|||||||
---
|
|
||||||
Language: Cpp
|
|
||||||
AccessModifierOffset: -4
|
|
||||||
AlignAfterOpenBracket: Align
|
|
||||||
AlignArrayOfStructures: None
|
|
||||||
AlignConsecutiveAssignments:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: true
|
|
||||||
AlignConsecutiveBitFields:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: false
|
|
||||||
AlignConsecutiveDeclarations:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: false
|
|
||||||
AlignConsecutiveMacros:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: false
|
|
||||||
AlignEscapedNewlines: Right
|
|
||||||
AlignOperands: Align
|
|
||||||
AlignTrailingComments:
|
|
||||||
Kind: Always
|
|
||||||
OverEmptyLines: 0
|
|
||||||
AllowAllArgumentsOnNextLine: true
|
|
||||||
AllowAllParametersOfDeclarationOnNextLine: true
|
|
||||||
AllowShortBlocksOnASingleLine: Never
|
|
||||||
AllowShortCaseLabelsOnASingleLine: false
|
|
||||||
AllowShortEnumsOnASingleLine: false
|
|
||||||
AllowShortFunctionsOnASingleLine: None
|
|
||||||
AllowShortIfStatementsOnASingleLine: Never
|
|
||||||
AllowShortLambdasOnASingleLine: All
|
|
||||||
AllowShortLoopsOnASingleLine: false
|
|
||||||
AlwaysBreakAfterDefinitionReturnType: None
|
|
||||||
AlwaysBreakAfterReturnType: None
|
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
|
||||||
AlwaysBreakTemplateDeclarations: MultiLine
|
|
||||||
AttributeMacros:
|
|
||||||
- __capability
|
|
||||||
BinPackArguments: true
|
|
||||||
BinPackParameters: true
|
|
||||||
BitFieldColonSpacing: Both
|
|
||||||
BraceWrapping:
|
|
||||||
AfterCaseLabel: false
|
|
||||||
AfterClass: true
|
|
||||||
AfterControlStatement: Always
|
|
||||||
AfterEnum: true
|
|
||||||
AfterExternBlock: true
|
|
||||||
AfterFunction: true
|
|
||||||
AfterNamespace: true
|
|
||||||
AfterObjCDeclaration: true
|
|
||||||
AfterStruct: true
|
|
||||||
AfterUnion: false
|
|
||||||
BeforeCatch: true
|
|
||||||
BeforeElse: true
|
|
||||||
BeforeLambdaBody: false
|
|
||||||
BeforeWhile: false
|
|
||||||
IndentBraces: false
|
|
||||||
SplitEmptyFunction: true
|
|
||||||
SplitEmptyRecord: true
|
|
||||||
SplitEmptyNamespace: true
|
|
||||||
BreakAfterAttributes: Never
|
|
||||||
BreakAfterJavaFieldAnnotations: false
|
|
||||||
BreakArrays: true
|
|
||||||
BreakBeforeBinaryOperators: None
|
|
||||||
BreakBeforeConceptDeclarations: Always
|
|
||||||
BreakBeforeBraces: Custom
|
|
||||||
BreakBeforeInlineASMColon: OnlyMultiline
|
|
||||||
BreakBeforeTernaryOperators: true
|
|
||||||
BreakConstructorInitializers: BeforeColon
|
|
||||||
BreakInheritanceList: BeforeColon
|
|
||||||
BreakStringLiterals: true
|
|
||||||
ColumnLimit: 120
|
|
||||||
CommentPragmas: "^ IWYU pragma:"
|
|
||||||
CompactNamespaces: false
|
|
||||||
ConstructorInitializerIndentWidth: 4
|
|
||||||
ContinuationIndentWidth: 4
|
|
||||||
Cpp11BracedListStyle: true
|
|
||||||
DerivePointerAlignment: false
|
|
||||||
DisableFormat: false
|
|
||||||
EmptyLineAfterAccessModifier: Never
|
|
||||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
|
||||||
ExperimentalAutoDetectBinPacking: false
|
|
||||||
FixNamespaceComments: false
|
|
||||||
ForEachMacros:
|
|
||||||
- foreach
|
|
||||||
- Q_FOREACH
|
|
||||||
- BOOST_FOREACH
|
|
||||||
IfMacros:
|
|
||||||
- KJ_IF_MAYBE
|
|
||||||
IncludeBlocks: Preserve
|
|
||||||
IncludeCategories:
|
|
||||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
|
||||||
Priority: 2
|
|
||||||
SortPriority: 0
|
|
||||||
CaseSensitive: false
|
|
||||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
|
||||||
Priority: 3
|
|
||||||
SortPriority: 0
|
|
||||||
CaseSensitive: false
|
|
||||||
- Regex: ".*"
|
|
||||||
Priority: 1
|
|
||||||
SortPriority: 0
|
|
||||||
CaseSensitive: false
|
|
||||||
IncludeIsMainRegex: "(Test)?$"
|
|
||||||
IncludeIsMainSourceRegex: ""
|
|
||||||
IndentAccessModifiers: false
|
|
||||||
IndentCaseBlocks: false
|
|
||||||
IndentCaseLabels: false
|
|
||||||
IndentExternBlock: AfterExternBlock
|
|
||||||
IndentGotoLabels: true
|
|
||||||
IndentPPDirectives: None
|
|
||||||
IndentRequiresClause: true
|
|
||||||
IndentWidth: 4
|
|
||||||
IndentWrappedFunctionNames: false
|
|
||||||
InsertBraces: false
|
|
||||||
InsertNewlineAtEOF: false
|
|
||||||
InsertTrailingCommas: None
|
|
||||||
IntegerLiteralSeparator:
|
|
||||||
Binary: 0
|
|
||||||
Decimal: 0
|
|
||||||
Hex: 0
|
|
||||||
JavaScriptQuotes: Leave
|
|
||||||
JavaScriptWrapImports: true
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
||||||
LambdaBodyIndentation: Signature
|
|
||||||
LineEnding: DeriveLF
|
|
||||||
MacroBlockBegin: ""
|
|
||||||
MacroBlockEnd: ""
|
|
||||||
MaxEmptyLinesToKeep: 1
|
|
||||||
NamespaceIndentation: All
|
|
||||||
ObjCBinPackProtocolList: Auto
|
|
||||||
ObjCBlockIndentWidth: 2
|
|
||||||
ObjCBreakBeforeNestedBlockParam: true
|
|
||||||
ObjCSpaceAfterProperty: false
|
|
||||||
ObjCSpaceBeforeProtocolList: true
|
|
||||||
PackConstructorInitializers: BinPack
|
|
||||||
PenaltyBreakAssignment: 2
|
|
||||||
PenaltyBreakBeforeFirstCallParameter: 19
|
|
||||||
PenaltyBreakComment: 300
|
|
||||||
PenaltyBreakFirstLessLess: 120
|
|
||||||
PenaltyBreakOpenParenthesis: 0
|
|
||||||
PenaltyBreakString: 1000
|
|
||||||
PenaltyBreakTemplateDeclaration: 10
|
|
||||||
PenaltyExcessCharacter: 1000000
|
|
||||||
PenaltyIndentedWhitespace: 0
|
|
||||||
PenaltyReturnTypeOnItsOwnLine: 1000
|
|
||||||
PointerAlignment: Right
|
|
||||||
PPIndentWidth: -1
|
|
||||||
QualifierAlignment: Leave
|
|
||||||
ReferenceAlignment: Pointer
|
|
||||||
ReflowComments: true
|
|
||||||
RemoveBracesLLVM: false
|
|
||||||
RemoveSemicolon: false
|
|
||||||
RequiresClausePosition: OwnLine
|
|
||||||
RequiresExpressionIndentation: OuterScope
|
|
||||||
SeparateDefinitionBlocks: Leave
|
|
||||||
ShortNamespaceLines: 1
|
|
||||||
SortIncludes: CaseSensitive
|
|
||||||
SortJavaStaticImport: Before
|
|
||||||
SortUsingDeclarations: LexicographicNumeric
|
|
||||||
SpaceAfterCStyleCast: false
|
|
||||||
SpaceAfterLogicalNot: false
|
|
||||||
SpaceAfterTemplateKeyword: true
|
|
||||||
SpaceAroundPointerQualifiers: Default
|
|
||||||
SpaceBeforeAssignmentOperators: true
|
|
||||||
SpaceBeforeCaseColon: false
|
|
||||||
SpaceBeforeCpp11BracedList: false
|
|
||||||
SpaceBeforeCtorInitializerColon: true
|
|
||||||
SpaceBeforeInheritanceColon: true
|
|
||||||
SpaceBeforeParens: ControlStatements
|
|
||||||
SpaceBeforeParensOptions:
|
|
||||||
AfterControlStatements: true
|
|
||||||
AfterForeachMacros: true
|
|
||||||
AfterFunctionDefinitionName: false
|
|
||||||
AfterFunctionDeclarationName: false
|
|
||||||
AfterIfMacros: true
|
|
||||||
AfterOverloadedOperator: false
|
|
||||||
AfterRequiresInClause: false
|
|
||||||
AfterRequiresInExpression: false
|
|
||||||
BeforeNonEmptyParentheses: false
|
|
||||||
SpaceBeforeRangeBasedForLoopColon: true
|
|
||||||
SpaceBeforeSquareBrackets: false
|
|
||||||
SpaceInEmptyBlock: false
|
|
||||||
SpaceInEmptyParentheses: false
|
|
||||||
SpacesBeforeTrailingComments: 1
|
|
||||||
SpacesInAngles: Never
|
|
||||||
SpacesInConditionalStatement: false
|
|
||||||
SpacesInContainerLiterals: true
|
|
||||||
SpacesInCStyleCastParentheses: false
|
|
||||||
SpacesInLineCommentPrefix:
|
|
||||||
Minimum: 1
|
|
||||||
Maximum: -1
|
|
||||||
SpacesInParentheses: false
|
|
||||||
SpacesInSquareBrackets: false
|
|
||||||
Standard: Latest
|
|
||||||
StatementAttributeLikeMacros:
|
|
||||||
- Q_EMIT
|
|
||||||
StatementMacros:
|
|
||||||
- Q_UNUSED
|
|
||||||
- QT_REQUIRE_VERSION
|
|
||||||
TabWidth: 4
|
|
||||||
UseTab: Never
|
|
||||||
WhitespaceSensitiveMacros:
|
|
||||||
- BOOST_PP_STRINGIZE
|
|
||||||
- CF_SWIFT_NAME
|
|
||||||
- NS_SWIFT_NAME
|
|
||||||
- PP_STRINGIZE
|
|
||||||
- STRINGIZE
|
|
||||||
---
|
|
||||||
|
|
||||||
23
.gitignore
vendored
23
.gitignore
vendored
@@ -1,17 +1,40 @@
|
|||||||
|
__pycache__/
|
||||||
|
.gradle/
|
||||||
|
.idea/
|
||||||
|
.metals/
|
||||||
|
.next/
|
||||||
|
.parcel-cache/
|
||||||
.vs/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
bin/
|
bin/
|
||||||
|
binaries/
|
||||||
|
build/
|
||||||
|
node_modules/
|
||||||
|
obj/
|
||||||
|
saved/
|
||||||
target/
|
target/
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.env
|
.env
|
||||||
|
*.crt
|
||||||
|
*.csproj
|
||||||
*.filters
|
*.filters
|
||||||
|
*.fsproj
|
||||||
|
*.key
|
||||||
|
*.log
|
||||||
*.make
|
*.make
|
||||||
|
*.mwb.bak
|
||||||
|
*.pem
|
||||||
*.sln
|
*.sln
|
||||||
*.user
|
*.user
|
||||||
*.vcxproj
|
*.vcxproj
|
||||||
|
*.vpp.*
|
||||||
|
*.wasm
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
*.xcworkspace
|
*.xcworkspace
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
desktop.ini
|
desktop.ini
|
||||||
|
keystore.jks
|
||||||
|
local.properties
|
||||||
Makefile
|
Makefile
|
||||||
|
next-env.d.ts
|
||||||
|
|||||||
@@ -5,45 +5,38 @@ src/models/account.rs
|
|||||||
src/models/application.rs
|
src/models/application.rs
|
||||||
src/models/application_type.rs
|
src/models/application_type.rs
|
||||||
src/models/authorize_request.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_challenge_method.rs
|
||||||
src/models/code_response.rs
|
|
||||||
src/models/create_user.rs
|
|
||||||
src/models/crypto_view_model.rs
|
src/models/crypto_view_model.rs
|
||||||
src/models/game.rs
|
src/models/game.rs
|
||||||
src/models/game_server.rs
|
src/models/game_server.rs
|
||||||
src/models/game_server_cluster.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/grant_type.rs
|
||||||
src/models/group.rs
|
src/models/group.rs
|
||||||
src/models/group_application.rs
|
src/models/group_game.rs
|
||||||
src/models/group_member.rs
|
src/models/group_member.rs
|
||||||
src/models/group_rank.rs
|
src/models/group_rank.rs
|
||||||
src/models/hash_view_model.rs
|
src/models/hash_view_model.rs
|
||||||
src/models/introspect_request.rs
|
src/models/introspect_request.rs
|
||||||
src/models/introspect_response.rs
|
|
||||||
src/models/ip_address.rs
|
src/models/ip_address.rs
|
||||||
src/models/leaderboard_item.rs
|
src/models/leaderboard_item.rs
|
||||||
src/models/leaderboard_order.rs
|
src/models/leaderboard_order.rs
|
||||||
src/models/login_provider.rs
|
src/models/login_provider.rs
|
||||||
|
src/models/login_request.rs
|
||||||
|
src/models/login_response.rs
|
||||||
src/models/mod.rs
|
src/models/mod.rs
|
||||||
src/models/package.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.rs
|
||||||
src/models/profile_game.rs
|
src/models/profile_game.rs
|
||||||
src/models/profile_group.rs
|
src/models/profile_group.rs
|
||||||
|
src/models/refresh_request.rs
|
||||||
|
src/models/register_request.rs
|
||||||
src/models/response_type.rs
|
src/models/response_type.rs
|
||||||
src/models/revoke_request.rs
|
src/models/revoke_request.rs
|
||||||
src/models/search.rs
|
src/models/search_request.rs
|
||||||
src/models/search_type.rs
|
src/models/search_type.rs
|
||||||
src/models/server_metrics.rs
|
src/models/server_metrics.rs
|
||||||
src/models/storage_file.rs
|
src/models/server_status.rs
|
||||||
|
src/models/subscription.rs
|
||||||
src/models/token_hint_type.rs
|
src/models/token_hint_type.rs
|
||||||
src/models/token_request.rs
|
src/models/token_request.rs
|
||||||
src/models/token_response.rs
|
src/models/token_response.rs
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tribufu"
|
name = "tribufu"
|
||||||
version = "1.3.0"
|
version = "1.1.0"
|
||||||
description = "REST API to access Tribufu services."
|
description = "REST API to access Tribufu services."
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
repository = "https://github.com/tribufu/tribufu-rust"
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
authors = ["Tribufu <contact@tribufu.com>"]
|
||||||
@@ -19,20 +19,15 @@ exclude = [
|
|||||||
".vscode/",
|
".vscode/",
|
||||||
"examples/",
|
"examples/",
|
||||||
"scripts/",
|
"scripts/",
|
||||||
|
"scripts/",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace]
|
|
||||||
resolver = "2"
|
|
||||||
members = ["src/*"]
|
|
||||||
exclude = ["src/apis", "src/models"]
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tribufu"
|
name = "tribufu"
|
||||||
crate-type = ["rlib"]
|
crate-type = ["rlib"]
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tribufu-constants = { version = "1.3.0", path = "./src/constants" }
|
|
||||||
async-trait = "^0.1"
|
async-trait = "^0.1"
|
||||||
reqwest = { version = "^0.12", features = ["json", "multipart"] }
|
reqwest = { version = "^0.12", features = ["json", "multipart"] }
|
||||||
serde = { version = "^1.0", features = ["derive"] }
|
serde = { version = "^1.0", features = ["derive"] }
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Rust SDK to access Tribufu APIs and services.
|
|||||||
[crates-badge]: https://img.shields.io/crates/v/tribufu.svg
|
[crates-badge]: https://img.shields.io/crates/v/tribufu.svg
|
||||||
[crates-url]: https://crates.io/crates/tribufu
|
[crates-url]: https://crates.io/crates/tribufu
|
||||||
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
|
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
|
||||||
[mit-url]: https://github.com/tribufu/tribufu-rust/blob/main/LICENSE.txt
|
[mit-url]: https://github.com/Tribufu/TribufuRust/blob/main/LICENSE.txt
|
||||||
[discord-badge]: https://img.shields.io/discord/276504514616623104.svg?logo=discord&style=flat-square
|
[discord-badge]: https://img.shields.io/discord/276504514616623104.svg?logo=discord&style=flat-square
|
||||||
[discord-url]: https://www.tribufu.com/discord
|
[discord-url]: https://www.tribufu.com/discord
|
||||||
|
|
||||||
@@ -20,4 +20,4 @@ Rust SDK to access Tribufu APIs and services.
|
|||||||
|
|
||||||
This project is licensed under the [MIT License].
|
This project is licensed under the [MIT License].
|
||||||
|
|
||||||
[MIT License]: https://github.com/tribufu/tribufu-rust/blob/main/LICENSE.txt
|
[MIT License]: https://github.com/Tribufu/TribufuRust/blob/main/LICENSE.txt
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use tribufu::TribufuApi;
|
|
||||||
|
|
||||||
#[tokio::main]
|
|
||||||
async fn main() {
|
|
||||||
let user_agent = TribufuApi::get_user_agent();
|
|
||||||
println!("{}", user_agent);
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
#!/usr/bin/env pwsh
|
#!/usr/bin/env pwsh
|
||||||
|
|
||||||
$crates = @(
|
$crates = @(
|
||||||
|
"tribufu-types",
|
||||||
"tribufu-constants",
|
"tribufu-constants",
|
||||||
"tribufu-error",
|
"tribufu-api",
|
||||||
"tribufu-json",
|
|
||||||
"tribufu-log",
|
|
||||||
"tribufu-platform",
|
|
||||||
"tribufu"
|
"tribufu"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
|
|
||||||
echo "Building for win-x64"
|
|
||||||
cargo build --workspace
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +40,7 @@ impl Default for Configuration {
|
|||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Configuration {
|
Configuration {
|
||||||
base_path: "http://localhost".to_owned(),
|
base_path: "http://localhost".to_owned(),
|
||||||
user_agent: Some("OpenAPI-Generator/1.3.0/rust".to_owned()),
|
user_agent: Some("OpenAPI-Generator/1.1.0/rust".to_owned()),
|
||||||
client: reqwest::Client::new(),
|
client: reqwest::Client::new(),
|
||||||
basic_auth: None,
|
basic_auth: None,
|
||||||
oauth_access_token: None,
|
oauth_access_token: None,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tribufu-constants"
|
|
||||||
version = "1.3.0"
|
|
||||||
description = "Tribufu Constants"
|
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
|
||||||
license = "MIT"
|
|
||||||
edition = "2021"
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "tribufu_constants"
|
|
||||||
crate-type = ["rlib"]
|
|
||||||
path = "lib.rs"
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
vergen = { version = "=5.1.5", default-features = false, features = [
|
|
||||||
"build",
|
|
||||||
"cargo",
|
|
||||||
"rustc",
|
|
||||||
] }
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use vergen::{vergen, Config};
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
vergen(Config::default()).unwrap();
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use std::env::consts;
|
|
||||||
|
|
||||||
pub const BUILD_TIMESTAMP: &'static str = env!("VERGEN_BUILD_TIMESTAMP");
|
|
||||||
pub const CARGO_PROFILE: &'static str = env!("VERGEN_CARGO_PROFILE");
|
|
||||||
pub const LLVM_VERSION: &'static str = env!("VERGEN_RUSTC_LLVM_VERSION");
|
|
||||||
pub const RUSTC_CHANNEL: &'static str = env!("VERGEN_RUSTC_CHANNEL");
|
|
||||||
pub const RUSTC_COMMIT: &'static str = env!("VERGEN_RUSTC_COMMIT_HASH");
|
|
||||||
pub const RUSTC_VERSION: &'static str = env!("VERGEN_RUSTC_SEMVER");
|
|
||||||
pub const TARGET_ARCH: &'static str = consts::ARCH;
|
|
||||||
pub const TARGET_DLL_EXTENSION: &'static str = consts::DLL_EXTENSION;
|
|
||||||
pub const TARGET_DLL_SUFFIX: &'static str = consts::DLL_SUFFIX;
|
|
||||||
pub const TARGET_EXE_EXTENSION: &'static str = consts::EXE_EXTENSION;
|
|
||||||
pub const TARGET_EXE_SUFFIX: &'static str = consts::EXE_SUFFIX;
|
|
||||||
pub const TARGET_FAMILY: &'static str = consts::FAMILY;
|
|
||||||
pub const TARGET_OS: &'static str = consts::OS;
|
|
||||||
pub const TARGET_TRIPLE: &'static str = env!("VERGEN_CARGO_TARGET_TRIPLE");
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tribufu-error"
|
|
||||||
version = "1.3.0"
|
|
||||||
description = "Tribufu Error"
|
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
|
||||||
license = "MIT"
|
|
||||||
edition = "2021"
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "tribufu_error"
|
|
||||||
crate-type = ["rlib"]
|
|
||||||
path = "lib.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
anyhow = "1.0.44"
|
|
||||||
thiserror = "2.0.12"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
pub use anyhow::Error;
|
|
||||||
pub use thiserror::Error;
|
|
||||||
|
|
||||||
pub type Result<T> = core::result::Result<T, Error>;
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tribufu-json"
|
|
||||||
version = "1.3.0"
|
|
||||||
description = "Tribufu Json"
|
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
|
||||||
license = "MIT"
|
|
||||||
edition = "2021"
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "tribufu_json"
|
|
||||||
crate-type = ["rlib"]
|
|
||||||
path = "lib.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
tribufu-error = { version = "1.3.0", path = "../error" }
|
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
|
||||||
serde_json = "1.0"
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use serde::Serialize;
|
|
||||||
use serde_json::ser::PrettyFormatter;
|
|
||||||
use serde_json::Serializer;
|
|
||||||
use tribufu_error::Result;
|
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! include_json {
|
|
||||||
($path:expr) => {
|
|
||||||
$crate::from_str(include_str!($path)).expect("Failed to load JSON")
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
pub use serde_json::from_slice;
|
|
||||||
pub use serde_json::from_str;
|
|
||||||
pub use serde_json::to_string;
|
|
||||||
pub use serde_json::to_value;
|
|
||||||
pub use serde_json::to_vec_pretty;
|
|
||||||
|
|
||||||
pub fn to_string_pretty<T>(value: &T) -> Result<String>
|
|
||||||
where
|
|
||||||
T: Serialize,
|
|
||||||
{
|
|
||||||
let obj = to_value(value).expect("Failed to serialize JSON");
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
let fmt = PrettyFormatter::with_indent(b" ");
|
|
||||||
let mut ser = Serializer::with_formatter(&mut buf, fmt);
|
|
||||||
obj.serialize(&mut ser)?;
|
|
||||||
Ok(String::from_utf8(buf)?)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
|
||||||
struct JsonTest {
|
|
||||||
version: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_include_json() {
|
|
||||||
let data: JsonTest = include_json!("test.json");
|
|
||||||
assert!(data.version == "0.0.0".to_owned())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.0.0"
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
use crate::apis::configuration::{ApiKey, Configuration};
|
use crate::apis::configuration::{ApiKey, Configuration};
|
||||||
use crate::apis::tribufu_generated_api::TribufuGeneratedApiClient;
|
use crate::apis::tribufu_generated_api::TribufuGeneratedApiClient;
|
||||||
use reqwest::Client;
|
use reqwest::Client;
|
||||||
use tribufu_constants::{RUSTC_VERSION, TARGET_TRIPLE};
|
|
||||||
use std::env::{self, consts};
|
use std::env::{self, consts};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ impl TribufuApi {
|
|||||||
/// Gets the user agent string for the Tribufu API client.
|
/// Gets the user agent string for the Tribufu API client.
|
||||||
pub fn get_user_agent() -> String {
|
pub fn get_user_agent() -> String {
|
||||||
let version = Self::get_version();
|
let version = Self::get_version();
|
||||||
format!("Tribufu/{} (Rust {}; {})", version, RUSTC_VERSION, TARGET_TRIPLE)
|
format!("Tribufu/{} ({}; {})", version, consts::OS, consts::ARCH)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks if debug mode is enabled.
|
/// Checks if debug mode is enabled.
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tribufu-log"
|
|
||||||
version = "1.3.0"
|
|
||||||
description = "Tribufu Log"
|
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
|
||||||
license = "MIT"
|
|
||||||
edition = "2021"
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "tribufu_log"
|
|
||||||
crate-type = ["rlib"]
|
|
||||||
path = "lib.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
tribufu-error = { version = "1.3.0", path = "../error" }
|
|
||||||
chrono = "0.4.23"
|
|
||||||
env_logger = "0.10.1"
|
|
||||||
log = "0.4"
|
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
pub const BLACK: u8 = 0;
|
|
||||||
pub const RED: u8 = 1;
|
|
||||||
pub const GREEN: u8 = 2;
|
|
||||||
pub const YELLOW: u8 = 3;
|
|
||||||
pub const BLUE: u8 = 4;
|
|
||||||
pub const MAGENTA: u8 = 5;
|
|
||||||
pub const CYAN: u8 = 6;
|
|
||||||
pub const WHITE: u8 = 7;
|
|
||||||
pub const BRIGHT_BLACK: u8 = 8;
|
|
||||||
pub const BRIGHT_RED: u8 = 9;
|
|
||||||
pub const BRIGHT_GREEN: u8 = 10;
|
|
||||||
pub const BRIGHT_YELLOW: u8 = 11;
|
|
||||||
pub const BRIGHT_BLUE: u8 = 12;
|
|
||||||
pub const BRIGHT_MAGENTA: u8 = 13;
|
|
||||||
pub const BRIGHT_CYAN: u8 = 14;
|
|
||||||
pub const BRIGHT_WHITE: u8 = 15;
|
|
||||||
118
src/log/lib.rs
118
src/log/lib.rs
@@ -1,118 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use chrono::prelude::*;
|
|
||||||
pub use env_logger::fmt::Color;
|
|
||||||
use env_logger::{Builder, Target};
|
|
||||||
pub use log::debug;
|
|
||||||
pub use log::error;
|
|
||||||
pub use log::info;
|
|
||||||
pub use log::trace;
|
|
||||||
pub use log::warn;
|
|
||||||
use log::Level;
|
|
||||||
use log::LevelFilter;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use std::io::Write;
|
|
||||||
|
|
||||||
pub mod colors;
|
|
||||||
|
|
||||||
mod log_config;
|
|
||||||
pub use log_config::*;
|
|
||||||
|
|
||||||
pub fn init() {
|
|
||||||
let logger = Logger::from_env(None);
|
|
||||||
logger.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn init_level(level: LogLevel) {
|
|
||||||
let logger = Logger::new(level.into());
|
|
||||||
logger.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Default, Debug, Copy, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(rename_all = "lowercase")]
|
|
||||||
pub enum LogLevel {
|
|
||||||
#[default]
|
|
||||||
Off,
|
|
||||||
Error,
|
|
||||||
Warn,
|
|
||||||
Info,
|
|
||||||
Debug,
|
|
||||||
Trace,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl LogLevel {
|
|
||||||
pub fn from_str(s: &str) -> Option<Self> {
|
|
||||||
match s {
|
|
||||||
"off" => Some(Self::Off),
|
|
||||||
"error" => Some(Self::Error),
|
|
||||||
"warn" => Some(Self::Warn),
|
|
||||||
"info" => Some(Self::Info),
|
|
||||||
"debug" => Some(Self::Debug),
|
|
||||||
"trace" => Some(Self::Trace),
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<LogLevel> for LevelFilter {
|
|
||||||
fn from(level: LogLevel) -> Self {
|
|
||||||
match level {
|
|
||||||
LogLevel::Off => LevelFilter::Off,
|
|
||||||
LogLevel::Error => LevelFilter::Error,
|
|
||||||
LogLevel::Warn => LevelFilter::Warn,
|
|
||||||
LogLevel::Info => LevelFilter::Info,
|
|
||||||
LogLevel::Debug => LevelFilter::Debug,
|
|
||||||
LogLevel::Trace => LevelFilter::Trace,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Logger {
|
|
||||||
builder: Builder,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Logger {
|
|
||||||
pub fn new(level: LevelFilter) -> Self {
|
|
||||||
let mut builder = Builder::new();
|
|
||||||
builder.filter_level(level);
|
|
||||||
Self { builder }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn with_config(config: LogConfig) -> Self {
|
|
||||||
let mut builder = Builder::new();
|
|
||||||
builder.filter_level(config.level.into());
|
|
||||||
Self { builder }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn from_env(var: Option<String>) -> Self {
|
|
||||||
let builder = Builder::from_env(var.unwrap_or("LOG_LEVEL".to_string()));
|
|
||||||
Self { builder }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn init(mut self) {
|
|
||||||
self.builder
|
|
||||||
.target(Target::Stdout)
|
|
||||||
.format(|fmt, record| {
|
|
||||||
let mut style = fmt.style();
|
|
||||||
|
|
||||||
match record.level() {
|
|
||||||
Level::Error => style.set_color(Color::Ansi256(colors::RED)),
|
|
||||||
Level::Warn => style.set_color(Color::Ansi256(colors::YELLOW)),
|
|
||||||
Level::Info => style.set_color(Color::Ansi256(colors::GREEN)),
|
|
||||||
Level::Debug => style.set_color(Color::Ansi256(colors::WHITE)),
|
|
||||||
Level::Trace => style.set_color(Color::Ansi256(colors::BRIGHT_BLACK)),
|
|
||||||
};
|
|
||||||
|
|
||||||
let line = format!(
|
|
||||||
"[{}] [{}]: {}",
|
|
||||||
Local::now().format("%Y-%m-%dT%H:%M:%S"),
|
|
||||||
record.level(),
|
|
||||||
record.args()
|
|
||||||
);
|
|
||||||
|
|
||||||
writeln!(fmt, "{}", style.value(line))
|
|
||||||
})
|
|
||||||
.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use crate::LogLevel;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use std::env;
|
|
||||||
use tribufu_error::Result;
|
|
||||||
|
|
||||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
|
||||||
pub struct LogConfig {
|
|
||||||
pub level: LogLevel,
|
|
||||||
pub file: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl LogConfig {
|
|
||||||
pub fn from_env() -> Result<Self> {
|
|
||||||
Ok(Self {
|
|
||||||
level: LogLevel::from_str(&env::var("LOG_LEVEL")?).unwrap_or_default(),
|
|
||||||
file: env::var("LOG_FILE").ok(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,12 +13,12 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Account {
|
pub struct Account {
|
||||||
#[serde(rename = "id", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<Option<String>>,
|
||||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "provider")]
|
#[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
|
||||||
pub provider: models::LoginProvider,
|
pub provider: Option<models::LoginProvider>,
|
||||||
#[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
|
||||||
pub user_id: Option<String>,
|
pub user_id: Option<String>,
|
||||||
#[serde(rename = "authorized", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "authorized", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -32,11 +32,11 @@ pub struct Account {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Account {
|
impl Account {
|
||||||
pub fn new(id: Option<String>, provider: models::LoginProvider) -> Account {
|
pub fn new() -> Account {
|
||||||
Account {
|
Account {
|
||||||
id,
|
id: None,
|
||||||
name: None,
|
name: None,
|
||||||
provider,
|
provider: None,
|
||||||
user_id: None,
|
user_id: None,
|
||||||
authorized: None,
|
authorized: None,
|
||||||
fields: None,
|
fields: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -15,8 +15,8 @@ use serde::{Deserialize, Serialize};
|
|||||||
pub struct Application {
|
pub struct Application {
|
||||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<Option<String>>,
|
pub description: Option<Option<String>>,
|
||||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -31,8 +31,24 @@ pub struct Application {
|
|||||||
pub capsule_image_url: Option<Option<String>>,
|
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")]
|
#[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>>,
|
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")]
|
#[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub slug: Option<Option<String>>,
|
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")]
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
pub created: Option<String>,
|
pub created: Option<String>,
|
||||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -40,10 +56,10 @@ pub struct Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Application {
|
impl Application {
|
||||||
pub fn new(name: Option<String>) -> Application {
|
pub fn new() -> Application {
|
||||||
Application {
|
Application {
|
||||||
id: None,
|
id: None,
|
||||||
name,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
r#type: None,
|
||||||
organization_id: None,
|
organization_id: None,
|
||||||
@@ -51,7 +67,15 @@ impl Application {
|
|||||||
banner_url: None,
|
banner_url: None,
|
||||||
capsule_image_url: None,
|
capsule_image_url: None,
|
||||||
library_image_url: None,
|
library_image_url: None,
|
||||||
|
parent_id: None,
|
||||||
slug: None,
|
slug: None,
|
||||||
|
visibility: None,
|
||||||
|
password: None,
|
||||||
|
primary: None,
|
||||||
|
user_count: None,
|
||||||
|
achievement_count: None,
|
||||||
|
badge_count: None,
|
||||||
|
download_count: None,
|
||||||
created: None,
|
created: None,
|
||||||
updated: None,
|
updated: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -15,14 +15,14 @@ use serde::{Deserialize, Serialize};
|
|||||||
pub struct AuthorizeRequest {
|
pub struct AuthorizeRequest {
|
||||||
#[serde(rename = "response_type", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "response_type", skip_serializing_if = "Option::is_none")]
|
||||||
pub response_type: Option<models::ResponseType>,
|
pub response_type: Option<models::ResponseType>,
|
||||||
#[serde(rename = "client_id")]
|
#[serde(rename = "client_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub client_id: String,
|
pub client_id: Option<Option<String>>,
|
||||||
#[serde(rename = "code_challenge", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "code_challenge", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub code_challenge: Option<Option<String>>,
|
pub code_challenge: Option<Option<String>>,
|
||||||
#[serde(rename = "code_challenge_method", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "code_challenge_method", skip_serializing_if = "Option::is_none")]
|
||||||
pub code_challenge_method: Option<models::CodeChallengeMethod>,
|
pub code_challenge_method: Option<models::CodeChallengeMethod>,
|
||||||
#[serde(rename = "redirect_uri", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "redirect_uri", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub redirect_uri: Option<String>,
|
pub redirect_uri: Option<Option<String>>,
|
||||||
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub scope: Option<Option<String>>,
|
pub scope: Option<Option<String>>,
|
||||||
#[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[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 {
|
impl AuthorizeRequest {
|
||||||
pub fn new(client_id: String, redirect_uri: Option<String>) -> AuthorizeRequest {
|
pub fn new() -> AuthorizeRequest {
|
||||||
AuthorizeRequest {
|
AuthorizeRequest {
|
||||||
response_type: None,
|
response_type: None,
|
||||||
client_id,
|
client_id: None,
|
||||||
code_challenge: None,
|
code_challenge: None,
|
||||||
code_challenge_method: None,
|
code_challenge_method: None,
|
||||||
redirect_uri,
|
redirect_uri: None,
|
||||||
scope: None,
|
scope: None,
|
||||||
state: None,
|
state: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,10 +13,32 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Game {
|
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")]
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<Option<String>>,
|
pub description: Option<Option<String>>,
|
||||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -31,33 +53,46 @@ pub struct Game {
|
|||||||
pub capsule_image_url: Option<Option<String>>,
|
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")]
|
#[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>>,
|
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")]
|
#[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub slug: Option<Option<String>>,
|
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")]
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
pub created: Option<String>,
|
pub created: Option<String>,
|
||||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub updated: Option<Option<String>>,
|
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 {
|
impl Game {
|
||||||
pub fn new(name: Option<String>) -> Game {
|
pub fn new() -> Game {
|
||||||
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,
|
id: None,
|
||||||
name,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
r#type: None,
|
||||||
organization_id: None,
|
organization_id: None,
|
||||||
@@ -65,16 +100,17 @@ impl Game {
|
|||||||
banner_url: None,
|
banner_url: None,
|
||||||
capsule_image_url: None,
|
capsule_image_url: None,
|
||||||
library_image_url: None,
|
library_image_url: None,
|
||||||
|
parent_id: None,
|
||||||
slug: None,
|
slug: None,
|
||||||
|
visibility: None,
|
||||||
|
password: None,
|
||||||
|
primary: None,
|
||||||
|
user_count: None,
|
||||||
|
achievement_count: None,
|
||||||
|
badge_count: None,
|
||||||
|
download_count: None,
|
||||||
created: None,
|
created: None,
|
||||||
updated: 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -15,34 +15,50 @@ use serde::{Deserialize, Serialize};
|
|||||||
pub struct GameServer {
|
pub struct GameServer {
|
||||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<Option<String>>,
|
pub description: Option<Option<String>>,
|
||||||
#[serde(rename = "owner_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub owner_id: Option<Option<String>>,
|
pub address: 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")]
|
#[serde(rename = "game_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub game_port: Option<Option<i32>>,
|
pub game_port: Option<Option<i32>>,
|
||||||
#[serde(rename = "map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "query_port", skip_serializing_if = "Option::is_none")]
|
||||||
pub map: Option<Option<String>>,
|
pub query_port: Option<i32>,
|
||||||
#[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")]
|
#[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
|
||||||
pub game_id: Option<String>,
|
pub game_id: Option<String>,
|
||||||
#[serde(rename = "game_icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[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>>,
|
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")]
|
#[serde(rename = "cluster_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub cluster_id: Option<Option<String>>,
|
pub cluster_id: Option<Option<String>>,
|
||||||
#[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub website_url: Option<Option<String>>,
|
pub website_url: Option<Option<String>>,
|
||||||
#[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub banner_url: Option<Option<String>>,
|
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")]
|
#[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
|
||||||
pub uptime: Option<f64>,
|
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")]
|
#[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub country: Option<Option<String>>,
|
pub country: Option<Option<String>>,
|
||||||
#[serde(rename = "steam", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "steam", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -51,6 +67,10 @@ pub struct GameServer {
|
|||||||
pub discord_server_id: Option<Option<String>>,
|
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")]
|
#[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>>,
|
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")]
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
pub created: Option<String>,
|
pub created: Option<String>,
|
||||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -58,27 +78,37 @@ pub struct GameServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl GameServer {
|
impl GameServer {
|
||||||
pub fn new(name: Option<String>, address: Option<String>, query_port: i32) -> GameServer {
|
pub fn new() -> GameServer {
|
||||||
GameServer {
|
GameServer {
|
||||||
id: None,
|
id: None,
|
||||||
name,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
owner_id: None,
|
address: None,
|
||||||
address,
|
|
||||||
query_port,
|
|
||||||
game_port: None,
|
game_port: None,
|
||||||
map: None,
|
query_port: None,
|
||||||
version: None,
|
|
||||||
game_id: None,
|
game_id: None,
|
||||||
game_icon_url: None,
|
game_icon_url: None,
|
||||||
|
version: None,
|
||||||
|
featured: None,
|
||||||
cluster_id: None,
|
cluster_id: None,
|
||||||
website_url: None,
|
website_url: None,
|
||||||
banner_url: None,
|
banner_url: None,
|
||||||
|
owner_id: None,
|
||||||
uptime: None,
|
uptime: None,
|
||||||
|
status: None,
|
||||||
|
ping: None,
|
||||||
|
map: None,
|
||||||
|
used_slots: None,
|
||||||
|
max_slots: None,
|
||||||
|
motd: None,
|
||||||
|
players: None,
|
||||||
|
last_online: None,
|
||||||
country: None,
|
country: None,
|
||||||
steam: None,
|
steam: None,
|
||||||
discord_server_id: None,
|
discord_server_id: None,
|
||||||
youtube_video_url: None,
|
youtube_video_url: None,
|
||||||
|
tags: None,
|
||||||
|
comment_count: None,
|
||||||
created: None,
|
created: None,
|
||||||
updated: None,
|
updated: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -15,8 +15,8 @@ use serde::{Deserialize, Serialize};
|
|||||||
pub struct GameServerCluster {
|
pub struct GameServerCluster {
|
||||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<Option<String>>,
|
pub description: Option<Option<String>>,
|
||||||
#[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -44,10 +44,10 @@ pub struct GameServerCluster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl GameServerCluster {
|
impl GameServerCluster {
|
||||||
pub fn new(name: Option<String>) -> GameServerCluster {
|
pub fn new() -> GameServerCluster {
|
||||||
GameServerCluster {
|
GameServerCluster {
|
||||||
id: None,
|
id: None,
|
||||||
name,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
game_id: None,
|
game_id: None,
|
||||||
website_url: None,
|
website_url: None,
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -17,8 +17,8 @@ pub struct Group {
|
|||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
||||||
pub uuid: Option<uuid::Uuid>,
|
pub uuid: Option<uuid::Uuid>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "tag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "tag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub tag: Option<Option<String>>,
|
pub tag: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[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 {
|
impl Group {
|
||||||
pub fn new(name: Option<String>) -> Group {
|
pub fn new() -> Group {
|
||||||
Group {
|
Group {
|
||||||
id: None,
|
id: None,
|
||||||
uuid: None,
|
uuid: None,
|
||||||
name,
|
name: None,
|
||||||
tag: None,
|
tag: None,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
r#type: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -12,9 +12,9 @@ use crate::models;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct GroupApplication {
|
pub struct GroupGame {
|
||||||
#[serde(rename = "group_id")]
|
#[serde(rename = "group_id", skip_serializing_if = "Option::is_none")]
|
||||||
pub group_id: String,
|
pub group_id: Option<String>,
|
||||||
#[serde(rename = "group", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "group", skip_serializing_if = "Option::is_none")]
|
||||||
pub group: Option<Box<models::Group>>,
|
pub group: Option<Box<models::Group>>,
|
||||||
#[serde(rename = "application_id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "application_id", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -29,10 +29,10 @@ pub struct GroupApplication {
|
|||||||
pub last_used: Option<Option<String>>,
|
pub last_used: Option<Option<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GroupApplication {
|
impl GroupGame {
|
||||||
pub fn new(group_id: String) -> GroupApplication {
|
pub fn new() -> GroupGame {
|
||||||
GroupApplication {
|
GroupGame {
|
||||||
group_id,
|
group_id: None,
|
||||||
group: None,
|
group: None,
|
||||||
application_id: None,
|
application_id: None,
|
||||||
application: None,
|
application: None,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,14 +13,14 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct HashViewModel {
|
pub struct HashViewModel {
|
||||||
#[serde(rename = "value", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub value: Option<String>,
|
pub value: Option<Option<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HashViewModel {
|
impl HashViewModel {
|
||||||
pub fn new(value: Option<String>) -> HashViewModel {
|
pub fn new() -> HashViewModel {
|
||||||
HashViewModel {
|
HashViewModel {
|
||||||
value,
|
value: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,17 +13,17 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct IntrospectRequest {
|
pub struct IntrospectRequest {
|
||||||
#[serde(rename = "token", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub token: Option<String>,
|
pub token: Option<Option<String>>,
|
||||||
#[serde(rename = "token_type_hint")]
|
#[serde(rename = "token_type_hint", skip_serializing_if = "Option::is_none")]
|
||||||
pub token_type_hint: models::TokenHintType,
|
pub token_type_hint: Option<models::TokenHintType>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IntrospectRequest {
|
impl IntrospectRequest {
|
||||||
pub fn new(token: Option<String>, token_type_hint: models::TokenHintType) -> IntrospectRequest {
|
pub fn new() -> IntrospectRequest {
|
||||||
IntrospectRequest {
|
IntrospectRequest {
|
||||||
token,
|
token: None,
|
||||||
token_type_hint,
|
token_type_hint: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -21,8 +21,6 @@ pub struct IpAddress {
|
|||||||
pub network: Option<Option<String>>,
|
pub network: Option<Option<String>>,
|
||||||
#[serde(rename = "reserved", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "reserved", skip_serializing_if = "Option::is_none")]
|
||||||
pub reserved: Option<bool>,
|
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")]
|
#[serde(rename = "asn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub asn: Option<Option<String>>,
|
pub asn: Option<Option<String>>,
|
||||||
#[serde(rename = "isp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "isp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -31,8 +29,8 @@ pub struct IpAddress {
|
|||||||
pub continent: Option<Option<String>>,
|
pub continent: Option<Option<String>>,
|
||||||
#[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub country: Option<Option<String>>,
|
pub country: Option<Option<String>>,
|
||||||
#[serde(rename = "province", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub province: Option<Option<String>>,
|
pub region: Option<Option<String>>,
|
||||||
#[serde(rename = "city", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "city", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub city: Option<Option<String>>,
|
pub city: Option<Option<String>>,
|
||||||
#[serde(rename = "postal_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "postal_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -60,12 +58,11 @@ impl IpAddress {
|
|||||||
version: None,
|
version: None,
|
||||||
network: None,
|
network: None,
|
||||||
reserved: None,
|
reserved: None,
|
||||||
banned: None,
|
|
||||||
asn: None,
|
asn: None,
|
||||||
isp: None,
|
isp: None,
|
||||||
continent: None,
|
continent: None,
|
||||||
country: None,
|
country: None,
|
||||||
province: None,
|
region: None,
|
||||||
city: None,
|
city: None,
|
||||||
postal_code: None,
|
postal_code: None,
|
||||||
calling_code: None,
|
calling_code: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
30
src/models/login_request.rs
Normal file
30
src/models/login_request.rs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* 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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
36
src/models/login_response.rs
Normal file
36
src/models/login_response.rs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* 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,18 +6,8 @@ pub mod application_type;
|
|||||||
pub use self::application_type::ApplicationType;
|
pub use self::application_type::ApplicationType;
|
||||||
pub mod authorize_request;
|
pub mod authorize_request;
|
||||||
pub use self::authorize_request::AuthorizeRequest;
|
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 mod code_challenge_method;
|
||||||
pub use self::code_challenge_method::CodeChallengeMethod;
|
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 mod crypto_view_model;
|
||||||
pub use self::crypto_view_model::CryptoViewModel;
|
pub use self::crypto_view_model::CryptoViewModel;
|
||||||
pub mod game;
|
pub mod game;
|
||||||
@@ -26,16 +16,12 @@ pub mod game_server;
|
|||||||
pub use self::game_server::GameServer;
|
pub use self::game_server::GameServer;
|
||||||
pub mod game_server_cluster;
|
pub mod game_server_cluster;
|
||||||
pub use self::game_server_cluster::GameServerCluster;
|
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 mod grant_type;
|
||||||
pub use self::grant_type::GrantType;
|
pub use self::grant_type::GrantType;
|
||||||
pub mod group;
|
pub mod group;
|
||||||
pub use self::group::Group;
|
pub use self::group::Group;
|
||||||
pub mod group_application;
|
pub mod group_game;
|
||||||
pub use self::group_application::GroupApplication;
|
pub use self::group_game::GroupGame;
|
||||||
pub mod group_member;
|
pub mod group_member;
|
||||||
pub use self::group_member::GroupMember;
|
pub use self::group_member::GroupMember;
|
||||||
pub mod group_rank;
|
pub mod group_rank;
|
||||||
@@ -44,8 +30,6 @@ pub mod hash_view_model;
|
|||||||
pub use self::hash_view_model::HashViewModel;
|
pub use self::hash_view_model::HashViewModel;
|
||||||
pub mod introspect_request;
|
pub mod introspect_request;
|
||||||
pub use self::introspect_request::IntrospectRequest;
|
pub use self::introspect_request::IntrospectRequest;
|
||||||
pub mod introspect_response;
|
|
||||||
pub use self::introspect_response::IntrospectResponse;
|
|
||||||
pub mod ip_address;
|
pub mod ip_address;
|
||||||
pub use self::ip_address::IpAddress;
|
pub use self::ip_address::IpAddress;
|
||||||
pub mod leaderboard_item;
|
pub mod leaderboard_item;
|
||||||
@@ -54,34 +38,36 @@ pub mod leaderboard_order;
|
|||||||
pub use self::leaderboard_order::LeaderboardOrder;
|
pub use self::leaderboard_order::LeaderboardOrder;
|
||||||
pub mod login_provider;
|
pub mod login_provider;
|
||||||
pub use self::login_provider::LoginProvider;
|
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 mod package;
|
||||||
pub use self::package::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 mod profile;
|
||||||
pub use self::profile::Profile;
|
pub use self::profile::Profile;
|
||||||
pub mod profile_game;
|
pub mod profile_game;
|
||||||
pub use self::profile_game::ProfileGame;
|
pub use self::profile_game::ProfileGame;
|
||||||
pub mod profile_group;
|
pub mod profile_group;
|
||||||
pub use self::profile_group::ProfileGroup;
|
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 mod response_type;
|
||||||
pub use self::response_type::ResponseType;
|
pub use self::response_type::ResponseType;
|
||||||
pub mod revoke_request;
|
pub mod revoke_request;
|
||||||
pub use self::revoke_request::RevokeRequest;
|
pub use self::revoke_request::RevokeRequest;
|
||||||
pub mod search;
|
pub mod search_request;
|
||||||
pub use self::search::Search;
|
pub use self::search_request::SearchRequest;
|
||||||
pub mod search_type;
|
pub mod search_type;
|
||||||
pub use self::search_type::SearchType;
|
pub use self::search_type::SearchType;
|
||||||
pub mod server_metrics;
|
pub mod server_metrics;
|
||||||
pub use self::server_metrics::ServerMetrics;
|
pub use self::server_metrics::ServerMetrics;
|
||||||
pub mod storage_file;
|
pub mod server_status;
|
||||||
pub use self::storage_file::StorageFile;
|
pub use self::server_status::ServerStatus;
|
||||||
|
pub mod subscription;
|
||||||
|
pub use self::subscription::Subscription;
|
||||||
pub mod token_hint_type;
|
pub mod token_hint_type;
|
||||||
pub use self::token_hint_type::TokenHintType;
|
pub use self::token_hint_type::TokenHintType;
|
||||||
pub mod token_request;
|
pub mod token_request;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -15,24 +15,24 @@ use serde::{Deserialize, Serialize};
|
|||||||
pub struct Package {
|
pub struct Package {
|
||||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<Option<String>>,
|
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")]
|
#[serde(rename = "author_id", skip_serializing_if = "Option::is_none")]
|
||||||
pub author_id: Option<String>,
|
pub author_id: Option<String>,
|
||||||
#[serde(rename = "image_url", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub image_url: Option<String>,
|
pub version: Option<Option<String>>,
|
||||||
#[serde(rename = "application_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "file_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub application_id: Option<Option<String>>,
|
pub file_url: Option<Option<String>>,
|
||||||
#[serde(rename = "category_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "raw_size", skip_serializing_if = "Option::is_none")]
|
||||||
pub category_id: Option<Option<String>>,
|
pub raw_size: Option<f64>,
|
||||||
#[serde(rename = "download_count", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "download_count", skip_serializing_if = "Option::is_none")]
|
||||||
pub download_count: Option<i32>,
|
pub download_count: Option<i32>,
|
||||||
#[serde(rename = "last_download", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "last_download", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub last_download: Option<Option<String>>,
|
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")]
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
pub created: Option<String>,
|
pub created: Option<String>,
|
||||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[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 {
|
impl Package {
|
||||||
pub fn new(name: Option<String>, image_url: Option<String>) -> Package {
|
pub fn new() -> Package {
|
||||||
Package {
|
Package {
|
||||||
id: None,
|
id: None,
|
||||||
name,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
|
image_url: None,
|
||||||
author_id: None,
|
author_id: None,
|
||||||
image_url,
|
version: None,
|
||||||
application_id: None,
|
file_url: None,
|
||||||
category_id: None,
|
raw_size: None,
|
||||||
download_count: None,
|
download_count: None,
|
||||||
last_download: None,
|
last_download: None,
|
||||||
releases: None,
|
|
||||||
created: None,
|
created: None,
|
||||||
updated: None,
|
updated: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
27
src/models/refresh_request.rs
Normal file
27
src/models/refresh_request.rs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* 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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
36
src/models/register_request.rs
Normal file
36
src/models/register_request.rs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,17 +13,17 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct RevokeRequest {
|
pub struct RevokeRequest {
|
||||||
#[serde(rename = "token", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub token: Option<String>,
|
pub token: Option<Option<String>>,
|
||||||
#[serde(rename = "token_type_hint")]
|
#[serde(rename = "token_type_hint", skip_serializing_if = "Option::is_none")]
|
||||||
pub token_type_hint: models::TokenHintType,
|
pub token_type_hint: Option<models::TokenHintType>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RevokeRequest {
|
impl RevokeRequest {
|
||||||
pub fn new(token: Option<String>, token_type_hint: models::TokenHintType) -> RevokeRequest {
|
pub fn new() -> RevokeRequest {
|
||||||
RevokeRequest {
|
RevokeRequest {
|
||||||
token,
|
token: None,
|
||||||
token_type_hint,
|
token_type_hint: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -12,22 +12,22 @@ use crate::models;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Search {
|
pub struct SearchRequest {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
pub r#type: models::SearchType,
|
pub r#type: Option<models::SearchType>,
|
||||||
#[serde(rename = "query", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "query", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub query: Option<String>,
|
pub query: Option<Option<String>>,
|
||||||
#[serde(rename = "page", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "page", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub page: Option<Option<i32>>,
|
pub page: Option<Option<i32>>,
|
||||||
#[serde(rename = "game_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "game_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub game_id: Option<Option<String>>,
|
pub game_id: Option<Option<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Search {
|
impl SearchRequest {
|
||||||
pub fn new(r#type: models::SearchType, query: Option<String>) -> Search {
|
pub fn new() -> SearchRequest {
|
||||||
Search {
|
SearchRequest {
|
||||||
r#type,
|
r#type: None,
|
||||||
query,
|
query: None,
|
||||||
page: None,
|
page: None,
|
||||||
game_id: None,
|
game_id: None,
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -18,10 +18,10 @@ pub enum SearchType {
|
|||||||
User,
|
User,
|
||||||
#[serde(rename = "group")]
|
#[serde(rename = "group")]
|
||||||
Group,
|
Group,
|
||||||
#[serde(rename = "game_server")]
|
#[serde(rename = "server")]
|
||||||
GameServer,
|
Server,
|
||||||
#[serde(rename = "game_server_cluster")]
|
#[serde(rename = "cluster")]
|
||||||
GameServerCluster,
|
Cluster,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,8 +30,8 @@ impl std::fmt::Display for SearchType {
|
|||||||
match self {
|
match self {
|
||||||
Self::User => write!(f, "user"),
|
Self::User => write!(f, "user"),
|
||||||
Self::Group => write!(f, "group"),
|
Self::Group => write!(f, "group"),
|
||||||
Self::GameServer => write!(f, "game_server"),
|
Self::Server => write!(f, "server"),
|
||||||
Self::GameServerCluster => write!(f, "game_server_cluster"),
|
Self::Cluster => write!(f, "cluster"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* 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)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
pub enum GameServerStatus {
|
pub enum ServerStatus {
|
||||||
#[serde(rename = "unknown")]
|
#[serde(rename = "unknown")]
|
||||||
Unknown,
|
Unknown,
|
||||||
#[serde(rename = "offline")]
|
#[serde(rename = "offline")]
|
||||||
@@ -23,7 +23,7 @@ pub enum GameServerStatus {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Display for GameServerStatus {
|
impl std::fmt::Display for ServerStatus {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::Unknown => write!(f, "unknown"),
|
Self::Unknown => write!(f, "unknown"),
|
||||||
@@ -33,8 +33,8 @@ impl std::fmt::Display for GameServerStatus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for GameServerStatus {
|
impl Default for ServerStatus {
|
||||||
fn default() -> GameServerStatus {
|
fn default() -> ServerStatus {
|
||||||
Self::Unknown
|
Self::Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -12,39 +12,30 @@ use crate::models;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Product {
|
pub struct Subscription {
|
||||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<Option<String>>,
|
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")]
|
#[serde(rename = "image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub image_url: Option<Option<String>>,
|
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")]
|
#[serde(rename = "prices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub prices: Option<Option<Vec<models::ProductPrice>>>,
|
pub prices: Option<Option<std::collections::HashMap<String, f64>>>,
|
||||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
pub created: Option<String>,
|
pub created: Option<String>,
|
||||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub updated: Option<Option<String>>,
|
pub updated: Option<Option<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Product {
|
impl Subscription {
|
||||||
pub fn new(name: Option<String>) -> Product {
|
pub fn new() -> Subscription {
|
||||||
Product {
|
Subscription {
|
||||||
id: None,
|
id: None,
|
||||||
name,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
|
||||||
slug: None,
|
|
||||||
image_url: None,
|
image_url: None,
|
||||||
is_physical: None,
|
|
||||||
prices: None,
|
prices: None,
|
||||||
created: None,
|
created: None,
|
||||||
updated: None,
|
updated: None,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -23,6 +23,8 @@ pub struct TokenRequest {
|
|||||||
pub password: Option<Option<String>>,
|
pub password: Option<Option<String>>,
|
||||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub refresh_token: Option<Option<String>>,
|
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")]
|
#[serde(rename = "redirect_uri", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub redirect_uri: Option<Option<String>>,
|
pub redirect_uri: Option<Option<String>>,
|
||||||
#[serde(rename = "code_verifier", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "code_verifier", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -37,6 +39,7 @@ impl TokenRequest {
|
|||||||
username: None,
|
username: None,
|
||||||
password: None,
|
password: None,
|
||||||
refresh_token: None,
|
refresh_token: None,
|
||||||
|
client_id: None,
|
||||||
redirect_uri: None,
|
redirect_uri: None,
|
||||||
code_verifier: None,
|
code_verifier: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,10 +13,10 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct TokenResponse {
|
pub struct TokenResponse {
|
||||||
#[serde(rename = "token_type")]
|
#[serde(rename = "token_type", skip_serializing_if = "Option::is_none")]
|
||||||
pub token_type: models::TokenType,
|
pub token_type: Option<models::TokenType>,
|
||||||
#[serde(rename = "access_token", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub access_token: Option<String>,
|
pub access_token: Option<Option<String>>,
|
||||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub refresh_token: Option<Option<String>>,
|
pub refresh_token: Option<Option<String>>,
|
||||||
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[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 {
|
impl TokenResponse {
|
||||||
pub fn new(token_type: models::TokenType, access_token: Option<String>) -> TokenResponse {
|
pub fn new() -> TokenResponse {
|
||||||
TokenResponse {
|
TokenResponse {
|
||||||
token_type,
|
token_type: None,
|
||||||
access_token,
|
access_token: None,
|
||||||
refresh_token: None,
|
refresh_token: None,
|
||||||
scope: None,
|
scope: None,
|
||||||
state: None,
|
state: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,16 +13,16 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct UpdateProfile {
|
pub struct UpdateProfile {
|
||||||
#[serde(rename = "display_name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub display_name: Option<String>,
|
pub display_name: Option<Option<String>>,
|
||||||
#[serde(rename = "biography", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "biography", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub biography: Option<Option<String>>,
|
pub biography: Option<Option<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UpdateProfile {
|
impl UpdateProfile {
|
||||||
pub fn new(display_name: Option<String>) -> UpdateProfile {
|
pub fn new() -> UpdateProfile {
|
||||||
UpdateProfile {
|
UpdateProfile {
|
||||||
display_name,
|
display_name: None,
|
||||||
biography: None,
|
biography: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -17,16 +17,32 @@ pub struct UserInfo {
|
|||||||
pub id: Option<String>,
|
pub id: Option<String>,
|
||||||
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
||||||
pub uuid: Option<uuid::Uuid>,
|
pub uuid: Option<uuid::Uuid>,
|
||||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<Option<String>>,
|
||||||
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub display_name: Option<Option<String>>,
|
pub display_name: Option<Option<String>>,
|
||||||
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub email: Option<Option<String>>,
|
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")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
pub r#type: Option<models::UserType>,
|
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")]
|
#[serde(rename = "language", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub language: Option<Option<String>>,
|
pub language: Option<Option<String>>,
|
||||||
#[serde(rename = "timezone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "timezone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -35,8 +51,14 @@ pub struct UserInfo {
|
|||||||
pub currency: Option<Option<String>>,
|
pub currency: Option<Option<String>>,
|
||||||
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub photo_url: Option<Option<String>>,
|
pub photo_url: Option<Option<String>>,
|
||||||
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub permissions: Option<Option<Vec<String>>>,
|
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 = "created", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
pub created: Option<String>,
|
pub created: Option<String>,
|
||||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
@@ -44,20 +66,31 @@ pub struct UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl UserInfo {
|
impl UserInfo {
|
||||||
pub fn new(name: Option<String>) -> UserInfo {
|
pub fn new() -> UserInfo {
|
||||||
UserInfo {
|
UserInfo {
|
||||||
id: None,
|
id: None,
|
||||||
uuid: None,
|
uuid: None,
|
||||||
name,
|
name: None,
|
||||||
display_name: None,
|
display_name: None,
|
||||||
email: None,
|
email: None,
|
||||||
email_verified: None,
|
|
||||||
r#type: 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,
|
language: None,
|
||||||
timezone: None,
|
timezone: None,
|
||||||
currency: None,
|
currency: None,
|
||||||
photo_url: None,
|
photo_url: None,
|
||||||
permissions: None,
|
banner_url: None,
|
||||||
|
last_online: None,
|
||||||
|
biography: None,
|
||||||
|
view_count: None,
|
||||||
created: None,
|
created: None,
|
||||||
updated: None,
|
updated: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* API to access Tribufu services.
|
* REST API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.3.0
|
* The version of the OpenAPI document: 1.1.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tribufu-platform"
|
|
||||||
version = "1.3.0"
|
|
||||||
description = "Tribufu Platform"
|
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
|
||||||
license = "MIT"
|
|
||||||
edition = "2021"
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "tribufu_platform"
|
|
||||||
crate-type = ["rlib"]
|
|
||||||
path = "lib.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
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]
|
|
||||||
dirs = "5.0.1"
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
pub mod paths;
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
// Copyright (c) Tribufu. All Rights Reserved.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
use std::env;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
use tribufu_error::Result;
|
|
||||||
|
|
||||||
/// Gets the root base directory of the application.
|
|
||||||
pub fn app_dir() -> Result<PathBuf> {
|
|
||||||
let mut path = dunce::canonicalize(env::current_exe()?)?; // /bin/platform/app.exe
|
|
||||||
path.pop(); // /bin
|
|
||||||
path.pop(); // /
|
|
||||||
Ok(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the path to the platform-specific binary directory.
|
|
||||||
pub fn bin_dir() -> Result<PathBuf> {
|
|
||||||
let base_dir = app_dir()?;
|
|
||||||
|
|
||||||
#[cfg(all(target_os = "macos", not(debug_assertions)))]
|
|
||||||
return Ok(base_dir.join("MacOS"));
|
|
||||||
|
|
||||||
#[cfg(not(all(target_os = "macos", not(debug_assertions))))]
|
|
||||||
Ok(base_dir.join("bin"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the path to the configuration directory.
|
|
||||||
pub fn config_dir() -> Result<PathBuf> {
|
|
||||||
Ok(app_dir()?.join("config"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the path to the assets directory.
|
|
||||||
pub fn assets_dir() -> Result<PathBuf> {
|
|
||||||
Ok(app_dir()?.join("assets"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the path to the saved data directory.
|
|
||||||
pub fn saved_dir() -> Result<PathBuf> {
|
|
||||||
Ok(app_dir()?.join("saved"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the path to the cache directory inside `saved`.
|
|
||||||
pub fn cache_dir() -> Result<PathBuf> {
|
|
||||||
Ok(saved_dir()?.join("cache"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets the path to the logs directory inside `saved`.
|
|
||||||
pub fn logs_dir() -> Result<PathBuf> {
|
|
||||||
Ok(saved_dir()?.join("logs"))
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user