001package com.box.sdk; 002 003import com.eclipsesource.json.JsonObject; 004 005/** 006 * Represents a Box item to be included when creating a zip file. 007 */ 008public class BoxZipItem { 009 private String type; 010 private String id; 011 012 /** 013 * Constructs a base BoxZipItem object. 014 * 015 * @param type item type, "file" or "folder". 016 * @param id id of the the item. 017 */ 018 public BoxZipItem(String type, String id) { 019 super(); 020 this.type = type; 021 this.id = id; 022 } 023 024 /** 025 * Gets the item type. 026 * 027 * @return the type of the zip item. 028 */ 029 public String getType() { 030 return this.type; 031 } 032 033 /** 034 * Gets the item ID. 035 * 036 * @return the ID fo the zip item. 037 */ 038 public String getID() { 039 return this.id; 040 } 041 042 /** 043 * Gets a JSON object reprsenting this class. 044 * 045 * @return the JSON object reprsenting this class. 046 */ 047 public JsonObject getJSONObject() { 048 JsonObject jsonObj = new JsonObject() 049 .add("type", this.type) 050 .add("id", this.id); 051 return jsonObj; 052 } 053 054}