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

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

public class CalendarEventAttributeDTO_Generated_JsonEncoderDecoder_ extends org.fusesource.restygwt.client.AbstractJsonEncoderDecoder<org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO> {
  
  public static final CalendarEventAttributeDTO_Generated_JsonEncoderDecoder_ INSTANCE = new CalendarEventAttributeDTO_Generated_JsonEncoderDecoder_();
  
  public com.google.gwt.json.client.JSONValue encode(org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO value) {
    if( value==null ) {
      return getNullType();
    }
      return encodeCalendarEventAttributeDTO1728972098(value);
    }
    
    private com.google.gwt.json.client.JSONValue encodeCalendarEventAttributeDTO1728972098( org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO value) {
      com.google.gwt.json.client.JSONObject rc = new com.google.gwt.json.client.JSONObject();
      org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO parseValue = (org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO)value;
      isNotNullValuePut(STRING.encode(parseValue.getName()), rc, "name");
      isNotNullValuePut(STRING.encode(parseValue.getValue()), rc, "value");
      return rc;
    }
    
    public org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO 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 decodeCalendarEventAttributeDTO1728972098(object);
      }
      
      private org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO decodeCalendarEventAttributeDTO1728972098(com.google.gwt.json.client.JSONObject object) {
        org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO rc = new org.silverpeas.mobile.shared.dto.almanach.CalendarEventAttributeDTO();
        rc.setName(getValueToSet(STRING.decode(object.get("name")), null));
        rc.setValue(getValueToSet(STRING.decode(object.get("value")), null));
        return rc;
      }
      
    }
