Class PutRoleMappingRequest.Builder

All Implemented Interfaces:
WithJson<PutRoleMappingRequest.Builder>, ObjectBuilder<PutRoleMappingRequest>
Enclosing class:
PutRoleMappingRequest

public static class PutRoleMappingRequest.Builder extends RequestBase.AbstractBuilder<PutRoleMappingRequest.Builder> implements ObjectBuilder<PutRoleMappingRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • enabled

      public final PutRoleMappingRequest.Builder enabled(@Nullable Boolean value)
      Mappings that have enabled set to false are ignored when role mapping is performed.

      API name: enabled

    • metadata

      public final PutRoleMappingRequest.Builder metadata(Map<String,JsonData> map)
      Additional metadata that helps define which roles are assigned to each user. Within the metadata object, keys beginning with _ are reserved for system usage.

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final PutRoleMappingRequest.Builder metadata(String key, JsonData value)
      Additional metadata that helps define which roles are assigned to each user. Within the metadata object, keys beginning with _ are reserved for system usage.

      API name: metadata

      Adds an entry to metadata.

    • name

      public final PutRoleMappingRequest.Builder name(String value)
      Required - The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way.

      API name: name

    • refresh

      public final PutRoleMappingRequest.Builder refresh(@Nullable Refresh value)
      If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.

      API name: refresh

    • roleTemplates

      public final PutRoleMappingRequest.Builder roleTemplates(List<RoleTemplate> list)
      A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. Exactly one of roles or role_templates must be specified.

      API name: role_templates

      Adds all elements of list to roleTemplates.

    • roleTemplates

      public final PutRoleMappingRequest.Builder roleTemplates(RoleTemplate value, RoleTemplate... values)
      A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. Exactly one of roles or role_templates must be specified.

      API name: role_templates

      Adds one or more values to roleTemplates.

    • roleTemplates

      A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. Exactly one of roles or role_templates must be specified.

      API name: role_templates

      Adds a value to roleTemplates using a builder lambda.

    • roles

      public final PutRoleMappingRequest.Builder roles(List<String> list)
      A list of role names that are granted to the users that match the role mapping rules. Exactly one of roles or role_templates must be specified.

      API name: roles

      Adds all elements of list to roles.

    • roles

      public final PutRoleMappingRequest.Builder roles(String value, String... values)
      A list of role names that are granted to the users that match the role mapping rules. Exactly one of roles or role_templates must be specified.

      API name: roles

      Adds one or more values to roles.

    • rules

      public final PutRoleMappingRequest.Builder rules(@Nullable RoleMappingRule value)
      The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.

      API name: rules

    • rules

      The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.

      API name: rules

    • rules

      The rules that determine which users should be matched by the mapping. A rule is a logical condition that is expressed by using a JSON DSL.

      API name: rules

    • runAs

      public final PutRoleMappingRequest.Builder runAs(List<String> list)
      API name: run_as

      Adds all elements of list to runAs.

    • runAs

      public final PutRoleMappingRequest.Builder runAs(String value, String... values)
      API name: run_as

      Adds one or more values to runAs.

    • self

      Specified by:
      self in class RequestBase.AbstractBuilder<PutRoleMappingRequest.Builder>
    • build

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