Skip to main content

akeyless_api/models/
decrypt_gpg.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 DecryptGpg {
16    /// Ciphertext to be decrypted
17    #[serde(rename = "ciphertext")]
18    pub ciphertext: String,
19    /// The display id of the key to use in the decryption process
20    #[serde(rename = "display-id", skip_serializing_if = "Option::is_none")]
21    pub display_id: Option<String>,
22    /// Select default assumed format for the ciphertext. Currently supported options: [base64,raw]
23    #[serde(rename = "input-format", skip_serializing_if = "Option::is_none")]
24    pub input_format: Option<String>,
25    /// The item id of the key to use in the decryption process
26    #[serde(rename = "item-id", skip_serializing_if = "Option::is_none")]
27    pub item_id: Option<i64>,
28    /// Set output format to JSON
29    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
30    pub json: Option<bool>,
31    /// The name of the key to use in the decryption process
32    #[serde(rename = "key-name")]
33    pub key_name: String,
34    /// If specified, the output will be formatted accordingly. options: [base64]
35    #[serde(rename = "output-format", skip_serializing_if = "Option::is_none")]
36    pub output_format: Option<String>,
37    /// Passphrase that was used to generate the key
38    #[serde(rename = "passphrase", skip_serializing_if = "Option::is_none")]
39    pub passphrase: Option<String>,
40    /// Authentication token (see `/auth` and `/configure`)
41    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
42    pub token: Option<String>,
43    /// The universal identity token, Required only for universal_identity authentication
44    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
45    pub uid_token: Option<String>,
46}
47
48impl DecryptGpg {
49    pub fn new(ciphertext: String, key_name: String) -> DecryptGpg {
50        DecryptGpg {
51            ciphertext,
52            display_id: None,
53            input_format: None,
54            item_id: None,
55            json: None,
56            key_name,
57            output_format: None,
58            passphrase: None,
59            token: None,
60            uid_token: None,
61        }
62    }
63}
64