package at.reisinger.obj;

import com.fasterxml.jackson.annotation.*;

/**
 * User Objekt
 */
@JsonAutoDetect
public class User{
    @JsonProperty
    private String name, nachname, email, bio, image;
    @JsonProperty
    private final Credentials credentials;

    @JsonCreator
    public User(@JsonProperty Credentials credentials, @JsonProperty String name, @JsonProperty String nachname, @JsonProperty String email, @SuppressWarnings("unused") @JsonProperty Coins coins, @JsonProperty String bio, @JsonProperty String image) {
        this.credentials = credentials;
        this.name = name;
        this.nachname = nachname;
        this.email = email;
        this.bio = bio;
        this.image = image;
    }

    /**
     * Holt die Bio vom User
     * @return Bio des Users
     */
    @JsonGetter
    public String getBio() {
        return bio;
    }

    /**
     * Setzt die Bio vom User
     * @param bio Bio des Users
     */
    @JsonSetter
    public void setBio(String bio) {
        this.bio = bio;
    }

    /**
     * Holt das image vom user
     * @return Image vom user
     */
    @JsonGetter
    public String getImage() {
        return image;
    }

    /**
     * Setzt das image vom user
     * @param image Image vom user
     */
    @JsonSetter
    public void setImage(String image) {
        this.image = image;
    }

    /**
     * Holt die eindeutigen Logindaten des Users
     * @return Eindeutige Logindaten
     */
    @JsonGetter
    public Credentials getCredentials() {
        return credentials;
    }

    /**
     * Get Name of at.reisinger.obj.User
     * @return Name of at.reisinger.obj.User
     */
    @JsonGetter
    public String getName() {
        return this.name;
    }

    /**
     * Get Nachname of at.reisinger.obj.User
     * @return Nachname of at.reisinger.obj.User
     */
    @JsonGetter
    public String getNachname() {
        return this.nachname;
    }

    /**
     * Email of at.reisinger.obj.User
     * @return Email of at.reisinger.obj.User
     */
    @JsonGetter
    public String getEmail() {
        return this.email;
    }

    /**
     * Setzt den Namen des Users
     * @param name Neuer Name des Users
     */
    @JsonSetter
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Setzt den Nachnamen
     * @param nachname Neuer Nachname
     */
    @JsonSetter
    public void setNachname(String nachname) {
        this.nachname = nachname;
    }

    /**
     * Setzt die Email des Users
     * @param email Neue Email des Users
     */
    @JsonSetter
    public void setEmail(String email) {
        this.email = email;
    }

}
