Skip to main content

tapis_authenticator/models/
device_code_resposne.rs

1/*
2 * Authenticator
3 *
4 * REST API and web server providing authentication for a Tapis v3 instance.
5 *
6 * The version of the OpenAPI document: 1
7 * Contact: cicsupport@tacc.utexas.edu
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DeviceCodeResposne {
16    /// The device code generated for the client
17    #[serde(rename = "device_code")]
18    pub device_code: String,
19    /// The user code generated for the client
20    #[serde(rename = "user_code")]
21    pub user_code: String,
22    /// The client_id of the client
23    #[serde(rename = "client_id")]
24    pub client_id: String,
25    /// The expiration for the user code
26    #[serde(rename = "expires_in")]
27    pub expires_in: String,
28    /// The url the user should go to to enter their user code
29    #[serde(rename = "verification_uri")]
30    pub verification_uri: String,
31}
32
33impl DeviceCodeResposne {
34    pub fn new(
35        device_code: String,
36        user_code: String,
37        client_id: String,
38        expires_in: String,
39        verification_uri: String,
40    ) -> DeviceCodeResposne {
41        DeviceCodeResposne {
42            device_code,
43            user_code,
44            client_id,
45            expires_in,
46            verification_uri,
47        }
48    }
49}