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
  • Field Details

  • Constructor Details

  • Method Details

    • _roleMappingRuleKind

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

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

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<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 kind any?
    • any

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

      public boolean isAll()
      Is this variant instance of kind all?
    • all

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

      public boolean isField()
      Is this variant instance of kind field?
    • field

      public FieldRule field()
      Get the field variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the field kind.
    • isExcept

      public boolean isExcept()
      Is this variant instance of kind except?
    • except

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

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

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • setupRoleMappingRuleDeserializer

      protected static void setupRoleMappingRuleDeserializer​(ObjectDeserializer<RoleMappingRule.Builder> op)