// ------------------------------------------------------------------------------
// <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 IfcBoundaryNodeCondition
    /// </summary>
	// ReSharper disable once PartialTypeWithSinglePart
	public partial interface @IIfcBoundaryNodeCondition : IIfcBoundaryCondition
	{
		IIfcTranslationalStiffnessSelect @TranslationalStiffnessX { get;  set; }
		IIfcTranslationalStiffnessSelect @TranslationalStiffnessY { get;  set; }
		IIfcTranslationalStiffnessSelect @TranslationalStiffnessZ { get;  set; }
		IIfcRotationalStiffnessSelect @RotationalStiffnessX { get;  set; }
		IIfcRotationalStiffnessSelect @RotationalStiffnessY { get;  set; }
		IIfcRotationalStiffnessSelect @RotationalStiffnessZ { get;  set; }
	
	}
}

namespace Xbim.Ifc4.StructuralLoadResource
{
	[ExpressType("IfcBoundaryNodeCondition", 394)]
	// ReSharper disable once PartialTypeWithSinglePart
	public  partial class @IfcBoundaryNodeCondition : IfcBoundaryCondition, IInstantiableEntity, IIfcBoundaryNodeCondition, IEquatable<@IfcBoundaryNodeCondition>
	{
		#region IIfcBoundaryNodeCondition explicit implementation
		IIfcTranslationalStiffnessSelect IIfcBoundaryNodeCondition.TranslationalStiffnessX { 
 
 
			get { return @TranslationalStiffnessX; } 
			set { TranslationalStiffnessX = value as IfcTranslationalStiffnessSelect;}
		}	
		IIfcTranslationalStiffnessSelect IIfcBoundaryNodeCondition.TranslationalStiffnessY { 
 
 
			get { return @TranslationalStiffnessY; } 
			set { TranslationalStiffnessY = value as IfcTranslationalStiffnessSelect;}
		}	
		IIfcTranslationalStiffnessSelect IIfcBoundaryNodeCondition.TranslationalStiffnessZ { 
 
 
			get { return @TranslationalStiffnessZ; } 
			set { TranslationalStiffnessZ = value as IfcTranslationalStiffnessSelect;}
		}	
		IIfcRotationalStiffnessSelect IIfcBoundaryNodeCondition.RotationalStiffnessX { 
 
 
			get { return @RotationalStiffnessX; } 
			set { RotationalStiffnessX = value as IfcRotationalStiffnessSelect;}
		}	
		IIfcRotationalStiffnessSelect IIfcBoundaryNodeCondition.RotationalStiffnessY { 
 
 
			get { return @RotationalStiffnessY; } 
			set { RotationalStiffnessY = value as IfcRotationalStiffnessSelect;}
		}	
		IIfcRotationalStiffnessSelect IIfcBoundaryNodeCondition.RotationalStiffnessZ { 
 
 
			get { return @RotationalStiffnessZ; } 
			set { RotationalStiffnessZ = value as IfcRotationalStiffnessSelect;}
		}	
		#endregion

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

		#region Explicit attribute fields
		private IfcTranslationalStiffnessSelect _translationalStiffnessX;
		private IfcTranslationalStiffnessSelect _translationalStiffnessY;
		private IfcTranslationalStiffnessSelect _translationalStiffnessZ;
		private IfcRotationalStiffnessSelect _rotationalStiffnessX;
		private IfcRotationalStiffnessSelect _rotationalStiffnessY;
		private IfcRotationalStiffnessSelect _rotationalStiffnessZ;
		#endregion
	
		#region Explicit attribute properties
		[EntityAttribute(2, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 2)]
		public IfcTranslationalStiffnessSelect @TranslationalStiffnessX 
		{ 
			get 
			{
				if(_activated) return _translationalStiffnessX;
				Activate();
				return _translationalStiffnessX;
			} 
			set
			{
				SetValue( v =>  _translationalStiffnessX = v, _translationalStiffnessX, value,  "TranslationalStiffnessX", 2);
			} 
		}	
		[EntityAttribute(3, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 3)]
		public IfcTranslationalStiffnessSelect @TranslationalStiffnessY 
		{ 
			get 
			{
				if(_activated) return _translationalStiffnessY;
				Activate();
				return _translationalStiffnessY;
			} 
			set
			{
				SetValue( v =>  _translationalStiffnessY = v, _translationalStiffnessY, value,  "TranslationalStiffnessY", 3);
			} 
		}	
		[EntityAttribute(4, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 4)]
		public IfcTranslationalStiffnessSelect @TranslationalStiffnessZ 
		{ 
			get 
			{
				if(_activated) return _translationalStiffnessZ;
				Activate();
				return _translationalStiffnessZ;
			} 
			set
			{
				SetValue( v =>  _translationalStiffnessZ = v, _translationalStiffnessZ, value,  "TranslationalStiffnessZ", 4);
			} 
		}	
		[EntityAttribute(5, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 5)]
		public IfcRotationalStiffnessSelect @RotationalStiffnessX 
		{ 
			get 
			{
				if(_activated) return _rotationalStiffnessX;
				Activate();
				return _rotationalStiffnessX;
			} 
			set
			{
				SetValue( v =>  _rotationalStiffnessX = v, _rotationalStiffnessX, value,  "RotationalStiffnessX", 5);
			} 
		}	
		[EntityAttribute(6, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 6)]
		public IfcRotationalStiffnessSelect @RotationalStiffnessY 
		{ 
			get 
			{
				if(_activated) return _rotationalStiffnessY;
				Activate();
				return _rotationalStiffnessY;
			} 
			set
			{
				SetValue( v =>  _rotationalStiffnessY = v, _rotationalStiffnessY, value,  "RotationalStiffnessY", 6);
			} 
		}	
		[EntityAttribute(7, EntityAttributeState.Optional, EntityAttributeType.Class, EntityAttributeType.None, null, null, 7)]
		public IfcRotationalStiffnessSelect @RotationalStiffnessZ 
		{ 
			get 
			{
				if(_activated) return _rotationalStiffnessZ;
				Activate();
				return _rotationalStiffnessZ;
			} 
			set
			{
				SetValue( v =>  _rotationalStiffnessZ = v, _rotationalStiffnessZ, value,  "RotationalStiffnessZ", 7);
			} 
		}	
		#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: 
					_translationalStiffnessX = (IfcTranslationalStiffnessSelect)(value.EntityVal);
					return;
				case 2: 
					_translationalStiffnessY = (IfcTranslationalStiffnessSelect)(value.EntityVal);
					return;
				case 3: 
					_translationalStiffnessZ = (IfcTranslationalStiffnessSelect)(value.EntityVal);
					return;
				case 4: 
					_rotationalStiffnessX = (IfcRotationalStiffnessSelect)(value.EntityVal);
					return;
				case 5: 
					_rotationalStiffnessY = (IfcRotationalStiffnessSelect)(value.EntityVal);
					return;
				case 6: 
					_rotationalStiffnessZ = (IfcRotationalStiffnessSelect)(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(@IfcBoundaryNodeCondition other)
	    {
	        return this == other;
	    }
        #endregion

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