Class IndexPrivilegesCheck.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<IndexPrivilegesCheck.Builder>
co.elastic.clients.elasticsearch.security.has_privileges.IndexPrivilegesCheck.Builder
All Implemented Interfaces:
WithJson<IndexPrivilegesCheck.Builder>, ObjectBuilder<IndexPrivilegesCheck>
Enclosing class:
IndexPrivilegesCheck

public static class IndexPrivilegesCheck.Builder
extends WithJsonObjectBuilderBase<IndexPrivilegesCheck.Builder>
implements ObjectBuilder<IndexPrivilegesCheck>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • names

      public final IndexPrivilegesCheck.Builder names​(java.util.List<java.lang.String> list)
      Required - A list of indices.

      API name: names

      Adds all elements of list to names.

    • names

      public final IndexPrivilegesCheck.Builder names​(java.lang.String value, java.lang.String... values)
      Required - A list of indices.

      API name: names

      Adds one or more values to names.

    • privileges

      public final IndexPrivilegesCheck.Builder privileges​(java.util.List<IndexPrivilege> list)
      Required - A list of the privileges that you want to check for the specified indices.

      API name: privileges

      Adds all elements of list to privileges.

    • privileges

      public final IndexPrivilegesCheck.Builder privileges​(IndexPrivilege value, IndexPrivilege... values)
      Required - A list of the privileges that you want to check for the specified indices.

      API name: privileges

      Adds one or more values to privileges.

    • allowRestrictedIndices

      public final IndexPrivilegesCheck.Builder allowRestrictedIndices​(@Nullable java.lang.Boolean value)
      This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false. If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices.

      API name: allow_restricted_indices

    • self

      protected IndexPrivilegesCheck.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<IndexPrivilegesCheck.Builder>
    • build

      public IndexPrivilegesCheck build()
      Specified by:
      build in interface ObjectBuilder<IndexPrivilegesCheck>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.