Skip to main content

doppler_rs/models/
create_service_account_token_request.rs

1/*
2 * Core
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0-oas3.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/*
12 * Core
13 *
14 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15 *
16 * The version of the OpenAPI document: 1.0.0-oas3.1
17 * 
18 * Generated by: https://openapi-generator.tech
19 */
20
21use crate::models;
22use serde::{Deserialize, Serialize};
23use chrono::{DateTime, NaiveDate, Utc};
24/// CreateServiceAccountTokenRequest
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct CreateServiceAccountTokenRequest {
27    /// The display name of the API token
28    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
29    pub name: Option<String >,
30    /// The datetime at which the API token should expire. If not provided, the API token will remain vaild indefinitely unless manually revoked
31    #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
32    pub expires_at: Option<chrono::DateTime<chrono::Utc> >,
33}
34
35impl CreateServiceAccountTokenRequest {
36    pub fn new() -> CreateServiceAccountTokenRequest {
37        CreateServiceAccountTokenRequest {
38            name: None,
39            expires_at: None,
40        }
41    }
42}
43