open_api_hydra/models/
oauth2_token_response.rs

1/*
2 * ORY Hydra
3 *
4 * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5 *
6 * The version of the OpenAPI document: latest
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// Oauth2TokenResponse : The Access Token Response
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Oauth2TokenResponse {
17    #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")]
18    pub access_token: Option<String>,
19    #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
20    pub expires_in: Option<i64>,
21    #[serde(rename = "id_token", skip_serializing_if = "Option::is_none")]
22    pub id_token: Option<String>,
23    #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
24    pub refresh_token: Option<String>,
25    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
26    pub scope: Option<String>,
27    #[serde(rename = "token_type", skip_serializing_if = "Option::is_none")]
28    pub token_type: Option<String>,
29}
30
31impl Oauth2TokenResponse {
32    /// The Access Token Response
33    pub fn new() -> Oauth2TokenResponse {
34        Oauth2TokenResponse {
35            access_token: None,
36            expires_in: None,
37            id_token: None,
38            refresh_token: None,
39            scope: None,
40            token_type: None,
41        }
42    }
43}
44
45