Skip to main content

akeyless_api/models/
create_event_forwarder.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/// CreateEventForwarder : createEventForwarder is a command that creates a new event forwarder [Deprecated - please use event-forwarder-create-* command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateEventForwarder {
17    /// Workstation Admin Name
18    #[serde(rename = "admin-name", skip_serializing_if = "Option::is_none")]
19    pub admin_name: Option<String>,
20    /// Workstation Admin password
21    #[serde(rename = "admin-pwd", skip_serializing_if = "Option::is_none")]
22    pub admin_pwd: Option<String>,
23    /// The RSA Private Key PEM formatted in base64 to use when connecting to ServiceNow with jwt authentication
24    #[serde(rename = "app-private-key-base64", skip_serializing_if = "Option::is_none")]
25    pub app_private_key_base64: Option<String>,
26    /// The authentication type to use when connecting to ServiceNow (user-pass / jwt)
27    #[serde(rename = "auth-type", skip_serializing_if = "Option::is_none")]
28    pub auth_type: Option<String>,
29    /// The client ID to use when connecting to ServiceNow with jwt authentication
30    #[serde(rename = "client-id", skip_serializing_if = "Option::is_none")]
31    pub client_id: Option<String>,
32    /// The client secret to use when connecting to ServiceNow with jwt authentication
33    #[serde(rename = "client-secret", skip_serializing_if = "Option::is_none")]
34    pub client_secret: Option<String>,
35    /// Deprecated - use description
36    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
37    pub comment: Option<String>,
38    /// Description of the object
39    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
40    pub description: Option<String>,
41    /// A comma seperated list of email addresses to send event to (relevant only for \"email\" Event Forwarder)
42    #[serde(rename = "email-to", skip_serializing_if = "Option::is_none")]
43    pub email_to: Option<String>,
44    /// Event sources
45    #[serde(rename = "event-source-locations")]
46    pub event_source_locations: Vec<String>,
47    /// Event Source type [item, target, auth_method, gateway]
48    #[serde(rename = "event-source-type", skip_serializing_if = "Option::is_none")]
49    pub event_source_type: Option<String>,
50    /// List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
51    #[serde(rename = "event-types", skip_serializing_if = "Option::is_none")]
52    pub event_types: Option<Vec<String>>,
53    /// Rate of periodic runner repetition in hours
54    #[serde(rename = "every", skip_serializing_if = "Option::is_none")]
55    pub every: Option<String>,
56    #[serde(rename = "forwarder-type")]
57    pub forwarder_type: String,
58    /// Workstation Host
59    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
60    pub host: Option<String>,
61    /// Set output format to JSON
62    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
63    pub json: Option<bool>,
64    /// The name of a key that used to encrypt the EventForwarder secret value (if empty, the account default protectionKey key will be used)
65    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
66    pub key: Option<String>,
67    /// EventForwarder name
68    #[serde(rename = "name")]
69    pub name: String,
70    #[serde(rename = "runner-type")]
71    pub runner_type: String,
72    /// Authentication token (see `/auth` and `/configure`)
73    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
74    pub token: Option<String>,
75    /// The universal identity token, Required only for universal_identity authentication
76    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
77    pub uid_token: Option<String>,
78    /// The user email to use when connecting to ServiceNow with jwt authentication
79    #[serde(rename = "user-email", skip_serializing_if = "Option::is_none")]
80    pub user_email: Option<String>,
81}
82
83impl CreateEventForwarder {
84    /// createEventForwarder is a command that creates a new event forwarder [Deprecated - please use event-forwarder-create-* command]
85    pub fn new(event_source_locations: Vec<String>, forwarder_type: String, name: String, runner_type: String) -> CreateEventForwarder {
86        CreateEventForwarder {
87            admin_name: None,
88            admin_pwd: None,
89            app_private_key_base64: None,
90            auth_type: None,
91            client_id: None,
92            client_secret: None,
93            comment: None,
94            description: None,
95            email_to: None,
96            event_source_locations,
97            event_source_type: None,
98            event_types: None,
99            every: None,
100            forwarder_type,
101            host: None,
102            json: None,
103            key: None,
104            name,
105            runner_type,
106            token: None,
107            uid_token: None,
108            user_email: None,
109        }
110    }
111}
112