258 lines
8.3 KiB
C#
258 lines
8.3 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: IPS_HTTPProxyService.cs
|
|
//
|
|
// Contents: Represents the HTTP Proxy Service.
|
|
// This file was automatically generated from IPS_HTTPProxyService.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>
|
|
///Represents the HTTP Proxy Service.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HTTPProxyService")]
|
|
[System.Xml.Serialization.XmlRootAttribute("IPS_HTTPProxyService", Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HTTPProxyService", IsNullable=false)]
|
|
public class IPS_HTTPProxyService : CIM_Service
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public IPS_HTTPProxyService() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public IPS_HTTPProxyService(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 IPS_HTTPProxyService(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove SyncEnabled field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveSyncEnabled()
|
|
{
|
|
RemoveField("SyncEnabled");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field SyncEnabled exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool SyncEnabledExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("SyncEnabled");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, This property defines whether the HTTP proxies sync (from local) is allowed
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool SyncEnabled
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["SyncEnabled"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("SyncEnabled",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Adds a Proxy access point that will be used when FW needs to open a user-initiated connection
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HTTPProxyService", IsNullable=false)]
|
|
private class AddProxyAccessPoint_INPUT : CimParams
|
|
{
|
|
public AddProxyAccessPoint_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, A string holding the IP address or FQDN of the server
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual string AccessInfo
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("AccessInfo",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, An enumerated integer describing the format and interpretation of the AccessInfo property.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual ushort InfoFormat
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("InfoFormat",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The port to be used for that HTTP proxy.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual ushort Port
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("Port",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, Domain name of the network this proxy belongs to
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual string NetworkDnsSuffix
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("NetworkDnsSuffix",value);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Adds a Proxy access point that will be used when FW needs to open a user-initiated connection
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HTTPProxyService", IsNullable=false)]
|
|
private class AddProxyAccessPoint_OUTPUT : CimParams
|
|
{
|
|
public AddProxyAccessPoint_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A reference to the created Proxy Access Point if the operation succeeded.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference ProxyAccessPoint
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("ProxyAccessPoint")[0];
|
|
CimReference epr = new CimReference("ProxyAccessPoint", "http://intel.com/wbem/wscim/1/ips-schema/1/IPS_HTTPProxyService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///Adds a Proxy access point that will be used when FW needs to open a user-initiated connection
|
|
/// </summary>
|
|
/// <param name="inAccessInfo">Required, IN -A string holding the IP address or FQDN of the server</param>
|
|
/// <param name="inInfoFormat">Required, IN -An enumerated integer describing the format and interpretation of the AccessInfo property.</param>
|
|
/// <param name="inPort">Required, IN -The port to be used for that HTTP proxy.</param>
|
|
/// <param name="inNetworkDnsSuffix">Required, IN -Domain name of the network this proxy belongs to</param>
|
|
/// <param name="outProxyAccessPoint">OUT - A reference to the created Proxy Access Point if the operation succeeded.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_NOT_PERMITTTED : 16
|
|
/// PT_STATUS_MAX_LIMIT_REACHED : 23
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_DUPLICATE : 2058
|
|
/// </returns>
|
|
public virtual uint AddProxyAccessPoint(string inAccessInfo,ushort? inInfoFormat,ushort? inPort,string inNetworkDnsSuffix,out CimReference outProxyAccessPoint)
|
|
{
|
|
AddProxyAccessPoint_INPUT input = new AddProxyAccessPoint_INPUT(this.XmlNamespace);
|
|
if (inAccessInfo != null)
|
|
input.AccessInfo=inAccessInfo;
|
|
if (inInfoFormat.HasValue)
|
|
input.InfoFormat=inInfoFormat.Value;
|
|
if (inPort.HasValue)
|
|
input.Port=inPort.Value;
|
|
if (inNetworkDnsSuffix != null)
|
|
input.NetworkDnsSuffix=inNetworkDnsSuffix;
|
|
AddProxyAccessPoint_OUTPUT output = new AddProxyAccessPoint_OUTPUT();
|
|
uint returnValue = base.Invoke("AddProxyAccessPoint",input,out output);
|
|
outProxyAccessPoint=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("ProxyAccessPoint"))
|
|
outProxyAccessPoint = output.ProxyAccessPoint;
|
|
}
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of IPS_HTTPProxyService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of IPS_HTTPProxyService objects</returns>
|
|
public static new Collection<IPS_HTTPProxyService> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<IPS_HTTPProxyService> ret = CimBase.Enumerate<IPS_HTTPProxyService>(client, cimKeys);
|
|
return new Collection<IPS_HTTPProxyService>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of IPS_HTTPProxyService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of IPS_HTTPProxyService objects</returns>
|
|
public static new Collection<IPS_HTTPProxyService> Enumerate(IWSManClient client)
|
|
{
|
|
List<IPS_HTTPProxyService> ret = CimBase.Enumerate<IPS_HTTPProxyService>(client);
|
|
return new Collection<IPS_HTTPProxyService>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of IPS_HTTPProxyService 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<IPS_HTTPProxyService>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the IPS_HTTPProxyService class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Service.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|