RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

source

Models/Packhouse/Site/ShiftHourlyEntryModel.js

/**
 * File Auto-Generated by the RICADO Gen 4 PHP API Project
 * 
 * Do Not Edit this File Manually!
 */

import BaseModel from '../../../Models/BaseModel';

/**
 * Model Class for a Shift Hourly Entry
 * 
 * @class
 * @hideconstructor
 * @extends BaseModel
 */
class ShiftHourlyEntryModel extends BaseModel
{
    /**
     * ShiftHourlyEntryModel Constructor
     * 
     * @protected
     * @param {number} siteId The Site ID associated with this Shift Hourly Entry
     */
    constructor(siteId)
    {
        super();
        
        /**
         * The Shift Hourly Entry ID
         * 
         * @type {string}
         * @public
         */
        this.id = "";
        
        /**
         * The Packing Line ID this Hourly Entry is associated with
         * 
         * @type {string}
         * @public
         */
        this.packingLineId = "";
        
        /**
         * The Shift ID this Hourly Entry is asssociated with
         * 
         * @type {string}
         * @public
         */
        this.shiftId = "";
        
        /**
         * When this Hourly Entry was Created
         * 
         * @type {Date}
         * @public
         */
        this.createdTimestamp = new Date();
        
        /**
         * The Start Timestamp of this Hourly Entry
         * 
         * @type {Date}
         * @public
         */
        this.startTimestamp = new Date();
        
        /**
         * The End Timestamp of this Hourly Entry
         * 
         * @type {Date}
         * @public
         */
        this.endTimestamp = new Date();
        
        /**
         * The Number of People working in all Areas except Class 2 for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.class1Manning = null;
        
        /**
         * The Number of People working in the Class 2 Area for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.class2Manning = null;
        
        /**
         * The Average Target Number of People that should be working for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageManningTarget = null;
        
        /**
         * The Average Target Number of People that should be working in all Areas except Class 2 for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageClass1ManningTarget = null;
        
        /**
         * The Average Target Number of People that should be working in the Class 2 Area for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageClass2ManningTarget = null;
        
        /**
         * An Array of Manning Teams and their Headcounts for this Hour. Only Applies when *manningUsesTeams* is *true*
         * 
         * @type {?Array<{id: string, name: string, headcount: number, group: string}>}
         * @public
         */
        this.manningTeams = null;
        
        /**
         * Whether Manning is tracked at the Team Level for this Hour
         * 
         * @type {?boolean}
         * @public
         */
        this.manningUsesTeams = null;
        
        /**
         * The Average Cost per Person working in all Areas for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageCostPerManningUnit = null;
        
        /**
         * The Actual Percentage of Total Tray Equivalents that are Layered for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.layeredTrayPercentage = null;
        
        /**
         * The Target Percentage of Total Tray Equivalents that should be Layered for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.layeredTrayPercentageTarget = null;
        
        /**
         * The Average Class 1 Percentage for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageClass1Percentage = null;
        
        /**
         * The Number of Quality R600 Samples that were Ideal for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.qualityR600IdealSamplesPercentage = null;
        
        /**
         * The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageQualityR600IdealSamplesTarget = null;
        
        /**
         * An Array of Custom Quality Data Items for this Hour
         * 
         * @type {Array<{id: string, name: string, type: string, value: number, averageTarget: ?number}>}
         * @public
         */
        this.customQualityData = [];
        
        /**
         * The Total Number of Bins Tipped for this Hour
         * 
         * @type {number}
         * @public
         */
        this.totalBinsTipped = 0;
        
        /**
         * The Target Number of Bins to Tip for this Hour
         * 
         * @type {number}
         * @public
         */
        this.binsTippedTarget = 0;
        
        /**
         * The Total Downtime for this Hour expressed in Seconds
         * 
         * @type {number}
         * @public
         */
        this.totalDowntime = 0;
        
        /**
         * The Total Time that could be Utilized for Packing Fruit (excludes Planned Downtime such as Smoko Breaks) for this Hour expressed in Seconds
         * 
         * @type {number}
         * @public
         */
        this.totalProductionTime = 0;
        
        /**
         * The Total Number of Class 1 Tray Equivalents Packed for this Hour
         * 
         * @type {number}
         * @public
         */
        this.totalClass1Trays = 0;
        
        /**
         * The Total Number of Class 2 Tray Equivalents Packed for this Hour
         * 
         * @type {number}
         * @public
         */
        this.totalClass2Trays = 0;
        
        /**
         * The Target Number of Class 1 Tray Equivalents that should be Packed excluding all Downtime for this Hour
         * 
         * @type {number}
         * @public
         */
        this.class1TraysPerHourExcludingDowntimeTarget = 0;
        
        /**
         * The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %) for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageClass1TraysPerHourAdjustedTarget = null;
        
        /**
         * The Average Cost per Tray Equivalent for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageCostPerTray = null;
        
        /**
         * The Average Cost per Tray Equivalent Target after Adjustment (Class 1 %, Soft-Sort %) for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.averageCostPerTrayTarget = null;
        
        /**
         * The Primary Issue Category for this Hourly Entry
         * 
         * @type {?string}
         * @public
         */
        this.primaryIssueCategory = null;
        
        /**
         * The Primary Issue Tag for this Hourly Entry
         * 
         * @type {?string}
         * @public
         */
        this.primaryIssueTag = null;
        
        /**
         * A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
         * 
         * @type {?number}
         * @public
         */
        this.primaryIssuePercentage = null;
        
        /**
         * The Secondary Issue Category for this Hourly Entry
         * 
         * @type {?string}
         * @public
         */
        this.secondaryIssueCategory = null;
        
        /**
         * The Secondary Issue Tag for this Hourly Entry
         * 
         * @type {?string}
         * @public
         */
        this.secondaryIssueTag = null;
        
        /**
         * A Percentage between 0% and 100% indicating how much the Secondary Issue impacted Throughput for this Hourly Entry
         * 
         * @type {?number}
         * @public
         */
        this.secondaryIssuePercentage = null;
        
        /**
         * An Optional Focus for the Next Hour
         * 
         * @type {?string}
         * @public
         */
        this.nextHourFocus = null;
        
        /**
         * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Hour
         * 
         * @type {?number}
         * @public
         */
        this.satisfactionRating = null;
        
        /**
         * The Status of this Hourly Entry
         * 
         * @type {string}
         * @public
         */
        this.status = "";
        
        /**
         * The Number of Class 1 Tray Equivalents that would have been Packed this Hour without Planned Downtime (e.g. Smoko Breaks)
         * 
         * @type {number}
         * @public
         */
        this.class1TraysPerHourPotential = 0;
        
        /**
         * The Number of Class 1 Tray Equivalents that would have been Packed this Hour with Zero Downtime
         * 
         * @type {number}
         * @public
         */
        this.class1TraysPerHourExcludingDowntime = 0;
        
        /**
         * The Number of Class 1 Tray Equivalents that would have been Packed per Person this Hour without Planned Downtime (e.g. Smoko Breaks)
         * 
         * @type {?number}
         * @public
         */
        this.class1TraysPerManHourPotential = null;
        
        /**
         * The Number of Class 1 Tray Equivalents that would have been Packed per Person this Hour with Zero Downtime
         * 
         * @type {?number}
         * @public
         */
        this.class1TraysPerManHourExcludingDowntime = null;
        
        /**
         * The Manning Percentage based on the Average Target for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.manningPercentage = null;
        
        /**
         * The Total Number of People working for this Hour
         * 
         * @type {?number}
         * @public
         */
        this.totalManning = null;
        
        /**
         * The Percentage of Production Time without Downtime for this Hour
         * 
         * @type {number}
         * @public
         */
        this.uptimePercentage = 0;
        
        /**
         * The Percentage of Downtime for this Hour
         * 
         * @type {number}
         * @public
         */
        this.downtimePercentage = 0;
        
        /**
         * Whether the Shift Hourly Entry has been deleted
         * 
         * @type {boolean}
         * @public
         */
        this.deleted = false;
        
        /**
         * When the Shift Hourly Entry was last updated
         * 
         * @type {Date}
         * @public
         */
        this.updateTimestamp = new Date();
        
        /**
         * The Site ID associated with this Shift Hourly Entry
         * 
         * @type {number}
         * @public
         */
        this.siteId = siteId;
    }

