// ------------------------------------------------------------------------------
// <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;

// ReSharper disable once CheckNamespace
namespace Xbim.Ifc2x3.MeasureResource
{
	public partial class @IfcSIUnit : IIfcSIUnit
	{

		[CrossSchemaAttribute(typeof(IIfcSIUnit), 3)]
		Ifc4.Interfaces.IfcSIPrefix? IIfcSIUnit.Prefix 
		{ 
			get
			{
				//## Custom code to handle enumeration of Prefix
				//##
				switch (Prefix)
				{
					case IfcSIPrefix.EXA:
						return Ifc4.Interfaces.IfcSIPrefix.EXA;
					case IfcSIPrefix.PETA:
						return Ifc4.Interfaces.IfcSIPrefix.PETA;
					case IfcSIPrefix.TERA:
						return Ifc4.Interfaces.IfcSIPrefix.TERA;
					case IfcSIPrefix.GIGA:
						return Ifc4.Interfaces.IfcSIPrefix.GIGA;
					case IfcSIPrefix.MEGA:
						return Ifc4.Interfaces.IfcSIPrefix.MEGA;
					case IfcSIPrefix.KILO:
						return Ifc4.Interfaces.IfcSIPrefix.KILO;
					case IfcSIPrefix.HECTO:
						return Ifc4.Interfaces.IfcSIPrefix.HECTO;
					case IfcSIPrefix.DECA:
						return Ifc4.Interfaces.IfcSIPrefix.DECA;
					case IfcSIPrefix.DECI:
						return Ifc4.Interfaces.IfcSIPrefix.DECI;
					case IfcSIPrefix.CENTI:
						return Ifc4.Interfaces.IfcSIPrefix.CENTI;
					case IfcSIPrefix.MILLI:
						return Ifc4.Interfaces.IfcSIPrefix.MILLI;
					case IfcSIPrefix.MICRO:
						return Ifc4.Interfaces.IfcSIPrefix.MICRO;
					case IfcSIPrefix.NANO:
						return Ifc4.Interfaces.IfcSIPrefix.NANO;
					case IfcSIPrefix.PICO:
						return Ifc4.Interfaces.IfcSIPrefix.PICO;
					case IfcSIPrefix.FEMTO:
						return Ifc4.Interfaces.IfcSIPrefix.FEMTO;
					case IfcSIPrefix.ATTO:
						return Ifc4.Interfaces.IfcSIPrefix.ATTO;
					case null: 
						return null;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of Prefix
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcSIPrefix.EXA:
						Prefix = IfcSIPrefix.EXA;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.PETA:
						Prefix = IfcSIPrefix.PETA;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.TERA:
						Prefix = IfcSIPrefix.TERA;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.GIGA:
						Prefix = IfcSIPrefix.GIGA;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.MEGA:
						Prefix = IfcSIPrefix.MEGA;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.KILO:
						Prefix = IfcSIPrefix.KILO;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.HECTO:
						Prefix = IfcSIPrefix.HECTO;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.DECA:
						Prefix = IfcSIPrefix.DECA;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.DECI:
						Prefix = IfcSIPrefix.DECI;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.CENTI:
						Prefix = IfcSIPrefix.CENTI;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.MILLI:
						Prefix = IfcSIPrefix.MILLI;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.MICRO:
						Prefix = IfcSIPrefix.MICRO;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.NANO:
						Prefix = IfcSIPrefix.NANO;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.PICO:
						Prefix = IfcSIPrefix.PICO;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.FEMTO:
						Prefix = IfcSIPrefix.FEMTO;
						return;
					case Ifc4.Interfaces.IfcSIPrefix.ATTO:
						Prefix = IfcSIPrefix.ATTO;
						return;
					
					case null:
						Prefix = null;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcSIUnit), 4)]
		Ifc4.Interfaces.IfcSIUnitName IIfcSIUnit.Name 
		{ 
			get
			{
				//## Custom code to handle enumeration of Name
				//##
				switch (Name)
				{
					case IfcSIUnitName.AMPERE:
						return Ifc4.Interfaces.IfcSIUnitName.AMPERE;
					case IfcSIUnitName.BECQUEREL:
						return Ifc4.Interfaces.IfcSIUnitName.BECQUEREL;
					case IfcSIUnitName.CANDELA:
						return Ifc4.Interfaces.IfcSIUnitName.CANDELA;
					case IfcSIUnitName.COULOMB:
						return Ifc4.Interfaces.IfcSIUnitName.COULOMB;
					case IfcSIUnitName.CUBIC_METRE:
						return Ifc4.Interfaces.IfcSIUnitName.CUBIC_METRE;
					case IfcSIUnitName.DEGREE_CELSIUS:
						return Ifc4.Interfaces.IfcSIUnitName.DEGREE_CELSIUS;
					case IfcSIUnitName.FARAD:
						return Ifc4.Interfaces.IfcSIUnitName.FARAD;
					case IfcSIUnitName.GRAM:
						return Ifc4.Interfaces.IfcSIUnitName.GRAM;
					case IfcSIUnitName.GRAY:
						return Ifc4.Interfaces.IfcSIUnitName.GRAY;
					case IfcSIUnitName.HENRY:
						return Ifc4.Interfaces.IfcSIUnitName.HENRY;
					case IfcSIUnitName.HERTZ:
						return Ifc4.Interfaces.IfcSIUnitName.HERTZ;
					case IfcSIUnitName.JOULE:
						return Ifc4.Interfaces.IfcSIUnitName.JOULE;
					case IfcSIUnitName.KELVIN:
						return Ifc4.Interfaces.IfcSIUnitName.KELVIN;
					case IfcSIUnitName.LUMEN:
						return Ifc4.Interfaces.IfcSIUnitName.LUMEN;
					case IfcSIUnitName.LUX:
						return Ifc4.Interfaces.IfcSIUnitName.LUX;
					case IfcSIUnitName.METRE:
						return Ifc4.Interfaces.IfcSIUnitName.METRE;
					case IfcSIUnitName.MOLE:
						return Ifc4.Interfaces.IfcSIUnitName.MOLE;
					case IfcSIUnitName.NEWTON:
						return Ifc4.Interfaces.IfcSIUnitName.NEWTON;
					case IfcSIUnitName.OHM:
						return Ifc4.Interfaces.IfcSIUnitName.OHM;
					case IfcSIUnitName.PASCAL:
						return Ifc4.Interfaces.IfcSIUnitName.PASCAL;
					case IfcSIUnitName.RADIAN:
						return Ifc4.Interfaces.IfcSIUnitName.RADIAN;
					case IfcSIUnitName.SECOND:
						return Ifc4.Interfaces.IfcSIUnitName.SECOND;
					case IfcSIUnitName.SIEMENS:
						return Ifc4.Interfaces.IfcSIUnitName.SIEMENS;
					case IfcSIUnitName.SIEVERT:
						return Ifc4.Interfaces.IfcSIUnitName.SIEVERT;
					case IfcSIUnitName.SQUARE_METRE:
						return Ifc4.Interfaces.IfcSIUnitName.SQUARE_METRE;
					case IfcSIUnitName.STERADIAN:
						return Ifc4.Interfaces.IfcSIUnitName.STERADIAN;
					case IfcSIUnitName.TESLA:
						return Ifc4.Interfaces.IfcSIUnitName.TESLA;
					case IfcSIUnitName.VOLT:
						return Ifc4.Interfaces.IfcSIUnitName.VOLT;
					case IfcSIUnitName.WATT:
						return Ifc4.Interfaces.IfcSIUnitName.WATT;
					case IfcSIUnitName.WEBER:
						return Ifc4.Interfaces.IfcSIUnitName.WEBER;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of Name
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcSIUnitName.AMPERE:
						Name = IfcSIUnitName.AMPERE;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.BECQUEREL:
						Name = IfcSIUnitName.BECQUEREL;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.CANDELA:
						Name = IfcSIUnitName.CANDELA;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.COULOMB:
						Name = IfcSIUnitName.COULOMB;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.CUBIC_METRE:
						Name = IfcSIUnitName.CUBIC_METRE;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.DEGREE_CELSIUS:
						Name = IfcSIUnitName.DEGREE_CELSIUS;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.FARAD:
						Name = IfcSIUnitName.FARAD;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.GRAM:
						Name = IfcSIUnitName.GRAM;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.GRAY:
						Name = IfcSIUnitName.GRAY;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.HENRY:
						Name = IfcSIUnitName.HENRY;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.HERTZ:
						Name = IfcSIUnitName.HERTZ;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.JOULE:
						Name = IfcSIUnitName.JOULE;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.KELVIN:
						Name = IfcSIUnitName.KELVIN;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.LUMEN:
						Name = IfcSIUnitName.LUMEN;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.LUX:
						Name = IfcSIUnitName.LUX;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.METRE:
						Name = IfcSIUnitName.METRE;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.MOLE:
						Name = IfcSIUnitName.MOLE;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.NEWTON:
						Name = IfcSIUnitName.NEWTON;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.OHM:
						Name = IfcSIUnitName.OHM;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.PASCAL:
						Name = IfcSIUnitName.PASCAL;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.RADIAN:
						Name = IfcSIUnitName.RADIAN;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.SECOND:
						Name = IfcSIUnitName.SECOND;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.SIEMENS:
						Name = IfcSIUnitName.SIEMENS;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.SIEVERT:
						Name = IfcSIUnitName.SIEVERT;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.SQUARE_METRE:
						Name = IfcSIUnitName.SQUARE_METRE;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.STERADIAN:
						Name = IfcSIUnitName.STERADIAN;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.TESLA:
						Name = IfcSIUnitName.TESLA;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.VOLT:
						Name = IfcSIUnitName.VOLT;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.WATT:
						Name = IfcSIUnitName.WATT;
						return;
					case Ifc4.Interfaces.IfcSIUnitName.WEBER:
						Name = IfcSIUnitName.WEBER;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}