-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_provisioning_state.go
86 lines (70 loc) · 2.29 KB
/
model_provisioning_state.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
/*
* 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"
)
// ProvisioningState The list of possible provisioning states in which DNS resource could be at the specific time. * AVAILABLE - resource exists and is healthy. * PROVISIONING - resource is being created or updated. * DESTROYING - delete command was issued, the resource is being deleted. * FAILED - creation of the resource failed.
type ProvisioningState string
// List of ProvisioningState
const (
PROVISIONINGSTATE_PROVISIONING ProvisioningState = "PROVISIONING"
PROVISIONINGSTATE_DESTROYING ProvisioningState = "DESTROYING"
PROVISIONINGSTATE_AVAILABLE ProvisioningState = "AVAILABLE"
PROVISIONINGSTATE_FAILED ProvisioningState = "FAILED"
)
func (v *ProvisioningState) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := ProvisioningState(value)
for _, existing := range []ProvisioningState{"PROVISIONING", "DESTROYING", "AVAILABLE", "FAILED"} {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid ProvisioningState", value)
}
// Ptr returns reference to ProvisioningState value
func (v ProvisioningState) Ptr() *ProvisioningState {
return &v
}
type NullableProvisioningState struct {
value *ProvisioningState
isSet bool
}
func (v NullableProvisioningState) Get() *ProvisioningState {
return v.value
}
func (v *NullableProvisioningState) Set(val *ProvisioningState) {
v.value = val
v.isSet = true
}
func (v NullableProvisioningState) IsSet() bool {
return v.isSet
}
func (v *NullableProvisioningState) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProvisioningState(val *ProvisioningState) *NullableProvisioningState {
return &NullableProvisioningState{value: val, isSet: true}
}
func (v NullableProvisioningState) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProvisioningState) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}