package com.sfnt.ldk.model;

import java.util.List;

public class Keys {
    private int count;
    private List<KeyInfo> key;

    public int getCount()
    {
    	return count;
    }
    public void setCount(int count)
    {
    	this.count = count;
    }
    
    public List<KeyInfo> getKey()
    {
    	return key;
    }
    public void setKey(List<KeyInfo> key)
    {
    	this.key = key;
    }
    
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("{\n");
		sb.append("\"key\": [");
		for(int i = 0; i < key.size(); i++)
		{
			sb.append(toIndentedString(key.get(i)));
			if(i != key.size() -1 )
				sb.append("\",\n");
		}
		sb.append("],\n");
        sb.append("\"count\":").append(key.size()).append("\n");
		sb.append("}");
		return sb.toString();
	}

	/**
	 * Convert the given object to string with each line indented by 4 spaces
	 * (except the first line).
	 */
	private String toIndentedString(java.lang.Object o) {
		if (o == null) {
			return "null";
		}
		return o.toString().replace("\n", "\n    ");
	}
}
