Skip to main content

akeyless_api/models/
rotated_secret_create_open_ai.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/// RotatedSecretCreateOpenAi : rotatedSecretCreateOpenAI is a command that creates a rotated secret for an OpenAI target by rotating the admin API key configured on the target.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RotatedSecretCreateOpenAi {
17    /// Admin API key value to rotate (relevant only for rotator-type=api-key)
18    #[serde(rename = "api-key", skip_serializing_if = "Option::is_none")]
19    pub api_key: Option<String>,
20    /// Admin API key ID to rotate (relevant only for rotator-type=api-key)
21    #[serde(rename = "api-key-id", skip_serializing_if = "Option::is_none")]
22    pub api_key_id: Option<String>,
23    /// The credentials to connect with use-user-creds/use-target-creds
24    #[serde(rename = "authentication-credentials", skip_serializing_if = "Option::is_none")]
25    pub authentication_credentials: Option<String>,
26    /// Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
27    #[serde(rename = "auto-rotate", skip_serializing_if = "Option::is_none")]
28    pub auto_rotate: Option<String>,
29    /// Protection from accidental deletion of this object [true/false]
30    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
31    pub delete_protection: Option<String>,
32    /// Description of the object
33    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
34    pub description: Option<String>,
35    /// Additional custom fields to associate with the item
36    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
37    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
38    /// Set output format to JSON
39    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
40    pub json: Option<bool>,
41    /// The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
42    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
43    pub key: Option<String>,
44    /// Set the maximum number of versions, limited by the account settings defaults.
45    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
46    pub max_versions: Option<String>,
47    /// Rotated secret name
48    #[serde(rename = "name")]
49    pub name: String,
50    /// The length of the password to be generated
51    #[serde(rename = "password-length", skip_serializing_if = "Option::is_none")]
52    pub password_length: Option<String>,
53    /// How many days before the rotation of the item would you like to be notified
54    #[serde(rename = "rotation-event-in", skip_serializing_if = "Option::is_none")]
55    pub rotation_event_in: Option<Vec<String>>,
56    /// The Hour of the rotation in UTC
57    #[serde(rename = "rotation-hour", skip_serializing_if = "Option::is_none")]
58    pub rotation_hour: Option<i32>,
59    /// The number of days to wait between every automatic key rotation (1-365)
60    #[serde(rename = "rotation-interval", skip_serializing_if = "Option::is_none")]
61    pub rotation_interval: Option<String>,
62    /// The rotator type. options: [target/api-key]
63    #[serde(rename = "rotator-type")]
64    pub rotator_type: String,
65    /// Add tags attached to this object
66    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
67    pub tags: Option<Vec<String>>,
68    /// The target name to associate
69    #[serde(rename = "target-name")]
70    pub target_name: String,
71    /// Authentication token (see `/auth` and `/configure`)
72    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
73    pub token: Option<String>,
74    /// The universal identity token, Required only for universal_identity authentication
75    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
76    pub uid_token: Option<String>,
77}
78
79impl RotatedSecretCreateOpenAi {
80    /// rotatedSecretCreateOpenAI is a command that creates a rotated secret for an OpenAI target by rotating the admin API key configured on the target.
81    pub fn new(name: String, rotator_type: String, target_name: String) -> RotatedSecretCreateOpenAi {
82        RotatedSecretCreateOpenAi {
83            api_key: None,
84            api_key_id: None,
85            authentication_credentials: None,
86            auto_rotate: None,
87            delete_protection: None,
88            description: None,
89            item_custom_fields: None,
90            json: None,
91            key: None,
92            max_versions: None,
93            name,
94            password_length: None,
95            rotation_event_in: None,
96            rotation_hour: None,
97            rotation_interval: None,
98            rotator_type,
99            tags: None,
100            target_name,
101            token: None,
102            uid_token: None,
103        }
104    }
105}
106