001package org.nuxeo.box.api.marshalling.dao;
002
003import java.util.Map;
004
005// CHECKSTYLE:OFF
006
007/**
008 * Permission for shared links.
009 */
010public class BoxSharedLinkPermissions extends BoxObject {
011
012    private boolean can_download;
013
014    /**
015     * Default constructor.
016     */
017    public BoxSharedLinkPermissions() {
018    }
019
020    /**
021     * Copy constructor, this does deep copy for all the fields.
022     *
023     * @param obj
024     */
025    public BoxSharedLinkPermissions(BoxSharedLinkPermissions obj) {
026        super(obj);
027    }
028
029    /**
030     * Instantiate the object from a map. Each entry in the map reflects to a field.
031     *
032     * @param map
033     */
034    public BoxSharedLinkPermissions(Map<String, Object> map) {
035        super(map);
036    }
037
038    /**
039     * Constructor.
040     *
041     * @param canDownload can be downloaded
042     */
043    public BoxSharedLinkPermissions(final boolean canDownload) {
044        this.setCan_download(canDownload);
045    }
046
047    /**
048     * whether can_download is true.
049     *
050     * @return can_download
051     */
052    public boolean isCan_download() {
053        return can_download;
054    }
055
056    /**
057     * Setter.
058     *
059     * @param canDownload
060     */
061    private void setCan_download(final boolean canDownload) {
062        this.can_download = canDownload;
063    }
064}