-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCluster.enums.gen.go
55 lines (43 loc) · 989 Bytes
/
Cluster.enums.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
// This is a generated file. DO NOT EDIT manually.
package go_xen_client
//ClusterOperation: cluster_operation enum type
type ClusterOperation int
const(
ClusterOperationAdd ClusterOperation = iota //adding a new member to the cluster
ClusterOperationRemove //removing a member from the cluster
ClusterOperationEnable //enabling any cluster member
ClusterOperationDisable //disabling any cluster member
ClusterOperationDestroy //completely destroying a cluster
)
func (e ClusterOperation) String() string {
switch e {
case 0:
return "add"
case 1:
return "remove"
case 2:
return "enable"
case 3:
return "disable"
case 4:
return "destroy"
default:
return ""
}
}
func ToClusterOperation(strValue string) ClusterOperation {
switch strValue {
case "add":
return 0
case "remove":
return 1
case "enable":
return 2
case "disable":
return 3
case "destroy":
return 4
default:
return -1
}
}