Skip to main content

akeyless_api/models/
update_rotation_settings.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/// UpdateRotationSettings : updateRotationSettings is a command that updates rotations settings of an existing key
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UpdateRotationSettings {
17    /// Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation
18    #[serde(rename = "auto-rotate")]
19    pub auto_rotate: bool,
20    /// Set output format to JSON
21    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
22    pub json: Option<bool>,
23    /// Key name
24    #[serde(rename = "name")]
25    pub name: String,
26    /// How many days before the rotation of the item would you like to be notified
27    #[serde(rename = "rotation-event-in", skip_serializing_if = "Option::is_none")]
28    pub rotation_event_in: Option<Vec<String>>,
29    /// The number of days to wait between every automatic key rotation (7-365)
30    #[serde(rename = "rotation-interval", skip_serializing_if = "Option::is_none")]
31    pub rotation_interval: Option<i64>,
32    /// Authentication token (see `/auth` and `/configure`)
33    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
34    pub token: Option<String>,
35    /// The universal identity token, Required only for universal_identity authentication
36    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
37    pub uid_token: Option<String>,
38}
39
40impl UpdateRotationSettings {
41    /// updateRotationSettings is a command that updates rotations settings of an existing key
42    pub fn new(auto_rotate: bool, name: String) -> UpdateRotationSettings {
43        UpdateRotationSettings {
44            auto_rotate,
45            json: None,
46            name,
47            rotation_event_in: None,
48            rotation_interval: None,
49            token: None,
50            uid_token: None,
51        }
52    }
53}
54