/
model_health_check_status.gen.go
87 lines (70 loc) · 1.92 KB
/
model_health_check_status.gen.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
/*
* Subset of Influx API covered by Influx CLI
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 2.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
"fmt"
)
// HealthCheckStatus the model 'HealthCheckStatus'
type HealthCheckStatus string
// List of HealthCheckStatus
const (
HEALTHCHECKSTATUS_PASS HealthCheckStatus = "pass"
HEALTHCHECKSTATUS_FAIL HealthCheckStatus = "fail"
)
func HealthCheckStatusValues() []HealthCheckStatus {
return []HealthCheckStatus{"pass", "fail"}
}
func (v *HealthCheckStatus) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := HealthCheckStatus(value)
for _, existing := range []HealthCheckStatus{"pass", "fail"} {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid HealthCheckStatus", value)
}
// Ptr returns reference to HealthCheckStatus value
func (v HealthCheckStatus) Ptr() *HealthCheckStatus {
return &v
}
type NullableHealthCheckStatus struct {
value *HealthCheckStatus
isSet bool
}
func (v NullableHealthCheckStatus) Get() *HealthCheckStatus {
return v.value
}
func (v *NullableHealthCheckStatus) Set(val *HealthCheckStatus) {
v.value = val
v.isSet = true
}
func (v NullableHealthCheckStatus) IsSet() bool {
return v.isSet
}
func (v *NullableHealthCheckStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHealthCheckStatus(val *HealthCheckStatus) *NullableHealthCheckStatus {
return &NullableHealthCheckStatus{value: val, isSet: true}
}
func (v NullableHealthCheckStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHealthCheckStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}