Skip to main content

akeyless_api/models/
upload_rsa.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 UploadRsa {
16    /// Key type. options: [RSA1024, RSA2048, RSA3072, RSA4096]
17    #[serde(rename = "alg")]
18    pub alg: String,
19    /// Certificate in a PEM format.
20    #[serde(rename = "cert-file-data", skip_serializing_if = "Option::is_none")]
21    pub cert_file_data: Option<String>,
22    #[serde(rename = "certificate-format", skip_serializing_if = "Option::is_none")]
23    pub certificate_format: Option<String>,
24    /// The customer fragment ID that will be used to split the key (if empty, the key will be created independently of a customer fragment)
25    #[serde(rename = "customer-frg-id", skip_serializing_if = "Option::is_none")]
26    pub customer_frg_id: Option<String>,
27    /// Protection from accidental deletion of this object [true/false]
28    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
29    pub delete_protection: Option<String>,
30    /// Description of the object
31    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
32    pub description: Option<String>,
33    /// How many days before the expiration of the certificate would you like to be notified.
34    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
35    pub expiration_event_in: Option<Vec<String>>,
36    /// Additional custom fields to associate with the item
37    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
38    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
39    /// Set output format to JSON
40    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
41    pub json: Option<bool>,
42    /// Deprecated - use description
43    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
44    pub metadata: Option<String>,
45    /// Name of key to be created
46    #[serde(rename = "name")]
47    pub name: String,
48    /// When the overwrite flag is set, this command will only update an existing key [true/false]
49    #[serde(rename = "overwrite", skip_serializing_if = "Option::is_none")]
50    pub overwrite: Option<String>,
51    /// RSA private key data, base64 encoded
52    #[serde(rename = "rsa-file-data", skip_serializing_if = "Option::is_none")]
53    pub rsa_file_data: Option<String>,
54    /// The number of fragments that the item will be split into
55    #[serde(rename = "split-level", skip_serializing_if = "Option::is_none")]
56    pub split_level: Option<i64>,
57    /// List of the tags attached to this key
58    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
59    pub tag: Option<Vec<String>>,
60    /// Authentication token (see `/auth` and `/configure`)
61    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
62    pub token: Option<String>,
63    /// The universal identity token, Required only for universal_identity authentication
64    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
65    pub uid_token: Option<String>,
66}
67
68impl UploadRsa {
69    pub fn new(alg: String, name: String) -> UploadRsa {
70        UploadRsa {
71            alg,
72            cert_file_data: None,
73            certificate_format: None,
74            customer_frg_id: None,
75            delete_protection: None,
76            description: None,
77            expiration_event_in: None,
78            item_custom_fields: None,
79            json: None,
80            metadata: None,
81            name,
82            overwrite: None,
83            rsa_file_data: None,
84            split_level: None,
85            tag: None,
86            token: None,
87            uid_token: None,
88        }
89    }
90}
91