Skip to main content

akeyless_api/models/
create_tokenizer.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/// CreateTokenizer : createTokenizer is a command that creates a tokenizer item
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateTokenizer {
17    /// Alphabet to use in regexp vaultless tokenization
18    #[serde(rename = "alphabet", skip_serializing_if = "Option::is_none")]
19    pub alphabet: Option<String>,
20    /// The Decoding output template to use in regexp vaultless tokenization
21    #[serde(rename = "decoding-template", skip_serializing_if = "Option::is_none")]
22    pub decoding_template: Option<String>,
23    /// Protection from accidental deletion of this object [true/false]
24    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
25    pub delete_protection: Option<String>,
26    /// Description of the object
27    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
28    pub description: Option<String>,
29    /// The Encoding output template to use in regexp vaultless tokenization
30    #[serde(rename = "encoding-template", skip_serializing_if = "Option::is_none")]
31    pub encoding_template: Option<String>,
32    /// AES key name to use in vaultless tokenization
33    #[serde(rename = "encryption-key-name", skip_serializing_if = "Option::is_none")]
34    pub encryption_key_name: Option<String>,
35    /// Additional custom fields to associate with the item
36    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
37    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
38    /// Set output format to JSON
39    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
40    pub json: Option<bool>,
41    /// Deprecated - use description
42    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
43    pub metadata: Option<String>,
44    /// Tokenizer name
45    #[serde(rename = "name")]
46    pub name: String,
47    /// Pattern to use in regexp vaultless tokenization
48    #[serde(rename = "pattern", skip_serializing_if = "Option::is_none")]
49    pub pattern: Option<String>,
50    /// List of the tags attached to this key
51    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
52    pub tag: Option<Vec<String>>,
53    /// Which template type this tokenizer is used for [SSN,CreditCard,USPhoneNumber,Email,Regexp]
54    #[serde(rename = "template-type")]
55    pub template_type: String,
56    /// Authentication token (see `/auth` and `/configure`)
57    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
58    pub token: Option<String>,
59    /// Tokenizer type
60    #[serde(rename = "tokenizer-type")]
61    pub tokenizer_type: String,
62    /// The tweak type to use in vaultless tokenization [Supplied, Generated, Internal, Masking]
63    #[serde(rename = "tweak-type", skip_serializing_if = "Option::is_none")]
64    pub tweak_type: Option<String>,
65    /// The universal identity token, Required only for universal_identity authentication
66    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
67    pub uid_token: Option<String>,
68}
69
70impl CreateTokenizer {
71    /// createTokenizer is a command that creates a tokenizer item
72    pub fn new(name: String, template_type: String, tokenizer_type: String) -> CreateTokenizer {
73        CreateTokenizer {
74            alphabet: None,
75            decoding_template: None,
76            delete_protection: None,
77            description: None,
78            encoding_template: None,
79            encryption_key_name: None,
80            item_custom_fields: None,
81            json: None,
82            metadata: None,
83            name,
84            pattern: None,
85            tag: None,
86            template_type,
87            token: None,
88            tokenizer_type,
89            tweak_type: None,
90            uid_token: None,
91        }
92    }
93}
94