001package org.nuxeo.box.api.marshalling.dao;
002
003import com.fasterxml.jackson.annotation.JsonProperty;
004
005import java.util.Map;
006
007public class BoxEmailAlias extends BoxTypedObject {
008
009    public static final String FIELD_IS_CONFIRMED = "is_confirmed";
010
011    public static final String FIELD_EMAIL = "email";
012
013    public BoxEmailAlias() {
014        setType(BoxResourceType.EMAIL_ALIAS.toString());
015    }
016
017    /**
018     * Copy constructor, this does deep copy for all the fields.
019     *
020     * @param obj
021     */
022    public BoxEmailAlias(BoxEmailAlias obj) {
023        super(obj);
024    }
025
026    /**
027     * Instantiate the object from a map. Each entry in the map reflects to a field.
028     *
029     * @param map
030     */
031    public BoxEmailAlias(Map<String, Object> map) {
032        super(map);
033    }
034
035    @JsonProperty(FIELD_IS_CONFIRMED)
036    public Boolean isConfirmed() {
037        return (Boolean) getValue(FIELD_IS_CONFIRMED);
038    }
039
040    @JsonProperty(FIELD_IS_CONFIRMED)
041    private void setIsConfirmed(Boolean isConfirmed) {
042        put(FIELD_IS_CONFIRMED, isConfirmed);
043    }
044
045    @JsonProperty(FIELD_EMAIL)
046    public String getEmail() {
047        return (String) getValue(FIELD_EMAIL);
048    }
049
050    @JsonProperty(FIELD_EMAIL)
051    private void setEmail(String email) {
052        put(FIELD_EMAIL, email);
053    }
054}