-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_day.go
89 lines (73 loc) · 2.11 KB
/
model_day.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
/*
* Container Registry service
*
* ## Overview Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls. ## Changelog ### 1.1.0 - Added new endpoints for Repositories - Added new endpoints for Artifacts - Added new endpoints for Vulnerabilities - Added registry vulnerabilityScanning feature ### 1.2.0 - Added registry `apiSubnetAllowList` ### 1.2.1 - Amended `apiSubnetAllowList` Regex
*
* API version: 1.2.1
* Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package ionoscloud
import (
"encoding/json"
"fmt"
)
// Day the model 'Day'
type Day string
// List of Day
const (
DAY_MONDAY Day = "Monday"
DAY_TUESDAY Day = "Tuesday"
DAY_WEDNESDAY Day = "Wednesday"
DAY_THURSDAY Day = "Thursday"
DAY_FRIDAY Day = "Friday"
DAY_SATURDAY Day = "Saturday"
DAY_SUNDAY Day = "Sunday"
)
func (v *Day) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := Day(value)
for _, existing := range []Day{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"} {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid Day", value)
}
// Ptr returns reference to Day value
func (v Day) Ptr() *Day {
return &v
}
type NullableDay struct {
value *Day
isSet bool
}
func (v NullableDay) Get() *Day {
return v.value
}
func (v *NullableDay) Set(val *Day) {
v.value = val
v.isSet = true
}
func (v NullableDay) IsSet() bool {
return v.isSet
}
func (v *NullableDay) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDay(val *Day) *NullableDay {
return &NullableDay{value: val, isSet: true}
}
func (v NullableDay) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDay) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}