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 class
RoleMappingRule.Builder
static class
RoleMappingRule.Kind
RoleMappingRule
variant 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 theall
variant value.java.util.List<RoleMappingRule>
any()
Get theany
variant value.RoleMappingRule
except()
Get theexcept
variant value.FieldRule
field()
Get thefield
variant value.boolean
isAll()
Is this variant instance of kindall
?boolean
isAny()
Is this variant instance of kindany
?boolean
isExcept()
Is this variant instance of kindexcept
?boolean
isField()
Is this variant instance of kindfield
?static RoleMappingRule
of(java.util.function.Function<RoleMappingRule.Builder,ObjectBuilder<RoleMappingRule>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupRoleMappingRuleDeserializer(ObjectDeserializer<RoleMappingRule.Builder> op)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch.security.RoleMappingRuleVariant
_toRoleMappingRule
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
RoleMappingRule
-
-
Method Details
-
_roleMappingRuleKind
RoleMappingRule variant kind.- Specified by:
_roleMappingRuleKind
in interfaceRoleMappingRuleVariant
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<RoleMappingRule.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in 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 theany
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theany
kind.
-
isAll
public boolean isAll()Is this variant instance of kindall
? -
all
Get theall
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theall
kind.
-
isField
public boolean isField()Is this variant instance of kindfield
? -
field
Get thefield
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefield
kind.
-
isExcept
public boolean isExcept()Is this variant instance of kindexcept
? -
except
Get theexcept
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theexcept
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupRoleMappingRuleDeserializer
protected static void setupRoleMappingRuleDeserializer(ObjectDeserializer<RoleMappingRule.Builder> op)
-