Class RoleMappingRule
java.lang.Object
co.elastic.clients.elasticsearch.security.RoleMappingRule
- All Implemented Interfaces:
RoleMappingRuleVariant,JsonpSerializable,TaggedUnion<RoleMappingRule.Kind,java.lang.Object>
@JsonpDeserializable public class RoleMappingRule extends java.lang.Object implements TaggedUnion<RoleMappingRule.Kind,java.lang.Object>, RoleMappingRuleVariant, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRoleMappingRule.Builderstatic classRoleMappingRule.KindRoleMappingRulevariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<RoleMappingRule>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description RoleMappingRule(RoleMappingRuleVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()RoleMappingRule.Kind_kind()Get the of the kind of variant held by this object.RoleMappingRule.Kind_roleMappingRuleKind()RoleMappingRule variant kind.java.util.List<RoleMappingRule>all()Get theallvariant value.java.util.List<RoleMappingRule>any()Get theanyvariant value.RoleMappingRuleexcept()Get theexceptvariant value.FieldRulefield()Get thefieldvariant value.booleanisAll()Is this variant instance of kindall?booleanisAny()Is this variant instance of kindany?booleanisExcept()Is this variant instance of kindexcept?booleanisField()Is this variant instance of kindfield?static RoleMappingRuleof(java.util.function.Function<RoleMappingRule.Builder,ObjectBuilder<RoleMappingRule>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupRoleMappingRuleDeserializer(ObjectDeserializer<RoleMappingRule.Builder> op)java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch.security.RoleMappingRuleVariant
_toRoleMappingRule
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
RoleMappingRule
-
-
Method Details
-
_roleMappingRuleKind
RoleMappingRule variant kind.- Specified by:
_roleMappingRuleKindin interfaceRoleMappingRuleVariant
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<RoleMappingRule.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<RoleMappingRule.Kind,java.lang.Object>
-
of
public static RoleMappingRule of(java.util.function.Function<RoleMappingRule.Builder,ObjectBuilder<RoleMappingRule>> fn) -
isAny
public boolean isAny()Is this variant instance of kindany? -
any
Get theanyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theanykind.
-
isAll
public boolean isAll()Is this variant instance of kindall? -
all
Get theallvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theallkind.
-
isField
public boolean isField()Is this variant instance of kindfield? -
field
Get thefieldvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefieldkind.
-
isExcept
public boolean isExcept()Is this variant instance of kindexcept? -
except
Get theexceptvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theexceptkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupRoleMappingRuleDeserializer
protected static void setupRoleMappingRuleDeserializer(ObjectDeserializer<RoleMappingRule.Builder> op)
-