Skip to main content

akeyless_api/models/
dynamic_secret_create_custom.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 DynamicSecretCreateCustom {
16    /// Define rotation interval in days
17    #[serde(rename = "admin-rotation-interval-days", skip_serializing_if = "Option::is_none")]
18    pub admin_rotation_interval_days: Option<i64>,
19    /// URL of an endpoint that implements /sync/create method, for example https://webhook.example.com/sync/create
20    #[serde(rename = "create-sync-url")]
21    pub create_sync_url: String,
22    /// Protection from accidental deletion of this object [true/false]
23    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
24    pub delete_protection: Option<String>,
25    /// Description of the object
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    /// Should admin credentials be rotated
29    #[serde(rename = "enable-admin-rotation", skip_serializing_if = "Option::is_none")]
30    pub enable_admin_rotation: Option<bool>,
31    /// Additional custom fields to associate with the item
32    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
33    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
34    /// Set output format to JSON
35    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
36    pub json: Option<bool>,
37    /// Dynamic secret name
38    #[serde(rename = "name")]
39    pub name: String,
40    /// Secret payload to be sent with each create/revoke webhook request
41    #[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
42    pub payload: Option<String>,
43    /// Dynamic producer encryption key
44    #[serde(rename = "producer-encryption-key-name", skip_serializing_if = "Option::is_none")]
45    pub producer_encryption_key_name: Option<String>,
46    /// URL of an endpoint that implements /sync/revoke method, for example https://webhook.example.com/sync/revoke
47    #[serde(rename = "revoke-sync-url")]
48    pub revoke_sync_url: String,
49    /// URL of an endpoint that implements /sync/rotate method, for example https://webhook.example.com/sync/rotate
50    #[serde(rename = "rotate-sync-url", skip_serializing_if = "Option::is_none")]
51    pub rotate_sync_url: Option<String>,
52    /// Add tags attached to this object
53    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
54    pub tags: Option<Vec<String>>,
55    /// Maximum allowed time in seconds for the webhook to return the results
56    #[serde(rename = "timeout-sec", skip_serializing_if = "Option::is_none")]
57    pub timeout_sec: Option<i64>,
58    /// Authentication token (see `/auth` and `/configure`)
59    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
60    pub token: Option<String>,
61    /// The universal identity token, Required only for universal_identity authentication
62    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
63    pub uid_token: Option<String>,
64    /// User TTL
65    #[serde(rename = "user-ttl", skip_serializing_if = "Option::is_none")]
66    pub user_ttl: Option<String>,
67}
68
69impl DynamicSecretCreateCustom {
70    pub fn new(create_sync_url: String, name: String, revoke_sync_url: String) -> DynamicSecretCreateCustom {
71        DynamicSecretCreateCustom {
72            admin_rotation_interval_days: None,
73            create_sync_url,
74            delete_protection: None,
75            description: None,
76            enable_admin_rotation: None,
77            item_custom_fields: None,
78            json: None,
79            name,
80            payload: None,
81            producer_encryption_key_name: None,
82            revoke_sync_url,
83            rotate_sync_url: None,
84            tags: None,
85            timeout_sec: None,
86            token: None,
87            uid_token: None,
88            user_ttl: None,
89        }
90    }
91}
92