Class PutUserRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • email

      public final PutUserRequest.Builder email(@Nullable String value)
      The email of the user.

      API name: email

    • enabled

      public final PutUserRequest.Builder enabled(@Nullable Boolean value)
      Specifies whether the user is enabled.

      API name: enabled

    • fullName

      public final PutUserRequest.Builder fullName(@Nullable String value)
      The full name of the user.

      API name: full_name

    • metadata

      public final PutUserRequest.Builder metadata(Map<String,JsonData> map)
      Arbitrary metadata that you want to associate with the user.

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final PutUserRequest.Builder metadata(String key, JsonData value)
      Arbitrary metadata that you want to associate with the user.

      API name: metadata

      Adds an entry to metadata.

    • password

      public final PutUserRequest.Builder password(@Nullable String value)
      The user's password. Passwords must be at least 6 characters long. When adding a user, one of password or password_hash is required. When updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's password

      API name: password

    • passwordHash

      public final PutUserRequest.Builder passwordHash(@Nullable String value)
      A hash of the user's password. This must be produced using the same hashing algorithm as has been configured for password storage. For more details, see the explanation of the xpack.security.authc.password_hashing.algorithm setting in the user cache and password hash algorithm documentation. Using this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons. The password parameter and the password_hash parameter cannot be used in the same request.

      API name: password_hash

    • refresh

      public final PutUserRequest.Builder refresh(@Nullable Refresh value)
      Valid values are true, false, and wait_for. These values have the same meaning as in the index API, but the default value for this API is true.

      API name: refresh

    • roles

      public final PutUserRequest.Builder roles(List<String> list)
      A set of roles the user has. The roles determine the user's access permissions. To create a user without any roles, specify an empty list ([]).

      API name: roles

      Adds all elements of list to roles.

    • roles

      public final PutUserRequest.Builder roles(String value, String... values)
      A set of roles the user has. The roles determine the user's access permissions. To create a user without any roles, specify an empty list ([]).

      API name: roles

      Adds one or more values to roles.

    • username

      public final PutUserRequest.Builder username(String value)
      Required - An identifier for the user.

      NOTE: Usernames must be at least 1 and no more than 507 characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. Leading or trailing whitespace is not allowed.

      API name: username

    • self

      protected PutUserRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<PutUserRequest.Builder>
    • build

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