internal static string ToSerializedValue(this HardwareComponentStatus value)
        {
            switch (value)
            {
            case HardwareComponentStatus.Unknown:
                return("Unknown");

            case HardwareComponentStatus.NotPresent:
                return("NotPresent");

            case HardwareComponentStatus.PoweredOff:
                return("PoweredOff");

            case HardwareComponentStatus.Ok:
                return("Ok");

            case HardwareComponentStatus.Recovering:
                return("Recovering");

            case HardwareComponentStatus.Warning:
                return("Warning");

            case HardwareComponentStatus.Failure:
                return("Failure");
            }
            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the HardwareComponent class.
 /// </summary>
 /// <param name="componentId">The component ID.</param>
 /// <param name="displayName">The display name of the hardware
 /// component.</param>
 /// <param name="status">The status of the hardware component. Possible
 /// values include: 'Unknown', 'NotPresent', 'PoweredOff', 'Ok',
 /// 'Recovering', 'Warning', 'Failure'</param>
 /// <param name="statusDisplayName">The display name of the status of
 /// hardware component.</param>
 public HardwareComponent(string componentId, string displayName, HardwareComponentStatus status, string statusDisplayName)
 {
     ComponentId       = componentId;
     DisplayName       = displayName;
     Status            = status;
     StatusDisplayName = statusDisplayName;
 }