// THIS FILE WAS AUTO-GENERATED BY ADKGEN -- DO NOT MODIFY!

//
// Copyright (c)1998-2011 Pearson Education, Inc. or its affiliate(s).
// All rights reserved.
//

using System;
using System.Text;
using System.Security.Permissions;
using System.Runtime.Serialization;
using OpenADK.Library;
using OpenADK.Library.Global;
using OpenADK.Library.uk.Common;

namespace OpenADK.Library.uk.Learner{

/// <summary>An Actions</summary>
/// <remarks>
///
/// <para>Author: Generated by adkgen</para>
/// <para>Version: 2.6</para>
/// <para>Since: 2.3</para>
/// </remarks>
[Serializable]
public class Actions : SifList<Action>
{
	/// <summary>
	/// Creates an instance of an Actions
	/// </summary>
	public Actions() : base ( LearnerDTD.ACTIONS ){}

	/// <summary>
	/// Constructor that accepts values for all mandatory fields
	/// </summary>
	///<param name="action">An Action</param>
	///
	public Actions( Action action ) : base( LearnerDTD.ACTIONS )
	{
		this.SafeAddChild( LearnerDTD.ACTIONS_ACTION, action );
	}

	/// <summary>
	/// Constructor used by the .Net Serialization formatter
	/// </summary>
	[SecurityPermission( SecurityAction.Demand, SerializationFormatter=true )] 
	protected Actions( SerializationInfo info, StreamingContext context ) : base( info, context ) {} 
	/// <summary>
	/// Gets the metadata fields that make up the key of this object
	/// </summary>
	/// <value>
	/// an array of metadata fields that make up the object's key
	/// </value>
	public  IElementDef[] KeyFields {
		get { return new IElementDef[] { LearnerDTD.ACTIONS_ACTION }; }
	}

	///<summary>Adds the value of the <c>&lt;Action&gt;</c> element.</summary>
	/// <param name="Classification">The classification Of Outcome</param>
	/// <param name="Date">Date and time Action has or Will take place</param>
	///<remarks>
	/// <para>This form of <c>setAction</c> is provided as a convenience method
	/// that is functionally equivalent to the method <c>AddAction</c></para>
	/// <para>Version: 2.6</para>
	/// <para>Since: 2.3</para>
	/// </remarks>
	public void AddAction( Classification Classification, DateTime? Date ) {
		AddChild( LearnerDTD.ACTIONS_ACTION, new Action( Classification, Date ) );
	}

}}
