Package com.mongodb.stitch.core.auth
Enum UserType
- java.lang.Object
-
- java.lang.Enum<UserType>
-
- com.mongodb.stitch.core.auth.UserType
-
- All Implemented Interfaces:
Serializable
,Comparable<UserType>
,java.lang.constant.Constable
public enum UserType extends Enum<UserType>
UserType indicates the type of a user. There are currently only two: normal and server. Normal users are users created from any authentication provider except the server API key authentication provider.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
-
Method Summary
Modifier and Type Method Description static UserType
fromName(String name)
Gets a UserType from a typeName; UNKNOWN if none is found.String
getTypeName()
Returns the human-readable name of this user type.String
toString()
static UserType
valueOf(String name)
Returns the enum constant of this type with the specified name.static UserType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static UserType[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UserType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getTypeName
public String getTypeName()
Returns the human-readable name of this user type.- Returns:
- the human-readable name of this user type.
-
-