-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_zsk_bits.go
85 lines (69 loc) · 1.58 KB
/
model_zsk_bits.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
/*
* IONOS Cloud - DNS API
*
* Cloud DNS service helps IONOS Cloud customers to automate DNS Zone and Record management.
*
* API version: 1.15.4
* Contact: support@cloud.ionos.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package ionoscloud
import (
"encoding/json"
"fmt"
)
// ZskBits Zone signing key length in bits.
type ZskBits int32
// List of zskBits
const (
ZSKBITS__1024 ZskBits = 1024
ZSKBITS__2048 ZskBits = 2048
ZSKBITS__4096 ZskBits = 4096
)
func (v *ZskBits) UnmarshalJSON(src []byte) error {
var value int32
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := ZskBits(value)
for _, existing := range []ZskBits{1024, 2048, 4096} {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid ZskBits", value)
}
// Ptr returns reference to zskBits value
func (v ZskBits) Ptr() *ZskBits {
return &v
}
type NullableZskBits struct {
value *ZskBits
isSet bool
}
func (v NullableZskBits) Get() *ZskBits {
return v.value
}
func (v *NullableZskBits) Set(val *ZskBits) {
v.value = val
v.isSet = true
}
func (v NullableZskBits) IsSet() bool {
return v.isSet
}
func (v *NullableZskBits) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableZskBits(val *ZskBits) *NullableZskBits {
return &NullableZskBits{value: val, isSet: true}
}
func (v NullableZskBits) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableZskBits) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}