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

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

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