-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathdevice_management_subscription_state.go
59 lines (56 loc) · 2 KB
/
device_management_subscription_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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Code generated by Microsoft Kiota - DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package models
// Tenant mobile device management subscription state.
type DeviceManagementSubscriptionState int
const (
// Pending
PENDING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE DeviceManagementSubscriptionState = iota
// Active
ACTIVE_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
// Warning
WARNING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
// Disabled
DISABLED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
// Deleted
DELETED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
// Blocked
BLOCKED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
// LockedOut
LOCKEDOUT_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
)
func (i DeviceManagementSubscriptionState) String() string {
return []string{"pending", "active", "warning", "disabled", "deleted", "blocked", "lockedOut"}[i]
}
func ParseDeviceManagementSubscriptionState(v string) (any, error) {
result := PENDING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
switch v {
case "pending":
result = PENDING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
case "active":
result = ACTIVE_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
case "warning":
result = WARNING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
case "disabled":
result = DISABLED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
case "deleted":
result = DELETED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
case "blocked":
result = BLOCKED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
case "lockedOut":
result = LOCKEDOUT_DEVICEMANAGEMENTSUBSCRIPTIONSTATE
default:
return nil, nil
}
return &result, nil
}
func SerializeDeviceManagementSubscriptionState(values []DeviceManagementSubscriptionState) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i DeviceManagementSubscriptionState) isMultiValue() bool {
return false
}