// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.elastic.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The properties of the request required for creating user on elastic side. */
@Fluent
public final class ExternalUserInfo {
    /*
     * Username of the user to be created or updated
     */
    @JsonProperty(value = "userName")
    private String username;

    /*
     * Full name of the user to be created or updated
     */
    @JsonProperty(value = "fullName")
    private String fullName;

    /*
     * Password of the user to be created or updated
     */
    @JsonProperty(value = "password")
    private String password;

    /*
     * Email id of the user to be created or updated
     */
    @JsonProperty(value = "emailId")
    private String emailId;

    /*
     * Roles to be assigned for  created or updated user
     */
    @JsonProperty(value = "roles")
    private List<String> roles;

    /** Creates an instance of ExternalUserInfo class. */
    public ExternalUserInfo() {
    }

    /**
     * Get the username property: Username of the user to be created or updated.
     *
     * @return the username value.
     */
    public String username() {
        return this.username;
    }

    /**
     * Set the username property: Username of the user to be created or updated.
     *
     * @param username the username value to set.
     * @return the ExternalUserInfo object itself.
     */
    public ExternalUserInfo withUsername(String username) {
        this.username = username;
        return this;
    }

    /**
     * Get the fullName property: Full name of the user to be created or updated.
     *
     * @return the fullName value.
     */
    public String fullName() {
        return this.fullName;
    }

    /**
     * Set the fullName property: Full name of the user to be created or updated.
     *
     * @param fullName the fullName value to set.
     * @return the ExternalUserInfo object itself.
     */
    public ExternalUserInfo withFullName(String fullName) {
        this.fullName = fullName;
        return this;
    }

    /**
     * Get the password property: Password of the user to be created or updated.
     *
     * @return the password value.
     */
    public String password() {
        return this.password;
    }

    /**
     * Set the password property: Password of the user to be created or updated.
     *
     * @param password the password value to set.
     * @return the ExternalUserInfo object itself.
     */
    public ExternalUserInfo withPassword(String password) {
        this.password = password;
        return this;
    }

    /**
     * Get the emailId property: Email id of the user to be created or updated.
     *
     * @return the emailId value.
     */
    public String emailId() {
        return this.emailId;
    }

    /**
     * Set the emailId property: Email id of the user to be created or updated.
     *
     * @param emailId the emailId value to set.
     * @return the ExternalUserInfo object itself.
     */
    public ExternalUserInfo withEmailId(String emailId) {
        this.emailId = emailId;
        return this;
    }

    /**
     * Get the roles property: Roles to be assigned for created or updated user.
     *
     * @return the roles value.
     */
    public List<String> roles() {
        return this.roles;
    }

    /**
     * Set the roles property: Roles to be assigned for created or updated user.
     *
     * @param roles the roles value to set.
     * @return the ExternalUserInfo object itself.
     */
    public ExternalUserInfo withRoles(List<String> roles) {
        this.roles = roles;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
