mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-06-01 09:42:37 +00:00
Generate api client with openapi-generator
This commit is contained in:
parent
e701f20c1a
commit
0b32ab460c
68 changed files with 6774 additions and 883 deletions
53
src/models/login_provider.rs
Normal file
53
src/models/login_provider.rs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum LoginProvider {
|
||||
#[serde(rename = "steam")]
|
||||
Steam,
|
||||
#[serde(rename = "epic")]
|
||||
Epic,
|
||||
#[serde(rename = "discord")]
|
||||
Discord,
|
||||
#[serde(rename = "microsoft")]
|
||||
Microsoft,
|
||||
#[serde(rename = "playstation")]
|
||||
Playstation,
|
||||
#[serde(rename = "google")]
|
||||
Google,
|
||||
#[serde(rename = "apple")]
|
||||
Apple,
|
||||
|
||||
}
|
||||
|
||||
impl std::fmt::Display for LoginProvider {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Steam => write!(f, "steam"),
|
||||
Self::Epic => write!(f, "epic"),
|
||||
Self::Discord => write!(f, "discord"),
|
||||
Self::Microsoft => write!(f, "microsoft"),
|
||||
Self::Playstation => write!(f, "playstation"),
|
||||
Self::Google => write!(f, "google"),
|
||||
Self::Apple => write!(f, "apple"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for LoginProvider {
|
||||
fn default() -> LoginProvider {
|
||||
Self::Steam
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue