package com.atlassian.stash.internal.web.admin;

import com.atlassian.bitbucket.validation.annotation.RequiredString;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Email;

public class UserForm {
    private String username;
    private String fullname;
    private String email;
    protected Boolean notify;

    @RequiredString(size = 255)
    public String getUsername() {
        return username;
    }

    @RequiredString(size = 255)
    public String getFullname() {
        return fullname;
    }

    @RequiredString(size = 255) @Email
    public String getEmail() {
        return email;
    }

    public Boolean getNotify() {
        return notify;
    }

    public void setUsername(String username) {
        this.username = StringUtils.trim(username);
    }

    public void setFullname(String fullname) {
        this.fullname = StringUtils.trim(fullname);
    }

    public void setEmail(String email) {
        this.email = StringUtils.trim(email);
    }

    public void setNotify(Boolean notify) {
        this.notify = notify;
    }
}
