Skip to main content

windmill_api/models/
offboard_token_info.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.681.0
7 * Contact: contact@windmill.dev
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 OffboardTokenInfo {
16    #[serde(rename = "label")]
17    pub label: String,
18    #[serde(rename = "scopes")]
19    pub scopes: Vec<String>,
20    #[serde(rename = "expiration", skip_serializing_if = "Option::is_none")]
21    pub expiration: Option<String>,
22}
23
24impl OffboardTokenInfo {
25    pub fn new(label: String, scopes: Vec<String>) -> OffboardTokenInfo {
26        OffboardTokenInfo {
27            label,
28            scopes,
29            expiration: None,
30        }
31    }
32}
33