317 lines
9.1 KiB
C#
317 lines
9.1 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_LogicalPort.cs
|
|
//
|
|
// Contents: The abstraction of a port or connection point of a Device. This object should be instantiated when the Port has independent management characteristics from the Device that includes it. Examples are a Fibre Channel Port and a USB Port.
|
|
// This file was automatically generated from CIM_LogicalPort.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
|
|
{
|
|
/// <summary>
|
|
///The abstraction of a port or connection point of a Device. This object should be instantiated when the Port has independent management characteristics from the Device that includes it. Examples are a Fibre Channel Port and a USB Port.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_LogicalPort")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_LogicalPort", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_LogicalPort", IsNullable=false)]
|
|
public class CIM_LogicalPort : CIM_LogicalDevice
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_LogicalPort() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_LogicalPort(string xml): base((IWSManClient)null)
|
|
{
|
|
this.Deserialize(xml);
|
|
}
|
|
/// <summary>
|
|
/// Constructor which recieves a Ws-Management client object.
|
|
/// </summary>
|
|
/// <param name="client">Ws-Management client</param>
|
|
public CIM_LogicalPort(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove MaxSpeed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveMaxSpeed()
|
|
{
|
|
RemoveField("MaxSpeed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field MaxSpeed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool MaxSpeedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("MaxSpeed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The maximum bandwidth of the Port in Bits per Second.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ulong MaxSpeed
|
|
{
|
|
get
|
|
{
|
|
return ulong.Parse(this["MaxSpeed"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("MaxSpeed",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherPortType field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherPortType()
|
|
{
|
|
RemoveField("OtherPortType");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherPortType exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherPortTypeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherPortType");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Describes the type of module, when PortType is set to 1 ("Other").
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string OtherPortType
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("OtherPortType")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OtherPortType",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PortType field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePortType()
|
|
{
|
|
RemoveField("PortType");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PortType exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PortTypeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PortType");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, PortType is defined to force consistent naming of the 'type' property in subclasses and to guarantee unique enum values for all instances of NetworkPort. When set to 1 ("Other"), related property OtherPortType contains a string description of the type of port. A range of values, DMTF_Reserved, has been defined that allows subclasses to override and define their specific types of ports.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort PortType
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["PortType"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PortType",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove RequestedSpeed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveRequestedSpeed()
|
|
{
|
|
RemoveField("RequestedSpeed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field RequestedSpeed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool RequestedSpeedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("RequestedSpeed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The requested bandwidth of the Port in Bits per Second. The actual bandwidth is reported in LogicalPort.Speed.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ulong RequestedSpeed
|
|
{
|
|
get
|
|
{
|
|
return ulong.Parse(this["RequestedSpeed"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("RequestedSpeed",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Speed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveSpeed()
|
|
{
|
|
RemoveField("Speed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Speed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool SpeedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Speed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The bandwidth of the Port in Bits per Second.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ulong Speed
|
|
{
|
|
get
|
|
{
|
|
return ulong.Parse(this["Speed"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Speed",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove UsageRestriction field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveUsageRestriction()
|
|
{
|
|
RemoveField("UsageRestriction");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field UsageRestriction exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool UsageRestrictionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("UsageRestriction");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, In some circumstances, a LogicalPort might be identifiable as a front end or back end port. An example of this situation would be a storage array that might have back end ports to communicate with disk drives and front end ports to communicate with hosts. If there is no restriction on the use of the port, then the value should be set to 'not restricted'.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort UsageRestriction
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["UsageRestriction"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("UsageRestriction",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_LogicalPort class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of CIM_LogicalPort objects</returns>
|
|
public static new Collection<CIM_LogicalPort> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_LogicalPort> ret = CimBase.Enumerate<CIM_LogicalPort>(client, cimKeys);
|
|
return new Collection<CIM_LogicalPort>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_LogicalPort class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_LogicalPort objects</returns>
|
|
public static new Collection<CIM_LogicalPort> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_LogicalPort> ret = CimBase.Enumerate<CIM_LogicalPort>(client);
|
|
return new Collection<CIM_LogicalPort>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_LogicalPort if it is singular.
|
|
/// Note: This method will succeed only if a single instance of the class exists.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
public static new void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_LogicalPort>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_LogicalPort class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_LogicalDevice.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|