Skip to main content

akeyless_api/models/
event_forwarder_create_slack.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/// EventForwarderCreateSlack : eventForwarderCreateSlack is a command that creates slack event forwarder
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EventForwarderCreateSlack {
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    /// Description of the object
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// 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]
24    #[serde(rename = "event-types", skip_serializing_if = "Option::is_none")]
25    pub event_types: Option<Vec<String>>,
26    /// Rate of periodic runner repetition in hours
27    #[serde(rename = "every", skip_serializing_if = "Option::is_none")]
28    pub every: Option<String>,
29    /// Event sources
30    #[serde(rename = "gateways-event-source-locations")]
31    pub gateways_event_source_locations: Vec<String>,
32    /// Items Event sources
33    #[serde(rename = "items-event-source-locations", skip_serializing_if = "Option::is_none")]
34    pub items_event_source_locations: Option<Vec<String>>,
35    /// Set output format to JSON
36    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
37    pub json: Option<bool>,
38    /// The name of a key that used to encrypt the EventForwarder secret value (if empty, the account default protectionKey key will be used)
39    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
40    pub key: Option<String>,
41    /// EventForwarder name
42    #[serde(rename = "name")]
43    pub name: String,
44    #[serde(rename = "runner-type")]
45    pub runner_type: String,
46    /// Targets Event sources
47    #[serde(rename = "targets-event-source-locations", skip_serializing_if = "Option::is_none")]
48    pub targets_event_source_locations: Option<Vec<String>>,
49    /// Authentication token (see `/auth` and `/configure`)
50    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
51    pub token: Option<String>,
52    /// The universal identity token, Required only for universal_identity authentication
53    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
54    pub uid_token: Option<String>,
55    /// Slack Webhook URL
56    #[serde(rename = "url")]
57    pub url: String,
58}
59
60impl EventForwarderCreateSlack {
61    /// eventForwarderCreateSlack is a command that creates slack event forwarder
62    pub fn new(gateways_event_source_locations: Vec<String>, name: String, runner_type: String, url: String) -> EventForwarderCreateSlack {
63        EventForwarderCreateSlack {
64            auth_methods_event_source_locations: None,
65            description: None,
66            event_types: None,
67            every: None,
68            gateways_event_source_locations,
69            items_event_source_locations: None,
70            json: None,
71            key: None,
72            name,
73            runner_type,
74            targets_event_source_locations: None,
75            token: None,
76            uid_token: None,
77            url,
78        }
79    }
80}
81