package org.silverpeas.mobile.shared.dto.survey;

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

public class ResponseDTO_Generated_JsonEncoderDecoder_ extends org.fusesource.restygwt.client.AbstractJsonEncoderDecoder<org.silverpeas.mobile.shared.dto.survey.ResponseDTO> {
  
  public static final ResponseDTO_Generated_JsonEncoderDecoder_ INSTANCE = new ResponseDTO_Generated_JsonEncoderDecoder_();
  
  public com.google.gwt.json.client.JSONValue encode(org.silverpeas.mobile.shared.dto.survey.ResponseDTO value) {
    if( value==null ) {
      return getNullType();
    }
      return encodeResponseDTO1842569300(value);
    }
    
    private com.google.gwt.json.client.JSONValue encodeResponseDTO1842569300( org.silverpeas.mobile.shared.dto.survey.ResponseDTO value) {
      com.google.gwt.json.client.JSONObject rc = new com.google.gwt.json.client.JSONObject();
      org.silverpeas.mobile.shared.dto.survey.ResponseDTO parseValue = (org.silverpeas.mobile.shared.dto.survey.ResponseDTO)value;
      isNotNullValuePut(STRING.encode(parseValue.getId()), rc, "id");
      isNotNullValuePut(STRING.encode(parseValue.getContent()), rc, "content");
      return rc;
    }
    
    public org.silverpeas.mobile.shared.dto.survey.ResponseDTO 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 decodeResponseDTO1842569300(object);
      }
      
      private org.silverpeas.mobile.shared.dto.survey.ResponseDTO decodeResponseDTO1842569300(com.google.gwt.json.client.JSONObject object) {
        org.silverpeas.mobile.shared.dto.survey.ResponseDTO rc = new org.silverpeas.mobile.shared.dto.survey.ResponseDTO();
        rc.setId(getValueToSet(STRING.decode(object.get("id")), null));
        rc.setContent(getValueToSet(STRING.decode(object.get("content")), null));
        return rc;
      }
      
    }
