dtz-identity 2.1.6

a generated client for the DTZ Identity API
Documentation
/*
 * DTZ Identity
 *
 * a generated client for the DTZ Identity API
 *
 * Contact: jens@apimeister.com
 * Generated by: https://openapi-generator.tech
 */

#[allow(unused_imports)]
use crate::models;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TokenResponse {
    #[serde(rename = "access_token")]
    pub access_token: String,
    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
    pub scope: Option<String>,
    #[serde(rename = "token_type")]
    pub token_type: String,
    #[serde(rename = "expires_in")]
    pub expires_in: f64,
}

impl TokenResponse {
    pub fn new(access_token: String, token_type: String, expires_in: f64) -> TokenResponse {
        TokenResponse {
            access_token,
            scope: None,
            token_type,
            expires_in,
        }
    }
}