Enum Class TenantProfile
- All Implemented Interfaces:
Serializable, Comparable<TenantProfile>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<TenantProfile> fromString(String name) Maps from all-caps snake case string to enum values.static TenantProfileReturns the enum constant of this class with the specified name.static TenantProfile[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
K1_BASIC
-
K1_STANDARD
-
K1_ENTERPRISE
-
K2_FREIGHT
-
K2_BASIC
-
K2_STANDARD
-
K2_ENTERPRISE
-
-
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
-
fromString
Maps from all-caps snake case string to enum values. e.g. "K2_FREIGHT" -> TenantProfile.K2_FREIGHTUnrecognized strings resolve to Optional.empty(), identical to no profile being set. That includes "K1_DEDICATED": Dedicated deliberately has no profile, because its per-tenant configs are meant to resolve to the broker's own values via
TenantBrokerConfigFallbackrather than to per-SKU constants that would shadow them. SeeTenantProfileTest#fromStringReturnsEmptyForK1Dedicated.- Returns:
- Corresponding TenantProfile. Optional.empty() if there are no matches.
-