// ------------------------------------------------------------------------------
// <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.BuildingControlsDomain
{
	public partial class @IfcSensorType : IIfcSensorType
	{

		[CrossSchemaAttribute(typeof(IIfcSensorType), 10)]
		Ifc4.Interfaces.IfcSensorTypeEnum IIfcSensorType.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcSensorTypeEnum.CO2SENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.CO2SENSOR;
					case IfcSensorTypeEnum.CONDUCTANCESENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.CONDUCTANCESENSOR;
					case IfcSensorTypeEnum.CONTACTSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.CONTACTSENSOR;
					case IfcSensorTypeEnum.COSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.COSENSOR;
					case IfcSensorTypeEnum.EARTHQUAKESENSOR:
						//## Handle translation of EARTHQUAKESENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.FIRESENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.FIRESENSOR;
					case IfcSensorTypeEnum.FLOWSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.FLOWSENSOR;
					case IfcSensorTypeEnum.FOREIGNOBJECTDETECTIONSENSOR:
						//## Handle translation of FOREIGNOBJECTDETECTIONSENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.FROSTSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.FROSTSENSOR;
					case IfcSensorTypeEnum.GASSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.GASSENSOR;
					case IfcSensorTypeEnum.HEATSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.HEATSENSOR;
					case IfcSensorTypeEnum.HUMIDITYSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.HUMIDITYSENSOR;
					case IfcSensorTypeEnum.IDENTIFIERSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.IDENTIFIERSENSOR;
					case IfcSensorTypeEnum.IONCONCENTRATIONSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.IONCONCENTRATIONSENSOR;
					case IfcSensorTypeEnum.LEVELSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.LEVELSENSOR;
					case IfcSensorTypeEnum.LIGHTSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.LIGHTSENSOR;
					case IfcSensorTypeEnum.MOISTURESENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.MOISTURESENSOR;
					case IfcSensorTypeEnum.MOVEMENTSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.MOVEMENTSENSOR;
					case IfcSensorTypeEnum.OBSTACLESENSOR:
						//## Handle translation of OBSTACLESENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.PHSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.PHSENSOR;
					case IfcSensorTypeEnum.PRESSURESENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.PRESSURESENSOR;
					case IfcSensorTypeEnum.RADIATIONSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.RADIATIONSENSOR;
					case IfcSensorTypeEnum.RADIOACTIVITYSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.RADIOACTIVITYSENSOR;
					case IfcSensorTypeEnum.RAINSENSOR:
						//## Handle translation of RAINSENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.SMOKESENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.SMOKESENSOR;
					case IfcSensorTypeEnum.SNOWDEPTHSENSOR:
						//## Handle translation of SNOWDEPTHSENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.SOUNDSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.SOUNDSENSOR;
					case IfcSensorTypeEnum.TEMPERATURESENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.TEMPERATURESENSOR;
					case IfcSensorTypeEnum.TRAINSENSOR:
						//## Handle translation of TRAINSENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.TURNOUTCLOSURESENSOR:
						//## Handle translation of TURNOUTCLOSURESENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.WHEELSENSOR:
						//## Handle translation of WHEELSENSOR member from IfcSensorTypeEnum in property PredefinedType
						return this.GetUserDefined<Ifc4.Interfaces.IfcSensorTypeEnum>();
						//##
					case IfcSensorTypeEnum.WINDSENSOR:
						return Ifc4.Interfaces.IfcSensorTypeEnum.WINDSENSOR;
					case IfcSensorTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcSensorTypeEnum.USERDEFINED;
					case IfcSensorTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcSensorTypeEnum.NOTDEFINED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcSensorTypeEnum.COSENSOR:
						PredefinedType = IfcSensorTypeEnum.COSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.CO2SENSOR:
						PredefinedType = IfcSensorTypeEnum.CO2SENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.CONDUCTANCESENSOR:
						PredefinedType = IfcSensorTypeEnum.CONDUCTANCESENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.CONTACTSENSOR:
						PredefinedType = IfcSensorTypeEnum.CONTACTSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.FIRESENSOR:
						PredefinedType = IfcSensorTypeEnum.FIRESENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.FLOWSENSOR:
						PredefinedType = IfcSensorTypeEnum.FLOWSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.FROSTSENSOR:
						PredefinedType = IfcSensorTypeEnum.FROSTSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.GASSENSOR:
						PredefinedType = IfcSensorTypeEnum.GASSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.HEATSENSOR:
						PredefinedType = IfcSensorTypeEnum.HEATSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.HUMIDITYSENSOR:
						PredefinedType = IfcSensorTypeEnum.HUMIDITYSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.IDENTIFIERSENSOR:
						PredefinedType = IfcSensorTypeEnum.IDENTIFIERSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.IONCONCENTRATIONSENSOR:
						PredefinedType = IfcSensorTypeEnum.IONCONCENTRATIONSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.LEVELSENSOR:
						PredefinedType = IfcSensorTypeEnum.LEVELSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.LIGHTSENSOR:
						PredefinedType = IfcSensorTypeEnum.LIGHTSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.MOISTURESENSOR:
						PredefinedType = IfcSensorTypeEnum.MOISTURESENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.MOVEMENTSENSOR:
						PredefinedType = IfcSensorTypeEnum.MOVEMENTSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.PHSENSOR:
						PredefinedType = IfcSensorTypeEnum.PHSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.PRESSURESENSOR:
						PredefinedType = IfcSensorTypeEnum.PRESSURESENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.RADIATIONSENSOR:
						PredefinedType = IfcSensorTypeEnum.RADIATIONSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.RADIOACTIVITYSENSOR:
						PredefinedType = IfcSensorTypeEnum.RADIOACTIVITYSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.SMOKESENSOR:
						PredefinedType = IfcSensorTypeEnum.SMOKESENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.SOUNDSENSOR:
						PredefinedType = IfcSensorTypeEnum.SOUNDSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.TEMPERATURESENSOR:
						PredefinedType = IfcSensorTypeEnum.TEMPERATURESENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.WINDSENSOR:
						PredefinedType = IfcSensorTypeEnum.WINDSENSOR;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.USERDEFINED:
						PredefinedType = IfcSensorTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcSensorTypeEnum.NOTDEFINED:
						PredefinedType = IfcSensorTypeEnum.NOTDEFINED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}