1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-06 00:48:45 +01:00
Files
installer/vendor/github.com/microsoftgraph/msgraph-sdk-go/models/authentication_method_state.go
2024-04-04 21:23:02 +02:00

35 lines
933 B
Go

package models
import (
"errors"
)
//
type AuthenticationMethodState int
const (
ENABLED_AUTHENTICATIONMETHODSTATE AuthenticationMethodState = iota
DISABLED_AUTHENTICATIONMETHODSTATE
)
func (i AuthenticationMethodState) String() string {
return []string{"enabled", "disabled"}[i]
}
func ParseAuthenticationMethodState(v string) (any, error) {
result := ENABLED_AUTHENTICATIONMETHODSTATE
switch v {
case "enabled":
result = ENABLED_AUTHENTICATIONMETHODSTATE
case "disabled":
result = DISABLED_AUTHENTICATIONMETHODSTATE
default:
return 0, errors.New("Unknown AuthenticationMethodState value: " + v)
}
return &result, nil
}
func SerializeAuthenticationMethodState(values []AuthenticationMethodState) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}