Package dev.digiried.wattpilot.dto
Enum Class AuthorizationState
- All Implemented Interfaces:
Serializable,Comparable<AuthorizationState>,Constable
Enum for the authorization state configuration.
- Author:
- Florian Hotze - Initial contribution
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCharging is authorized.Waiting for charging authorization. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorizationStatefromValue(int value) Get the authorization state from the API value.inttoValue()Get the API value of the authorization state.static AuthorizationStateReturns the enum constant of this class with the specified name.static AuthorizationState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTHORIZED
Charging is authorized. -
WAITING
Waiting for charging authorization.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toValue
public int toValue()Get the API value of the authorization state.- Returns:
- the API value
-
fromValue
Get the authorization state from the API value.- Parameters:
value- the API value- Returns:
- the authorization state, or
nullif the API value is unknown
-