public static bool TryParse(string value, out InstanceAvailability result)
            {
                result = default(InstanceAvailability);

                if( value=="ONLINE")
                    result = InstanceAvailability.ONLINE;
                else if( value=="OFFLINE")
                    result = InstanceAvailability.OFFLINE;
                else if( value=="NEARLINE")
                    result = InstanceAvailability.NEARLINE;
                else if( value=="UNAVAILABLE")
                    result = InstanceAvailability.UNAVAILABLE;
                else
                    return false;

                return true;
            }
 public static string ToString(InstanceAvailability value)
 {
     if( value==InstanceAvailability.ONLINE )
         return "ONLINE";
     else if( value==InstanceAvailability.OFFLINE )
         return "OFFLINE";
     else if( value==InstanceAvailability.NEARLINE )
         return "NEARLINE";
     else if( value==InstanceAvailability.UNAVAILABLE )
         return "UNAVAILABLE";
     else
         throw new ArgumentException("Unrecognized InstanceAvailability value: " + value.ToString());
 }