/*
 * Authenticator
 *
 * REST API and web server providing authentication for a Tapis v3 instance.
 *
 * The version of the OpenAPI document: 1
 * Contact: cicsupport@tacc.utexas.edu
 * 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 = "access_token")]
    pub access_token: Box<models::TokenResponseAccessToken>,
    #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
    pub refresh_token: Option<Box<models::TokenResponseRefreshToken>>,
}

impl TokenResponse {
    pub fn new(access_token: models::TokenResponseAccessToken) -> TokenResponse {
        TokenResponse {
            access_token: Box::new(access_token),
            refresh_token: None,
        }
    }
}
