using System;
namespace AsterNET.Manager.Action
{
///
/// The SetCDRUserFieldAction causes the user field of the call detail record for the given channel to be changed.
/// Depending on the value of the append property the value is appended or overwritten.
/// The SetCDRUserFieldAction is implemented in apps/app_setcdruserfield.c
///
public class SetCDRUserFieldAction : ManagerAction
{
private string channel;
private string userField;
private bool append;
///
/// Get the name of the action, i.e. "SetCDRUserField".
///
override public string Action
{
get { return "SetCDRUserField"; }
}
///
/// Get/Set the name of the channel to set the cdr user field on.
/// This property is mandatory.
///
public string Channel
{
get { return this.channel; }
set { this.channel = value; }
}
///
/// Get/Set the value of the cdr user field to set or append.
/// This property is mandatory.
///
public string UserField
{
get { return this.userField; }
set { this.userField = value; }
}
///
/// Get/Set if the value of the cdr user field is appended or overwritten.
/// true
to append the value to the cdr user field or false
to overwrite.
///
public bool Append
{
get { return this.append; }
set { this.append = value; }
}
///
/// Creates a new empty SetCDRUserFieldAction.
///
public SetCDRUserFieldAction()
{
}
///
/// Creates a new SetCDRUserFieldAction that sets the user field of the call detail record for the given channel to the given value.
///
/// the name of the channel
/// the new value of the userfield
public SetCDRUserFieldAction(string channel, string userField)
{
this.channel = channel;
this.userField = userField;
}
///
/// Creates a new SetCDRUserFieldAction that sets the user field of the call detail record for the given channel to the given value.
///
/// the name of the channel
/// the new value of the userfield
/// true to append the value to the cdr user field or false to overwrite
public SetCDRUserFieldAction(string channel, string userField, bool append)
{
this.channel = channel;
this.userField = userField;
this.append = append;
}
}
}