-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathconnected_organization_state.go
36 lines (34 loc) · 1.1 KB
/
connected_organization_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
package models
type ConnectedOrganizationState int
const (
CONFIGURED_CONNECTEDORGANIZATIONSTATE ConnectedOrganizationState = iota
PROPOSED_CONNECTEDORGANIZATIONSTATE
UNKNOWNFUTUREVALUE_CONNECTEDORGANIZATIONSTATE
)
func (i ConnectedOrganizationState) String() string {
return []string{"configured", "proposed", "unknownFutureValue"}[i]
}
func ParseConnectedOrganizationState(v string) (any, error) {
result := CONFIGURED_CONNECTEDORGANIZATIONSTATE
switch v {
case "configured":
result = CONFIGURED_CONNECTEDORGANIZATIONSTATE
case "proposed":
result = PROPOSED_CONNECTEDORGANIZATIONSTATE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_CONNECTEDORGANIZATIONSTATE
default:
return nil, nil
}
return &result, nil
}
func SerializeConnectedOrganizationState(values []ConnectedOrganizationState) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConnectedOrganizationState) isMultiValue() bool {
return false
}