// ------------------------------------------------------------------------------
// <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 @IfcBuildingElementProxyType : IIfcBuildingElementProxyType
	{

		[CrossSchemaAttribute(typeof(IIfcBuildingElementProxyType), 10)]
		Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum IIfcBuildingElementProxyType.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcBuildingElementProxyTypeEnum.COMPLEX:
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.COMPLEX;
					case IfcBuildingElementProxyTypeEnum.ELEMENT:
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.ELEMENT;
					case IfcBuildingElementProxyTypeEnum.PARTIAL:
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.PARTIAL;
					case IfcBuildingElementProxyTypeEnum.PROVISIONFORSPACE:
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.PROVISIONFORSPACE;
					case IfcBuildingElementProxyTypeEnum.PROVISIONFORVOID:
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.PROVISIONFORVOID;
					case IfcBuildingElementProxyTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.USERDEFINED;
					case IfcBuildingElementProxyTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.NOTDEFINED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.COMPLEX:
						PredefinedType = IfcBuildingElementProxyTypeEnum.COMPLEX;
						return;
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.ELEMENT:
						PredefinedType = IfcBuildingElementProxyTypeEnum.ELEMENT;
						return;
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.PARTIAL:
						PredefinedType = IfcBuildingElementProxyTypeEnum.PARTIAL;
						return;
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.PROVISIONFORVOID:
						PredefinedType = IfcBuildingElementProxyTypeEnum.PROVISIONFORVOID;
						return;
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.PROVISIONFORSPACE:
						PredefinedType = IfcBuildingElementProxyTypeEnum.PROVISIONFORSPACE;
						return;
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.USERDEFINED:
						PredefinedType = IfcBuildingElementProxyTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcBuildingElementProxyTypeEnum.NOTDEFINED:
						PredefinedType = IfcBuildingElementProxyTypeEnum.NOTDEFINED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}