-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdrive_item_source_application.go
60 lines (58 loc) · 2.07 KB
/
drive_item_source_application.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
package models
type DriveItemSourceApplication int
const (
TEAMS_DRIVEITEMSOURCEAPPLICATION DriveItemSourceApplication = iota
YAMMER_DRIVEITEMSOURCEAPPLICATION
SHAREPOINT_DRIVEITEMSOURCEAPPLICATION
ONEDRIVE_DRIVEITEMSOURCEAPPLICATION
STREAM_DRIVEITEMSOURCEAPPLICATION
POWERPOINT_DRIVEITEMSOURCEAPPLICATION
OFFICE_DRIVEITEMSOURCEAPPLICATION
LOKI_DRIVEITEMSOURCEAPPLICATION
LOOP_DRIVEITEMSOURCEAPPLICATION
OTHER_DRIVEITEMSOURCEAPPLICATION
UNKNOWNFUTUREVALUE_DRIVEITEMSOURCEAPPLICATION
)
func (i DriveItemSourceApplication) String() string {
return []string{"teams", "yammer", "sharePoint", "oneDrive", "stream", "powerPoint", "office", "loki", "loop", "other", "unknownFutureValue"}[i]
}
func ParseDriveItemSourceApplication(v string) (any, error) {
result := TEAMS_DRIVEITEMSOURCEAPPLICATION
switch v {
case "teams":
result = TEAMS_DRIVEITEMSOURCEAPPLICATION
case "yammer":
result = YAMMER_DRIVEITEMSOURCEAPPLICATION
case "sharePoint":
result = SHAREPOINT_DRIVEITEMSOURCEAPPLICATION
case "oneDrive":
result = ONEDRIVE_DRIVEITEMSOURCEAPPLICATION
case "stream":
result = STREAM_DRIVEITEMSOURCEAPPLICATION
case "powerPoint":
result = POWERPOINT_DRIVEITEMSOURCEAPPLICATION
case "office":
result = OFFICE_DRIVEITEMSOURCEAPPLICATION
case "loki":
result = LOKI_DRIVEITEMSOURCEAPPLICATION
case "loop":
result = LOOP_DRIVEITEMSOURCEAPPLICATION
case "other":
result = OTHER_DRIVEITEMSOURCEAPPLICATION
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_DRIVEITEMSOURCEAPPLICATION
default:
return nil, nil
}
return &result, nil
}
func SerializeDriveItemSourceApplication(values []DriveItemSourceApplication) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i DriveItemSourceApplication) isMultiValue() bool {
return false
}