// ------------------------------------------------------------------------------
// <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 System;
using System.Collections.Generic;
using System.Linq;
using Xbim.Common;
using Xbim.Common.Exceptions;
using Xbim.Ifc4.Interfaces;
using Xbim.Ifc4.StructuralLoadResource;
//## Custom using statements
//##

namespace Xbim.Ifc4.Interfaces
{
	/// <summary>
    /// Readonly interface for IfcBoundaryFaceCondition
    /// </summary>
	// ReSharper disable once PartialTypeWithSinglePart
	public partial interface @IIfcBoundaryFaceCondition : IIfcBoundaryCondition
	{
		IIfcModulusOfSubgradeReactionSelect @TranslationalStiffnessByAreaX { get;  set; }
		IIfcModulusOfSubgradeReactionSelect @TranslationalStiffnessByAreaY { get;  set; }
		IIfcModulusOfSubgradeReactionSelect @TranslationalStiffnessByAreaZ { get;  set; }
	
	}
}

namespace Xbim.Ifc4.StructuralLoadResource
{
	[ExpressType("IfcBoundaryFaceCondition", 674)]
	// ReSharper disable once PartialTypeWithSinglePart
	public  partial class @IfcBoundaryFaceCondition : IfcBoundaryCondition, IInstantiableEntity, IIfcBoundaryFaceCondition, IEquatable<@IfcBoundaryFaceCondition>
	{
		#region IIfcBoundaryFaceCondition explicit implementation
		IIfcModulusOfSubgradeReactionSelect IIfcBoundaryFaceCondition.TranslationalStiffnessByAreaX { 
 
 
			get { return @TranslationalStiffnessByAreaX; } 
			set { TranslationalStiffnessByAreaX = value as IfcModulusOfSubgradeReactionSelect;}
		}	
		IIfcModulusOfSubgradeReactionSelect IIfcBoundaryFaceCondition.TranslationalStiffnessByAreaY { 
 
 
			get { return @TranslationalStiffnessByAreaY; } 
			set { TranslationalStiffnessByAreaY = value as IfcModulusOfSubgradeReactionSelect;}
		}	
		IIfcModulusOfSubgradeReactionSelect IIfcBoundaryFaceCondition.TranslationalStiffnessByAreaZ { 
 
 
			get { return @TranslationalStiffnessByAreaZ; } 
			set { TranslationalStiffnessByAreaZ = value as IfcModulusOfSubgradeReactionSelect;}
		}	
		#endregion

		//internal constructor makes sure that objects are not created outside of the model/ assembly controlled area
		internal IfcBoundaryFaceCondition(IModel model, int label, bool activated) : base(model, label, activated)  
		{
		}

		#region Explicit attribute fields
		private IfcModulusOfSubgradeReactionSelect _translationalStiffnessByAreaX;
		private IfcModulusOfSubgradeReactionSelect _translationalStiffnessByAreaY;
		private IfcModulusOfSubgradeReactionSelect _translationalStiffnessByAreaZ;
		#endregion
	
		#region Explicit attribute properties
		[EntityAttribute(2, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 2)]
		public IfcModulusOfSubgradeReactionSelect @TranslationalStiffnessByAreaX 
		{ 
			get 
			{
				if(_activated) return _translationalStiffnessByAreaX;
				Activate();
				return _translationalStiffnessByAreaX;
			} 
			set
			{
				SetValue( v =>  _translationalStiffnessByAreaX = v, _translationalStiffnessByAreaX, value,  "TranslationalStiffnessByAreaX", 2);
			} 
		}	
		[EntityAttribute(3, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 3)]
		public IfcModulusOfSubgradeReactionSelect @TranslationalStiffnessByAreaY 
		{ 
			get 
			{
				if(_activated) return _translationalStiffnessByAreaY;
				Activate();
				return _translationalStiffnessByAreaY;
			} 
			set
			{
				SetValue( v =>  _translationalStiffnessByAreaY = v, _translationalStiffnessByAreaY, value,  "TranslationalStiffnessByAreaY", 3);
			} 
		}	
		[EntityAttribute(4, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 4)]
		public IfcModulusOfSubgradeReactionSelect @TranslationalStiffnessByAreaZ 
		{ 
			get 
			{
				if(_activated) return _translationalStiffnessByAreaZ;
				Activate();
				return _translationalStiffnessByAreaZ;
			} 
			set
			{
				SetValue( v =>  _translationalStiffnessByAreaZ = v, _translationalStiffnessByAreaZ, value,  "TranslationalStiffnessByAreaZ", 4);
			} 
		}	
		#endregion




		#region IPersist implementation
		public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
		{
			switch (propIndex)
			{
				case 0: 
					base.Parse(propIndex, value, nestedIndex); 
					return;
				case 1: 
					_translationalStiffnessByAreaX = (IfcModulusOfSubgradeReactionSelect)(value.EntityVal);
					return;
				case 2: 
					_translationalStiffnessByAreaY = (IfcModulusOfSubgradeReactionSelect)(value.EntityVal);
					return;
				case 3: 
					_translationalStiffnessByAreaZ = (IfcModulusOfSubgradeReactionSelect)(value.EntityVal);
					return;
				default:
					throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
			}
		}
		#endregion

		#region Equality comparers and operators
        public bool Equals(@IfcBoundaryFaceCondition other)
	    {
	        return this == other;
	    }
        #endregion

		#region Custom code (will survive code regeneration)
		//## Custom code
		//##
		#endregion
	}
}