    /**
     * Create a new **ShiftHourlyEntryModel** from a JSON Object or JSON String
     * 
     * @static
     * @public
     * @param {Object<string, any>|string} json A JSON Object or JSON String
     * @param {number} siteId The Site ID associated with this Shift Hourly Entry
     * @return {ShiftHourlyEntryModel}
     */
    static fromJSON(json, siteId)
    {
        let model = new ShiftHourlyEntryModel(siteId);
        
        /**
         * The JSON Object
         * 
         * @type {Object<string, any>}
         */
        let jsonObject = {};
        
        if(typeof json === 'string')
        {
            jsonObject = JSON.parse(json);
        }
        else if(typeof json === 'object')
        {
            jsonObject = json;
        }
        
        if('id' in jsonObject)
        {
            model.id = (function(){
                if(typeof jsonObject['id'] !== 'string')
                {
                    return String(jsonObject['id']);
                }
        
                return jsonObject['id'];
            }());
        }
        
        if('packingLineId' in jsonObject)
        {
            model.packingLineId = (function(){
                if(typeof jsonObject['packingLineId'] !== 'string')
                {
                    return String(jsonObject['packingLineId']);
                }
        
                return jsonObject['packingLineId'];
            }());
        }
        
        if('shiftId' in jsonObject)
        {
            model.shiftId = (function(){
                if(typeof jsonObject['shiftId'] !== 'string')
                {
                    return String(jsonObject['shiftId']);
                }
        
                return jsonObject['shiftId'];
            }());
        }
        
        if('createdTimestamp' in jsonObject)
        {
            model.createdTimestamp = (function(){
                if(typeof jsonObject['createdTimestamp'] !== 'string')
                {
                    return new Date(String(jsonObject['createdTimestamp']));
                }
        
                return new Date(jsonObject['createdTimestamp']);
            }());
        }
        
        if('startTimestamp' in jsonObject)
        {
            model.startTimestamp = (function(){
                if(typeof jsonObject['startTimestamp'] !== 'string')
                {
                    return new Date(String(jsonObject['startTimestamp']));
                }
        
                return new Date(jsonObject['startTimestamp']);
            }());
        }
        
        if('endTimestamp' in jsonObject)
        {
            model.endTimestamp = (function(){
                if(typeof jsonObject['endTimestamp'] !== 'string')
                {
                    return new Date(String(jsonObject['endTimestamp']));
                }
        
                return new Date(jsonObject['endTimestamp']);
            }());
        }
        
        if('class1Manning' in jsonObject)
        {
            model.class1Manning = (function(){
                if(jsonObject['class1Manning'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['class1Manning'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['class1Manning'])) ? Number(jsonObject['class1Manning']) : Math.floor(Number(jsonObject['class1Manning']));
                }
        
                return Number.isInteger(jsonObject['class1Manning']) ? jsonObject['class1Manning'] : Math.floor(jsonObject['class1Manning']);
            }());
        }
        
        if('class2Manning' in jsonObject)
        {
            model.class2Manning = (function(){
                if(jsonObject['class2Manning'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['class2Manning'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['class2Manning'])) ? Number(jsonObject['class2Manning']) : Math.floor(Number(jsonObject['class2Manning']));
                }
        
                return Number.isInteger(jsonObject['class2Manning']) ? jsonObject['class2Manning'] : Math.floor(jsonObject['class2Manning']);
            }());
        }
        
        if('averageManningTarget' in jsonObject)
        {
            model.averageManningTarget = (function(){
                if(jsonObject['averageManningTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageManningTarget'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['averageManningTarget'])) ? Number(jsonObject['averageManningTarget']) : Math.floor(Number(jsonObject['averageManningTarget']));
                }
        
                return Number.isInteger(jsonObject['averageManningTarget']) ? jsonObject['averageManningTarget'] : Math.floor(jsonObject['averageManningTarget']);
            }());
        }
        
