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