// ------------------------------------------------------------------------------
// <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.ElectricalDomain
{
	public partial class @IfcCableCarrierFittingType : IIfcCableCarrierFittingType
	{

		[CrossSchemaAttribute(typeof(IIfcCableCarrierFittingType), 10)]
		Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum IIfcCableCarrierFittingType.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcCableCarrierFittingTypeEnum.BEND:
						return Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.BEND;
					case IfcCableCarrierFittingTypeEnum.CONNECTOR:
                        //## Handle translation of CONNECTOR member from IfcCableCarrierFittingTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum>();
                    //##
                    case IfcCableCarrierFittingTypeEnum.CROSS:
						return Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.CROSS;
					case IfcCableCarrierFittingTypeEnum.JUNCTION:
                        //## Handle translation of JUNCTION member from IfcCableCarrierFittingTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum>();
                    //##
                    case IfcCableCarrierFittingTypeEnum.REDUCER:
						return Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.REDUCER;
					case IfcCableCarrierFittingTypeEnum.TEE:
						return Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.TEE;
					case IfcCableCarrierFittingTypeEnum.TRANSITION:
                        //## Handle translation of TRANSITION member from IfcCableCarrierFittingTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum>();
                    //##
                    case IfcCableCarrierFittingTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.USERDEFINED;
					case IfcCableCarrierFittingTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.NOTDEFINED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.BEND:
						PredefinedType = IfcCableCarrierFittingTypeEnum.BEND;
						return;
					case Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.CROSS:
						PredefinedType = IfcCableCarrierFittingTypeEnum.CROSS;
						return;
					case Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.REDUCER:
						PredefinedType = IfcCableCarrierFittingTypeEnum.REDUCER;
						return;
					case Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.TEE:
						PredefinedType = IfcCableCarrierFittingTypeEnum.TEE;
						return;
					case Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.USERDEFINED:
						PredefinedType = IfcCableCarrierFittingTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcCableCarrierFittingTypeEnum.NOTDEFINED:
						PredefinedType = IfcCableCarrierFittingTypeEnum.NOTDEFINED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}