package org.silverpeas.mobile.shared;

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

public class StreamingList__org_silverpeas_mobile_shared_dto_notifications_NotificationReceivedDTO_Generated_JsonEncoderDecoder_ extends org.fusesource.restygwt.client.AbstractJsonEncoderDecoder<org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO>> {
  
  public static final StreamingList__org_silverpeas_mobile_shared_dto_notifications_NotificationReceivedDTO_Generated_JsonEncoderDecoder_ INSTANCE = new StreamingList__org_silverpeas_mobile_shared_dto_notifications_NotificationReceivedDTO_Generated_JsonEncoderDecoder_();
  
  public com.google.gwt.json.client.JSONValue encode(org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO> value) {
    if( value==null ) {
      return getNullType();
    }
      return encodeStreamingList311514126(value);
    }
    
    private com.google.gwt.json.client.JSONValue encodeStreamingList311514126( org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO> 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.notifications.NotificationReceivedDTO> parseValue = (org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO>)value;
      isNotNullValuePut(BOOLEAN.encode(parseValue.getMoreElement()), rc, "moreElement");
      isNotNullValuePut(BOOLEAN.encode(parseValue.isFirstCall()), rc, "firstCall");
      isNotNullValuePut(toJSON(parseValue.getList(), org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO_Generated_JsonEncoderDecoder_.INSTANCE), rc, "list");
      return rc;
    }
    
    public org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO> 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 decodeStreamingList311514126(object);
      }
      
      private org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO> decodeStreamingList311514126(com.google.gwt.json.client.JSONObject object) {
        org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO> rc = new org.silverpeas.mobile.shared.StreamingList<org.silverpeas.mobile.shared.dto.notifications.NotificationReceivedDTO>();
        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.notifications.NotificationReceivedDTO_Generated_JsonEncoderDecoder_.INSTANCE), null));
        return rc;
      }
      
    }
