Class FieldRule
java.lang.Object
co.elastic.clients.elasticsearch.security.FieldRule
- All Implemented Interfaces:
RoleMappingRuleVariant
,JsonpSerializable
,OpenTaggedUnion<FieldRule.Kind,
,Object> TaggedUnion<FieldRule.Kind,
Object>
@JsonpDeserializable
public class FieldRule
extends Object
implements OpenTaggedUnion<FieldRule.Kind,Object>, RoleMappingRuleVariant, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_custom()
Get the custom plugin-defined variant value.final String
Get the actual kind when_kind()
equalsFieldRule.Kind._Custom
(plugin-defined variant).final Object
_get()
boolean
Is this a customFieldRule
defined by a plugin?final FieldRule.Kind
_kind()
Get the of the kind of variant held by this object.RoleMappingRule variant kind.dn()
Get thedn
variant value.groups()
Get thegroups
variant value.boolean
isDn()
Is this variant instance of kinddn
?boolean
isGroups()
Is this variant instance of kindgroups
?boolean
Is this variant instance of kindusername
?static FieldRule
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
toString()
username()
Get theusername
variant value.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
-
FieldRule
-
-
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<FieldRule.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<FieldRule.Kind,
Object>
-
of
-
isUsername
public boolean isUsername()Is this variant instance of kindusername
? -
username
Get theusername
variant value.- Throws:
IllegalStateException
- if the current variant is not of theusername
kind.
-
isDn
public boolean isDn()Is this variant instance of kinddn
? -
dn
Get thedn
variant value.- Throws:
IllegalStateException
- if the current variant is not of thedn
kind.
-
isGroups
public boolean isGroups()Is this variant instance of kindgroups
? -
groups
Get thegroups
variant value.- Throws:
IllegalStateException
- if the current variant is not of thegroups
kind.
-
_isCustom
public boolean _isCustom()Is this a customFieldRule
defined by a plugin? -
_customKind
Get the actual kind when_kind()
equalsFieldRule.Kind._Custom
(plugin-defined variant).- Specified by:
_customKind
in interfaceOpenTaggedUnion<FieldRule.Kind,
Object>
-
_custom
Get the custom plugin-defined variant value.- Throws:
IllegalStateException
- if the current variant is notFieldRule.Kind._Custom
.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupFieldRuleDeserializer
-