mirror of
https://github.com/tribufu/sdk-rust
synced 2026-02-04 09:23:08 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9eb473d6d6 | |||
| dfa1dfb1c8 | |||
| 33d76d7a4e | |||
| 66094fc10d | |||
| 7b3af5d291 | |||
|
|
a392dbb119 |
14
.cargo/config.toml
Normal file
14
.cargo/config.toml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[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
Normal file
221
.clang-format
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
---
|
||||||
|
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,40 +1,17 @@
|
|||||||
__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,38 +5,45 @@ 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_game.rs
|
src/models/group_application.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_request.rs
|
src/models/search.rs
|
||||||
src/models/search_type.rs
|
src/models/search_type.rs
|
||||||
src/models/server_metrics.rs
|
src/models/server_metrics.rs
|
||||||
src/models/server_status.rs
|
src/models/storage_file.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.1.0"
|
version = "1.3.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,7 +19,7 @@ exclude = [
|
|||||||
".vscode/",
|
".vscode/",
|
||||||
"examples/",
|
"examples/",
|
||||||
"scripts/",
|
"scripts/",
|
||||||
"scripts/",
|
"vendor/",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
@@ -33,7 +33,7 @@ crate-type = ["rlib"]
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tribufu-constants = { version = "0.0.5", path = "./src/constants" }
|
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"] }
|
||||||
|
|||||||
4
scripts/windows/build.ps1
Normal file
4
scripts/windows/build.ps1
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
|
||||||
|
echo "Building for win-x64"
|
||||||
|
cargo build --workspace
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
#!/usr/bin/env pwsh
|
#!/usr/bin/env pwsh
|
||||||
|
|
||||||
$crates = @(
|
$crates = @(
|
||||||
"tribufu-types",
|
|
||||||
"tribufu-constants",
|
"tribufu-constants",
|
||||||
"tribufu-api",
|
"tribufu-error",
|
||||||
|
"tribufu-json",
|
||||||
|
"tribufu-log",
|
||||||
|
"tribufu-platform",
|
||||||
"tribufu"
|
"tribufu"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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.1.0/rust".to_owned()),
|
user_agent: Some("OpenAPI-Generator/1.3.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,11 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tribufu-constants"
|
name = "tribufu-constants"
|
||||||
version = "0.0.5"
|
version = "1.3.0"
|
||||||
description = "Tribufu Constants"
|
description = "Tribufu Constants"
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
repository = "https://github.com/tribufu/tribufu-rust"
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
authors = ["Tribufu <contact@tribufu.com>"]
|
||||||
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = true
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tribufu_constants"
|
name = "tribufu_constants"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tribufu-error"
|
name = "tribufu-error"
|
||||||
version = "0.0.5"
|
version = "1.3.0"
|
||||||
description = "Tribufu Error"
|
description = "Tribufu Error"
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
repository = "https://github.com/tribufu/tribufu-rust"
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
authors = ["Tribufu <contact@tribufu.com>"]
|
||||||
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = true
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tribufu_error"
|
name = "tribufu_error"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tribufu-json"
|
name = "tribufu-json"
|
||||||
version = "0.0.5"
|
version = "1.3.0"
|
||||||
description = "Tribufu Json"
|
description = "Tribufu Json"
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
repository = "https://github.com/tribufu/tribufu-rust"
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
authors = ["Tribufu <contact@tribufu.com>"]
|
||||||
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = true
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tribufu_json"
|
name = "tribufu_json"
|
||||||
@@ -13,6 +14,6 @@ crate-type = ["rlib"]
|
|||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tribufu-error = { version = "0.0.5", path = "../error" }
|
tribufu-error = { version = "1.3.0", path = "../error" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tribufu-log"
|
name = "tribufu-log"
|
||||||
version = "0.0.5"
|
version = "1.3.0"
|
||||||
description = "Tribufu Log"
|
description = "Tribufu Log"
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
repository = "https://github.com/tribufu/tribufu-rust"
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
authors = ["Tribufu <contact@tribufu.com>"]
|
||||||
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = true
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tribufu_log"
|
name = "tribufu_log"
|
||||||
@@ -13,7 +14,7 @@ crate-type = ["rlib"]
|
|||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tribufu-error = { version = "0.0.5", path = "../error" }
|
tribufu-error = { version = "1.3.0", path = "../error" }
|
||||||
chrono = "0.4.23"
|
chrono = "0.4.23"
|
||||||
env_logger = "0.10.1"
|
env_logger = "0.10.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "id", deserialize_with = "Option::deserialize")]
|
||||||
pub id: Option<Option<String>>,
|
pub id: 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", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "provider")]
|
||||||
pub provider: Option<models::LoginProvider>,
|
pub provider: 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() -> Account {
|
pub fn new(id: Option<String>, provider: models::LoginProvider) -> Account {
|
||||||
Account {
|
Account {
|
||||||
id: None,
|
id,
|
||||||
name: None,
|
name: None,
|
||||||
provider: None,
|
provider,
|
||||||
user_id: None,
|
user_id: None,
|
||||||
authorized: None,
|
authorized: None,
|
||||||
fields: None,
|
fields: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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,24 +31,8 @@ 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")]
|
||||||
@@ -56,10 +40,10 @@ pub struct Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Application {
|
impl Application {
|
||||||
pub fn new() -> Application {
|
pub fn new(name: Option<String>) -> Application {
|
||||||
Application {
|
Application {
|
||||||
id: None,
|
id: None,
|
||||||
name: None,
|
name,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
r#type: None,
|
||||||
organization_id: None,
|
organization_id: None,
|
||||||
@@ -67,15 +51,7 @@ 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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "client_id")]
|
||||||
pub client_id: Option<Option<String>>,
|
pub client_id: 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "redirect_uri", deserialize_with = "Option::deserialize")]
|
||||||
pub redirect_uri: Option<Option<String>>,
|
pub redirect_uri: 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() -> AuthorizeRequest {
|
pub fn new(client_id: String, redirect_uri: Option<String>) -> AuthorizeRequest {
|
||||||
AuthorizeRequest {
|
AuthorizeRequest {
|
||||||
response_type: None,
|
response_type: None,
|
||||||
client_id: None,
|
client_id,
|
||||||
code_challenge: None,
|
code_challenge: None,
|
||||||
code_challenge_method: None,
|
code_challenge_method: None,
|
||||||
redirect_uri: None,
|
redirect_uri,
|
||||||
scope: None,
|
scope: None,
|
||||||
state: None,
|
state: None,
|
||||||
}
|
}
|
||||||
|
|||||||
63
src/models/client.rs
Normal file
63
src/models/client.rs
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Client {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<String>,
|
||||||
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
|
pub name: Option<String>,
|
||||||
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub r#type: Option<models::ClientType>,
|
||||||
|
#[serde(rename = "organization_id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub organization_id: Option<String>,
|
||||||
|
#[serde(rename = "trusted", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub trusted: Option<bool>,
|
||||||
|
#[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub website_url: Option<Option<String>>,
|
||||||
|
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub photo_url: Option<Option<String>>,
|
||||||
|
#[serde(rename = "background_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub background_url: Option<Option<String>>,
|
||||||
|
#[serde(rename = "redirects", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub redirects: Option<Option<String>>,
|
||||||
|
#[serde(rename = "scopes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub scopes: Option<Option<String>>,
|
||||||
|
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub permissions: Option<Option<Vec<String>>>,
|
||||||
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub created: Option<String>,
|
||||||
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub updated: Option<Option<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Client {
|
||||||
|
pub fn new(name: Option<String>) -> Client {
|
||||||
|
Client {
|
||||||
|
id: None,
|
||||||
|
name,
|
||||||
|
r#type: None,
|
||||||
|
organization_id: None,
|
||||||
|
trusted: None,
|
||||||
|
website_url: None,
|
||||||
|
photo_url: None,
|
||||||
|
background_url: None,
|
||||||
|
redirects: None,
|
||||||
|
scopes: None,
|
||||||
|
permissions: None,
|
||||||
|
created: None,
|
||||||
|
updated: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
39
src/models/client_info.rs
Normal file
39
src/models/client_info.rs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct ClientInfo {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<String>,
|
||||||
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
|
pub name: Option<String>,
|
||||||
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub r#type: Option<models::ClientType>,
|
||||||
|
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub photo_url: Option<Option<String>>,
|
||||||
|
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub permissions: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ClientInfo {
|
||||||
|
pub fn new(name: Option<String>) -> ClientInfo {
|
||||||
|
ClientInfo {
|
||||||
|
id: None,
|
||||||
|
name,
|
||||||
|
r#type: None,
|
||||||
|
photo_url: None,
|
||||||
|
permissions: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
41
src/models/client_type.rs
Normal file
41
src/models/client_type.rs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum ClientType {
|
||||||
|
#[serde(rename = "web")]
|
||||||
|
Web,
|
||||||
|
#[serde(rename = "desktop")]
|
||||||
|
Desktop,
|
||||||
|
#[serde(rename = "mobile")]
|
||||||
|
Mobile,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for ClientType {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
Self::Web => write!(f, "web"),
|
||||||
|
Self::Desktop => write!(f, "desktop"),
|
||||||
|
Self::Mobile => write!(f, "mobile"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for ClientType {
|
||||||
|
fn default() -> ClientType {
|
||||||
|
Self::Web
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
30
src/models/code_response.rs
Normal file
30
src/models/code_response.rs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct CodeResponse {
|
||||||
|
#[serde(rename = "code", deserialize_with = "Option::deserialize")]
|
||||||
|
pub code: Option<String>,
|
||||||
|
#[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub state: Option<Option<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CodeResponse {
|
||||||
|
pub fn new(code: Option<String>) -> CodeResponse {
|
||||||
|
CodeResponse {
|
||||||
|
code,
|
||||||
|
state: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
51
src/models/create_user.rs
Normal file
51
src/models/create_user.rs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct CreateUser {
|
||||||
|
#[serde(rename = "uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub uuid: Option<Option<uuid::Uuid>>,
|
||||||
|
#[serde(rename = "name")]
|
||||||
|
pub name: String,
|
||||||
|
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub display_name: Option<Option<String>>,
|
||||||
|
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub email: Option<Option<String>>,
|
||||||
|
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub password: Option<Option<String>>,
|
||||||
|
#[serde(rename = "language", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub language: Option<Option<String>>,
|
||||||
|
#[serde(rename = "timezone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub timezone: Option<Option<String>>,
|
||||||
|
#[serde(rename = "currency", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub currency: Option<Option<String>>,
|
||||||
|
#[serde(rename = "ip_address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub ip_address: Option<Option<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CreateUser {
|
||||||
|
pub fn new(name: String) -> CreateUser {
|
||||||
|
CreateUser {
|
||||||
|
uuid: None,
|
||||||
|
name,
|
||||||
|
display_name: None,
|
||||||
|
email: None,
|
||||||
|
password: None,
|
||||||
|
language: None,
|
||||||
|
timezone: None,
|
||||||
|
currency: None,
|
||||||
|
ip_address: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -13,32 +13,10 @@ 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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")]
|
||||||
@@ -53,46 +31,33 @@ 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() -> Game {
|
pub fn new(name: Option<String>) -> 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: None,
|
name,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
r#type: None,
|
||||||
organization_id: None,
|
organization_id: None,
|
||||||
@@ -100,17 +65,16 @@ 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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -15,50 +15,34 @@ 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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 = "address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "owner_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub address: Option<Option<String>>,
|
pub owner_id: Option<Option<String>>,
|
||||||
|
#[serde(rename = "address", deserialize_with = "Option::deserialize")]
|
||||||
|
pub address: Option<String>,
|
||||||
|
#[serde(rename = "query_port")]
|
||||||
|
pub query_port: i32,
|
||||||
#[serde(rename = "game_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[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 = "query_port", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub query_port: Option<i32>,
|
pub map: Option<Option<String>>,
|
||||||
|
#[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub version: Option<Option<String>>,
|
||||||
#[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
|
#[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")]
|
||||||
@@ -67,10 +51,6 @@ 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")]
|
||||||
@@ -78,37 +58,27 @@ pub struct GameServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl GameServer {
|
impl GameServer {
|
||||||
pub fn new() -> GameServer {
|
pub fn new(name: Option<String>, address: Option<String>, query_port: i32) -> GameServer {
|
||||||
GameServer {
|
GameServer {
|
||||||
id: None,
|
id: None,
|
||||||
name: None,
|
name,
|
||||||
description: None,
|
description: None,
|
||||||
address: None,
|
owner_id: None,
|
||||||
|
address,
|
||||||
|
query_port,
|
||||||
game_port: None,
|
game_port: None,
|
||||||
query_port: None,
|
map: 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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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() -> GameServerCluster {
|
pub fn new(name: Option<String>) -> GameServerCluster {
|
||||||
GameServerCluster {
|
GameServerCluster {
|
||||||
id: None,
|
id: None,
|
||||||
name: None,
|
name,
|
||||||
description: None,
|
description: None,
|
||||||
game_id: None,
|
game_id: None,
|
||||||
website_url: None,
|
website_url: None,
|
||||||
|
|||||||
48
src/models/game_server_query.rs
Normal file
48
src/models/game_server_query.rs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct GameServerQuery {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<String>,
|
||||||
|
#[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub server_id: Option<String>,
|
||||||
|
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub status: Option<models::GameServerStatus>,
|
||||||
|
#[serde(rename = "ping", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub ping: Option<i32>,
|
||||||
|
#[serde(rename = "current_players", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub current_players: Option<i32>,
|
||||||
|
#[serde(rename = "max_players", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub max_players: Option<i32>,
|
||||||
|
#[serde(rename = "motd", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub motd: Option<Option<String>>,
|
||||||
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub created: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl GameServerQuery {
|
||||||
|
pub fn new() -> GameServerQuery {
|
||||||
|
GameServerQuery {
|
||||||
|
id: None,
|
||||||
|
server_id: None,
|
||||||
|
status: None,
|
||||||
|
ping: None,
|
||||||
|
current_players: None,
|
||||||
|
max_players: None,
|
||||||
|
motd: None,
|
||||||
|
created: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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 ServerStatus {
|
pub enum GameServerStatus {
|
||||||
#[serde(rename = "unknown")]
|
#[serde(rename = "unknown")]
|
||||||
Unknown,
|
Unknown,
|
||||||
#[serde(rename = "offline")]
|
#[serde(rename = "offline")]
|
||||||
@@ -23,7 +23,7 @@ pub enum ServerStatus {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Display for ServerStatus {
|
impl std::fmt::Display for GameServerStatus {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
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 ServerStatus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ServerStatus {
|
impl Default for GameServerStatus {
|
||||||
fn default() -> ServerStatus {
|
fn default() -> GameServerStatus {
|
||||||
Self::Unknown
|
Self::Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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() -> Group {
|
pub fn new(name: Option<String>) -> Group {
|
||||||
Group {
|
Group {
|
||||||
id: None,
|
id: None,
|
||||||
uuid: None,
|
uuid: None,
|
||||||
name: None,
|
name,
|
||||||
tag: None,
|
tag: None,
|
||||||
description: None,
|
description: None,
|
||||||
r#type: None,
|
r#type: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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 GroupGame {
|
pub struct GroupApplication {
|
||||||
#[serde(rename = "group_id", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "group_id")]
|
||||||
pub group_id: Option<String>,
|
pub group_id: 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 GroupGame {
|
|||||||
pub last_used: Option<Option<String>>,
|
pub last_used: Option<Option<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GroupGame {
|
impl GroupApplication {
|
||||||
pub fn new() -> GroupGame {
|
pub fn new(group_id: String) -> GroupApplication {
|
||||||
GroupGame {
|
GroupApplication {
|
||||||
group_id: None,
|
group_id,
|
||||||
group: None,
|
group: None,
|
||||||
application_id: None,
|
application_id: None,
|
||||||
application: None,
|
application: None,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "value", deserialize_with = "Option::deserialize")]
|
||||||
pub value: Option<Option<String>>,
|
pub value: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HashViewModel {
|
impl HashViewModel {
|
||||||
pub fn new() -> HashViewModel {
|
pub fn new(value: Option<String>) -> HashViewModel {
|
||||||
HashViewModel {
|
HashViewModel {
|
||||||
value: None,
|
value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "token", deserialize_with = "Option::deserialize")]
|
||||||
pub token: Option<Option<String>>,
|
pub token: Option<String>,
|
||||||
#[serde(rename = "token_type_hint", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "token_type_hint")]
|
||||||
pub token_type_hint: Option<models::TokenHintType>,
|
pub token_type_hint: models::TokenHintType,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IntrospectRequest {
|
impl IntrospectRequest {
|
||||||
pub fn new() -> IntrospectRequest {
|
pub fn new(token: Option<String>, token_type_hint: models::TokenHintType) -> IntrospectRequest {
|
||||||
IntrospectRequest {
|
IntrospectRequest {
|
||||||
token: None,
|
token,
|
||||||
token_type_hint: None,
|
token_type_hint,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
60
src/models/introspect_response.rs
Normal file
60
src/models/introspect_response.rs
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct IntrospectResponse {
|
||||||
|
#[serde(rename = "jti", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub jti: Option<Option<String>>,
|
||||||
|
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub active: Option<bool>,
|
||||||
|
#[serde(rename = "token_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub token_type: Option<Option<String>>,
|
||||||
|
#[serde(rename = "client_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub client_id: Option<Option<String>>,
|
||||||
|
#[serde(rename = "sub", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub sub: Option<Option<String>>,
|
||||||
|
#[serde(rename = "username", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub username: Option<Option<String>>,
|
||||||
|
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub scope: Option<Option<String>>,
|
||||||
|
#[serde(rename = "iss", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub iss: Option<Option<String>>,
|
||||||
|
#[serde(rename = "aud", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub aud: Option<Option<String>>,
|
||||||
|
#[serde(rename = "iat", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub iat: Option<Option<i64>>,
|
||||||
|
#[serde(rename = "exp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub exp: Option<Option<i64>>,
|
||||||
|
#[serde(rename = "nbf", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub nbf: Option<Option<i64>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IntrospectResponse {
|
||||||
|
pub fn new() -> IntrospectResponse {
|
||||||
|
IntrospectResponse {
|
||||||
|
jti: None,
|
||||||
|
active: None,
|
||||||
|
token_type: None,
|
||||||
|
client_id: None,
|
||||||
|
sub: None,
|
||||||
|
username: None,
|
||||||
|
scope: None,
|
||||||
|
iss: None,
|
||||||
|
aud: None,
|
||||||
|
iat: None,
|
||||||
|
exp: None,
|
||||||
|
nbf: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -21,6 +21,8 @@ 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")]
|
||||||
@@ -29,8 +31,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 = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "province", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub region: Option<Option<String>>,
|
pub province: 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")]
|
||||||
@@ -58,11 +60,12 @@ 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,
|
||||||
region: None,
|
province: 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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Tribufu API
|
|
||||||
*
|
|
||||||
* REST API to access Tribufu services.
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.1.0
|
|
||||||
* Contact: contact@tribufu.com
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct LoginRequest {
|
|
||||||
#[serde(rename = "login", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub login: Option<Option<String>>,
|
|
||||||
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub password: Option<Option<String>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl LoginRequest {
|
|
||||||
pub fn new() -> LoginRequest {
|
|
||||||
LoginRequest {
|
|
||||||
login: None,
|
|
||||||
password: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
* Tribufu API
|
|
||||||
*
|
|
||||||
* REST API to access Tribufu services.
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.1.0
|
|
||||||
* Contact: contact@tribufu.com
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct LoginResponse {
|
|
||||||
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub user: Option<Box<models::UserInfo>>,
|
|
||||||
#[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub access_token: Option<Option<String>>,
|
|
||||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub refresh_token: Option<Option<String>>,
|
|
||||||
#[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub expires_in: Option<i64>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl LoginResponse {
|
|
||||||
pub fn new() -> LoginResponse {
|
|
||||||
LoginResponse {
|
|
||||||
user: None,
|
|
||||||
access_token: None,
|
|
||||||
refresh_token: None,
|
|
||||||
expires_in: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -6,8 +6,18 @@ pub mod application_type;
|
|||||||
pub use self::application_type::ApplicationType;
|
pub 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;
|
||||||
@@ -16,12 +26,16 @@ 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_game;
|
pub mod group_application;
|
||||||
pub use self::group_game::GroupGame;
|
pub use self::group_application::GroupApplication;
|
||||||
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;
|
||||||
@@ -30,6 +44,8 @@ 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;
|
||||||
@@ -38,36 +54,34 @@ 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_request;
|
pub mod search;
|
||||||
pub use self::search_request::SearchRequest;
|
pub use self::search::Search;
|
||||||
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 server_status;
|
pub mod storage_file;
|
||||||
pub use self::server_status::ServerStatus;
|
pub use self::storage_file::StorageFile;
|
||||||
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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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 = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "image_url", deserialize_with = "Option::deserialize")]
|
||||||
pub version: Option<Option<String>>,
|
pub image_url: Option<String>,
|
||||||
#[serde(rename = "file_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "application_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub file_url: Option<Option<String>>,
|
pub application_id: Option<Option<String>>,
|
||||||
#[serde(rename = "raw_size", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "category_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub raw_size: Option<f64>,
|
pub category_id: Option<Option<String>>,
|
||||||
#[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() -> Package {
|
pub fn new(name: Option<String>, image_url: Option<String>) -> Package {
|
||||||
Package {
|
Package {
|
||||||
id: None,
|
id: None,
|
||||||
name: None,
|
name,
|
||||||
description: None,
|
description: None,
|
||||||
image_url: None,
|
|
||||||
author_id: None,
|
author_id: None,
|
||||||
version: None,
|
image_url,
|
||||||
file_url: None,
|
application_id: None,
|
||||||
raw_size: None,
|
category_id: None,
|
||||||
download_count: None,
|
download_count: None,
|
||||||
last_download: None,
|
last_download: None,
|
||||||
|
releases: None,
|
||||||
created: None,
|
created: None,
|
||||||
updated: None,
|
updated: None,
|
||||||
}
|
}
|
||||||
|
|||||||
45
src/models/package_release.rs
Normal file
45
src/models/package_release.rs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PackageRelease {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<String>,
|
||||||
|
#[serde(rename = "version", deserialize_with = "Option::deserialize")]
|
||||||
|
pub version: Option<String>,
|
||||||
|
#[serde(rename = "package_id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub package_id: Option<String>,
|
||||||
|
#[serde(rename = "notes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub notes: Option<Option<String>>,
|
||||||
|
#[serde(rename = "files", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub files: Option<Option<Vec<models::StorageFile>>>,
|
||||||
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub created: Option<String>,
|
||||||
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub updated: Option<Option<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PackageRelease {
|
||||||
|
pub fn new(version: Option<String>) -> PackageRelease {
|
||||||
|
PackageRelease {
|
||||||
|
id: None,
|
||||||
|
version,
|
||||||
|
package_id: None,
|
||||||
|
notes: None,
|
||||||
|
files: None,
|
||||||
|
created: None,
|
||||||
|
updated: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -12,30 +12,39 @@ 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 Subscription {
|
pub struct Product {
|
||||||
#[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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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<std::collections::HashMap<String, f64>>>,
|
pub prices: Option<Option<Vec<models::ProductPrice>>>,
|
||||||
#[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 Subscription {
|
impl Product {
|
||||||
pub fn new() -> Subscription {
|
pub fn new(name: Option<String>) -> Product {
|
||||||
Subscription {
|
Product {
|
||||||
id: None,
|
id: None,
|
||||||
name: None,
|
name,
|
||||||
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,
|
||||||
33
src/models/product_price.rs
Normal file
33
src/models/product_price.rs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct ProductPrice {
|
||||||
|
#[serde(rename = "currency", deserialize_with = "Option::deserialize")]
|
||||||
|
pub currency: Option<String>,
|
||||||
|
#[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub amount: Option<f64>,
|
||||||
|
#[serde(rename = "renewal", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub renewal: Option<Option<f64>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ProductPrice {
|
||||||
|
pub fn new(currency: Option<String>) -> ProductPrice {
|
||||||
|
ProductPrice {
|
||||||
|
currency,
|
||||||
|
amount: None,
|
||||||
|
renewal: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
38
src/models/product_type.rs
Normal file
38
src/models/product_type.rs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum ProductType {
|
||||||
|
#[serde(rename = "product")]
|
||||||
|
Product,
|
||||||
|
#[serde(rename = "subscription")]
|
||||||
|
Subscription,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for ProductType {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
Self::Product => write!(f, "product"),
|
||||||
|
Self::Subscription => write!(f, "subscription"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for ProductType {
|
||||||
|
fn default() -> ProductType {
|
||||||
|
Self::Product
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Tribufu API
|
|
||||||
*
|
|
||||||
* REST API to access Tribufu services.
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.1.0
|
|
||||||
* Contact: contact@tribufu.com
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct RefreshRequest {
|
|
||||||
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub refresh_token: Option<Option<String>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RefreshRequest {
|
|
||||||
pub fn new() -> RefreshRequest {
|
|
||||||
RefreshRequest {
|
|
||||||
refresh_token: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
* Tribufu API
|
|
||||||
*
|
|
||||||
* REST API to access Tribufu services.
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.1.0
|
|
||||||
* Contact: contact@tribufu.com
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct RegisterRequest {
|
|
||||||
#[serde(rename = "uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub uuid: Option<Option<uuid::Uuid>>,
|
|
||||||
#[serde(rename = "name")]
|
|
||||||
pub name: String,
|
|
||||||
#[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub email: Option<Option<String>>,
|
|
||||||
#[serde(rename = "password")]
|
|
||||||
pub password: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RegisterRequest {
|
|
||||||
pub fn new(name: String, password: String) -> RegisterRequest {
|
|
||||||
RegisterRequest {
|
|
||||||
uuid: None,
|
|
||||||
name,
|
|
||||||
email: None,
|
|
||||||
password,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "token", deserialize_with = "Option::deserialize")]
|
||||||
pub token: Option<Option<String>>,
|
pub token: Option<String>,
|
||||||
#[serde(rename = "token_type_hint", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "token_type_hint")]
|
||||||
pub token_type_hint: Option<models::TokenHintType>,
|
pub token_type_hint: models::TokenHintType,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RevokeRequest {
|
impl RevokeRequest {
|
||||||
pub fn new() -> RevokeRequest {
|
pub fn new(token: Option<String>, token_type_hint: models::TokenHintType) -> RevokeRequest {
|
||||||
RevokeRequest {
|
RevokeRequest {
|
||||||
token: None,
|
token,
|
||||||
token_type_hint: None,
|
token_type_hint,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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 SearchRequest {
|
pub struct Search {
|
||||||
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "type")]
|
||||||
pub r#type: Option<models::SearchType>,
|
pub r#type: models::SearchType,
|
||||||
#[serde(rename = "query", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "query", deserialize_with = "Option::deserialize")]
|
||||||
pub query: Option<Option<String>>,
|
pub query: 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 SearchRequest {
|
impl Search {
|
||||||
pub fn new() -> SearchRequest {
|
pub fn new(r#type: models::SearchType, query: Option<String>) -> Search {
|
||||||
SearchRequest {
|
Search {
|
||||||
r#type: None,
|
r#type,
|
||||||
query: None,
|
query,
|
||||||
page: None,
|
page: None,
|
||||||
game_id: None,
|
game_id: None,
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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 = "server")]
|
#[serde(rename = "game_server")]
|
||||||
Server,
|
GameServer,
|
||||||
#[serde(rename = "cluster")]
|
#[serde(rename = "game_server_cluster")]
|
||||||
Cluster,
|
GameServerCluster,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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::Server => write!(f, "server"),
|
Self::GameServer => write!(f, "game_server"),
|
||||||
Self::Cluster => write!(f, "cluster"),
|
Self::GameServerCluster => write!(f, "game_server_cluster"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
51
src/models/storage_file.rs
Normal file
51
src/models/storage_file.rs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Tribufu API
|
||||||
|
*
|
||||||
|
* API to access Tribufu services.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.3.0
|
||||||
|
* Contact: contact@tribufu.com
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct StorageFile {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<String>,
|
||||||
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
|
pub name: Option<String>,
|
||||||
|
#[serde(rename = "content_type", deserialize_with = "Option::deserialize")]
|
||||||
|
pub content_type: Option<String>,
|
||||||
|
#[serde(rename = "url", deserialize_with = "Option::deserialize")]
|
||||||
|
pub url: Option<String>,
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
#[serde(rename = "hash", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub hash: Option<Option<String>>,
|
||||||
|
#[serde(rename = "etag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub etag: Option<Option<String>>,
|
||||||
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub created: Option<String>,
|
||||||
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub updated: Option<Option<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StorageFile {
|
||||||
|
pub fn new(name: Option<String>, content_type: Option<String>, url: Option<String>) -> StorageFile {
|
||||||
|
StorageFile {
|
||||||
|
id: None,
|
||||||
|
name,
|
||||||
|
content_type,
|
||||||
|
url,
|
||||||
|
size: None,
|
||||||
|
hash: None,
|
||||||
|
etag: None,
|
||||||
|
created: None,
|
||||||
|
updated: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -23,8 +23,6 @@ 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")]
|
||||||
@@ -39,7 +37,6 @@ 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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "token_type")]
|
||||||
pub token_type: Option<models::TokenType>,
|
pub token_type: models::TokenType,
|
||||||
#[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "access_token", deserialize_with = "Option::deserialize")]
|
||||||
pub access_token: Option<Option<String>>,
|
pub access_token: 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() -> TokenResponse {
|
pub fn new(token_type: models::TokenType, access_token: Option<String>) -> TokenResponse {
|
||||||
TokenResponse {
|
TokenResponse {
|
||||||
token_type: None,
|
token_type,
|
||||||
access_token: None,
|
access_token,
|
||||||
refresh_token: None,
|
refresh_token: None,
|
||||||
scope: None,
|
scope: None,
|
||||||
state: None,
|
state: None,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "display_name", deserialize_with = "Option::deserialize")]
|
||||||
pub display_name: Option<Option<String>>,
|
pub display_name: 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() -> UpdateProfile {
|
pub fn new(display_name: Option<String>) -> UpdateProfile {
|
||||||
UpdateProfile {
|
UpdateProfile {
|
||||||
display_name: None,
|
display_name,
|
||||||
biography: None,
|
biography: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Tribufu API
|
* Tribufu API
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
@@ -17,32 +17,16 @@ 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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||||
pub name: Option<Option<String>>,
|
pub name: 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")]
|
||||||
@@ -51,14 +35,8 @@ 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 = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
pub banner_url: Option<Option<String>>,
|
pub permissions: Option<Option<Vec<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")]
|
||||||
@@ -66,31 +44,20 @@ pub struct UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl UserInfo {
|
impl UserInfo {
|
||||||
pub fn new() -> UserInfo {
|
pub fn new(name: Option<String>) -> UserInfo {
|
||||||
UserInfo {
|
UserInfo {
|
||||||
id: None,
|
id: None,
|
||||||
uuid: None,
|
uuid: None,
|
||||||
name: None,
|
name,
|
||||||
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,
|
||||||
banner_url: None,
|
permissions: 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
|
||||||
*
|
*
|
||||||
* REST API to access Tribufu services.
|
* API to access Tribufu services.
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.1.0
|
* The version of the OpenAPI document: 1.3.0
|
||||||
* Contact: contact@tribufu.com
|
* Contact: contact@tribufu.com
|
||||||
* Generated by: https://openapi-generator.tech
|
* Generated by: https://openapi-generator.tech
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tribufu-platform"
|
name = "tribufu-platform"
|
||||||
version = "0.0.5"
|
version = "1.3.0"
|
||||||
description = "Tribufu Platform"
|
description = "Tribufu Platform"
|
||||||
repository = "https://github.com/tribufu/tribufu-rust"
|
repository = "https://github.com/tribufu/tribufu-rust"
|
||||||
authors = ["Tribufu <contact@tribufu.com>"]
|
authors = ["Tribufu <contact@tribufu.com>"]
|
||||||
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = true
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tribufu_platform"
|
name = "tribufu_platform"
|
||||||
@@ -13,7 +14,7 @@ crate-type = ["rlib"]
|
|||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tribufu-error = { version = "0.0.5", path = "../error" }
|
tribufu-error = { version = "1.3.0", path = "../error" }
|
||||||
dunce = "1.0.4"
|
dunce = "1.0.4"
|
||||||
|
|
||||||
[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies]
|
[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies]
|
||||||
|
|||||||
Reference in New Issue
Block a user