Skip to main content

akeyless_api/models/
sign_data_with_classic_key.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 SignDataWithClassicKey {
16    /// Data
17    #[serde(rename = "data")]
18    pub data: String,
19    /// The name of the key to use in the sign data process
20    #[serde(rename = "display-id")]
21    pub display_id: String,
22    /// Defines whether the data should be hashed as part of the signing. If true, the data will not be hashed
23    #[serde(rename = "hashed", skip_serializing_if = "Option::is_none")]
24    pub hashed: Option<bool>,
25    /// HashingMethod
26    #[serde(rename = "hashing-method", skip_serializing_if = "Option::is_none")]
27    pub hashing_method: Option<String>,
28    /// Retrieve the Secret value without checking the Gateway's cache [true/false]. This flag is only relevant when using the RestAPI
29    #[serde(rename = "ignore-cache", skip_serializing_if = "Option::is_none")]
30    pub ignore_cache: Option<String>,
31    /// Set output format to JSON
32    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
33    pub json: Option<bool>,
34    /// ClassicKey name
35    #[serde(rename = "name")]
36    pub name: String,
37    /// Authentication token (see `/auth` and `/configure`)
38    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
39    pub token: Option<String>,
40    /// The universal identity token, Required only for universal_identity authentication
41    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
42    pub uid_token: Option<String>,
43    /// classic key version
44    #[serde(rename = "version")]
45    pub version: i32,
46}
47
48impl SignDataWithClassicKey {
49    pub fn new(data: String, display_id: String, name: String, version: i32) -> SignDataWithClassicKey {
50        SignDataWithClassicKey {
51            data,
52            display_id,
53            hashed: None,
54            hashing_method: None,
55            ignore_cache: None,
56            json: None,
57            name,
58            token: None,
59            uid_token: None,
60            version,
61        }
62    }
63}
64