use crate::gen::auth::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OAuthTokenResponse {
#[serde(rename = "access_token")]
pub access_token: String,
#[serde(rename = "token_type")]
pub token_type: String,
#[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
pub expires_in: Option<i64>,
#[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
pub refresh_token: Option<String>,
#[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
pub scope: Option<String>,
#[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
}
impl OAuthTokenResponse {
pub fn new(access_token: String, token_type: String) -> OAuthTokenResponse {
OAuthTokenResponse {
access_token,
token_type,
expires_in: None,
refresh_token: None,
scope: None,
client_id: None,
}
}
}