Skip to main content

akeyless_api/models/
decrypt.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/// Decrypt : decrypt is a command that decrypts ciphertext into plaintext by using an AES key.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Decrypt {
17    /// Ciphertext to be decrypted in base64 encoded format
18    #[serde(rename = "ciphertext", skip_serializing_if = "Option::is_none")]
19    pub ciphertext: Option<String>,
20    /// The display id of the key to use in the decryption process
21    #[serde(rename = "display-id", skip_serializing_if = "Option::is_none")]
22    pub display_id: Option<String>,
23    /// The encryption context. If this was specified in the encrypt command, it must be specified here or the decryption operation will fail
24    #[serde(rename = "encryption-context", skip_serializing_if = "Option::is_none")]
25    pub encryption_context: Option<std::collections::HashMap<String, String>>,
26    /// The item id of the key to use in the decryption process
27    #[serde(rename = "item-id", skip_serializing_if = "Option::is_none")]
28    pub item_id: Option<i64>,
29    /// Set output format to JSON
30    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
31    pub json: Option<bool>,
32    /// The name of the key to use in the decryption process
33    #[serde(rename = "key-name")]
34    pub key_name: String,
35    /// If specified, the output will be formatted accordingly. options: [base64]
36    #[serde(rename = "output-format", skip_serializing_if = "Option::is_none")]
37    pub output_format: Option<String>,
38    /// Authentication token (see `/auth` and `/configure`)
39    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
40    pub token: Option<String>,
41    /// The universal identity token, Required only for universal_identity authentication
42    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
43    pub uid_token: Option<String>,
44    /// key version (relevant only for classic key)
45    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
46    pub version: Option<i32>,
47}
48
49impl Decrypt {
50    /// decrypt is a command that decrypts ciphertext into plaintext by using an AES key.
51    pub fn new(key_name: String) -> Decrypt {
52        Decrypt {
53            ciphertext: None,
54            display_id: None,
55            encryption_context: None,
56            item_id: None,
57            json: None,
58            key_name,
59            output_format: None,
60            token: None,
61            uid_token: None,
62            version: None,
63        }
64    }
65}
66