Skip to main content

akeyless_api/models/
get_last_user_event_status.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 GetLastUserEventStatus {
16    #[serde(rename = "event-source", skip_serializing_if = "Option::is_none")]
17    pub event_source: Option<String>,
18    #[serde(rename = "event-type")]
19    pub event_type: String,
20    /// Event item name
21    #[serde(rename = "item-name")]
22    pub item_name: String,
23    /// Event item type can be either \"target\" or type of item eg \"static_secret\"/\"dynamic_secret\" To get type of some item run `akeyless describe-item -n {ITEM_NAME} --jq-expression .item_type`
24    #[serde(rename = "item-type")]
25    pub item_type: String,
26    /// Set output format to JSON
27    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
28    pub json: Option<bool>,
29    /// The time back to search the event, for example if the value is \"5m\" we will return the last user event issued in the last 5 minutes. By default, we will search without any time boundary.
30    #[serde(rename = "time-back", skip_serializing_if = "Option::is_none")]
31    pub time_back: Option<String>,
32    /// Authentication token (see `/auth` and `/configure`)
33    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
34    pub token: Option<String>,
35    /// The universal identity token, Required only for universal_identity authentication
36    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
37    pub uid_token: Option<String>,
38}
39
40impl GetLastUserEventStatus {
41    pub fn new(event_type: String, item_name: String, item_type: String) -> GetLastUserEventStatus {
42        GetLastUserEventStatus {
43            event_source: None,
44            event_type,
45            item_name,
46            item_type,
47            json: None,
48            time_back: None,
49            token: None,
50            uid_token: None,
51        }
52    }
53}
54