// 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.au.Common;

namespace OpenADK.Library.au.School{

/// <summary>A MediumOfInstruction</summary>
/// <remarks>
///
/// <para>Author: Generated by adkgen</para>
/// <para>Version: 2.6</para>
/// <para>Since: 2.6</para>
/// </remarks>
[Serializable]
public class MediumOfInstruction : SifKeyedElement
{
	/// <summary>
	/// Creates an instance of a MediumOfInstruction
	/// </summary>
	public MediumOfInstruction() : base ( SchoolDTD.MEDIUMOFINSTRUCTION ){}

	/// <summary>
	/// Constructor that accepts values for all mandatory fields
	/// </summary>
	///<param name="code">A Code</param>
	///
	public MediumOfInstruction( AUCodeSetsMediumOfInstructionType code ) : base( SchoolDTD.MEDIUMOFINSTRUCTION )
	{
		this.SetCode( code );
	}

	/// <summary>
	/// Constructor used by the .Net Serialization formatter
	/// </summary>
	[SecurityPermission( SecurityAction.Demand, SerializationFormatter=true )] 
	protected MediumOfInstruction( 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 override IElementDef[] KeyFields {
		get { return new IElementDef[] { SchoolDTD.MEDIUMOFINSTRUCTION_CODE }; }
	}

	/// <summary>
	/// Gets or sets the value of the <c>&lt;Code&gt;</c> element.
	/// </summary>
	/// <value> The <c>Code</c> element of this object.</value>
	/// <remarks>
	/// <para>Version: 2.6</para>
	/// <para>Since: 2.6</para>
	/// </remarks>
	public string Code
	{
		get
		{ 
			return GetFieldValue( SchoolDTD.MEDIUMOFINSTRUCTION_CODE );
		}
		set
		{
			SetField( SchoolDTD.MEDIUMOFINSTRUCTION_CODE, value );
		}
	}

	/// <summary>
	/// Sets the value of the <c>&lt;Code&gt;</c> element.
	/// </summary>
	/// <param name="val">A AUCodeSetsMediumOfInstructionType object</param>
	/// <remarks>
	/// <para>Version: 2.6</para>
	/// <para>Since: 2.6</para>
	/// </remarks>
	public void SetCode( AUCodeSetsMediumOfInstructionType val )
	{
		SetField( SchoolDTD.MEDIUMOFINSTRUCTION_CODE, val );
	}

	/// <summary>
	/// Gets or sets the value of the <c>&lt;OtherCodeList&gt;</c> element.
	/// </summary>
	/// <value> An OtherCodeList </value>
	/// <remarks>
	/// <para>To remove the <c>OtherCodeList</c>, set <c>OtherCodeList</c> to <c>null</c></para>
	/// <para>Version: 2.6</para>
	/// <para>Since: 2.6</para>
	/// </remarks>
	public OtherCodeList OtherCodeList
	{
		get
		{
			return (OtherCodeList)GetChild( SchoolDTD.MEDIUMOFINSTRUCTION_OTHERCODELIST);
		}
		set
		{
			RemoveChild( SchoolDTD.MEDIUMOFINSTRUCTION_OTHERCODELIST);
			if( value != null)
			{
				AddChild( SchoolDTD.MEDIUMOFINSTRUCTION_OTHERCODELIST, value );
			}
		}
	}

}}
