Skip to main content

akeyless_api/models/
hmac.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 Hmac {
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    /// Hash function [sha-256,sha-512]
20    #[serde(rename = "hash-function", skip_serializing_if = "Option::is_none")]
21    pub hash_function: Option<String>,
22    /// Select default assumed format for any plaintext input. Currently supported options: [base64]
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 encryption 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 encryption process
32    #[serde(rename = "key-name")]
33    pub key_name: String,
34    /// Data to perform hmac on
35    #[serde(rename = "plaintext", skip_serializing_if = "Option::is_none")]
36    pub plaintext: Option<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}
44
45impl Hmac {
46    pub fn new(key_name: String) -> Hmac {
47        Hmac {
48            display_id: None,
49            hash_function: None,
50            input_format: None,
51            item_id: None,
52            json: None,
53            key_name,
54            plaintext: None,
55            token: None,
56            uid_token: None,
57        }
58    }
59}
60