package org.silverpeas.mobile.shared;

import static org.fusesource.restygwt.client.AbstractJsonEncoderDecoder.*;

public class StreamingList__org_silverpeas_mobile_shared_dto_workflow_WorkflowInstanceDTO_Generated_JsonEncoderDecoder_ extends org.fusesource.restygwt.client.AbstractJsonEncoderDecoder<org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO>> {
  
  public static final StreamingList__org_silverpeas_mobile_shared_dto_workflow_WorkflowInstanceDTO_Generated_JsonEncoderDecoder_ INSTANCE = new StreamingList__org_silverpeas_mobile_shared_dto_workflow_WorkflowInstanceDTO_Generated_JsonEncoderDecoder_();
  
  public com.google.gwt.json.client.JSONValue encode(org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO> value) {
    if( value==null ) {
      return getNullType();
    }
      return encodeStreamingList1388862463(value);
    }
    
    private com.google.gwt.json.client.JSONValue encodeStreamingList1388862463( org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO> value) {
      com.google.gwt.json.client.JSONObject rc = new com.google.gwt.json.client.JSONObject();
      org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO> parseValue = (org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO>)value;
      isNotNullValuePut(BOOLEAN.encode(parseValue.getMoreElement()), rc, "moreElement");
      isNotNullValuePut(BOOLEAN.encode(parseValue.isFirstCall()), rc, "firstCall");
      isNotNullValuePut(toJSON(parseValue.getList(), org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO_Generated_JsonEncoderDecoder_.INSTANCE), rc, "list");
      return rc;
    }
    
    public org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO> decode(com.google.gwt.json.client.JSONValue value) {
      if( value == null || value.isNull()!=null ) {
        return null;
      }
      com.google.gwt.json.client.JSONObject object = toObject(value);
        return decodeStreamingList1388862463(object);
      }
      
      private org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO> decodeStreamingList1388862463(com.google.gwt.json.client.JSONObject object) {
        org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO> rc = new org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO>();
        rc.setMoreElement(getValueToSet(BOOLEAN.decode(object.get("moreElement")), false));
        rc.setFirstCall(getValueToSet(BOOLEAN.decode(object.get("firstCall")), false));
        rc.setList(getValueToSet(toList(object.get("list"), org.silverpeas.mobile.shared.dto.workflow.WorkflowInstanceDTO_Generated_JsonEncoderDecoder_.INSTANCE), null));
        return rc;
      }
      
    }
