Skip to main content

akeyless_api/models/
detokenize.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/// Detokenize : detokenize is a command that decrypts text with a tokenizer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Detokenize {
17    /// Data to be decrypted
18    #[serde(rename = "ciphertext")]
19    pub ciphertext: String,
20    /// Set output format to JSON
21    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
22    pub json: Option<bool>,
23    /// Authentication token (see `/auth` and `/configure`)
24    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
25    pub token: Option<String>,
26    /// The name of the tokenizer to use in the decryption process
27    #[serde(rename = "tokenizer-name")]
28    pub tokenizer_name: String,
29    /// Base64 encoded tweak for vaultless encryption
30    #[serde(rename = "tweak", skip_serializing_if = "Option::is_none")]
31    pub tweak: Option<String>,
32    /// The universal identity token, Required only for universal_identity authentication
33    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
34    pub uid_token: Option<String>,
35}
36
37impl Detokenize {
38    /// detokenize is a command that decrypts text with a tokenizer
39    pub fn new(ciphertext: String, tokenizer_name: String) -> Detokenize {
40        Detokenize {
41            ciphertext,
42            json: None,
43            token: None,
44            tokenizer_name,
45            tweak: None,
46            uid_token: None,
47        }
48    }
49}
50