Skip to main content

akeyless_api/models/
event_action.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
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 EventAction {
16    /// The Event Action [approve/deny]
17    #[serde(rename = "action")]
18    pub action: String,
19    /// The Event ID
20    #[serde(rename = "event-id")]
21    pub event_id: i64,
22    /// Set output format to JSON
23    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
24    pub json: Option<bool>,
25    /// Authentication token (see `/auth` and `/configure`)
26    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
27    pub token: Option<String>,
28    /// The universal identity token, Required only for universal_identity authentication
29    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
30    pub uid_token: Option<String>,
31}
32
33impl EventAction {
34    pub fn new(action: String, event_id: i64) -> EventAction {
35        EventAction {
36            action,
37            event_id,
38            json: None,
39            token: None,
40            uid_token: None,
41        }
42    }
43}
44