gitbundle_sdk/models/
service_account_token_output.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServiceAccountTokenOutput {
17    #[serde(rename = "access_token")]
18    pub access_token: String,
19    #[serde(
20        rename = "expires_at",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub expires_at: Option<Option<i64>>,
26}
27
28impl ServiceAccountTokenOutput {
29    pub fn new(access_token: String) -> ServiceAccountTokenOutput {
30        ServiceAccountTokenOutput {
31            access_token,
32            expires_at: None,
33        }
34    }
35}