-
Notifications
You must be signed in to change notification settings - Fork 34
/
ios_notification_alert_type.go
44 lines (42 loc) · 1.26 KB
/
ios_notification_alert_type.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
package models
// Notification Settings Alert Type.
type IosNotificationAlertType int
const (
// Device default value, no intent.
DEVICEDEFAULT_IOSNOTIFICATIONALERTTYPE IosNotificationAlertType = iota
// Banner.
BANNER_IOSNOTIFICATIONALERTTYPE
// Modal.
MODAL_IOSNOTIFICATIONALERTTYPE
// None.
NONE_IOSNOTIFICATIONALERTTYPE
)
func (i IosNotificationAlertType) String() string {
return []string{"deviceDefault", "banner", "modal", "none"}[i]
}
func ParseIosNotificationAlertType(v string) (any, error) {
result := DEVICEDEFAULT_IOSNOTIFICATIONALERTTYPE
switch v {
case "deviceDefault":
result = DEVICEDEFAULT_IOSNOTIFICATIONALERTTYPE
case "banner":
result = BANNER_IOSNOTIFICATIONALERTTYPE
case "modal":
result = MODAL_IOSNOTIFICATIONALERTTYPE
case "none":
result = NONE_IOSNOTIFICATIONALERTTYPE
default:
return nil, nil
}
return &result, nil
}
func SerializeIosNotificationAlertType(values []IosNotificationAlertType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i IosNotificationAlertType) isMultiValue() bool {
return false
}