// ------------------------------------------------------------------------------
// <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.StructuralLoadResource
{
	public partial class @IfcBoundaryEdgeCondition : IIfcBoundaryEdgeCondition
	{

		[CrossSchemaAttribute(typeof(IIfcBoundaryEdgeCondition), 2)]
		IIfcModulusOfTranslationalSubgradeReactionSelect IIfcBoundaryEdgeCondition.TranslationalStiffnessByLengthX 
		{ 
			get
			{
				//## Handle return of TranslationalStiffnessByLengthX for which no match was found
                if (_translationalStiffnessByLengthX != null)
                    return _translationalStiffnessByLengthX;

                var value = LinearStiffnessByLengthX;
                if (!value.HasValue) return null;
                return new Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure(value.Value);
			    //##
			} 
			set
			{
				//## Handle setting of TranslationalStiffnessByLengthX for which no match was found
                if (value == null)
                {
                    LinearStiffnessByLengthX = null;
                    if (_translationalStiffnessByLengthX != null)
                        SetValue(v => _translationalStiffnessByLengthX = v, _translationalStiffnessByLengthX, null, "TranslationalStiffnessByLengthX", -2);
                    return;

                }
                if (value is Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)
                {
                    LinearStiffnessByLengthX = new MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)value);
                    if (_translationalStiffnessByLengthX != null)
                        SetValue(v => _translationalStiffnessByLengthX = v, _translationalStiffnessByLengthX, null, "TranslationalStiffnessByLengthX", -2);
                    return;
                }

                SetValue(v => _translationalStiffnessByLengthX = v, _translationalStiffnessByLengthX, value, "TranslationalStiffnessByLengthX", -2);
				//##
				NotifyPropertyChanged("TranslationalStiffnessByLengthX");
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBoundaryEdgeCondition), 3)]
		IIfcModulusOfTranslationalSubgradeReactionSelect IIfcBoundaryEdgeCondition.TranslationalStiffnessByLengthY 
		{ 
			get
			{
				//## Handle return of TranslationalStiffnessByLengthY for which no match was found
                if (_translationalStiffnessByLengthY != null)
                    return _translationalStiffnessByLengthY;

                var value = LinearStiffnessByLengthY;
                if (!value.HasValue) return null;
                return new Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure(value.Value);
                //##
			} 
			set
			{
				//## Handle setting of TranslationalStiffnessByLengthY for which no match was found
                if (value == null)
                {
                    LinearStiffnessByLengthY = null;
                    if (_translationalStiffnessByLengthY != null)
                        SetValue(v => _translationalStiffnessByLengthY = v, _translationalStiffnessByLengthY, null, "LinearStiffnessByLengthY", -3);
                    return;

                }
                if (value is Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)
                {
                    LinearStiffnessByLengthY = new MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)value);
                    if (_translationalStiffnessByLengthY != null)
                        SetValue(v => _translationalStiffnessByLengthY = v, _translationalStiffnessByLengthY, null, "LinearStiffnessByLengthY", -3);
                    return;
                }

                SetValue(v => _translationalStiffnessByLengthY = v, _translationalStiffnessByLengthY, value, "LinearStiffnessByLengthY", -3);
                //##
				NotifyPropertyChanged("TranslationalStiffnessByLengthY");
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBoundaryEdgeCondition), 4)]
		IIfcModulusOfTranslationalSubgradeReactionSelect IIfcBoundaryEdgeCondition.TranslationalStiffnessByLengthZ 
		{ 
			get
			{
				//## Handle return of TranslationalStiffnessByLengthZ for which no match was found
                if (_translationalStiffnessByLengthZ != null)
                    return _translationalStiffnessByLengthZ;

                var value = LinearStiffnessByLengthZ;
                if (!value.HasValue) return null;
                return new Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure(value.Value);
                //##
			} 
			set
			{
				//## Handle setting of TranslationalStiffnessByLengthZ for which no match was found
                if (value == null)
                {
                    LinearStiffnessByLengthZ = null;
                    if (_translationalStiffnessByLengthZ != null)
                        SetValue(v => _translationalStiffnessByLengthZ = v, _translationalStiffnessByLengthZ, null, "TranslationalStiffnessByLengthZ", -4);
                    return;

                }
                if (value is Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)
                {
                    LinearStiffnessByLengthZ = new MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)value);
                    if (_translationalStiffnessByLengthZ != null)
                        SetValue(v => _translationalStiffnessByLengthZ = v, _translationalStiffnessByLengthZ, null, "TranslationalStiffnessByLengthZ", -4);
                    return;
                }

                SetValue(v => _translationalStiffnessByLengthZ = v, _translationalStiffnessByLengthZ, value, "TranslationalStiffnessByAreaZ", -4);
                //##
				NotifyPropertyChanged("TranslationalStiffnessByLengthZ");
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBoundaryEdgeCondition), 5)]
		IIfcModulusOfRotationalSubgradeReactionSelect IIfcBoundaryEdgeCondition.RotationalStiffnessByLengthX 
		{ 
			get
			{
				//## Handle return of RotationalStiffnessByLengthX for which no match was found
                if (_rotationalStiffnessByLengthX4 != null)
                    return _rotationalStiffnessByLengthX4;

                var value = RotationalStiffnessByLengthX;
                if (!value.HasValue) return null;
                return new Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure(value.Value);
				//##
			} 
			set
			{
				//## Handle setting of RotationalStiffnessByLengthX for which no match was found
                if (value == null)
                {
                    RotationalStiffnessByLengthX = null;
                    if (_rotationalStiffnessByLengthX4 != null)
                        SetValue(v => _rotationalStiffnessByLengthX4 = v, _rotationalStiffnessByLengthX4, null, "TranslationalStiffnessByAreaZ", -5);
                    return;

                }
                if (value is Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)
                {
                    RotationalStiffnessByLengthX = new MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)value);
                    if (_rotationalStiffnessByLengthX4 != null)
                        SetValue(v => _rotationalStiffnessByLengthX4 = v, _rotationalStiffnessByLengthX4, null, "TranslationalStiffnessByAreaZ", -5);
                    return;
                }

                SetValue(v => _rotationalStiffnessByLengthX4 = v, _rotationalStiffnessByLengthX4, value, "TranslationalStiffnessByAreaZ", -5);
				//##
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBoundaryEdgeCondition), 6)]
		IIfcModulusOfRotationalSubgradeReactionSelect IIfcBoundaryEdgeCondition.RotationalStiffnessByLengthY 
		{ 
			get
			{
				//## Handle return of RotationalStiffnessByLengthY for which no match was found
                if (_rotationalStiffnessByLengthY4 != null)
                    return _rotationalStiffnessByLengthY4;

                var value = RotationalStiffnessByLengthY;
                if (!value.HasValue) return null;
                return new Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure(value.Value);
                //##
			} 
			set
			{
				//## Handle setting of RotationalStiffnessByLengthY for which no match was found
                if (value == null)
                {
                    RotationalStiffnessByLengthY = null;
                    if (_rotationalStiffnessByLengthY4 != null)
                        SetValue(v => _rotationalStiffnessByLengthY4 = v, _rotationalStiffnessByLengthY4, null, "TranslationalStiffnessByAreaZ", -6);
                    return;

                }
                if (value is Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)
                {
                    RotationalStiffnessByLengthY = new MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)value);
                    if (_rotationalStiffnessByLengthY4 != null)
                        SetValue(v => _rotationalStiffnessByLengthY4 = v, _rotationalStiffnessByLengthY4, null, "TranslationalStiffnessByAreaZ", -6);
                    return;
                }

                SetValue(v => _rotationalStiffnessByLengthY4 = v, _rotationalStiffnessByLengthY4, value, "TranslationalStiffnessByAreaZ", -6);
                //##
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBoundaryEdgeCondition), 7)]
		IIfcModulusOfRotationalSubgradeReactionSelect IIfcBoundaryEdgeCondition.RotationalStiffnessByLengthZ 
		{ 
			get
			{
				//## Handle return of RotationalStiffnessByLengthZ for which no match was found
                if (_rotationalStiffnessByLengthZ4 != null)
                    return _rotationalStiffnessByLengthZ4;

                var value = RotationalStiffnessByLengthZ;
                if (!value.HasValue) return null;
                return new Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure(value.Value);
                //##
			} 
			set
			{
				//## Handle setting of RotationalStiffnessByLengthZ for which no match was found
                if (value == null)
                {
                    RotationalStiffnessByLengthZ = null;
                    if (_rotationalStiffnessByLengthZ4 != null)
                        SetValue(v => _rotationalStiffnessByLengthZ4 = v, _rotationalStiffnessByLengthZ4, null, "TranslationalStiffnessByAreaZ", -7);
                    return;

                }
                if (value is Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)
                {
                    RotationalStiffnessByLengthZ = new MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)value);
                    if (_rotationalStiffnessByLengthZ4 != null)
                        SetValue(v => _rotationalStiffnessByLengthZ4 = v, _rotationalStiffnessByLengthZ4, null, "TranslationalStiffnessByAreaZ", -7);
                    return;
                }

                SetValue(v => _rotationalStiffnessByLengthZ4 = v, _rotationalStiffnessByLengthZ4, value, "TranslationalStiffnessByAreaZ", -7);
                //##
				
			}
		}
	//## Custom code
        private IIfcModulusOfTranslationalSubgradeReactionSelect _translationalStiffnessByLengthX;
        private IIfcModulusOfTranslationalSubgradeReactionSelect _translationalStiffnessByLengthY;
        private IIfcModulusOfTranslationalSubgradeReactionSelect _translationalStiffnessByLengthZ;

        private IIfcModulusOfRotationalSubgradeReactionSelect _rotationalStiffnessByLengthX4;
        private IIfcModulusOfRotationalSubgradeReactionSelect _rotationalStiffnessByLengthY4;
        private IIfcModulusOfRotationalSubgradeReactionSelect _rotationalStiffnessByLengthZ4;
	    //##
	}
}