Skip to main content

akeyless_api/models/
update_certificate_value.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 UpdateCertificateValue {
16    /// List of the new tags that will be attached to this item
17    #[serde(rename = "add-tag", skip_serializing_if = "Option::is_none")]
18    pub add_tag: Option<Vec<String>>,
19    /// Content of the certificate in a Base64 format.
20    #[serde(rename = "certificate-data", skip_serializing_if = "Option::is_none")]
21    pub certificate_data: Option<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    /// How many days before the expiration of the certificate would you like to be notified.
29    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
30    pub expiration_event_in: Option<Vec<String>>,
31    /// CertificateFormat of the certificate and private key, possible values: cer,crt,pem,pfx,p12. Required when passing inline certificate content with --certificate-data or --key-data, otherwise format is derived from the file extension.
32    #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
33    pub format: Option<String>,
34    /// Set output format to JSON
35    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
36    pub json: Option<bool>,
37    /// Whether to keep previous version [true/false]. If not set, use default according to account settings
38    #[serde(rename = "keep-prev-version", skip_serializing_if = "Option::is_none")]
39    pub keep_prev_version: Option<String>,
40    /// The name of a key to use to encrypt the certificate's key (if empty, the account default protectionKey key will be used)
41    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
42    pub key: Option<String>,
43    /// Content of the certificate's private key in a Base64 format.
44    #[serde(rename = "key-data", skip_serializing_if = "Option::is_none")]
45    pub key_data: Option<String>,
46    /// Deprecated - use description
47    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
48    pub metadata: Option<String>,
49    /// Certificate name
50    #[serde(rename = "name")]
51    pub name: String,
52    /// List of the existent tags that will be removed from this item
53    #[serde(rename = "rm-tag", skip_serializing_if = "Option::is_none")]
54    pub rm_tag: Option<Vec<String>>,
55    /// Authentication token (see `/auth` and `/configure`)
56    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
57    pub token: Option<String>,
58    /// The universal identity token, Required only for universal_identity authentication
59    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
60    pub uid_token: Option<String>,
61}
62
63impl UpdateCertificateValue {
64    pub fn new(name: String) -> UpdateCertificateValue {
65        UpdateCertificateValue {
66            add_tag: None,
67            certificate_data: None,
68            delete_protection: None,
69            description: None,
70            expiration_event_in: None,
71            format: None,
72            json: None,
73            keep_prev_version: None,
74            key: None,
75            key_data: None,
76            metadata: None,
77            name,
78            rm_tag: None,
79            token: None,
80            uid_token: None,
81        }
82    }
83}
84