Skip to main content

akeyless_api/models/
gateway_update_item.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/// GatewayUpdateItem : gatewayUpdateItem is a command that updates classic key
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GatewayUpdateItem {
17    /// List of the new tags that will be attached to this item
18    #[serde(rename = "add-tag", skip_serializing_if = "Option::is_none")]
19    pub add_tag: Option<Vec<String>>,
20    /// API ID to rotate (relevant only for rotator-type=api-key)
21    #[serde(rename = "api-id", skip_serializing_if = "Option::is_none")]
22    pub api_id: Option<String>,
23    /// API key to rotate (relevant only for rotator-type=api-key)
24    #[serde(rename = "api-key", skip_serializing_if = "Option::is_none")]
25    pub api_key: Option<String>,
26    /// ApplicationId (used in azure)
27    #[serde(rename = "app-id", skip_serializing_if = "Option::is_none")]
28    pub app_id: Option<String>,
29    /// Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
30    #[serde(rename = "auto-rotate", skip_serializing_if = "Option::is_none")]
31    pub auto_rotate: Option<String>,
32    /// Secret payload to be sent with rotation request (relevant only for rotator-type=custom)
33    #[serde(rename = "custom-payload", skip_serializing_if = "Option::is_none")]
34    pub custom_payload: Option<String>,
35    /// Protection from accidental deletion of this object [true/false]
36    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
37    pub delete_protection: Option<String>,
38    /// Description of the object
39    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
40    pub description: Option<String>,
41    /// Base64-encoded service account private key text
42    #[serde(rename = "gcp-key", skip_serializing_if = "Option::is_none")]
43    pub gcp_key: Option<String>,
44    /// The email of the gcp service account to rotate
45    #[serde(rename = "gcp-service-account-email", skip_serializing_if = "Option::is_none")]
46    pub gcp_service_account_email: Option<String>,
47    /// The key id of the gcp service account to rotate
48    #[serde(rename = "gcp-service-account-key-id", skip_serializing_if = "Option::is_none")]
49    pub gcp_service_account_key_id: Option<String>,
50    /// Create a new access key without deleting the old key from AWS for backup (relevant only for AWS) [true/false]
51    #[serde(rename = "grace-rotation", skip_serializing_if = "Option::is_none")]
52    pub grace_rotation: Option<String>,
53    /// Set output format to JSON
54    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
55    pub json: Option<bool>,
56    /// Whether to keep previous version [true/false]. (relevant only for --type=rotated-secret). If not set, use default according to account settings
57    #[serde(rename = "keep-prev-version", skip_serializing_if = "Option::is_none")]
58    pub keep_prev_version: Option<String>,
59    /// The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
60    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
61    pub key: Option<String>,
62    /// Item name
63    #[serde(rename = "name")]
64    pub name: String,
65    /// Deprecated - use description
66    #[serde(rename = "new-metadata", skip_serializing_if = "Option::is_none")]
67    pub new_metadata: Option<String>,
68    /// New item name
69    #[serde(rename = "new-name", skip_serializing_if = "Option::is_none")]
70    pub new_name: Option<String>,
71    /// Deprecated
72    #[serde(rename = "new-version", skip_serializing_if = "Option::is_none")]
73    pub new_version: Option<bool>,
74    /// The length of the password to be generated
75    #[serde(rename = "password-length", skip_serializing_if = "Option::is_none")]
76    pub password_length: Option<String>,
77    /// List of the existent tags that will be removed from this item
78    #[serde(rename = "rm-tag", skip_serializing_if = "Option::is_none")]
79    pub rm_tag: Option<Vec<String>>,
80    /// rotated-username password (relevant only for rotator-type=password)
81    #[serde(rename = "rotated-password", skip_serializing_if = "Option::is_none")]
82    pub rotated_password: Option<String>,
83    /// username to be rotated, if selected \\\"use-self-creds\\\" at rotator-creds-type, this username will try to rotate it's own password, if \\\"use-target-creds\\\" is selected, target credentials will be use to rotate the rotated-password (relevant only for rotator-type=password)
84    #[serde(rename = "rotated-username", skip_serializing_if = "Option::is_none")]
85    pub rotated_username: Option<String>,
86    /// How many days before the rotation of the item would you like to be notified
87    #[serde(rename = "rotation-event-in", skip_serializing_if = "Option::is_none")]
88    pub rotation_event_in: Option<Vec<String>>,
89    /// The Rotation Hour
90    #[serde(rename = "rotation-hour", skip_serializing_if = "Option::is_none")]
91    pub rotation_hour: Option<i32>,
92    /// The number of days to wait between every automatic key rotation (1-365)
93    #[serde(rename = "rotation-interval", skip_serializing_if = "Option::is_none")]
94    pub rotation_interval: Option<String>,
95    /// The rotation credentials type
96    #[serde(rename = "rotator-creds-type", skip_serializing_if = "Option::is_none")]
97    pub rotator_creds_type: Option<String>,
98    /// Authentication token (see `/auth` and `/configure`)
99    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
100    pub token: Option<String>,
101    /// Item type
102    #[serde(rename = "type")]
103    pub r#type: String,
104    /// The universal identity token, Required only for universal_identity authentication
105    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
106    pub uid_token: Option<String>,
107}
108
109impl GatewayUpdateItem {
110    /// gatewayUpdateItem is a command that updates classic key
111    pub fn new(name: String, r#type: String) -> GatewayUpdateItem {
112        GatewayUpdateItem {
113            add_tag: None,
114            api_id: None,
115            api_key: None,
116            app_id: None,
117            auto_rotate: None,
118            custom_payload: None,
119            delete_protection: None,
120            description: None,
121            gcp_key: None,
122            gcp_service_account_email: None,
123            gcp_service_account_key_id: None,
124            grace_rotation: None,
125            json: None,
126            keep_prev_version: None,
127            key: None,
128            name,
129            new_metadata: None,
130            new_name: None,
131            new_version: None,
132            password_length: None,
133            rm_tag: None,
134            rotated_password: None,
135            rotated_username: None,
136            rotation_event_in: None,
137            rotation_hour: None,
138            rotation_interval: None,
139            rotator_creds_type: None,
140            token: None,
141            r#type,
142            uid_token: None,
143        }
144    }
145}
146