/**
* File Auto-Generated by the RICADO Gen 4 PHP API Project
*
* Do Not Edit this File Manually!
*/
import RequestHelper from '../../../RequestHelper';
import SampleModel from '../../../Models/Lab/Site/SampleModel';
import SampleResultModel from '../../../Models/Lab/Site/SampleResultModel';
/**
* Controller Class for Samples
*
* @class
*/
class SampleController
{
/**
* Retrieve a Sample [GET /lab/sites/{siteId}/samples/{id}]
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @return {Promise<SampleModel>}
*/
static getOne(siteId, id)
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/lab/sites/${siteId}/samples/${id}`)
.then((result) => {
let resolveValue = (function(){
return SampleModel.fromJSON(result, siteId);
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Update a Sample [PATCH /lab/sites/{siteId}/samples/{id}]
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @param {SampleController.UpdateData} updateData The Sample Update Data
* @return {Promise<SampleModel>}
*/
static update(siteId, id, updateData)
{
return new Promise((resolve, reject) => {
RequestHelper.patchRequest(`/lab/sites/${siteId}/samples/${id}`, updateData)
.then((result) => {
let resolveValue = (function(){
return SampleModel.fromJSON(result, siteId);
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Delete a Sample [DELETE /lab/sites/{siteId}/samples/{id}]
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @return {Promise<boolean>}
*/
static delete(siteId, id)
{
return new Promise((resolve, reject) => {
RequestHelper.deleteRequest(`/lab/sites/${siteId}/samples/${id}`)
.then((result) => {
resolve(result ?? true);
})
.catch(error => reject(error));
});
}
/**
* Retrieve Comments [GET /lab/sites/{siteId}/samples/{id}/comments]
*
* Retrieves Comments for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @return {Promise<Array<SampleController.CommentItem>>}
*/
static getComments(siteId, id)
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/lab/sites/${siteId}/samples/${id}/comments`)
.then((result) => {
let resolveValue = (function(){
if(Array.isArray(result) !== true)
{
return [];
}
return result.map((resultItem) => {
return (function(){
let resultItemObject = {};
if(typeof resultItem === 'object' && 'id' in resultItem)
{
resultItemObject.id = (function(){
if(typeof resultItem.id !== 'string')
{
return String(resultItem.id);
}
return resultItem.id;
}());
}
else
{
resultItemObject.id = "";
}
if(typeof resultItem === 'object' && 'userAccount' in resultItem)
{
resultItemObject.userAccount = (function(){
let userAccountObject = {};
if(typeof resultItem.userAccount === 'object' && 'id' in resultItem.userAccount)
{
userAccountObject.id = (function(){
if(resultItem.userAccount.id === null)
{
return null;
}
if(typeof resultItem.userAccount.id !== 'string')
{
return String(resultItem.userAccount.id);
}
return resultItem.userAccount.id;
}());
}
else
{
userAccountObject.id = null;
}
if(typeof resultItem.userAccount === 'object' && 'firstName' in resultItem.userAccount)
{
userAccountObject.firstName = (function(){
if(resultItem.userAccount.firstName === null)
{
return null;
}
if(typeof resultItem.userAccount.firstName !== 'string')
{
return String(resultItem.userAccount.firstName);
}
return resultItem.userAccount.firstName;
}());
}
else
{
userAccountObject.firstName = null;
}
if(typeof resultItem.userAccount === 'object' && 'lastName' in resultItem.userAccount)
{
userAccountObject.lastName = (function(){
if(resultItem.userAccount.lastName === null)
{
return null;
}
if(typeof resultItem.userAccount.lastName !== 'string')
{
return String(resultItem.userAccount.lastName);
}
return resultItem.userAccount.lastName;
}());
}
else
{
userAccountObject.lastName = null;
}
return userAccountObject;
}());
}
else
{
resultItemObject.userAccount = (function(){
let userAccountDefaultValue = {};
userAccountDefaultValue.id = null;
userAccountDefaultValue.firstName = null;
userAccountDefaultValue.lastName = null;
return userAccountDefaultValue;
}());
}
if(typeof resultItem === 'object' && 'content' in resultItem)
{
resultItemObject.content = (function(){
if(resultItem.content === null)
{
return null;
}
if(typeof resultItem.content !== 'string')
{
return String(resultItem.content);
}
return resultItem.content;
}());
}
else
{
resultItemObject.content = null;
}
if(typeof resultItem === 'object' && 'createdTimestamp' in resultItem)
{
resultItemObject.createdTimestamp = (function(){
if(resultItem.createdTimestamp === null)
{
return null;
}
if(typeof resultItem.createdTimestamp !== 'string')
{
return new Date(String(resultItem.createdTimestamp));
}
return new Date(resultItem.createdTimestamp);
}());
}
else
{
resultItemObject.createdTimestamp = null;
}
if(typeof resultItem === 'object' && 'updatedTimestamp' in resultItem)
{
resultItemObject.updatedTimestamp = (function(){
if(resultItem.updatedTimestamp === null)
{
return null;
}
if(typeof resultItem.updatedTimestamp !== 'string')
{
return new Date(String(resultItem.updatedTimestamp));
}
return new Date(resultItem.updatedTimestamp);
}());
}
else
{
resultItemObject.updatedTimestamp = null;
}
return resultItemObject;
}());
});
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Create a Comment [POST /lab/sites/{siteId}/samples/{id}/comments]
*
* Create a Comment for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @param {string} content The Content of the New Comment
* @return {Promise<SampleController.CommentItem>}
*/
static createComment(siteId, id, content)
{
return new Promise((resolve, reject) => {
RequestHelper.postRequest(`/lab/sites/${siteId}/samples/${id}/comments`, {content})
.then((result) => {
let resolveValue = (function(){
let resultObject = {};
if(typeof result === 'object' && 'id' in result)
{
resultObject.id = (function(){
if(typeof result.id !== 'string')
{
return String(result.id);
}
return result.id;
}());
}
else
{
resultObject.id = "";
}
if(typeof result === 'object' && 'userAccount' in result)
{
resultObject.userAccount = (function(){
let userAccountObject = {};
if(typeof result.userAccount === 'object' && 'id' in result.userAccount)
{
userAccountObject.id = (function(){
if(result.userAccount.id === null)
{
return null;
}
if(typeof result.userAccount.id !== 'string')
{
return String(result.userAccount.id);
}
return result.userAccount.id;
}());
}
else
{
userAccountObject.id = null;
}
if(typeof result.userAccount === 'object' && 'firstName' in result.userAccount)
{
userAccountObject.firstName = (function(){
if(result.userAccount.firstName === null)
{
return null;
}
if(typeof result.userAccount.firstName !== 'string')
{
return String(result.userAccount.firstName);
}
return result.userAccount.firstName;
}());
}
else
{
userAccountObject.firstName = null;
}
if(typeof result.userAccount === 'object' && 'lastName' in result.userAccount)
{
userAccountObject.lastName = (function(){
if(result.userAccount.lastName === null)
{
return null;
}
if(typeof result.userAccount.lastName !== 'string')
{
return String(result.userAccount.lastName);
}
return result.userAccount.lastName;
}());
}
else
{
userAccountObject.lastName = null;
}
return userAccountObject;
}());
}
else
{
resultObject.userAccount = (function(){
let userAccountDefaultValue = {};
userAccountDefaultValue.id = null;
userAccountDefaultValue.firstName = null;
userAccountDefaultValue.lastName = null;
return userAccountDefaultValue;
}());
}
if(typeof result === 'object' && 'content' in result)
{
resultObject.content = (function(){
if(result.content === null)
{
return null;
}
if(typeof result.content !== 'string')
{
return String(result.content);
}
return result.content;
}());
}
else
{
resultObject.content = null;
}
if(typeof result === 'object' && 'createdTimestamp' in result)
{
resultObject.createdTimestamp = (function(){
if(result.createdTimestamp === null)
{
return null;
}
if(typeof result.createdTimestamp !== 'string')
{
return new Date(String(result.createdTimestamp));
}
return new Date(result.createdTimestamp);
}());
}
else
{
resultObject.createdTimestamp = null;
}
if(typeof result === 'object' && 'updatedTimestamp' in result)
{
resultObject.updatedTimestamp = (function(){
if(result.updatedTimestamp === null)
{
return null;
}
if(typeof result.updatedTimestamp !== 'string')
{
return new Date(String(result.updatedTimestamp));
}
return new Date(result.updatedTimestamp);
}());
}
else
{
resultObject.updatedTimestamp = null;
}
return resultObject;
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Retrieve a Comment [GET /lab/sites/{siteId}/samples/{id}/comments/{commentId}]
*
* Retrieves Comments for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @param {string} commentId The Comment ID
* @return {Promise<SampleController.CommentItem>}
*/
static getOneComment(siteId, id, commentId)
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/lab/sites/${siteId}/samples/${id}/comments/${commentId}`)
.then((result) => {
let resolveValue = (function(){
let resultObject = {};
if(typeof result === 'object' && 'id' in result)
{
resultObject.id = (function(){
if(typeof result.id !== 'string')
{
return String(result.id);
}
return result.id;
}());
}
else
{
resultObject.id = "";
}
if(typeof result === 'object' && 'userAccount' in result)
{
resultObject.userAccount = (function(){
let userAccountObject = {};
if(typeof result.userAccount === 'object' && 'id' in result.userAccount)
{
userAccountObject.id = (function(){
if(result.userAccount.id === null)
{
return null;
}
if(typeof result.userAccount.id !== 'string')
{
return String(result.userAccount.id);
}
return result.userAccount.id;
}());
}
else
{
userAccountObject.id = null;
}
if(typeof result.userAccount === 'object' && 'firstName' in result.userAccount)
{
userAccountObject.firstName = (function(){
if(result.userAccount.firstName === null)
{
return null;
}
if(typeof result.userAccount.firstName !== 'string')
{
return String(result.userAccount.firstName);
}
return result.userAccount.firstName;
}());
}
else
{
userAccountObject.firstName = null;
}
if(typeof result.userAccount === 'object' && 'lastName' in result.userAccount)
{
userAccountObject.lastName = (function(){
if(result.userAccount.lastName === null)
{
return null;
}
if(typeof result.userAccount.lastName !== 'string')
{
return String(result.userAccount.lastName);
}
return result.userAccount.lastName;
}());
}
else
{
userAccountObject.lastName = null;
}
return userAccountObject;
}());
}
else
{
resultObject.userAccount = (function(){
let userAccountDefaultValue = {};
userAccountDefaultValue.id = null;
userAccountDefaultValue.firstName = null;
userAccountDefaultValue.lastName = null;
return userAccountDefaultValue;
}());
}
if(typeof result === 'object' && 'content' in result)
{
resultObject.content = (function(){
if(result.content === null)
{
return null;
}
if(typeof result.content !== 'string')
{
return String(result.content);
}
return result.content;
}());
}
else
{
resultObject.content = null;
}
if(typeof result === 'object' && 'createdTimestamp' in result)
{
resultObject.createdTimestamp = (function(){
if(result.createdTimestamp === null)
{
return null;
}
if(typeof result.createdTimestamp !== 'string')
{
return new Date(String(result.createdTimestamp));
}
return new Date(result.createdTimestamp);
}());
}
else
{
resultObject.createdTimestamp = null;
}
if(typeof result === 'object' && 'updatedTimestamp' in result)
{
resultObject.updatedTimestamp = (function(){
if(result.updatedTimestamp === null)
{
return null;
}
if(typeof result.updatedTimestamp !== 'string')
{
return new Date(String(result.updatedTimestamp));
}
return new Date(result.updatedTimestamp);
}());
}
else
{
resultObject.updatedTimestamp = null;
}
return resultObject;
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Update a Comment [PATCH /lab/sites/{siteId}/samples/{id}/comments/{commentId}]
*
* Update a Comment for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @param {string} commentId The Comment ID
* @param {string} content The Updated Content for the Comment
* @return {Promise<SampleController.CommentItem>}
*/
static updateOneComment(siteId, id, commentId, content)
{
return new Promise((resolve, reject) => {
RequestHelper.patchRequest(`/lab/sites/${siteId}/samples/${id}/comments/${commentId}`, {content})
.then((result) => {
let resolveValue = (function(){
let resultObject = {};
if(typeof result === 'object' && 'id' in result)
{
resultObject.id = (function(){
if(typeof result.id !== 'string')
{
return String(result.id);
}
return result.id;
}());
}
else
{
resultObject.id = "";
}
if(typeof result === 'object' && 'userAccount' in result)
{
resultObject.userAccount = (function(){
let userAccountObject = {};
if(typeof result.userAccount === 'object' && 'id' in result.userAccount)
{
userAccountObject.id = (function(){
if(result.userAccount.id === null)
{
return null;
}
if(typeof result.userAccount.id !== 'string')
{
return String(result.userAccount.id);
}
return result.userAccount.id;
}());
}
else
{
userAccountObject.id = null;
}
if(typeof result.userAccount === 'object' && 'firstName' in result.userAccount)
{
userAccountObject.firstName = (function(){
if(result.userAccount.firstName === null)
{
return null;
}
if(typeof result.userAccount.firstName !== 'string')
{
return String(result.userAccount.firstName);
}
return result.userAccount.firstName;
}());
}
else
{
userAccountObject.firstName = null;
}
if(typeof result.userAccount === 'object' && 'lastName' in result.userAccount)
{
userAccountObject.lastName = (function(){
if(result.userAccount.lastName === null)
{
return null;
}
if(typeof result.userAccount.lastName !== 'string')
{
return String(result.userAccount.lastName);
}
return result.userAccount.lastName;
}());
}
else
{
userAccountObject.lastName = null;
}
return userAccountObject;
}());
}
else
{
resultObject.userAccount = (function(){
let userAccountDefaultValue = {};
userAccountDefaultValue.id = null;
userAccountDefaultValue.firstName = null;
userAccountDefaultValue.lastName = null;
return userAccountDefaultValue;
}());
}
if(typeof result === 'object' && 'content' in result)
{
resultObject.content = (function(){
if(result.content === null)
{
return null;
}
if(typeof result.content !== 'string')
{
return String(result.content);
}
return result.content;
}());
}
else
{
resultObject.content = null;
}
if(typeof result === 'object' && 'createdTimestamp' in result)
{
resultObject.createdTimestamp = (function(){
if(result.createdTimestamp === null)
{
return null;
}
if(typeof result.createdTimestamp !== 'string')
{
return new Date(String(result.createdTimestamp));
}
return new Date(result.createdTimestamp);
}());
}
else
{
resultObject.createdTimestamp = null;
}
if(typeof result === 'object' && 'updatedTimestamp' in result)
{
resultObject.updatedTimestamp = (function(){
if(result.updatedTimestamp === null)
{
return null;
}
if(typeof result.updatedTimestamp !== 'string')
{
return new Date(String(result.updatedTimestamp));
}
return new Date(result.updatedTimestamp);
}());
}
else
{
resultObject.updatedTimestamp = null;
}
return resultObject;
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Delete a Comment [DELETE /lab/sites/{siteId}/samples/{id}/comments/{commentId}]
*
* Delete a Comment for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @param {string} commentId The Comment ID
* @return {Promise<boolean>}
*/
static deleteOneComment(siteId, id, commentId)
{
return new Promise((resolve, reject) => {
RequestHelper.deleteRequest(`/lab/sites/${siteId}/samples/${id}/comments/${commentId}`)
.then((result) => {
resolve(result ?? true);
})
.catch(error => reject(error));
});
}
/**
* Retrieve a Sample Result [GET /lab/sites/{siteId}/samples/{id}/result]
*
* Retrieves a Sample Result for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @return {Promise<SampleResultModel>}
*/
static getSampleResult(siteId, id)
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/lab/sites/${siteId}/samples/${id}/result`)
.then((result) => {
let resolveValue = (function(){
return SampleResultModel.fromJSON(result, siteId);
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Retrieve Temperature Data [GET /lab/sites/{siteId}/samples/{id}/temperature-data]
*
* Retrieves Temperature Data for a Sample
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {string} id The Sample ID
* @return {Promise<Array<SampleController.TemperatureDataItem>>}
*/
static getTemperatureData(siteId, id)
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/lab/sites/${siteId}/samples/${id}/temperature-data`)
.then((result) => {
let resolveValue = (function(){
if(Array.isArray(result) !== true)
{
return [];
}
return result.map((resultItem) => {
return (function(){
let resultItemObject = {};
if(typeof resultItem === 'object' && 'timestamp' in resultItem)
{
resultItemObject.timestamp = (function(){
if(typeof resultItem.timestamp !== 'string')
{
return new Date(String(resultItem.timestamp));
}
return new Date(resultItem.timestamp);
}());
}
else
{
resultItemObject.timestamp = new Date();
}
if(typeof resultItem === 'object' && 'temperature' in resultItem)
{
resultItemObject.temperature = (function(){
if(typeof resultItem.temperature !== 'number')
{
return Number(resultItem.temperature);
}
return resultItem.temperature;
}());
}
else
{
resultItemObject.temperature = 0;
}
return resultItemObject;
}());
});
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* List all Samples [GET /lab/sites/{siteId}/samples]
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {SampleController.GetAllQueryParameters} [queryParameters] The Optional Query Parameters
* @return {Promise<SampleModel[]>}
*/
static getAll(siteId, queryParameters = {})
{
return new Promise((resolve, reject) => {
RequestHelper.getRequest(`/lab/sites/${siteId}/samples`, queryParameters)
.then((result) => {
let resolveValue = (function(){
if(Array.isArray(result) !== true)
{
return [];
}
return result.map((resultItem) => {
return (function(){
return SampleModel.fromJSON(resultItem, siteId);
}());
});
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
/**
* Create a Sample [POST /lab/sites/{siteId}/samples]
*
* @static
* @public
* @param {number} siteId The Site ID
* @param {SampleController.CreateData} createData The Sample Create Data
* @return {Promise<SampleModel>}
*/
static create(siteId, createData)
{
return new Promise((resolve, reject) => {
RequestHelper.postRequest(`/lab/sites/${siteId}/samples`, createData)
.then((result) => {
let resolveValue = (function(){
return SampleModel.fromJSON(result, siteId);
}());
resolve(resolveValue);
})
.catch(error => reject(error));
});
}
}
export default SampleController;
/**
* The Optional Query Parameters for the getAll Function
*
* @typedef {Object} SampleController.GetAllQueryParameters
* @property {string} [labId] The Lab ID this Sample is associated with
* @property {string} [sampleNumber] The Numeric Sample Number
* @property {string} [createdSource] The Source that Created this Sample
* @property {?string} [createdUserName] Name of the User who Created this Sample
* @property {?string} [publishSource] The Source that Published this Sample
* @property {?string} [publishUserName] Name of the User who Published this Sample
* @property {string} [fruitProfileId] The Fruit Profile for this Sample
* @property {string} [rackPositionId] The Rack Position used for this Sample
* @property {string} [dehydratorId] The Dehydrator used for this Sample
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
* @property {Date} [createdTimestampBegin] Filter by the Timestamp when Samples were Created. Results Greater than or Equal to Timestamp
* @property {Date} [createdTimestampEnd] Filter by the Timestamp when Samples were Created. Results Less than or Equal to Timestamp
* @property {Date} [scheduledTimestampBegin] Filter by the Timestamp when Samples were Scheduled to Begin. Results Greater than or Equal to Timestamp
* @property {Date} [scheduledTimestampEnd] Filter by the Timestamp when Samples were Scheduled to Begin. Results Less than or Equal to Timestamp
* @property {Date} [loadedTimestampBegin] Filter by the Timestamp when Samples were Loaded. Results Greater than or Equal to Timestamp
* @property {Date} [loadedTimestampEnd] Filter by the Timestamp when Samples were Loaded. Results Less than or Equal to Timestamp
* @property {Date} [startTimestampBegin] Filter by the Timestamp when Samples were Started. Results Greater than or Equal to Timestamp
* @property {Date} [startTimestampEnd] Filter by the Timestamp when Samples were Started. Results Less than or Equal to Timestamp
* @property {Date} [finishTimestampBegin] Filter by the Timestamp when Samples were Finished. Results Greater than or Equal to Timestamp
* @property {Date} [finishTimestampEnd] Filter by the Timestamp when Samples were Finished. Results Less than or Equal to Timestamp
* @property {Date} [unloadedTimestampBegin] Filter by the Timestamp when Samples were Unloaded. Results Greater than or Equal to Timestamp
* @property {Date} [unloadedTimestampEnd] Filter by the Timestamp when Samples were Unloaded. Results Less than or Equal to Timestamp
* @property {Date} [publishTimestampBegin] Filter by the Timestamp when Samples were Published. Results Greater than or Equal to Timestamp
* @property {Date} [publishTimestampEnd] Filter by the Timestamp when Samples were Published. Results Less than or Equal to Timestamp
* @property {Date} [updateTimestampBegin] Filter by the Timestamp when Samples were last Updated. Results Greater than or Equal to Timestamp
* @property {Date} [updateTimestampEnd] Filter by the Timestamp when Samples were last Updated. Results Less than or Equal to Timestamp
* @property {boolean} [publishedState] Filter by Published State of a Sample. `true` = Published, `false` = Not Published
* @memberof Controllers.Lab.Site
*/
/**
* The Create Data for a Sample
*
* @typedef {Object} SampleController.CreateData
* @property {string} labId The Lab ID this Sample is associated with
* @property {string} [sampleNumber] The Numeric Sample Number
* @property {Date} [createdTimestamp] When this Sample was Created
* @property {string} createdSource The Source that Created this Sample
* @property {?string} [createdUserName] Name of the User who Created this Sample
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
* @property {?Date} [startTimestamp] When this Sample was Started
* @property {?Date} [finishTimestamp] When this Sample was Finished
* @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
* @property {?Date} [publishTimestamp] When this Sample was Published
* @property {?string} [publishSource] The Source that Published this Sample
* @property {?string} [publishUserName] Name of the User who Published this Sample
* @property {string} fruitProfileId The Fruit Profile for this Sample
* @property {string} rackPositionId The Rack Position used for this Sample
* @property {string} dehydratorId The Dehydrator used for this Sample
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
* @memberof Controllers.Lab.Site
*/
/**
* The Update Data for a Sample
*
* @typedef {Object} SampleController.UpdateData
* @property {string} [labId] The Lab ID this Sample is associated with
* @property {Date} [createdTimestamp] When this Sample was Created
* @property {string} [createdSource] The Source that Created this Sample
* @property {?string} [createdUserName] Name of the User who Created this Sample
* @property {?Date} [scheduledTimestamp] Optional Scheduled Timestamp when this Sample should Begin
* @property {?Date} [loadedTimestamp] When this Sample was Loaded into the Dehydrator
* @property {?Date} [startTimestamp] When this Sample was Started
* @property {?Date} [finishTimestamp] When this Sample was Finished
* @property {?Date} [unloadedTimestamp] When this Sample was Unloaded from the Dehydrator
* @property {?Date} [publishTimestamp] When this Sample was Published
* @property {?string} [publishSource] The Source that Published this Sample
* @property {?string} [publishUserName] Name of the User who Published this Sample
* @property {string} [fruitProfileId] The Fruit Profile for this Sample
* @property {string} [rackPositionId] The Rack Position used for this Sample
* @property {string} [dehydratorId] The Dehydrator used for this Sample
* @property {?string} [resultId] The Sample Result ID asociated with this Sample
* @memberof Controllers.Lab.Site
*/
/**
* A **UserAccount** Type
*
* @typedef {Object} SampleController.UserAccount
* @property {?string} id The User Account ID
* @property {?string} firstName The User's First Name
* @property {?string} lastName The User's Last Name
* @memberof Controllers.Lab.Site
*/
/**
* A **CommentItem** Type
*
* @typedef {Object} SampleController.CommentItem
* @property {string} id The Comment ID
* @property {SampleController.UserAccount} userAccount
* @property {?string} content The Content of the Comment
* @property {?Date} createdTimestamp When the Comment was Created
* @property {?Date} updatedTimestamp When the Comment was last Updated
* @memberof Controllers.Lab.Site
*/
/**
* A **TemperatureDataItem** Type
*
* @typedef {Object} SampleController.TemperatureDataItem
* @property {Date} timestamp The Timestamp for the Temperature Value
* @property {number} temperature The Temperature Value
* @memberof Controllers.Lab.Site
*/
source