Class IndicesPrivileges.Builder

java.lang.Object
All Implemented Interfaces:
WithJson<IndicesPrivileges.Builder>, ObjectBuilder<IndicesPrivileges>
Enclosing class:
IndicesPrivileges

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

    • Builder

      public Builder()
  • Method Details

    • fieldSecurity

      public final IndicesPrivileges.Builder fieldSecurity​(java.util.List<FieldSecurity> list)
      The document fields that the owners of the role have read access to.

      API name: field_security

      Adds all elements of list to fieldSecurity.

    • fieldSecurity

      public final IndicesPrivileges.Builder fieldSecurity​(FieldSecurity value, FieldSecurity... values)
      The document fields that the owners of the role have read access to.

      API name: field_security

      Adds one or more values to fieldSecurity.

    • fieldSecurity

      public final IndicesPrivileges.Builder fieldSecurity​(java.util.function.Function<FieldSecurity.Builder,​ObjectBuilder<FieldSecurity>> fn)
      The document fields that the owners of the role have read access to.

      API name: field_security

      Adds a value to fieldSecurity using a builder lambda.

    • names

      public final IndicesPrivileges.Builder names​(java.util.List<java.lang.String> list)
      Required - A list of indices (or index name patterns) to which the permissions in this entry apply.

      API name: names

      Adds all elements of list to names.

    • names

      public final IndicesPrivileges.Builder names​(java.lang.String value, java.lang.String... values)
      Required - A list of indices (or index name patterns) to which the permissions in this entry apply.

      API name: names

      Adds one or more values to names.

    • privileges

      public final IndicesPrivileges.Builder privileges​(java.util.List<IndexPrivilege> list)
      Required - The index level privileges that owners of the role have on the specified indices.

      API name: privileges

      Adds all elements of list to privileges.

    • privileges

      public final IndicesPrivileges.Builder privileges​(IndexPrivilege value, IndexPrivilege... values)
      Required - The index level privileges that owners of the role have on the specified indices.

      API name: privileges

      Adds one or more values to privileges.

    • query

      public final IndicesPrivileges.Builder query​(@Nullable Query value)
      A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. Use a custom query of type ("template", RoleTemplateScript) for templated queries

      API name: query

    • query

      public final IndicesPrivileges.Builder query​(java.util.function.Function<Query.Builder,​ObjectBuilder<Query>> fn)
      A search query that defines the documents the owners of the role have access to. A document within the specified indices must match this query for it to be accessible by the owners of the role. Use a custom query of type ("template", RoleTemplateScript) for templated queries

      API name: query

    • allowRestrictedIndices

      public final IndicesPrivileges.Builder allowRestrictedIndices​(@Nullable java.lang.Boolean value)
      Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices.

      API name: allow_restricted_indices

    • self

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

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