//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_MediaAccessDevice.cs
//
// Contents: A MediaAccessDevice represents the ability to access one or more media and use this media to store and retrieve data.
// This file was automatically generated from CIM_MediaAccessDevice.mof
//
//----------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Globalization;
using System.Xml.Serialization;
using System.IO;
using Intel.Manageability.WSManagement;
using Intel.Manageability.Cim.Untyped;
namespace Intel.Manageability.Cim.Typed
{
///
///A MediaAccessDevice represents the ability to access one or more media and use this media to store and retrieve data.
///
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_MediaAccessDevice")]
[System.Xml.Serialization.XmlRootAttribute("CIM_MediaAccessDevice", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_MediaAccessDevice", IsNullable=false)]
public class CIM_MediaAccessDevice : CIM_LogicalDevice
{
///
/// Default constructor.
///
public CIM_MediaAccessDevice() :base()
{
}
///
/// Constructor that recieves an xml string for deserialization.
///
/// xml string to deserialize
public CIM_MediaAccessDevice(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
///
/// Constructor which recieves a Ws-Management client object.
///
/// Ws-Management client
public CIM_MediaAccessDevice(IWSManClient client): base(client)
{
}
///
/// Remove Capabilities field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveCapabilities()
{
RemoveField("Capabilities");
}
///
/// Is true if the field Capabilities exists in the current object,
/// otherwise is false.
///
public virtual bool CapabilitiesExist
{
get
{
return ContainsField("Capabilities");
}
}
///
/// Optional, Capabilities of the MediaAccessDevice. For example, the Device may support "Random Access", removeable media and "Automatic Cleaning". In this case, the values 3, 7 and 9 would be written to the array.
/// Several of the enumerated values require some explanation: 1) Value 11, Supports Dual Sided Media, distinguishes a Device that can access both sides of dual sided Media, from a Device that reads only a single side and requires the Media to be flipped; and, 2) Value 12, Predismount Eject Not Required, indicates that Media does not have to be explicitly ejected from the Device before being accessed by a PickerElement.
///
[CimField(false, false)]
public virtual ushort[] Capabilities
{
get
{
return CimTypesUtils.StringArrayToArray(this["Capabilities"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray(value);
this.SetOrAddField("Capabilities", arr);
}
}
///
/// Remove CapabilityDescriptions field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveCapabilityDescriptions()
{
RemoveField("CapabilityDescriptions");
}
///
/// Is true if the field CapabilityDescriptions exists in the current object,
/// otherwise is false.
///
public virtual bool CapabilityDescriptionsExist
{
get
{
return ContainsField("CapabilityDescriptions");
}
}
///
/// Optional, An array of free-form strings providing more detailed explanations for any of the AccessDevice features indicated in the Capabilities array. Note, each entry of this array is related to the entry in the Capabilities array that is located at the same index.
///
[CimField(false, false)]
public virtual string[] CapabilityDescriptions
{
get
{
return CimTypesUtils.StringArrayToArray(this["CapabilityDescriptions"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray(value);
this.SetOrAddField("CapabilityDescriptions", arr);
}
}
///
/// Remove CompressionMethod field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveCompressionMethod()
{
RemoveField("CompressionMethod");
}
///
/// Is true if the field CompressionMethod exists in the current object,
/// otherwise is false.
///
public virtual bool CompressionMethodExist
{
get
{
return ContainsField("CompressionMethod");
}
}
///
/// Optional, A free form string indicating the algorithm or tool used by the device to support compression. If it is not possible or not desired to describe the compression scheme (perhaps because it is not known), recommend using the following words: "Unknown" to represent that it is not known whether the device supports compression capabilities or not, "Compressed" to represent that the device supports compression capabilities but either its compression scheme is not known or not disclosed, and "Not Compressed" to represent that the devices does not support compression capabilities.
///
[CimField(false, false)]
public virtual string CompressionMethod
{
get
{
return this.GetField("CompressionMethod")[0];
}
set
{
this.SetOrAddField("CompressionMethod",value);
}
}
///
/// Remove DefaultBlockSize field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveDefaultBlockSize()
{
RemoveField("DefaultBlockSize");
}
///
/// Is true if the field DefaultBlockSize exists in the current object,
/// otherwise is false.
///
public virtual bool DefaultBlockSizeExist
{
get
{
return ContainsField("DefaultBlockSize");
}
}
///
/// Optional, Default block size, in bytes, for this Device.
///
[CimField(false, false)]
public virtual ulong DefaultBlockSize
{
get
{
return ulong.Parse(this["DefaultBlockSize"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("DefaultBlockSize",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove ErrorMethodology field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveErrorMethodology()
{
RemoveField("ErrorMethodology");
}
///
/// Is true if the field ErrorMethodology exists in the current object,
/// otherwise is false.
///
public virtual bool ErrorMethodologyExist
{
get
{
return ContainsField("ErrorMethodology");
}
}
///
/// Optional, ErrorMethodology is a free-form string describing the type(s) of error detection and correction supported by this Device.
///
[CimField(false, false)]
public virtual string ErrorMethodology
{
get
{
return this.GetField("ErrorMethodology")[0];
}
set
{
this.SetOrAddField("ErrorMethodology",value);
}
}
///
/// Remove LastCleaned field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveLastCleaned()
{
RemoveField("LastCleaned");
}
///
/// Is true if the field LastCleaned exists in the current object,
/// otherwise is false.
///
public virtual bool LastCleanedExist
{
get
{
return ContainsField("LastCleaned");
}
}
///
/// Optional, The date and time on which the Device was last cleaned.
///
[CimField(false, false)]
public virtual CimDateTime LastCleaned
{
get
{
return CimDateTime.Parse(this["LastCleaned"][0]);
}
set
{
this.SetOrAddField("LastCleaned",value.ToString());
}
}
///
/// Remove LoadTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveLoadTime()
{
RemoveField("LoadTime");
}
///
/// Is true if the field LoadTime exists in the current object,
/// otherwise is false.
///
public virtual bool LoadTimeExist
{
get
{
return ContainsField("LoadTime");
}
}
///
/// Optional, Time in milliseconds from 'load' to being able to read or write a Media. For example, for DiskDrives, this is the interval between a disk not spinning to the disk reporting that it is ready for read/write (ie, the disk spinning at nominal speeds). For TapeDrives, this is the time from a Media being injected to reporting that it is ready for an application. This is usually at the tape's BOT area.
///
[CimField(false, false)]
public virtual ulong LoadTime
{
get
{
return ulong.Parse(this["LoadTime"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("LoadTime",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove MaxAccessTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMaxAccessTime()
{
RemoveField("MaxAccessTime");
}
///
/// Is true if the field MaxAccessTime exists in the current object,
/// otherwise is false.
///
public virtual bool MaxAccessTimeExist
{
get
{
return ContainsField("MaxAccessTime");
}
}
///
/// Optional, Time in milliseconds to move from the first location on the Media to the location that is furthest with respect to time. For a DiskDrive, this represents full seek + full rotational delay. For TapeDrives, this represents a search from the beginning of the tape to the most physically distant point. (The end of a tape may be at its most physically distant point, but this is not necessarily true.)
///
[CimField(false, false)]
public virtual ulong MaxAccessTime
{
get
{
return ulong.Parse(this["MaxAccessTime"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MaxAccessTime",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove MaxBlockSize field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMaxBlockSize()
{
RemoveField("MaxBlockSize");
}
///
/// Is true if the field MaxBlockSize exists in the current object,
/// otherwise is false.
///
public virtual bool MaxBlockSizeExist
{
get
{
return ContainsField("MaxBlockSize");
}
}
///
/// Optional, Maximum block size, in bytes, for media accessed by this Device.
///
[CimField(false, false)]
public virtual ulong MaxBlockSize
{
get
{
return ulong.Parse(this["MaxBlockSize"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MaxBlockSize",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove MaxMediaSize field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMaxMediaSize()
{
RemoveField("MaxMediaSize");
}
///
/// Is true if the field MaxMediaSize exists in the current object,
/// otherwise is false.
///
public virtual bool MaxMediaSizeExist
{
get
{
return ContainsField("MaxMediaSize");
}
}
///
/// Optional, Maximum size, in KBytes, of media supported by this Device. KBytes is interpreted as the number of bytes multiplied by 1000 (NOT the number of bytes multiplied by 1024).
///
[CimField(false, false)]
public virtual ulong MaxMediaSize
{
get
{
return ulong.Parse(this["MaxMediaSize"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MaxMediaSize",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove MaxUnitsBeforeCleaning field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMaxUnitsBeforeCleaning()
{
RemoveField("MaxUnitsBeforeCleaning");
}
///
/// Is true if the field MaxUnitsBeforeCleaning exists in the current object,
/// otherwise is false.
///
public virtual bool MaxUnitsBeforeCleaningExist
{
get
{
return ContainsField("MaxUnitsBeforeCleaning");
}
}
///
/// Optional, An unsigned integer indicating the maximum 'units' that can be used, with respect to the AccessDevice, before the Device should be cleaned. The property, UnitsDescription, defines how 'units' should be interpreted.
///
[CimField(false, false)]
public virtual ulong MaxUnitsBeforeCleaning
{
get
{
return ulong.Parse(this["MaxUnitsBeforeCleaning"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MaxUnitsBeforeCleaning",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove MediaIsLocked field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMediaIsLocked()
{
RemoveField("MediaIsLocked");
}
///
/// Is true if the field MediaIsLocked exists in the current object,
/// otherwise is false.
///
public virtual bool MediaIsLockedExist
{
get
{
return ContainsField("MediaIsLocked");
}
}
///
/// Optional, True indicates that the media is locked in the Device and can not be ejected. For non-removeable Devices, this value should be true.
///
[CimField(false, false)]
public virtual bool MediaIsLocked
{
get
{
return bool.Parse(this["MediaIsLocked"][0]);
}
set
{
this.SetOrAddField("MediaIsLocked",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Remove MinBlockSize field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMinBlockSize()
{
RemoveField("MinBlockSize");
}
///
/// Is true if the field MinBlockSize exists in the current object,
/// otherwise is false.
///
public virtual bool MinBlockSizeExist
{
get
{
return ContainsField("MinBlockSize");
}
}
///
/// Optional, Minimum block size, in bytes, for media accessed by this Device.
///
[CimField(false, false)]
public virtual ulong MinBlockSize
{
get
{
return ulong.Parse(this["MinBlockSize"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MinBlockSize",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove MountCount field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveMountCount()
{
RemoveField("MountCount");
}
///
/// Is true if the field MountCount exists in the current object,
/// otherwise is false.
///
public virtual bool MountCountExist
{
get
{
return ContainsField("MountCount");
}
}
///
/// Optional, For a MediaAccessDevice that supports removable Media, the number of times that Media have been mounted for data transfer or to clean the Device. For Devices accessing nonremovable Media, such as hard disks, this property is not applicable and should be set to 0.
///
[CimField(false, false)]
public virtual ulong MountCount
{
get
{
return ulong.Parse(this["MountCount"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MountCount",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove NeedsCleaning field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveNeedsCleaning()
{
RemoveField("NeedsCleaning");
}
///
/// Is true if the field NeedsCleaning exists in the current object,
/// otherwise is false.
///
public virtual bool NeedsCleaningExist
{
get
{
return ContainsField("NeedsCleaning");
}
}
///
/// Optional, Boolean indicating that the MediaAccessDevice needs cleaning. Whether manual or automatic cleaning is possible is indicated in the Capabilities array property.
///
[CimField(false, false)]
public virtual bool NeedsCleaning
{
get
{
return bool.Parse(this["NeedsCleaning"][0]);
}
set
{
this.SetOrAddField("NeedsCleaning",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
///
/// Remove NumberOfMediaSupported field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveNumberOfMediaSupported()
{
RemoveField("NumberOfMediaSupported");
}
///
/// Is true if the field NumberOfMediaSupported exists in the current object,
/// otherwise is false.
///
public virtual bool NumberOfMediaSupportedExist
{
get
{
return ContainsField("NumberOfMediaSupported");
}
}
///
/// Optional, When the MediaAccessDevice supports multiple individual Media, this property defines the maximum number which can be supported or inserted.
///
[CimField(false, false)]
public virtual uint NumberOfMediaSupported
{
get
{
return uint.Parse(this["NumberOfMediaSupported"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("NumberOfMediaSupported",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove Security field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveSecurity()
{
RemoveField("Security");
}
///
/// Is true if the field Security exists in the current object,
/// otherwise is false.
///
public virtual bool SecurityExist
{
get
{
return ContainsField("Security");
}
}
///
/// Optional, An enumeration indicating the operational security defined for the MediaAccessDevice. For example, information that the Device is "Read Only" (value=4) or "Boot Bypass" (value=6) can be described using this property.
///
[CimField(false, false)]
public virtual ushort Security
{
get
{
return ushort.Parse(this["Security"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("Security",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove TimeOfLastMount field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveTimeOfLastMount()
{
RemoveField("TimeOfLastMount");
}
///
/// Is true if the field TimeOfLastMount exists in the current object,
/// otherwise is false.
///
public virtual bool TimeOfLastMountExist
{
get
{
return ContainsField("TimeOfLastMount");
}
}
///
/// Optional, For a MediaAccessDevice that supports removable Media, the most recent date and time that Media was mounted on the Device. For Devices accessing nonremovable Media, such as hard disks, this property has no meaning and is not applicable.
///
[CimField(false, false)]
public virtual CimDateTime TimeOfLastMount
{
get
{
return CimDateTime.Parse(this["TimeOfLastMount"][0]);
}
set
{
this.SetOrAddField("TimeOfLastMount",value.ToString());
}
}
///
/// Remove TotalMountTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveTotalMountTime()
{
RemoveField("TotalMountTime");
}
///
/// Is true if the field TotalMountTime exists in the current object,
/// otherwise is false.
///
public virtual bool TotalMountTimeExist
{
get
{
return ContainsField("TotalMountTime");
}
}
///
/// Optional, For a MediaAccessDevice that supports removable Media, the total time (in seconds) that Media have been mounted for data transfer or to clean the Device. For Devices accessing nonremovable Media, such as hard disks, this property is not applicable and should be set to 0.
///
[CimField(false, false)]
public virtual ulong TotalMountTime
{
get
{
return ulong.Parse(this["TotalMountTime"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("TotalMountTime",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove UncompressedDataRate field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveUncompressedDataRate()
{
RemoveField("UncompressedDataRate");
}
///
/// Is true if the field UncompressedDataRate exists in the current object,
/// otherwise is false.
///
public virtual bool UncompressedDataRateExist
{
get
{
return ContainsField("UncompressedDataRate");
}
}
///
/// Optional, The sustained data transfer rate in KB/sec that the Device can read from and write to a Media. This is a sustained, raw data rate. Maximum rates or rates assuming compression should not be reported in this property.
///
[CimField(false, false)]
public virtual uint UncompressedDataRate
{
get
{
return uint.Parse(this["UncompressedDataRate"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("UncompressedDataRate",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove UnitsDescription field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveUnitsDescription()
{
RemoveField("UnitsDescription");
}
///
/// Is true if the field UnitsDescription exists in the current object,
/// otherwise is false.
///
public virtual bool UnitsDescriptionExist
{
get
{
return ContainsField("UnitsDescription");
}
}
///
/// Optional, Defines 'Units' relative to its use in the property, MaxUnitsBeforeCleaning. This describes the criteria used to determine when the MediaAccessDevice should be cleaned.
///
[CimField(false, false)]
public virtual string UnitsDescription
{
get
{
return this.GetField("UnitsDescription")[0];
}
set
{
this.SetOrAddField("UnitsDescription",value);
}
}
///
/// Remove UnitsUsed field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveUnitsUsed()
{
RemoveField("UnitsUsed");
}
///
/// Is true if the field UnitsUsed exists in the current object,
/// otherwise is false.
///
public virtual bool UnitsUsedExist
{
get
{
return ContainsField("UnitsUsed");
}
}
///
/// Optional, An unsigned integer indicating the currently used 'units' of the AccessDevice, helpful to describe when the Device may require cleaning. The property, UnitsDescription, defines how 'units' should be interpreted.
///
[CimField(false, false)]
public virtual ulong UnitsUsed
{
get
{
return ulong.Parse(this["UnitsUsed"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("UnitsUsed",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Remove UnloadTime field.
/// Note: This method will succeed only if this field is optional in the concrete object.
///
public virtual void RemoveUnloadTime()
{
RemoveField("UnloadTime");
}
///
/// Is true if the field UnloadTime exists in the current object,
/// otherwise is false.
///
public virtual bool UnloadTimeExist
{
get
{
return ContainsField("UnloadTime");
}
}
///
/// Optional, Time in milliseconds from being able to read or write a Media to its 'unload'. For example, for DiskDrives, this is the interval between a disk spinning at nominal speeds and a disk not spinning. For TapeDrives, this is the time for a Media to go from its BOT to being fully ejected and accessible to a PickerElement or human operator.
///
[CimField(false, false)]
public virtual ulong UnloadTime
{
get
{
return ulong.Parse(this["UnloadTime"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("UnloadTime",value.ToString(CultureInfo.InvariantCulture));
}
}
///
/// Enumerate instances of CIM_MediaAccessDevice class at an endpoint.
///
/// WS-Management client
/// Keys for selecting the instances
/// Collection of CIM_MediaAccessDevice objects
public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List ret = CimBase.Enumerate(client, cimKeys);
return new Collection(ret);
}
///
/// Enumerate instances of CIM_MediaAccessDevice class at an endpoint.
///
/// WS-Management client
/// Collection of CIM_MediaAccessDevice objects
public static new Collection Enumerate(IWSManClient client)
{
List ret = CimBase.Enumerate(client);
return new Collection(ret);
}
///
/// Delete the instance of CIM_MediaAccessDevice if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
///
/// WS-Management client
public static new void Delete(IWSManClient client)
{
CimBase.Delete(client);
}
///
/// Represents the keys of the CIM_MediaAccessDevice class.
///
public new class CimKeys : CIM_LogicalDevice.CimKeys
{
}
}
}