java.lang.Object
co.elastic.clients.elasticsearch.security.FieldRule
All Implemented Interfaces:
RoleMappingRuleVariant, JsonpSerializable, TaggedUnion<FieldRule.Kind,​java.lang.Object>

@JsonpDeserializable
public class FieldRule
extends java.lang.Object
implements TaggedUnion<FieldRule.Kind,​java.lang.Object>, RoleMappingRuleVariant, JsonpSerializable
See Also:
API specification
  • Field Details

  • Constructor Details

  • Method Details

    • _roleMappingRuleKind

      public RoleMappingRule.Kind _roleMappingRuleKind()
      RoleMappingRule variant kind.
      Specified by:
      _roleMappingRuleKind in interface RoleMappingRuleVariant
    • _kind

      public final FieldRule.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<FieldRule.Kind,​java.lang.Object>
      Returns:
      the variant kind
    • _get

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<FieldRule.Kind,​java.lang.Object>
    • of

      public static FieldRule of​(java.util.function.Function<FieldRule.Builder,​ObjectBuilder<FieldRule>> fn)
    • isUsername

      public boolean isUsername()
      Is this variant instance of kind username?
    • username

      public java.lang.String username()
      Get the username variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the username kind.
    • isDn

      public boolean isDn()
      Is this variant instance of kind dn?
    • dn

      public java.util.List<java.lang.String> dn()
      Get the dn variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the dn kind.
    • isGroups

      public boolean isGroups()
      Is this variant instance of kind groups?
    • groups

      public java.util.List<java.lang.String> groups()
      Get the groups variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the groups kind.
    • isMetadata

      public boolean isMetadata()
      Is this variant instance of kind metadata?
    • metadata

      public JsonData metadata()
      Get the metadata variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the metadata kind.
    • isRealm

      public boolean isRealm()
      Is this variant instance of kind realm?
    • realm

      public Realm realm()
      Get the realm variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the realm kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupFieldRuleDeserializer

      protected static void setupFieldRuleDeserializer​(ObjectDeserializer<FieldRule.Builder> op)