Skip to main content

akeyless_api/models/
encrypt_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 EncryptGpg {
16    /// The display id of the key to use in the encryption process
17    #[serde(rename = "display-id", skip_serializing_if = "Option::is_none")]
18    pub display_id: Option<String>,
19    /// If specified, the plaintext input is assumed to be formatted accordingly. Current supported options: [base64]
20    #[serde(rename = "input-format", skip_serializing_if = "Option::is_none")]
21    pub input_format: Option<String>,
22    /// The item id of the key to use in the encryption process
23    #[serde(rename = "item-id", skip_serializing_if = "Option::is_none")]
24    pub item_id: Option<i64>,
25    /// Set output format to JSON
26    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
27    pub json: Option<bool>,
28    /// The name of the key to use in the encryption process
29    #[serde(rename = "key-name")]
30    pub key_name: String,
31    /// Data to be encrypted
32    #[serde(rename = "plaintext")]
33    pub plaintext: String,
34    /// Authentication token (see `/auth` and `/configure`)
35    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
36    pub token: Option<String>,
37    /// The universal identity token, Required only for universal_identity authentication
38    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
39    pub uid_token: Option<String>,
40}
41
42impl EncryptGpg {
43    pub fn new(key_name: String, plaintext: String) -> EncryptGpg {
44        EncryptGpg {
45            display_id: None,
46            input_format: None,
47            item_id: None,
48            json: None,
49            key_name,
50            plaintext,
51            token: None,
52            uid_token: None,
53        }
54    }
55}
56