windmill_api/models/
blacklist_agent_token_request.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.505.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 BlacklistAgentTokenRequest {
16    /// The agent token to blacklist
17    #[serde(rename = "token")]
18    pub token: String,
19    /// Optional expiration date for the blacklist entry
20    #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
21    pub expires_at: Option<String>,
22}
23
24impl BlacklistAgentTokenRequest {
25    pub fn new(token: String) -> BlacklistAgentTokenRequest {
26        BlacklistAgentTokenRequest {
27            token,
28            expires_at: None,
29        }
30    }
31}
32