Skip to main content

akeyless_api/models/
generate_ca.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/// GenerateCa : GenerateCA is a command that creates a new PKI CA and Intermediate issuers
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GenerateCa {
17    #[serde(rename = "alg", skip_serializing_if = "Option::is_none")]
18    pub alg: Option<String>,
19    /// A list of the allowed domains that clients can request to be included in the certificate (in a comma-delimited list)
20    #[serde(rename = "allowed-domains")]
21    pub allowed_domains: 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    /// A comma sepereted list of extended key usage for the intermediate (serverauth / clientauth / codesigning)
26    #[serde(rename = "extended-key-usage", skip_serializing_if = "Option::is_none")]
27    pub extended_key_usage: Option<String>,
28    /// Set output format to JSON
29    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
30    pub json: Option<bool>,
31    #[serde(rename = "key-type", skip_serializing_if = "Option::is_none")]
32    pub key_type: Option<String>,
33    /// The maximum number of intermediate certificates that can appear in a certification path
34    #[serde(rename = "max-path-len", skip_serializing_if = "Option::is_none")]
35    pub max_path_len: Option<i64>,
36    /// PKI chain name
37    #[serde(rename = "pki-chain-name")]
38    pub pki_chain_name: String,
39    /// The name of a key that used to encrypt the secrets values (if empty, the account default protectionKey key will be used)
40    #[serde(rename = "protection-key-name", skip_serializing_if = "Option::is_none")]
41    pub protection_key_name: Option<String>,
42    /// The number of fragments that the item will be split into
43    #[serde(rename = "split-level", skip_serializing_if = "Option::is_none")]
44    pub split_level: Option<i64>,
45    /// Authentication token (see `/auth` and `/configure`)
46    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
47    pub token: Option<String>,
48    /// The maximum requested Time To Live for issued certificate by default in seconds, supported formats are s,m,h,d
49    #[serde(rename = "ttl")]
50    pub ttl: String,
51    /// The universal identity token, Required only for universal_identity authentication
52    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
53    pub uid_token: Option<String>,
54}
55
56impl GenerateCa {
57    /// GenerateCA is a command that creates a new PKI CA and Intermediate issuers
58    pub fn new(allowed_domains: String, pki_chain_name: String, ttl: String) -> GenerateCa {
59        GenerateCa {
60            alg: None,
61            allowed_domains,
62            delete_protection: None,
63            extended_key_usage: None,
64            json: None,
65            key_type: None,
66            max_path_len: None,
67            pki_chain_name,
68            protection_key_name: None,
69            split_level: None,
70            token: None,
71            ttl,
72            uid_token: None,
73        }
74    }
75}
76