-
Notifications
You must be signed in to change notification settings - Fork 5
/
RemovalStateViewBoxEnum.go
78 lines (68 loc) · 2.06 KB
/
RemovalStateViewBoxEnum.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
// Copyright 2019 Cohesity Inc.
package models
import(
"encoding/json"
)
/**
* Type definition for RemovalStateViewBoxEnum enum
*/
type RemovalStateViewBoxEnum int
/**
* Value collection for RemovalStateViewBoxEnum enum
*/
const (
RemovalStateViewBox_KDONTREMOVE RemovalStateViewBoxEnum = 1 + iota
RemovalStateViewBox_KMARKEDFORREMOVAL
RemovalStateViewBox_KOKTOREMOVE
)
func (r RemovalStateViewBoxEnum) MarshalJSON() ([]byte, error) {
s := RemovalStateViewBoxEnumToValue(r)
return json.Marshal(s)
}
func (r *RemovalStateViewBoxEnum) UnmarshalJSON(data []byte) error {
var s string
json.Unmarshal(data, &s)
v := RemovalStateViewBoxEnumFromValue(s)
*r = v
return nil
}
/**
* Converts RemovalStateViewBoxEnum to its string representation
*/
func RemovalStateViewBoxEnumToValue(removalStateViewBoxEnum RemovalStateViewBoxEnum) string {
switch removalStateViewBoxEnum {
case RemovalStateViewBox_KDONTREMOVE:
return "kDontRemove"
case RemovalStateViewBox_KMARKEDFORREMOVAL:
return "kMarkedForRemoval"
case RemovalStateViewBox_KOKTOREMOVE:
return "kOkToRemove"
default:
return "kDontRemove"
}
}
/**
* Converts RemovalStateViewBoxEnum Array to its string Array representation
*/
func RemovalStateViewBoxEnumArrayToValue(removalStateViewBoxEnum []RemovalStateViewBoxEnum) []string {
convArray := make([]string,len( removalStateViewBoxEnum))
for i:=0; i<len(removalStateViewBoxEnum);i++ {
convArray[i] = RemovalStateViewBoxEnumToValue(removalStateViewBoxEnum[i])
}
return convArray
}
/**
* Converts given value to its enum representation
*/
func RemovalStateViewBoxEnumFromValue(value string) RemovalStateViewBoxEnum {
switch value {
case "kDontRemove":
return RemovalStateViewBox_KDONTREMOVE
case "kMarkedForRemoval":
return RemovalStateViewBox_KMARKEDFORREMOVAL
case "kOkToRemove":
return RemovalStateViewBox_KOKTOREMOVE
default:
return RemovalStateViewBox_KDONTREMOVE
}
}