Generate api client with openapi-generator

This commit is contained in:
2025-06-03 19:09:41 -03:00
parent e701f20c1a
commit 0b32ab460c
68 changed files with 6774 additions and 883 deletions

View File

@@ -0,0 +1,42 @@
/*
* 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 TokenResponse {
#[serde(rename = "token_type", skip_serializing_if = "Option::is_none")]
pub token_type: Option<models::TokenType>,
#[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub access_token: Option<Option<String>>,
#[serde(rename = "refresh_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub refresh_token: Option<Option<String>>,
#[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub scope: Option<Option<String>>,
#[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub state: Option<Option<String>>,
#[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
pub expires_in: Option<i64>,
}
impl TokenResponse {
pub fn new() -> TokenResponse {
TokenResponse {
token_type: None,
access_token: None,
refresh_token: None,
scope: None,
state: None,
expires_in: None,
}
}
}