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

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

public class ValidationRequestDTO_Generated_JsonEncoderDecoder_ extends org.fusesource.restygwt.client.AbstractJsonEncoderDecoder<org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO> {
  
  public static final ValidationRequestDTO_Generated_JsonEncoderDecoder_ INSTANCE = new ValidationRequestDTO_Generated_JsonEncoderDecoder_();
  
  public com.google.gwt.json.client.JSONValue encode(org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO value) {
    if( value==null ) {
      return getNullType();
    }
      return encodeValidationRequestDTO747199686(value);
    }
    
    private com.google.gwt.json.client.JSONValue encodeValidationRequestDTO747199686( org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO value) {
      com.google.gwt.json.client.JSONObject rc = new com.google.gwt.json.client.JSONObject();
      org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO parseValue = (org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO)value;
      isNotNullValuePut(STRING.encode(parseValue.getDecision()), rc, "decision");
      isNotNullValuePut(STRING.encode(parseValue.getComment()), rc, "comment");
      return rc;
    }
    
    public org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO 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 decodeValidationRequestDTO747199686(object);
      }
      
      private org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO decodeValidationRequestDTO747199686(com.google.gwt.json.client.JSONObject object) {
        org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO rc = new org.silverpeas.mobile.shared.dto.formsonline.ValidationRequestDTO();
        rc.setDecision(getValueToSet(STRING.decode(object.get("decision")), null));
        rc.setComment(getValueToSet(STRING.decode(object.get("comment")), null));
        return rc;
      }
      
    }
