-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdelegated_admin_access_assignment_status.go
45 lines (43 loc) · 1.65 KB
/
delegated_admin_access_assignment_status.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
package models
type DelegatedAdminAccessAssignmentStatus int
const (
PENDING_DELEGATEDADMINACCESSASSIGNMENTSTATUS DelegatedAdminAccessAssignmentStatus = iota
ACTIVE_DELEGATEDADMINACCESSASSIGNMENTSTATUS
DELETING_DELEGATEDADMINACCESSASSIGNMENTSTATUS
DELETED_DELEGATEDADMINACCESSASSIGNMENTSTATUS
ERROR_DELEGATEDADMINACCESSASSIGNMENTSTATUS
UNKNOWNFUTUREVALUE_DELEGATEDADMINACCESSASSIGNMENTSTATUS
)
func (i DelegatedAdminAccessAssignmentStatus) String() string {
return []string{"pending", "active", "deleting", "deleted", "error", "unknownFutureValue"}[i]
}
func ParseDelegatedAdminAccessAssignmentStatus(v string) (any, error) {
result := PENDING_DELEGATEDADMINACCESSASSIGNMENTSTATUS
switch v {
case "pending":
result = PENDING_DELEGATEDADMINACCESSASSIGNMENTSTATUS
case "active":
result = ACTIVE_DELEGATEDADMINACCESSASSIGNMENTSTATUS
case "deleting":
result = DELETING_DELEGATEDADMINACCESSASSIGNMENTSTATUS
case "deleted":
result = DELETED_DELEGATEDADMINACCESSASSIGNMENTSTATUS
case "error":
result = ERROR_DELEGATEDADMINACCESSASSIGNMENTSTATUS
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_DELEGATEDADMINACCESSASSIGNMENTSTATUS
default:
return nil, nil
}
return &result, nil
}
func SerializeDelegatedAdminAccessAssignmentStatus(values []DelegatedAdminAccessAssignmentStatus) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i DelegatedAdminAccessAssignmentStatus) isMultiValue() bool {
return false
}