// ------------------------------------------------------------------------------
// <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.DateTimeResource
{
	public partial class @IfcResourceTime : IIfcResourceTime
	{

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 4)]
		Ifc4.DateTimeResource.IfcDuration? IIfcResourceTime.ScheduleWork 
		{ 
			get
			{
				if (!ScheduleWork.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDuration(ScheduleWork.Value);
			} 
			set
			{
				ScheduleWork = value.HasValue ? 
					new IfcDuration(value.Value) :  
					 new IfcDuration?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 5)]
		Ifc4.MeasureResource.IfcPositiveRatioMeasure? IIfcResourceTime.ScheduleUsage 
		{ 
			get
			{
				if (!ScheduleUsage.HasValue) return null;
				return new Ifc4.MeasureResource.IfcPositiveRatioMeasure(ScheduleUsage.Value);
			} 
			set
			{
				ScheduleUsage = value.HasValue ? 
					new MeasureResource.IfcPositiveRatioMeasure(value.Value) :  
					 new MeasureResource.IfcPositiveRatioMeasure?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 6)]
		Ifc4.DateTimeResource.IfcDateTime? IIfcResourceTime.ScheduleStart 
		{ 
			get
			{
				if (!ScheduleStart.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDateTime(ScheduleStart.Value);
			} 
			set
			{
				ScheduleStart = value.HasValue ? 
					new IfcDateTime(value.Value) :  
					 new IfcDateTime?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 7)]
		Ifc4.DateTimeResource.IfcDateTime? IIfcResourceTime.ScheduleFinish 
		{ 
			get
			{
				if (!ScheduleFinish.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDateTime(ScheduleFinish.Value);
			} 
			set
			{
				ScheduleFinish = value.HasValue ? 
					new IfcDateTime(value.Value) :  
					 new IfcDateTime?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 8)]
		Ifc4.MeasureResource.IfcLabel? IIfcResourceTime.ScheduleContour 
		{ 
			get
			{
				if (!ScheduleContour.HasValue) return null;
				return new Ifc4.MeasureResource.IfcLabel(ScheduleContour.Value);
			} 
			set
			{
				ScheduleContour = value.HasValue ? 
					new MeasureResource.IfcLabel(value.Value) :  
					 new MeasureResource.IfcLabel?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 9)]
		Ifc4.DateTimeResource.IfcDuration? IIfcResourceTime.LevelingDelay 
		{ 
			get
			{
				if (!LevelingDelay.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDuration(LevelingDelay.Value);
			} 
			set
			{
				LevelingDelay = value.HasValue ? 
					new IfcDuration(value.Value) :  
					 new IfcDuration?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 10)]
		Ifc4.MeasureResource.IfcBoolean? IIfcResourceTime.IsOverAllocated 
		{ 
			get
			{
				if (!IsOverAllocated.HasValue) return null;
				return new Ifc4.MeasureResource.IfcBoolean(IsOverAllocated.Value);
			} 
			set
			{
				IsOverAllocated = value.HasValue ? 
					new MeasureResource.IfcBoolean(value.Value) :  
					 new MeasureResource.IfcBoolean?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 11)]
		Ifc4.DateTimeResource.IfcDateTime? IIfcResourceTime.StatusTime 
		{ 
			get
			{
				if (!StatusTime.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDateTime(StatusTime.Value);
			} 
			set
			{
				StatusTime = value.HasValue ? 
					new IfcDateTime(value.Value) :  
					 new IfcDateTime?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 12)]
		Ifc4.DateTimeResource.IfcDuration? IIfcResourceTime.ActualWork 
		{ 
			get
			{
				if (!ActualWork.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDuration(ActualWork.Value);
			} 
			set
			{
				ActualWork = value.HasValue ? 
					new IfcDuration(value.Value) :  
					 new IfcDuration?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 13)]
		Ifc4.MeasureResource.IfcPositiveRatioMeasure? IIfcResourceTime.ActualUsage 
		{ 
			get
			{
				if (!ActualUsage.HasValue) return null;
				return new Ifc4.MeasureResource.IfcPositiveRatioMeasure(ActualUsage.Value);
			} 
			set
			{
				ActualUsage = value.HasValue ? 
					new MeasureResource.IfcPositiveRatioMeasure(value.Value) :  
					 new MeasureResource.IfcPositiveRatioMeasure?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 14)]
		Ifc4.DateTimeResource.IfcDateTime? IIfcResourceTime.ActualStart 
		{ 
			get
			{
				if (!ActualStart.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDateTime(ActualStart.Value);
			} 
			set
			{
				ActualStart = value.HasValue ? 
					new IfcDateTime(value.Value) :  
					 new IfcDateTime?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 15)]
		Ifc4.DateTimeResource.IfcDateTime? IIfcResourceTime.ActualFinish 
		{ 
			get
			{
				if (!ActualFinish.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDateTime(ActualFinish.Value);
			} 
			set
			{
				ActualFinish = value.HasValue ? 
					new IfcDateTime(value.Value) :  
					 new IfcDateTime?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 16)]
		Ifc4.DateTimeResource.IfcDuration? IIfcResourceTime.RemainingWork 
		{ 
			get
			{
				if (!RemainingWork.HasValue) return null;
				return new Ifc4.DateTimeResource.IfcDuration(RemainingWork.Value);
			} 
			set
			{
				RemainingWork = value.HasValue ? 
					new IfcDuration(value.Value) :  
					 new IfcDuration?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 17)]
		Ifc4.MeasureResource.IfcPositiveRatioMeasure? IIfcResourceTime.RemainingUsage 
		{ 
			get
			{
				if (!RemainingUsage.HasValue) return null;
				return new Ifc4.MeasureResource.IfcPositiveRatioMeasure(RemainingUsage.Value);
			} 
			set
			{
				RemainingUsage = value.HasValue ? 
					new MeasureResource.IfcPositiveRatioMeasure(value.Value) :  
					 new MeasureResource.IfcPositiveRatioMeasure?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcResourceTime), 18)]
		Ifc4.MeasureResource.IfcPositiveRatioMeasure? IIfcResourceTime.Completion 
		{ 
			get
			{
				if (!Completion.HasValue) return null;
				return new Ifc4.MeasureResource.IfcPositiveRatioMeasure(Completion.Value);
			} 
			set
			{
				Completion = value.HasValue ? 
					new MeasureResource.IfcPositiveRatioMeasure(value.Value) :  
					 new MeasureResource.IfcPositiveRatioMeasure?() ;
				
			}
		}
	//## Custom code
	//##
	}
}