Skip to main content

akeyless_api/models/
kmip_server_setup.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 KmipServerSetup {
16    /// Server certificate TTL in days
17    #[serde(rename = "certificate-ttl", skip_serializing_if = "Option::is_none")]
18    pub certificate_ttl: Option<i64>,
19    /// Hostname
20    #[serde(rename = "hostname")]
21    pub hostname: String,
22    /// Set output format to JSON
23    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
24    pub json: Option<bool>,
25    /// Root path of KMIP Resources
26    #[serde(rename = "root")]
27    pub root: String,
28    /// Authentication token (see `/auth` and `/configure`)
29    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
30    pub token: Option<String>,
31    /// The universal identity token, Required only for universal_identity authentication
32    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
33    pub uid_token: Option<String>,
34}
35
36impl KmipServerSetup {
37    pub fn new(hostname: String, root: String) -> KmipServerSetup {
38        KmipServerSetup {
39            certificate_ttl: None,
40            hostname,
41            json: None,
42            root,
43            token: None,
44            uid_token: None,
45        }
46    }
47}
48