213 lines
6.6 KiB
C#
213 lines
6.6 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_RemoteIdentity.cs
|
|
//
|
|
// Contents: An instance of RemoteIdentity is an Identity that should be used to provide a persistent representation of a security principal for which authoritative information required for mapping to users or groups is not otherwise modeled.
|
|
// This file was automatically generated from CIM_RemoteIdentity.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>
|
|
///An instance of RemoteIdentity is an Identity that should be used to provide a persistent representation of a security principal for which authoritative information required for mapping to users or groups is not otherwise modeled.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RemoteIdentity")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_RemoteIdentity", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RemoteIdentity", IsNullable=false)]
|
|
public class CIM_RemoteIdentity : CIM_Identity
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_RemoteIdentity() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_RemoteIdentity(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_RemoteIdentity(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove Name field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveName()
|
|
{
|
|
RemoveField("Name");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Name exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool NameExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Name");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Name is an octet string representing an identifier that can be correlated to the authoritative information. The type and format are defined by the NameFormat and OtherNameFormat properties.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual byte[] Name
|
|
{
|
|
get
|
|
{
|
|
return Convert.FromBase64String(this.GetField("Name")[0]); }
|
|
set
|
|
{
|
|
this.SetOrAddField("Name",Convert.ToBase64String(value));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove NameFormat field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveNameFormat()
|
|
{
|
|
RemoveField("NameFormat");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field NameFormat exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool NameFormatExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("NameFormat");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An enumeration defining the type and format of Name.
|
|
/// * GID: A Unix Group ID, an integer encoded as an octet string. For example, the decimal value 25 results in the octetstring 0x0000000519.
|
|
/// * UID: A Unix User ID, an integer encoded as an octet string. For example, the decimal value 100 results in the octetstring 0x0000000564.
|
|
/// * SID: A Windows Security ID in its native binary format
|
|
/// * DN: An ASN.1-encoded LDAP Distinguished Name
|
|
/// * KID: A Kerberos Remote Identifier, a string encoded as an octet string.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort NameFormat
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["NameFormat"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("NameFormat",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove OtherNameFormat field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveOtherNameFormat()
|
|
{
|
|
RemoveField("OtherNameFormat");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field OtherNameFormat exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool OtherNameFormatExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("OtherNameFormat");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, OtherNameFormat is a string that describes the format of the Name property when NameFormat is set to "Other" . The format of this string is vendor specific.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string OtherNameFormat
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("OtherNameFormat")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("OtherNameFormat",value);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_RemoteIdentity 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_RemoteIdentity objects</returns>
|
|
public static new Collection<CIM_RemoteIdentity> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_RemoteIdentity> ret = CimBase.Enumerate<CIM_RemoteIdentity>(client, cimKeys);
|
|
return new Collection<CIM_RemoteIdentity>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_RemoteIdentity class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_RemoteIdentity objects</returns>
|
|
public static new Collection<CIM_RemoteIdentity> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_RemoteIdentity> ret = CimBase.Enumerate<CIM_RemoteIdentity>(client);
|
|
return new Collection<CIM_RemoteIdentity>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_RemoteIdentity 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_RemoteIdentity>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_RemoteIdentity class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Identity.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|