-
Notifications
You must be signed in to change notification settings - Fork 36
/
online_meeting_role.go
42 lines (40 loc) · 1.21 KB
/
online_meeting_role.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
package models
type OnlineMeetingRole int
const (
ATTENDEE_ONLINEMEETINGROLE OnlineMeetingRole = iota
PRESENTER_ONLINEMEETINGROLE
UNKNOWNFUTUREVALUE_ONLINEMEETINGROLE
PRODUCER_ONLINEMEETINGROLE
COORGANIZER_ONLINEMEETINGROLE
)
func (i OnlineMeetingRole) String() string {
return []string{"attendee", "presenter", "unknownFutureValue", "producer", "coorganizer"}[i]
}
func ParseOnlineMeetingRole(v string) (any, error) {
result := ATTENDEE_ONLINEMEETINGROLE
switch v {
case "attendee":
result = ATTENDEE_ONLINEMEETINGROLE
case "presenter":
result = PRESENTER_ONLINEMEETINGROLE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_ONLINEMEETINGROLE
case "producer":
result = PRODUCER_ONLINEMEETINGROLE
case "coorganizer":
result = COORGANIZER_ONLINEMEETINGROLE
default:
return nil, nil
}
return &result, nil
}
func SerializeOnlineMeetingRole(values []OnlineMeetingRole) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i OnlineMeetingRole) isMultiValue() bool {
return false
}