001package org.nuxeo.box.api.marshalling.dao;
002
003import com.fasterxml.jackson.annotation.JsonProperty;
004
005import java.util.Map;
006
007/**
008 * Version of a file.
009 */
010public class BoxServiceAction extends BoxObject {
011
012    public static final String FIELD_ID = "id";
013
014    public static final String FIELD_NAME = "name";
015
016    public BoxServiceAction() {
017    }
018
019    /**
020     * Copy constructor, this does deep copy for all the fields.
021     *
022     * @param obj
023     */
024    public BoxServiceAction(BoxServiceAction obj) {
025        super(obj);
026    }
027
028    /**
029     * Instantiate the object from a map. Each entry in the map reflects to a field.
030     *
031     * @param map
032     */
033    public BoxServiceAction(Map<String, Object> map) {
034        super(map);
035    }
036
037    /**
038     * Get id.
039     *
040     * @return id
041     */
042    @JsonProperty(FIELD_ID)
043    public String getId() {
044        return (String) getValue(FIELD_ID);
045    }
046
047    /**
048     * Setter. This is only used by {@see <a href="http://jackson.codehaus .org">Jackson JSON processer</a>}
049     *
050     * @param id id
051     */
052    @JsonProperty(FIELD_ID)
053    private void setId(String id) {
054        put(FIELD_ID, id);
055    }
056
057    @JsonProperty(FIELD_NAME)
058    public String getCreatedBy() {
059        return (String) getValue(FIELD_NAME);
060    }
061
062    @JsonProperty(FIELD_NAME)
063    public void getName(String name) {
064        put(FIELD_NAME, name);
065    }
066
067}