-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_nsec_mode.go
84 lines (68 loc) · 1.56 KB
/
model_nsec_mode.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
/*
* IONOS Cloud - DNS API
*
* Cloud DNS service helps IONOS Cloud customers to automate DNS Zone and Record management.
*
* API version: 1.17.0
* Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package ionoscloud
import (
"encoding/json"
"fmt"
)
// NsecMode NSEC mode.
type NsecMode string
// List of nsecMode
const (
NSECMODE_NSEC NsecMode = "NSEC"
NSECMODE_NSEC3 NsecMode = "NSEC3"
)
func (v *NsecMode) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := NsecMode(value)
for _, existing := range []NsecMode{"NSEC", "NSEC3"} {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid NsecMode", value)
}
// Ptr returns reference to nsecMode value
func (v NsecMode) Ptr() *NsecMode {
return &v
}
type NullableNsecMode struct {
value *NsecMode
isSet bool
}
func (v NullableNsecMode) Get() *NsecMode {
return v.value
}
func (v *NullableNsecMode) Set(val *NsecMode) {
v.value = val
v.isSet = true
}
func (v NullableNsecMode) IsSet() bool {
return v.isSet
}
func (v *NullableNsecMode) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNsecMode(val *NsecMode) *NullableNsecMode {
return &NullableNsecMode{value: val, isSet: true}
}
func (v NullableNsecMode) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNsecMode) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}