package com.gh.gamecenter.entity;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;

public class GameUpdateEntity {

	@SerializedName("game_id")
	private String id;

	private String name;

	private String icon;

	@SerializedName("package")
	private String packageName;

	private String size;

	private String version;

	@SerializedName("gh_version")
	private String ghVersion;

	private String url;

	private String platform;

	private boolean isPluggable;

	private ApkEntity apk;
	
	private String etag;

	private String brief;

	private ArrayList<String> tag;

	public GameUpdateEntity() {
		
	}

	public String getBrief() {
		return brief;
	}

	public void setBrief(String brief) {
		this.brief = brief;
	}

	public void setTag(ArrayList<String> tag) {
		this.tag = tag;
	}

	public ArrayList<String> getTag() {
		return tag;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getGhVersion() {
		return ghVersion;
	}

	public void setGhVersion(String ghVersion) {
		this.ghVersion = ghVersion;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getPlatform() {
		return platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public boolean isPluggable() {
		return isPluggable;
	}

	public void setPluggable(boolean isPluggable) {
		this.isPluggable = isPluggable;
	}

	public String getEtag() {
		return etag;
	}

	public void setEtag(String etag) {
		this.etag = etag;
	}

	public ApkEntity getApk() {
		if (apk == null) {
			apk = new ApkEntity();
			apk.setGhVersion(ghVersion);
			apk.setVersion(version);
			apk.setPackageName(packageName);
			apk.setPlatform(platform);
			apk.setSize(size);
			apk.setUrl(url);
			apk.setEtag(etag);
		}
		return apk;
	}

	public void setApk(ApkEntity apk) {
		this.apk = apk;
	}

	@Override
	public String toString() {
		return "GameUpdateEntity{" +
				"id='" + id + '\'' +
				", name='" + name + '\'' +
				", icon='" + icon + '\'' +
				", packageName='" + packageName + '\'' +
				", size='" + size + '\'' +
				", version='" + version + '\'' +
				", ghVersion='" + ghVersion + '\'' +
				", url='" + url + '\'' +
				", platform='" + platform + '\'' +
				", isPluggable=" + isPluggable +
				", apk=" + apk +
				", etag='" + etag + '\'' +
				", brief='" + brief + '\'' +
				", tag=" + tag +
				'}';
	}
}
