Skip to main content

akeyless_api/models/
event_forwarder_update_webhook.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/// EventForwarderUpdateWebhook : eventForwarderUpdateWebhook is a command that updates webhook event forwarder
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EventForwarderUpdateWebhook {
17    /// Auth Method Event sources
18    #[serde(rename = "auth-methods-event-source-locations", skip_serializing_if = "Option::is_none")]
19    pub auth_methods_event_source_locations: Option<Vec<String>>,
20    /// Base64 encoded Token string for authentication type Token
21    #[serde(rename = "auth-token", skip_serializing_if = "Option::is_none")]
22    pub auth_token: Option<String>,
23    /// The Webhook authentication type [user-pass, bearer-token, certificate]
24    #[serde(rename = "auth-type", skip_serializing_if = "Option::is_none")]
25    pub auth_type: Option<String>,
26    /// Base64 encoded PEM certificate, relevant for certificate auth-type
27    #[serde(rename = "client-cert-data", skip_serializing_if = "Option::is_none")]
28    pub client_cert_data: Option<String>,
29    /// Description of the object
30    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
31    pub description: Option<String>,
32    /// Enable/Disable Event Forwarder [true/false]
33    #[serde(rename = "enable", skip_serializing_if = "Option::is_none")]
34    pub enable: Option<String>,
35    /// 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, next-automatic-rotation, 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, rate-limiting, usage-report, secret-sync]
36    #[serde(rename = "event-types", skip_serializing_if = "Option::is_none")]
37    pub event_types: Option<Vec<String>>,
38    /// Event sources
39    #[serde(rename = "gateways-event-source-locations")]
40    pub gateways_event_source_locations: Vec<String>,
41    /// Items Event sources
42    #[serde(rename = "items-event-source-locations", skip_serializing_if = "Option::is_none")]
43    pub items_event_source_locations: Option<Vec<String>>,
44    /// Set output format to JSON
45    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
46    pub json: Option<bool>,
47    /// Whether to keep previous version [true/false]. If not set, use default according to account settings
48    #[serde(rename = "keep-prev-version", skip_serializing_if = "Option::is_none")]
49    pub keep_prev_version: Option<String>,
50    /// The name of a key that used to encrypt the EventForwarder secret value (if empty, the account default protectionKey key will be used)
51    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
52    pub key: Option<String>,
53    /// EventForwarder name
54    #[serde(rename = "name")]
55    pub name: String,
56    /// New EventForwarder name
57    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
58    pub new_name: Option<String>,
59    /// Password for authentication relevant for user-pass auth-type
60    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
61    pub password: Option<String>,
62    /// Base64 encoded PEM RSA Private Key, relevant for certificate auth-type
63    #[serde(rename = "private-key-data", skip_serializing_if = "Option::is_none")]
64    pub private_key_data: Option<String>,
65    /// Base64 encoded PEM certificate of the Webhook
66    #[serde(rename = "server-certificates", skip_serializing_if = "Option::is_none")]
67    pub server_certificates: Option<String>,
68    /// Targets Event sources
69    #[serde(rename = "targets-event-source-locations", skip_serializing_if = "Option::is_none")]
70    pub targets_event_source_locations: Option<Vec<String>>,
71    /// Authentication token (see `/auth` and `/configure`)
72    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
73    pub token: Option<String>,
74    /// The universal identity token, Required only for universal_identity authentication
75    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
76    pub uid_token: Option<String>,
77    /// Webhook URL
78    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
79    pub url: Option<String>,
80    /// Username for authentication relevant for user-pass auth-type
81    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
82    pub username: Option<String>,
83}
84
85impl EventForwarderUpdateWebhook {
86    /// eventForwarderUpdateWebhook is a command that updates webhook event forwarder
87    pub fn new(gateways_event_source_locations: Vec<String>, name: String) -> EventForwarderUpdateWebhook {
88        EventForwarderUpdateWebhook {
89            auth_methods_event_source_locations: None,
90            auth_token: None,
91            auth_type: None,
92            client_cert_data: None,
93            description: None,
94            enable: None,
95            event_types: None,
96            gateways_event_source_locations,
97            items_event_source_locations: None,
98            json: None,
99            keep_prev_version: None,
100            key: None,
101            name,
102            new_name: None,
103            password: None,
104            private_key_data: None,
105            server_certificates: None,
106            targets_event_source_locations: None,
107            token: None,
108            uid_token: None,
109            url: None,
110            username: None,
111        }
112    }
113}
114