// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool Xbim.CodeGeneration 
//  
//     Changes to this file may cause incorrect behaviour and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

using Xbim.Ifc4.Interfaces;
using System.Collections.Generic;
using System.Linq;
using Xbim.Common;

//## Custom using statements
//##

// ReSharper disable once CheckNamespace
namespace Xbim.Ifc4x3.SharedBldgElements
{
	public partial class @IfcPlate : IIfcPlate
	{

		[CrossSchemaAttribute(typeof(IIfcPlate), 9)]
		Ifc4.Interfaces.IfcPlateTypeEnum? IIfcPlate.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcPlateTypeEnum.BASE_PLATE:
						//## Handle translation of BASE_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.COVER_PLATE:
						//## Handle translation of COVER_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.CURTAIN_PANEL:
						return Ifc4.Interfaces.IfcPlateTypeEnum.CURTAIN_PANEL;
					case IfcPlateTypeEnum.FLANGE_PLATE:
						//## Handle translation of FLANGE_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.GUSSET_PLATE:
						//## Handle translation of GUSSET_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.SHEET:
						return Ifc4.Interfaces.IfcPlateTypeEnum.SHEET;
					case IfcPlateTypeEnum.SPLICE_PLATE:
						//## Handle translation of SPLICE_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.STIFFENER_PLATE:
						//## Handle translation of STIFFENER_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.WEB_PLATE:
						//## Handle translation of WEB_PLATE member from IfcPlateTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcPlateTypeEnum>();
						//##
					case IfcPlateTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcPlateTypeEnum.USERDEFINED;
					case IfcPlateTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcPlateTypeEnum.NOTDEFINED;
					case null: 
						return null;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcPlateTypeEnum.CURTAIN_PANEL:
						PredefinedType = IfcPlateTypeEnum.CURTAIN_PANEL;
						return;
					case Ifc4.Interfaces.IfcPlateTypeEnum.SHEET:
						PredefinedType = IfcPlateTypeEnum.SHEET;
						return;
					case Ifc4.Interfaces.IfcPlateTypeEnum.USERDEFINED:
						PredefinedType = IfcPlateTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcPlateTypeEnum.NOTDEFINED:
						PredefinedType = IfcPlateTypeEnum.NOTDEFINED;
						return;
					
					case null:
						PredefinedType = null;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}