Class PutUserRequest

    • Constructor Detail

      • PutUserRequest

        public PutUserRequest​(java.lang.String username,
                              char[] password,
                              java.util.List<java.lang.String> roles,
                              java.lang.String fullName,
                              java.lang.String email,
                              boolean enabled,
                              java.util.Map<java.lang.String,​java.lang.Object> metadata,
                              RefreshPolicy refreshPolicy)
        Creates a new request that is used to create or update a user in the native realm.
        Parameters:
        username - the username of the user to be created or updated
        password - the password of the user. The password array is not modified by this class. It is the responsibility of the caller to clear the password after receiving a response.
        roles - the roles that this user is assigned
        fullName - the full name of the user that may be used for display purposes
        email - the email address of the user
        enabled - true if the user is enabled and allowed to access elasticsearch
        metadata - a map of additional user attributes that may be used in templating roles
        refreshPolicy - the refresh policy for the request.
    • Method Detail

      • getUsername

        public java.lang.String getUsername()
      • getRoles

        public java.util.List<java.lang.String> getRoles()
      • getFullName

        public java.lang.String getFullName()
      • getEmail

        public java.lang.String getEmail()
      • getMetadata

        public java.util.Map<java.lang.String,​java.lang.Object> getMetadata()
      • getPassword

        public char[] getPassword()
      • isEnabled

        public boolean isEnabled()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • validate

        public java.util.Optional<ValidationException> validate()
        Description copied from interface: Validatable
        Perform validation. This method does not have to be overridden in the event that no validation needs to be done, or the validation was done during object construction time. A ValidationException that is not null is assumed to contain validation errors and will be thrown.
        Specified by:
        validate in interface Validatable
        Returns:
        An Optional ValidationException that contains a list of validation errors.