/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/microsoftgraph/msgraph-sdk-go/models/action_state.go
59 строк
2 KB
Justin Pierce
Add compat_otp package with openshift-tests-private (OTP) util implementations
11 авг 2025, 18:00
11 авг 2025, 18:00
80ac5c1
Код
Авторство
О чём код?
// Code generated by Microsoft Kiota - DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models // State of the action on the device type ActionState int const ( // Not a valid action state NONE_ACTIONSTATE ActionState = iota // Action is pending PENDING_ACTIONSTATE // Action has been cancelled. CANCELED_ACTIONSTATE // Action is active. ACTIVE_ACTIONSTATE // Action completed without errors. DONE_ACTIONSTATE // Action failed FAILED_ACTIONSTATE // Action is not supported. NOTSUPPORTED_ACTIONSTATE ) func (i ActionState) String() string { return []string{"none", "pending", "canceled", "active", "done", "failed", "notSupported"}[i] } func ParseActionState(v string) (any, error) { result := NONE_ACTIONSTATE switch v { case "none": result = NONE_ACTIONSTATE case "pending": result = PENDING_ACTIONSTATE case "canceled": result = CANCELED_ACTIONSTATE case "active": result = ACTIVE_ACTIONSTATE case "done": result = DONE_ACTIONSTATE case "failed": result = FAILED_ACTIONSTATE case "notSupported": result = NOTSUPPORTED_ACTIONSTATE default: return nil, nil } return &result, nil } func SerializeActionState(values []ActionState) []string { result := make([]string, len(values)) for i, v := range values { result[i] = v.String() } return result } func (i ActionState) isMultiValue() bool { return false }