        if('averageClass1ManningTarget' in jsonObject)
        {
            model.averageClass1ManningTarget = (function(){
                if(jsonObject['averageClass1ManningTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageClass1ManningTarget'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['averageClass1ManningTarget'])) ? Number(jsonObject['averageClass1ManningTarget']) : Math.floor(Number(jsonObject['averageClass1ManningTarget']));
                }
        
                return Number.isInteger(jsonObject['averageClass1ManningTarget']) ? jsonObject['averageClass1ManningTarget'] : Math.floor(jsonObject['averageClass1ManningTarget']);
            }());
        }
        
        if('averageClass2ManningTarget' in jsonObject)
        {
            model.averageClass2ManningTarget = (function(){
                if(jsonObject['averageClass2ManningTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageClass2ManningTarget'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['averageClass2ManningTarget'])) ? Number(jsonObject['averageClass2ManningTarget']) : Math.floor(Number(jsonObject['averageClass2ManningTarget']));
                }
        
                return Number.isInteger(jsonObject['averageClass2ManningTarget']) ? jsonObject['averageClass2ManningTarget'] : Math.floor(jsonObject['averageClass2ManningTarget']);
            }());
        }
        
        if('manningTeams' in jsonObject)
        {
            model.manningTeams = (function(){
                if(jsonObject['manningTeams'] === null)
                {
                    return null;
                }
        
                if(Array.isArray(jsonObject['manningTeams']) !== true)
                {
                    return [];
                }
        
                return jsonObject['manningTeams'].map((manningTeamsItem) => {
                    return (function(){
                        let manningTeamsItemObject = {};
                        
                        if(typeof manningTeamsItem === 'object' && 'id' in manningTeamsItem)
                        {
                            manningTeamsItemObject.id = (function(){
                                if(typeof manningTeamsItem.id !== 'string')
                                {
                                    return String(manningTeamsItem.id);
                                }
        
                                return manningTeamsItem.id;
                            }());
                        }
                        else
                        {
                            manningTeamsItemObject.id = "";
                        }
                        
                        if(typeof manningTeamsItem === 'object' && 'name' in manningTeamsItem)
                        {
                            manningTeamsItemObject.name = (function(){
                                if(typeof manningTeamsItem.name !== 'string')
                                {
                                    return String(manningTeamsItem.name);
                                }
        
                                return manningTeamsItem.name;
                            }());
                        }
                        else
                        {
                            manningTeamsItemObject.name = "";
                        }
                        
                        if(typeof manningTeamsItem === 'object' && 'headcount' in manningTeamsItem)
                        {
                            manningTeamsItemObject.headcount = (function(){
                                if(typeof manningTeamsItem.headcount !== 'number')
                                {
                                    return Number.isInteger(Number(manningTeamsItem.headcount)) ? Number(manningTeamsItem.headcount) : Math.floor(Number(manningTeamsItem.headcount));
                                }
        
                                return Number.isInteger(manningTeamsItem.headcount) ? manningTeamsItem.headcount : Math.floor(manningTeamsItem.headcount);
                            }());
                        }
                        else
                        {
                            manningTeamsItemObject.headcount = 0;
                        }
                        
                        if(typeof manningTeamsItem === 'object' && 'group' in manningTeamsItem)
                        {
                            manningTeamsItemObject.group = (function(){
                                if(typeof manningTeamsItem.group !== 'string')
                                {
                                    return String(manningTeamsItem.group);
                                }
        
                                return manningTeamsItem.group;
                            }());
                        }
                        else
                        {
                            manningTeamsItemObject.group = "";
                        }
        
                        return manningTeamsItemObject;
                    }());
                });
            }());
        }
        
        if('manningUsesTeams' in jsonObject)
        {
            model.manningUsesTeams = (function(){
                if(jsonObject['manningUsesTeams'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['manningUsesTeams'] !== 'boolean')
                {
                    return Boolean(jsonObject['manningUsesTeams']);
                }
        
                return jsonObject['manningUsesTeams'];
            }());
        }
        
        if('averageCostPerManningUnit' in jsonObject)
        {
            model.averageCostPerManningUnit = (function(){
                if(jsonObject['averageCostPerManningUnit'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageCostPerManningUnit'] !== 'number')
                {
                    return Number(jsonObject['averageCostPerManningUnit']);
                }
        
                return jsonObject['averageCostPerManningUnit'];
            }());
        }
        
        if('layeredTrayPercentage' in jsonObject)
        {
            model.layeredTrayPercentage = (function(){
                if(jsonObject['layeredTrayPercentage'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['layeredTrayPercentage'] !== 'number')
                {
                    return Number(jsonObject['layeredTrayPercentage']);
                }
        
                return jsonObject['layeredTrayPercentage'];
            }());
        }
        
        if('layeredTrayPercentageTarget' in jsonObject)
        {
            model.layeredTrayPercentageTarget = (function(){
                if(jsonObject['layeredTrayPercentageTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['layeredTrayPercentageTarget'] !== 'number')
                {
                    return Number(jsonObject['layeredTrayPercentageTarget']);
                }
        
                return jsonObject['layeredTrayPercentageTarget'];
            }());
        }
        
        if('averageClass1Percentage' in jsonObject)
        {
            model.averageClass1Percentage = (function(){
                if(jsonObject['averageClass1Percentage'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageClass1Percentage'] !== 'number')
                {
                    return Number(jsonObject['averageClass1Percentage']);
                }
        
                return jsonObject['averageClass1Percentage'];
            }());
        }
        
        if('qualityR600IdealSamplesPercentage' in jsonObject)
        {
            model.qualityR600IdealSamplesPercentage = (function(){
                if(jsonObject['qualityR600IdealSamplesPercentage'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['qualityR600IdealSamplesPercentage'] !== 'number')
                {
                    return Number(jsonObject['qualityR600IdealSamplesPercentage']);
                }
        
                return jsonObject['qualityR600IdealSamplesPercentage'];
            }());
        }
        
        if('averageQualityR600IdealSamplesTarget' in jsonObject)
        {
            model.averageQualityR600IdealSamplesTarget = (function(){
                if(jsonObject['averageQualityR600IdealSamplesTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageQualityR600IdealSamplesTarget'] !== 'number')
                {
                    return Number(jsonObject['averageQualityR600IdealSamplesTarget']);
                }
        
                return jsonObject['averageQualityR600IdealSamplesTarget'];
            }());
        }
        
        if('customQualityData' in jsonObject)
        {
            model.customQualityData = (function(){
                if(Array.isArray(jsonObject['customQualityData']) !== true)
                {
                    return [];
                }
        
                return jsonObject['customQualityData'].map((customQualityDataItem) => {
                    return (function(){
                        let customQualityDataItemObject = {};
                        
                        if(typeof customQualityDataItem === 'object' && 'id' in customQualityDataItem)
                        {
                            customQualityDataItemObject.id = (function(){
                                if(typeof customQualityDataItem.id !== 'string')
                                {
                                    return String(customQualityDataItem.id);
                                }
        
                                return customQualityDataItem.id;
                            }());
                        }
                        else
                        {
                            customQualityDataItemObject.id = "";
                        }
                        
                        if(typeof customQualityDataItem === 'object' && 'name' in customQualityDataItem)
                        {
                            customQualityDataItemObject.name = (function(){
                                if(typeof customQualityDataItem.name !== 'string')
                                {
                                    return String(customQualityDataItem.name);
                                }
        
                                return customQualityDataItem.name;
                            }());
                        }
                        else
                        {
                            customQualityDataItemObject.name = "";
                        }
                        
                        if(typeof customQualityDataItem === 'object' && 'type' in customQualityDataItem)
                        {
                            customQualityDataItemObject.type = (function(){
                                if(typeof customQualityDataItem.type !== 'string')
                                {
                                    return String(customQualityDataItem.type);
                                }
        
                                return customQualityDataItem.type;
                            }());
                        }
                        else
                        {
                            customQualityDataItemObject.type = "";
                        }
                        
                        if(typeof customQualityDataItem === 'object' && 'value' in customQualityDataItem)
                        {
                            customQualityDataItemObject.value = (function(){
                                if(typeof customQualityDataItem.value !== 'number')
                                {
                                    return Number(customQualityDataItem.value);
                                }
        
                                return customQualityDataItem.value;
                            }());
                        }
                        else
                        {
                            customQualityDataItemObject.value = 0;
                        }
                        
                        if(typeof customQualityDataItem === 'object' && 'averageTarget' in customQualityDataItem)
                        {
                            customQualityDataItemObject.averageTarget = (function(){
                                if(customQualityDataItem.averageTarget === null)
                                {
                                    return null;
                                }
        
                                if(typeof customQualityDataItem.averageTarget !== 'number')
                                {
                                    return Number(customQualityDataItem.averageTarget);
                                }
        
                                return customQualityDataItem.averageTarget;
                            }());
                        }
                        else
                        {
                            customQualityDataItemObject.averageTarget = null;
                        }
        
                        return customQualityDataItemObject;
                    }());
                });
            }());
        }
        
        if('totalBinsTipped' in jsonObject)
        {
            model.totalBinsTipped = (function(){
                if(typeof jsonObject['totalBinsTipped'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['totalBinsTipped'])) ? Number(jsonObject['totalBinsTipped']) : Math.floor(Number(jsonObject['totalBinsTipped']));
                }
        
                return Number.isInteger(jsonObject['totalBinsTipped']) ? jsonObject['totalBinsTipped'] : Math.floor(jsonObject['totalBinsTipped']);
            }());
        }
        
        if('binsTippedTarget' in jsonObject)
        {
            model.binsTippedTarget = (function(){
                if(typeof jsonObject['binsTippedTarget'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['binsTippedTarget'])) ? Number(jsonObject['binsTippedTarget']) : Math.floor(Number(jsonObject['binsTippedTarget']));
                }
        
                return Number.isInteger(jsonObject['binsTippedTarget']) ? jsonObject['binsTippedTarget'] : Math.floor(jsonObject['binsTippedTarget']);
            }());
        }
        
        if('totalDowntime' in jsonObject)
        {
            model.totalDowntime = (function(){
                if(typeof jsonObject['totalDowntime'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['totalDowntime'])) ? Number(jsonObject['totalDowntime']) : Math.floor(Number(jsonObject['totalDowntime']));
                }
        
                return Number.isInteger(jsonObject['totalDowntime']) ? jsonObject['totalDowntime'] : Math.floor(jsonObject['totalDowntime']);
            }());
        }
        
        if('totalProductionTime' in jsonObject)
        {
            model.totalProductionTime = (function(){
                if(typeof jsonObject['totalProductionTime'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['totalProductionTime'])) ? Number(jsonObject['totalProductionTime']) : Math.floor(Number(jsonObject['totalProductionTime']));
                }
        
                return Number.isInteger(jsonObject['totalProductionTime']) ? jsonObject['totalProductionTime'] : Math.floor(jsonObject['totalProductionTime']);
            }());
        }
        
        if('totalClass1Trays' in jsonObject)
        {
            model.totalClass1Trays = (function(){
                if(typeof jsonObject['totalClass1Trays'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['totalClass1Trays'])) ? Number(jsonObject['totalClass1Trays']) : Math.floor(Number(jsonObject['totalClass1Trays']));
                }
        
                return Number.isInteger(jsonObject['totalClass1Trays']) ? jsonObject['totalClass1Trays'] : Math.floor(jsonObject['totalClass1Trays']);
            }());
        }
        
        if('totalClass2Trays' in jsonObject)
        {
            model.totalClass2Trays = (function(){
                if(typeof jsonObject['totalClass2Trays'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['totalClass2Trays'])) ? Number(jsonObject['totalClass2Trays']) : Math.floor(Number(jsonObject['totalClass2Trays']));
                }
        
                return Number.isInteger(jsonObject['totalClass2Trays']) ? jsonObject['totalClass2Trays'] : Math.floor(jsonObject['totalClass2Trays']);
            }());
        }
        
        if('class1TraysPerHourExcludingDowntimeTarget' in jsonObject)
        {
            model.class1TraysPerHourExcludingDowntimeTarget = (function(){
                if(typeof jsonObject['class1TraysPerHourExcludingDowntimeTarget'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['class1TraysPerHourExcludingDowntimeTarget'])) ? Number(jsonObject['class1TraysPerHourExcludingDowntimeTarget']) : Math.floor(Number(jsonObject['class1TraysPerHourExcludingDowntimeTarget']));
                }
        
                return Number.isInteger(jsonObject['class1TraysPerHourExcludingDowntimeTarget']) ? jsonObject['class1TraysPerHourExcludingDowntimeTarget'] : Math.floor(jsonObject['class1TraysPerHourExcludingDowntimeTarget']);
            }());
        }
        
        if('averageClass1TraysPerHourAdjustedTarget' in jsonObject)
        {
            model.averageClass1TraysPerHourAdjustedTarget = (function(){
                if(jsonObject['averageClass1TraysPerHourAdjustedTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageClass1TraysPerHourAdjustedTarget'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['averageClass1TraysPerHourAdjustedTarget'])) ? Number(jsonObject['averageClass1TraysPerHourAdjustedTarget']) : Math.floor(Number(jsonObject['averageClass1TraysPerHourAdjustedTarget']));
                }
        
                return Number.isInteger(jsonObject['averageClass1TraysPerHourAdjustedTarget']) ? jsonObject['averageClass1TraysPerHourAdjustedTarget'] : Math.floor(jsonObject['averageClass1TraysPerHourAdjustedTarget']);
            }());
        }
        
        if('averageCostPerTray' in jsonObject)
        {
            model.averageCostPerTray = (function(){
                if(jsonObject['averageCostPerTray'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageCostPerTray'] !== 'number')
                {
                    return Number(jsonObject['averageCostPerTray']);
                }
        
                return jsonObject['averageCostPerTray'];
            }());
        }
        
        if('averageCostPerTrayTarget' in jsonObject)
        {
            model.averageCostPerTrayTarget = (function(){
                if(jsonObject['averageCostPerTrayTarget'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['averageCostPerTrayTarget'] !== 'number')
                {
                    return Number(jsonObject['averageCostPerTrayTarget']);
                }
        
                return jsonObject['averageCostPerTrayTarget'];
            }());
        }
        
        if('primaryIssueCategory' in jsonObject)
        {
            model.primaryIssueCategory = (function(){
                if(jsonObject['primaryIssueCategory'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['primaryIssueCategory'] !== 'string')
                {
                    return String(jsonObject['primaryIssueCategory']);
                }
        
                return jsonObject['primaryIssueCategory'];
            }());
        }
        
        if('primaryIssueTag' in jsonObject)
        {
            model.primaryIssueTag = (function(){
                if(jsonObject['primaryIssueTag'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['primaryIssueTag'] !== 'string')
                {
                    return String(jsonObject['primaryIssueTag']);
                }
        
                return jsonObject['primaryIssueTag'];
            }());
        }
        
        if('primaryIssuePercentage' in jsonObject)
        {
            model.primaryIssuePercentage = (function(){
                if(jsonObject['primaryIssuePercentage'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['primaryIssuePercentage'] !== 'number')
                {
                    return Number(jsonObject['primaryIssuePercentage']);
                }
        
                return jsonObject['primaryIssuePercentage'];
            }());
        }
        
        if('secondaryIssueCategory' in jsonObject)
        {
            model.secondaryIssueCategory = (function(){
                if(jsonObject['secondaryIssueCategory'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['secondaryIssueCategory'] !== 'string')
                {
                    return String(jsonObject['secondaryIssueCategory']);
                }
        
                return jsonObject['secondaryIssueCategory'];
            }());
        }
        
        if('secondaryIssueTag' in jsonObject)
        {
            model.secondaryIssueTag = (function(){
                if(jsonObject['secondaryIssueTag'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['secondaryIssueTag'] !== 'string')
                {
                    return String(jsonObject['secondaryIssueTag']);
                }
        
                return jsonObject['secondaryIssueTag'];
            }());
        }
        
        if('secondaryIssuePercentage' in jsonObject)
        {
            model.secondaryIssuePercentage = (function(){
                if(jsonObject['secondaryIssuePercentage'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['secondaryIssuePercentage'] !== 'number')
                {
                    return Number(jsonObject['secondaryIssuePercentage']);
                }
        
                return jsonObject['secondaryIssuePercentage'];
            }());
        }
        
        if('nextHourFocus' in jsonObject)
        {
            model.nextHourFocus = (function(){
                if(jsonObject['nextHourFocus'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['nextHourFocus'] !== 'string')
                {
                    return String(jsonObject['nextHourFocus']);
                }
        
                return jsonObject['nextHourFocus'];
            }());
        }
        
        if('satisfactionRating' in jsonObject)
        {
            model.satisfactionRating = (function(){
                if(jsonObject['satisfactionRating'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['satisfactionRating'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['satisfactionRating'])) ? Number(jsonObject['satisfactionRating']) : Math.floor(Number(jsonObject['satisfactionRating']));
                }
        
                return Number.isInteger(jsonObject['satisfactionRating']) ? jsonObject['satisfactionRating'] : Math.floor(jsonObject['satisfactionRating']);
            }());
        }
        
        if('status' in jsonObject)
        {
            model.status = (function(){
                if(typeof jsonObject['status'] !== 'string')
                {
                    return String(jsonObject['status']);
                }
        
                return jsonObject['status'];
            }());
        }
        
        if('class1TraysPerHourPotential' in jsonObject)
        {
            model.class1TraysPerHourPotential = (function(){
                if(typeof jsonObject['class1TraysPerHourPotential'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['class1TraysPerHourPotential'])) ? Number(jsonObject['class1TraysPerHourPotential']) : Math.floor(Number(jsonObject['class1TraysPerHourPotential']));
                }
        
                return Number.isInteger(jsonObject['class1TraysPerHourPotential']) ? jsonObject['class1TraysPerHourPotential'] : Math.floor(jsonObject['class1TraysPerHourPotential']);
            }());
        }
        
        if('class1TraysPerHourExcludingDowntime' in jsonObject)
        {
            model.class1TraysPerHourExcludingDowntime = (function(){
                if(typeof jsonObject['class1TraysPerHourExcludingDowntime'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['class1TraysPerHourExcludingDowntime'])) ? Number(jsonObject['class1TraysPerHourExcludingDowntime']) : Math.floor(Number(jsonObject['class1TraysPerHourExcludingDowntime']));
                }
        
                return Number.isInteger(jsonObject['class1TraysPerHourExcludingDowntime']) ? jsonObject['class1TraysPerHourExcludingDowntime'] : Math.floor(jsonObject['class1TraysPerHourExcludingDowntime']);
            }());
        }
        
        if('class1TraysPerManHourPotential' in jsonObject)
        {
            model.class1TraysPerManHourPotential = (function(){
                if(jsonObject['class1TraysPerManHourPotential'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['class1TraysPerManHourPotential'] !== 'number')
                {
                    return Number(jsonObject['class1TraysPerManHourPotential']);
                }
        
                return jsonObject['class1TraysPerManHourPotential'];
            }());
        }
        
        if('class1TraysPerManHourExcludingDowntime' in jsonObject)
        {
            model.class1TraysPerManHourExcludingDowntime = (function(){
                if(jsonObject['class1TraysPerManHourExcludingDowntime'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['class1TraysPerManHourExcludingDowntime'] !== 'number')
                {
                    return Number(jsonObject['class1TraysPerManHourExcludingDowntime']);
                }
        
                return jsonObject['class1TraysPerManHourExcludingDowntime'];
            }());
        }
        
        if('manningPercentage' in jsonObject)
        {
            model.manningPercentage = (function(){
                if(jsonObject['manningPercentage'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['manningPercentage'] !== 'number')
                {
                    return Number(jsonObject['manningPercentage']);
                }
        
                return jsonObject['manningPercentage'];
            }());
        }
        
        if('totalManning' in jsonObject)
        {
            model.totalManning = (function(){
                if(jsonObject['totalManning'] === null)
                {
                    return null;
                }
        
                if(typeof jsonObject['totalManning'] !== 'number')
                {
                    return Number.isInteger(Number(jsonObject['totalManning'])) ? Number(jsonObject['totalManning']) : Math.floor(Number(jsonObject['totalManning']));
                }
        
                return Number.isInteger(jsonObject['totalManning']) ? jsonObject['totalManning'] : Math.floor(jsonObject['totalManning']);
            }());
        }
        
        if('uptimePercentage' in jsonObject)
        {
            model.uptimePercentage = (function(){
                if(typeof jsonObject['uptimePercentage'] !== 'number')
                {
                    return Number(jsonObject['uptimePercentage']);
                }
        
                return jsonObject['uptimePercentage'];
            }());
        }
        
        if('downtimePercentage' in jsonObject)
        {
            model.downtimePercentage = (function(){
                if(typeof jsonObject['downtimePercentage'] !== 'number')
                {
                    return Number(jsonObject['downtimePercentage']);
                }
        
                return jsonObject['downtimePercentage'];
            }());
        }
        
        if('deleted' in jsonObject)
        {
            model.deleted = (function(){
                if(typeof jsonObject['deleted'] !== 'boolean')
                {
                    return Boolean(jsonObject['deleted']);
                }
        
                return jsonObject['deleted'];
            }());
        }
        
        if('updateTimestamp' in jsonObject)
        {
            model.updateTimestamp = (function(){
                if(typeof jsonObject['updateTimestamp'] !== 'string')
                {
                    return new Date(String(jsonObject['updateTimestamp']));
                }
        
                return new Date(jsonObject['updateTimestamp']);
            }());
        }
        
        return model;
    }
}

export default ShiftHourlyEntryModel;