-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathdevice_management_partner_tenant_state.go
55 lines (52 loc) · 1.99 KB
/
device_management_partner_tenant_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
// Code generated by Microsoft Kiota - DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package models
// Partner state of this tenant.
type DeviceManagementPartnerTenantState int
const (
// Partner state is unknown.
UNKNOWN_DEVICEMANAGEMENTPARTNERTENANTSTATE DeviceManagementPartnerTenantState = iota
// Partner is unavailable.
UNAVAILABLE_DEVICEMANAGEMENTPARTNERTENANTSTATE
// Partner is enabled.
ENABLED_DEVICEMANAGEMENTPARTNERTENANTSTATE
// Partner connection is terminated.
TERMINATED_DEVICEMANAGEMENTPARTNERTENANTSTATE
// Partner messages are rejected.
REJECTED_DEVICEMANAGEMENTPARTNERTENANTSTATE
// Partner is unresponsive.
UNRESPONSIVE_DEVICEMANAGEMENTPARTNERTENANTSTATE
)
func (i DeviceManagementPartnerTenantState) String() string {
return []string{"unknown", "unavailable", "enabled", "terminated", "rejected", "unresponsive"}[i]
}
func ParseDeviceManagementPartnerTenantState(v string) (any, error) {
result := UNKNOWN_DEVICEMANAGEMENTPARTNERTENANTSTATE
switch v {
case "unknown":
result = UNKNOWN_DEVICEMANAGEMENTPARTNERTENANTSTATE
case "unavailable":
result = UNAVAILABLE_DEVICEMANAGEMENTPARTNERTENANTSTATE
case "enabled":
result = ENABLED_DEVICEMANAGEMENTPARTNERTENANTSTATE
case "terminated":
result = TERMINATED_DEVICEMANAGEMENTPARTNERTENANTSTATE
case "rejected":
result = REJECTED_DEVICEMANAGEMENTPARTNERTENANTSTATE
case "unresponsive":
result = UNRESPONSIVE_DEVICEMANAGEMENTPARTNERTENANTSTATE
default:
return nil, nil
}
return &result, nil
}
func SerializeDeviceManagementPartnerTenantState(values []DeviceManagementPartnerTenantState) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i DeviceManagementPartnerTenantState) isMultiValue() bool {
return false
}