-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmodel_create_tokenizer.go
657 lines (563 loc) · 17.6 KB
/
model_create_tokenizer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
/*
* Akeyless API
*
* The purpose of this application is to provide access to Akeyless API.
*
* API version: 2.0
* Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package akeyless
import (
"encoding/json"
)
// CreateTokenizer createTokenizer is a command that creates a tokenizer item
type CreateTokenizer struct {
// Alphabet to use in regexp vaultless tokenization
Alphabet *string `json:"alphabet,omitempty"`
// The Decoding output template to use in regexp vaultless tokenization
DecodingTemplate *string `json:"decoding-template,omitempty"`
// Protection from accidental deletion of this object [true/false]
DeleteProtection *string `json:"delete_protection,omitempty"`
// Description of the object
Description *string `json:"description,omitempty"`
// The Encoding output template to use in regexp vaultless tokenization
EncodingTemplate *string `json:"encoding-template,omitempty"`
// AES key name to use in vaultless tokenization
EncryptionKeyName *string `json:"encryption-key-name,omitempty"`
// Set output format to JSON
Json *bool `json:"json,omitempty"`
// Deprecated - use description
Metadata *string `json:"metadata,omitempty"`
// Tokenizer name
Name string `json:"name"`
// Pattern to use in regexp vaultless tokenization
Pattern *string `json:"pattern,omitempty"`
// List of the tags attached to this key
Tag *[]string `json:"tag,omitempty"`
// Which template type this tokenizer is used for [SSN,CreditCard,USPhoneNumber,Email,Regexp]
TemplateType string `json:"template-type"`
// Authentication token (see `/auth` and `/configure`)
Token *string `json:"token,omitempty"`
// Tokenizer type
TokenizerType string `json:"tokenizer-type"`
// The tweak type to use in vaultless tokenization [Supplied, Generated, Internal, Masking]
TweakType *string `json:"tweak-type,omitempty"`
// The universal identity token, Required only for universal_identity authentication
UidToken *string `json:"uid-token,omitempty"`
}
// NewCreateTokenizer instantiates a new CreateTokenizer object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCreateTokenizer(name string, templateType string, tokenizerType string, ) *CreateTokenizer {
this := CreateTokenizer{}
var json bool = false
this.Json = &json
this.Name = name
this.TemplateType = templateType
this.TokenizerType = tokenizerType
return &this
}
// NewCreateTokenizerWithDefaults instantiates a new CreateTokenizer object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCreateTokenizerWithDefaults() *CreateTokenizer {
this := CreateTokenizer{}
var json bool = false
this.Json = &json
var tokenizerType string = "vaultless"
this.TokenizerType = tokenizerType
return &this
}
// GetAlphabet returns the Alphabet field value if set, zero value otherwise.
func (o *CreateTokenizer) GetAlphabet() string {
if o == nil || o.Alphabet == nil {
var ret string
return ret
}
return *o.Alphabet
}
// GetAlphabetOk returns a tuple with the Alphabet field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetAlphabetOk() (*string, bool) {
if o == nil || o.Alphabet == nil {
return nil, false
}
return o.Alphabet, true
}
// HasAlphabet returns a boolean if a field has been set.
func (o *CreateTokenizer) HasAlphabet() bool {
if o != nil && o.Alphabet != nil {
return true
}
return false
}
// SetAlphabet gets a reference to the given string and assigns it to the Alphabet field.
func (o *CreateTokenizer) SetAlphabet(v string) {
o.Alphabet = &v
}
// GetDecodingTemplate returns the DecodingTemplate field value if set, zero value otherwise.
func (o *CreateTokenizer) GetDecodingTemplate() string {
if o == nil || o.DecodingTemplate == nil {
var ret string
return ret
}
return *o.DecodingTemplate
}
// GetDecodingTemplateOk returns a tuple with the DecodingTemplate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetDecodingTemplateOk() (*string, bool) {
if o == nil || o.DecodingTemplate == nil {
return nil, false
}
return o.DecodingTemplate, true
}
// HasDecodingTemplate returns a boolean if a field has been set.
func (o *CreateTokenizer) HasDecodingTemplate() bool {
if o != nil && o.DecodingTemplate != nil {
return true
}
return false
}
// SetDecodingTemplate gets a reference to the given string and assigns it to the DecodingTemplate field.
func (o *CreateTokenizer) SetDecodingTemplate(v string) {
o.DecodingTemplate = &v
}
// GetDeleteProtection returns the DeleteProtection field value if set, zero value otherwise.
func (o *CreateTokenizer) GetDeleteProtection() string {
if o == nil || o.DeleteProtection == nil {
var ret string
return ret
}
return *o.DeleteProtection
}
// GetDeleteProtectionOk returns a tuple with the DeleteProtection field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetDeleteProtectionOk() (*string, bool) {
if o == nil || o.DeleteProtection == nil {
return nil, false
}
return o.DeleteProtection, true
}
// HasDeleteProtection returns a boolean if a field has been set.
func (o *CreateTokenizer) HasDeleteProtection() bool {
if o != nil && o.DeleteProtection != nil {
return true
}
return false
}
// SetDeleteProtection gets a reference to the given string and assigns it to the DeleteProtection field.
func (o *CreateTokenizer) SetDeleteProtection(v string) {
o.DeleteProtection = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateTokenizer) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateTokenizer) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateTokenizer) SetDescription(v string) {
o.Description = &v
}
// GetEncodingTemplate returns the EncodingTemplate field value if set, zero value otherwise.
func (o *CreateTokenizer) GetEncodingTemplate() string {
if o == nil || o.EncodingTemplate == nil {
var ret string
return ret
}
return *o.EncodingTemplate
}
// GetEncodingTemplateOk returns a tuple with the EncodingTemplate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetEncodingTemplateOk() (*string, bool) {
if o == nil || o.EncodingTemplate == nil {
return nil, false
}
return o.EncodingTemplate, true
}
// HasEncodingTemplate returns a boolean if a field has been set.
func (o *CreateTokenizer) HasEncodingTemplate() bool {
if o != nil && o.EncodingTemplate != nil {
return true
}
return false
}
// SetEncodingTemplate gets a reference to the given string and assigns it to the EncodingTemplate field.
func (o *CreateTokenizer) SetEncodingTemplate(v string) {
o.EncodingTemplate = &v
}
// GetEncryptionKeyName returns the EncryptionKeyName field value if set, zero value otherwise.
func (o *CreateTokenizer) GetEncryptionKeyName() string {
if o == nil || o.EncryptionKeyName == nil {
var ret string
return ret
}
return *o.EncryptionKeyName
}
// GetEncryptionKeyNameOk returns a tuple with the EncryptionKeyName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetEncryptionKeyNameOk() (*string, bool) {
if o == nil || o.EncryptionKeyName == nil {
return nil, false
}
return o.EncryptionKeyName, true
}
// HasEncryptionKeyName returns a boolean if a field has been set.
func (o *CreateTokenizer) HasEncryptionKeyName() bool {
if o != nil && o.EncryptionKeyName != nil {
return true
}
return false
}
// SetEncryptionKeyName gets a reference to the given string and assigns it to the EncryptionKeyName field.
func (o *CreateTokenizer) SetEncryptionKeyName(v string) {
o.EncryptionKeyName = &v
}
// GetJson returns the Json field value if set, zero value otherwise.
func (o *CreateTokenizer) GetJson() bool {
if o == nil || o.Json == nil {
var ret bool
return ret
}
return *o.Json
}
// GetJsonOk returns a tuple with the Json field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetJsonOk() (*bool, bool) {
if o == nil || o.Json == nil {
return nil, false
}
return o.Json, true
}
// HasJson returns a boolean if a field has been set.
func (o *CreateTokenizer) HasJson() bool {
if o != nil && o.Json != nil {
return true
}
return false
}
// SetJson gets a reference to the given bool and assigns it to the Json field.
func (o *CreateTokenizer) SetJson(v bool) {
o.Json = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *CreateTokenizer) GetMetadata() string {
if o == nil || o.Metadata == nil {
var ret string
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetMetadataOk() (*string, bool) {
if o == nil || o.Metadata == nil {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *CreateTokenizer) HasMetadata() bool {
if o != nil && o.Metadata != nil {
return true
}
return false
}
// SetMetadata gets a reference to the given string and assigns it to the Metadata field.
func (o *CreateTokenizer) SetMetadata(v string) {
o.Metadata = &v
}
// GetName returns the Name field value
func (o *CreateTokenizer) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *CreateTokenizer) SetName(v string) {
o.Name = v
}
// GetPattern returns the Pattern field value if set, zero value otherwise.
func (o *CreateTokenizer) GetPattern() string {
if o == nil || o.Pattern == nil {
var ret string
return ret
}
return *o.Pattern
}
// GetPatternOk returns a tuple with the Pattern field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetPatternOk() (*string, bool) {
if o == nil || o.Pattern == nil {
return nil, false
}
return o.Pattern, true
}
// HasPattern returns a boolean if a field has been set.
func (o *CreateTokenizer) HasPattern() bool {
if o != nil && o.Pattern != nil {
return true
}
return false
}
// SetPattern gets a reference to the given string and assigns it to the Pattern field.
func (o *CreateTokenizer) SetPattern(v string) {
o.Pattern = &v
}
// GetTag returns the Tag field value if set, zero value otherwise.
func (o *CreateTokenizer) GetTag() []string {
if o == nil || o.Tag == nil {
var ret []string
return ret
}
return *o.Tag
}
// GetTagOk returns a tuple with the Tag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetTagOk() (*[]string, bool) {
if o == nil || o.Tag == nil {
return nil, false
}
return o.Tag, true
}
// HasTag returns a boolean if a field has been set.
func (o *CreateTokenizer) HasTag() bool {
if o != nil && o.Tag != nil {
return true
}
return false
}
// SetTag gets a reference to the given []string and assigns it to the Tag field.
func (o *CreateTokenizer) SetTag(v []string) {
o.Tag = &v
}
// GetTemplateType returns the TemplateType field value
func (o *CreateTokenizer) GetTemplateType() string {
if o == nil {
var ret string
return ret
}
return o.TemplateType
}
// GetTemplateTypeOk returns a tuple with the TemplateType field value
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetTemplateTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TemplateType, true
}
// SetTemplateType sets field value
func (o *CreateTokenizer) SetTemplateType(v string) {
o.TemplateType = v
}
// GetToken returns the Token field value if set, zero value otherwise.
func (o *CreateTokenizer) GetToken() string {
if o == nil || o.Token == nil {
var ret string
return ret
}
return *o.Token
}
// GetTokenOk returns a tuple with the Token field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetTokenOk() (*string, bool) {
if o == nil || o.Token == nil {
return nil, false
}
return o.Token, true
}
// HasToken returns a boolean if a field has been set.
func (o *CreateTokenizer) HasToken() bool {
if o != nil && o.Token != nil {
return true
}
return false
}
// SetToken gets a reference to the given string and assigns it to the Token field.
func (o *CreateTokenizer) SetToken(v string) {
o.Token = &v
}
// GetTokenizerType returns the TokenizerType field value
func (o *CreateTokenizer) GetTokenizerType() string {
if o == nil {
var ret string
return ret
}
return o.TokenizerType
}
// GetTokenizerTypeOk returns a tuple with the TokenizerType field value
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetTokenizerTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TokenizerType, true
}
// SetTokenizerType sets field value
func (o *CreateTokenizer) SetTokenizerType(v string) {
o.TokenizerType = v
}
// GetTweakType returns the TweakType field value if set, zero value otherwise.
func (o *CreateTokenizer) GetTweakType() string {
if o == nil || o.TweakType == nil {
var ret string
return ret
}
return *o.TweakType
}
// GetTweakTypeOk returns a tuple with the TweakType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetTweakTypeOk() (*string, bool) {
if o == nil || o.TweakType == nil {
return nil, false
}
return o.TweakType, true
}
// HasTweakType returns a boolean if a field has been set.
func (o *CreateTokenizer) HasTweakType() bool {
if o != nil && o.TweakType != nil {
return true
}
return false
}
// SetTweakType gets a reference to the given string and assigns it to the TweakType field.
func (o *CreateTokenizer) SetTweakType(v string) {
o.TweakType = &v
}
// GetUidToken returns the UidToken field value if set, zero value otherwise.
func (o *CreateTokenizer) GetUidToken() string {
if o == nil || o.UidToken == nil {
var ret string
return ret
}
return *o.UidToken
}
// GetUidTokenOk returns a tuple with the UidToken field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateTokenizer) GetUidTokenOk() (*string, bool) {
if o == nil || o.UidToken == nil {
return nil, false
}
return o.UidToken, true
}
// HasUidToken returns a boolean if a field has been set.
func (o *CreateTokenizer) HasUidToken() bool {
if o != nil && o.UidToken != nil {
return true
}
return false
}
// SetUidToken gets a reference to the given string and assigns it to the UidToken field.
func (o *CreateTokenizer) SetUidToken(v string) {
o.UidToken = &v
}
func (o CreateTokenizer) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Alphabet != nil {
toSerialize["alphabet"] = o.Alphabet
}
if o.DecodingTemplate != nil {
toSerialize["decoding-template"] = o.DecodingTemplate
}
if o.DeleteProtection != nil {
toSerialize["delete_protection"] = o.DeleteProtection
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.EncodingTemplate != nil {
toSerialize["encoding-template"] = o.EncodingTemplate
}
if o.EncryptionKeyName != nil {
toSerialize["encryption-key-name"] = o.EncryptionKeyName
}
if o.Json != nil {
toSerialize["json"] = o.Json
}
if o.Metadata != nil {
toSerialize["metadata"] = o.Metadata
}
if true {
toSerialize["name"] = o.Name
}
if o.Pattern != nil {
toSerialize["pattern"] = o.Pattern
}
if o.Tag != nil {
toSerialize["tag"] = o.Tag
}
if true {
toSerialize["template-type"] = o.TemplateType
}
if o.Token != nil {
toSerialize["token"] = o.Token
}
if true {
toSerialize["tokenizer-type"] = o.TokenizerType
}
if o.TweakType != nil {
toSerialize["tweak-type"] = o.TweakType
}
if o.UidToken != nil {
toSerialize["uid-token"] = o.UidToken
}
return json.Marshal(toSerialize)
}
type NullableCreateTokenizer struct {
value *CreateTokenizer
isSet bool
}
func (v NullableCreateTokenizer) Get() *CreateTokenizer {
return v.value
}
func (v *NullableCreateTokenizer) Set(val *CreateTokenizer) {
v.value = val
v.isSet = true
}
func (v NullableCreateTokenizer) IsSet() bool {
return v.isSet
}
func (v *NullableCreateTokenizer) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateTokenizer(val *CreateTokenizer) *NullableCreateTokenizer {
return &NullableCreateTokenizer{value: val, isSet: true}
}
func (v NullableCreateTokenizer) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateTokenizer) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}