package com.box.boxjavalibv2.dao;

import java.util.Map;

import com.fasterxml.jackson.annotation.JsonProperty;

public class BoxWebLink extends BoxItem {

    public static final String FIELD_URL = "url";

    /**
     * Constructor.
     */
    public BoxWebLink() {
        setType(BoxResourceType.WEB_LINK.toString());
    }

    /**
     * Copy constructor, this does deep copy for all the fields.
     * 
     * @param obj
     */
    public BoxWebLink(BoxWebLink obj) {
        super(obj);
    }

    /**
     * Instantiate the object from a map. Each entry in the map reflects to a field.
     * 
     * @param map
     */
    public BoxWebLink(Map<String, Object> map) {
        super(map);
    }

    /**
     * Get url of the weblink.
     * 
     * @return url
     */
    @JsonProperty(FIELD_URL)
    public String getUrl() {
        return (String) getValue(FIELD_URL);
    }

    /**
     * Setter. This is only used by {@see <a href="http://jackson.codehaus.org">Jackson JSON processer</a>}
     * 
     * @param url
     *            url
     */
    @JsonProperty(FIELD_URL)
    private void setUrl(String url) {
        put(FIELD_URL, url);
    }

    public BoxWebLink(IBoxParcelWrapper in) {
        super(in);
    }
}

@@ -692,32 +692,189 @@
 er(map);%0A    %7D%0A%0A
+    @Override%0A    @JsonProperty(%22size%22)%0A    public Double getSize() %7B%0A        Double size = super.getSize();%0A        return size == null ? 0d : size;%0A    %7D%0A%0A
     /**%0A     * G

make weblink size return 0 if not applicable to avoid potential null pointers from sdk consumer