499 lines
14 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_NetworkPort.cs
//
// Contents: NetworkPort is the logical representation of network communications hardware such as a physical connector and the setup or operation of the network chips, at the lowest layers of a network stack.
// This file was automatically generated from CIM_NetworkPort.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>
///NetworkPort is the logical representation of network communications hardware such as a physical connector and the setup or operation of the network chips, at the lowest layers of a network stack.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPort")]
[System.Xml.Serialization.XmlRootAttribute("CIM_NetworkPort", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NetworkPort", IsNullable=false)]
public class CIM_NetworkPort : CIM_LogicalPort
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_NetworkPort() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_NetworkPort(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_NetworkPort(IWSManClient client): base(client)
{
}
/// <summary>
/// Remove ActiveMaximumTransmissionUnit field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveActiveMaximumTransmissionUnit()
{
RemoveField("ActiveMaximumTransmissionUnit");
}
/// <summary>
/// Is true if the field ActiveMaximumTransmissionUnit exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool ActiveMaximumTransmissionUnitExist
{
get
{
return ContainsField("ActiveMaximumTransmissionUnit");
}
}
/// <summary>
/// Optional, The active or negotiated maximum transmission unit (MTU) that can be supported.
/// </summary>
[CimField(false, false)]
public virtual ulong ActiveMaximumTransmissionUnit
{
get
{
return ulong.Parse(this["ActiveMaximumTransmissionUnit"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("ActiveMaximumTransmissionUnit",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove AutoSense field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveAutoSense()
{
RemoveField("AutoSense");
}
/// <summary>
/// Is true if the field AutoSense exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool AutoSenseExist
{
get
{
return ContainsField("AutoSense");
}
}
/// <summary>
/// Optional, A Boolean that indicates whether the NetworkPort is capable of automatically determining the speed or other communications characteristics of the attached network media.
/// </summary>
[CimField(false, false)]
public virtual bool AutoSense
{
get
{
return bool.Parse(this["AutoSense"][0]);
}
set
{
this.SetOrAddField("AutoSense",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove FullDuplex field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveFullDuplex()
{
RemoveField("FullDuplex");
}
/// <summary>
/// Is true if the field FullDuplex exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool FullDuplexExist
{
get
{
return ContainsField("FullDuplex");
}
}
/// <summary>
/// Optional, Boolean that indicates that the port is operating in full duplex mode.
/// </summary>
[CimField(false, false)]
public virtual bool FullDuplex
{
get
{
return bool.Parse(this["FullDuplex"][0]);
}
set
{
this.SetOrAddField("FullDuplex",value.ToString().ToLower(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove LinkTechnology field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveLinkTechnology()
{
RemoveField("LinkTechnology");
}
/// <summary>
/// Is true if the field LinkTechnology exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool LinkTechnologyExist
{
get
{
return ContainsField("LinkTechnology");
}
}
/// <summary>
/// Optional, An enumeration of the types of links. When set to 1 ("Other"), the related property OtherLinkTechnology contains a string description of the type of link.
/// </summary>
[CimField(false, false)]
public virtual ushort LinkTechnology
{
get
{
return ushort.Parse(this["LinkTechnology"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("LinkTechnology",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove NetworkAddresses field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveNetworkAddresses()
{
RemoveField("NetworkAddresses");
}
/// <summary>
/// Is true if the field NetworkAddresses exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool NetworkAddressesExist
{
get
{
return ContainsField("NetworkAddresses");
}
}
/// <summary>
/// Optional, An array of strings that indicates the network addresses for the port.
/// </summary>
[CimField(false, false)]
public virtual string[] NetworkAddresses
{
get
{
return CimTypesUtils.StringArrayToArray<string>(this["NetworkAddresses"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray<string>(value);
this.SetOrAddField("NetworkAddresses", arr);
}
}
/// <summary>
/// Remove OtherLinkTechnology field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveOtherLinkTechnology()
{
RemoveField("OtherLinkTechnology");
}
/// <summary>
/// Is true if the field OtherLinkTechnology exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool OtherLinkTechnologyExist
{
get
{
return ContainsField("OtherLinkTechnology");
}
}
/// <summary>
/// Optional, A string value that describes LinkTechnology when it is set to 1, "Other".
/// </summary>
[CimField(false, false)]
public virtual string OtherLinkTechnology
{
get
{
return this.GetField("OtherLinkTechnology")[0];
}
set
{
this.SetOrAddField("OtherLinkTechnology",value);
}
}
/// <summary>
/// Remove OtherNetworkPortType field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveOtherNetworkPortType()
{
RemoveField("OtherNetworkPortType");
}
/// <summary>
/// Is true if the field OtherNetworkPortType exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool OtherNetworkPortTypeExist
{
get
{
return ContainsField("OtherNetworkPortType");
}
}
/// <summary>
/// Optional, Note: The use of this property is deprecated in lieu of CIM_LogicalPort.PortType.
/// Deprecated description: The type of module, when PortType is set to 1 ("Other".)
/// </summary>
[CimField(false, false)]
public virtual string OtherNetworkPortType
{
get
{
return this.GetField("OtherNetworkPortType")[0];
}
set
{
this.SetOrAddField("OtherNetworkPortType",value);
}
}
/// <summary>
/// Remove PermanentAddress field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemovePermanentAddress()
{
RemoveField("PermanentAddress");
}
/// <summary>
/// Is true if the field PermanentAddress exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool PermanentAddressExist
{
get
{
return ContainsField("PermanentAddress");
}
}
/// <summary>
/// Optional, PermanentAddress defines the network address that is hardcoded into a port. This 'hardcoded' address can be changed using a firmware upgrade or a software configuration. When this change is made, the field should be updated at the same time. PermanentAddress should be left blank if no 'hardcoded' address exists for the NetworkAdapter.
/// </summary>
[CimField(false, false)]
public virtual string PermanentAddress
{
get
{
return this.GetField("PermanentAddress")[0];
}
set
{
this.SetOrAddField("PermanentAddress",value);
}
}
/// <summary>
/// Remove PortNumber field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemovePortNumber()
{
RemoveField("PortNumber");
}
/// <summary>
/// Is true if the field PortNumber exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool PortNumberExist
{
get
{
return ContainsField("PortNumber");
}
}
/// <summary>
/// Optional, NetworkPorts are often numbered relative to either a logical module or a network element.
/// </summary>
[CimField(false, false)]
public virtual ushort PortNumber
{
get
{
return ushort.Parse(this["PortNumber"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("PortNumber",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 override void RemoveSpeed()
{
RemoveField("Speed");
}
/// <summary>
/// Is true if the field Speed exists in the current object,
/// otherwise is false.
/// </summary>
public override bool SpeedExist
{
get
{
return ContainsField("Speed");
}
}
/// <summary>
/// Optional, The current bandwidth of the Port in Bits per Second. For ports that vary in bandwidth or for those where no accurate estimation can be made, this property should contain the nominal bandwidth.
/// </summary>
[CimField(false, false)]
public override ulong Speed
{
get
{
return ulong.Parse(this["Speed"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("Speed",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove SupportedMaximumTransmissionUnit field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveSupportedMaximumTransmissionUnit()
{
RemoveField("SupportedMaximumTransmissionUnit");
}
/// <summary>
/// Is true if the field SupportedMaximumTransmissionUnit exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool SupportedMaximumTransmissionUnitExist
{
get
{
return ContainsField("SupportedMaximumTransmissionUnit");
}
}
/// <summary>
/// Optional, The maximum transmission unit (MTU) that can be supported.
/// </summary>
[CimField(false, false)]
public virtual ulong SupportedMaximumTransmissionUnit
{
get
{
return ulong.Parse(this["SupportedMaximumTransmissionUnit"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("SupportedMaximumTransmissionUnit",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Enumerate instances of CIM_NetworkPort 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_NetworkPort objects</returns>
public static new Collection<CIM_NetworkPort> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_NetworkPort> ret = CimBase.Enumerate<CIM_NetworkPort>(client, cimKeys);
return new Collection<CIM_NetworkPort>(ret);
}
/// <summary>
/// Enumerate instances of CIM_NetworkPort class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_NetworkPort objects</returns>
public static new Collection<CIM_NetworkPort> Enumerate(IWSManClient client)
{
List<CIM_NetworkPort> ret = CimBase.Enumerate<CIM_NetworkPort>(client);
return new Collection<CIM_NetworkPort>(ret);
}
/// <summary>
/// Delete the instance of CIM_NetworkPort 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_NetworkPort>(client);
}
/// <summary>
/// Represents the keys of the CIM_NetworkPort class.
/// </summary>
public new class CimKeys : CIM_LogicalPort.CimKeys
{
}
}
}