import org.kobjects.serialization.PropertyInfo;
import org.kobjects.serialization.ElementType;
import org.kobjects.serialization.KvmSerializable;

public class SystemAlert implements KvmSerializable {
    
    private long timeStamp = -1;
    private String message = null;
    
    /*
     *  Used by KSOAP Implementation methods
     */
    private static int PROP_COUNT = 2;
    
	 private static PropertyInfo PI_timeStamp = 
		new PropertyInfo("timeStamp",ElementType.LONG_CLASS);
    
	 private static PropertyInfo PI_message   = 
		new PropertyInfo("message",ElementType.STRING_CLASS);
    
	 private static PropertyInfo[] PI_PROP_ARRAY = 
		{PI_timeStamp,PI_message};
    
    public SystemAlert() {
    }
    
    public java.lang.String getMessage() {
        return message;
    }
    
    public void setMessage(java.lang.String message) {
        this.message = message;
    }
    
    public long getTimeStamp() {
        return timeStamp;
    }
    
    public void setTimeStamp(long timeStamp) {
        this.timeStamp = timeStamp;
    }
    
    /*
     *  Implementation Logic for KSOAP
     */
    public Object getProperty(int param) {
        if ( param == 0 ) {
            return new Long(getTimeStamp());
        } else if ( param == 1 ) {
            return getMessage();
        } else {
            return null;
        }
    }
        
    public void setProperty(int param, Object obj) {
        if ( param == 0 ) {
            long l = ((Long) obj).longValue();
            setTimeStamp( l );
        } else if ( param == 1 ) {
            setMessage( (String) obj );
        } else {
            
        }
    }
    
    public int getPropertyCount() {
        return PI_PROP_ARRAY.length;
    }
    
    public void getPropertyInfo(int param, org.kobjects.serialization.PropertyInfo propertyInfo) {
        propertyInfo.name = PI_PROP_ARRAY[param].name;
        propertyInfo.nonpermanent = PI_PROP_ARRAY[param].nonpermanent;
        propertyInfo.copy(PI_PROP_ARRAY[param]);
    }
    
}