Skip to main content

akeyless_api/models/
dynamic_secret_update_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 DynamicSecretUpdateCustom {
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    /// Dynamic secret name
41    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
42    pub new_name: Option<String>,
43    /// Secret payload to be sent with each create/revoke webhook request
44    #[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
45    pub payload: Option<String>,
46    /// Dynamic producer encryption key
47    #[serde(rename = "producer-encryption-key-name", skip_serializing_if = "Option::is_none")]
48    pub producer_encryption_key_name: Option<String>,
49    /// URL of an endpoint that implements /sync/revoke method, for example https://webhook.example.com/sync/revoke
50    #[serde(rename = "revoke-sync-url")]
51    pub revoke_sync_url: String,
52    /// URL of an endpoint that implements /sync/rotate method, for example https://webhook.example.com/sync/rotate
53    #[serde(rename = "rotate-sync-url", skip_serializing_if = "Option::is_none")]
54    pub rotate_sync_url: Option<String>,
55    /// Add tags attached to this object
56    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
57    pub tags: Option<Vec<String>>,
58    /// Maximum allowed time in seconds for the webhook to return the results
59    #[serde(rename = "timeout-sec", skip_serializing_if = "Option::is_none")]
60    pub timeout_sec: Option<i64>,
61    /// Authentication token (see `/auth` and `/configure`)
62    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
63    pub token: Option<String>,
64    /// The universal identity token, Required only for universal_identity authentication
65    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
66    pub uid_token: Option<String>,
67    /// User TTL
68    #[serde(rename = "user-ttl", skip_serializing_if = "Option::is_none")]
69    pub user_ttl: Option<String>,
70}
71
72impl DynamicSecretUpdateCustom {
73    pub fn new(create_sync_url: String, name: String, revoke_sync_url: String) -> DynamicSecretUpdateCustom {
74        DynamicSecretUpdateCustom {
75            admin_rotation_interval_days: None,
76            create_sync_url,
77            delete_protection: None,
78            description: None,
79            enable_admin_rotation: None,
80            item_custom_fields: None,
81            json: None,
82            name,
83            new_name: None,
84            payload: None,
85            producer_encryption_key_name: None,
86            revoke_sync_url,
87            rotate_sync_url: None,
88            tags: None,
89            timeout_sec: None,
90            token: None,
91            uid_token: None,
92            user_ttl: None,
93        }
94    }
95}
96