// This is file has been generated using an automated tool.
// Customized / extended behavior should be done within the partial files (code modules).
// Generated: @2026-02-09T18:11:46.7395983Z (2026/02/09 12:11:46) by WASPBARCODE\trungnguyen Machine: WB-L-J890NN3



// This was added by WaspOpenApiSwagger App.config file
import { PublicApiClientBase } from "./PublicAppiClientBase(NoGen)"   // leave off .ts extension during import


/* tslint:disable */
/* eslint-disable */
//----------------------
// <auto-generated>
//     Generated using the NSwag toolchain v13.6.1.0 (NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------
// ReSharper disable InconsistentNaming

export class SystemInfoWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method returns the type of application hosted at this URL.
    Returns a WaspResult with Data = MobileAsset or InventoryControl, else some error.
     * @return WaspResult&lt;string&gt;
     */
    serverType(): Promise<WaspResultOfString> {
        let url_ = this.baseUrl + "/systeminfo/servertype";
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processServerType(_response);
        });
    }

    protected processServerType(response: Response): Promise<WaspResultOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfString>(<any>null);
    }
}

export class ApiAddressWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * Obsolete: This method creates/updates the addresses associated with customers. It will not create new Address Types, you will need to first create those in the web, but once you do they can be used here.
    Requires the Update Customer permission
    Accepts a maximum of 500 records at a time
     */
    saveAddresses(request: SaveCustomerAddressRequest[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/addresses/customer/obsoletesave";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveAddresses(_response);
        });
    }

    protected processSaveAddresses(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * Obsolete: This method creates/updates the addresses associated with employees. It will not create new Address Types, you will need to first create those in the web, but once you do they can be used here.
    Requires the Update Employee permission
    Accepts a maximum of 500 records at a time
     */
    saveAddresses2(request: SaveCustomerAddressRequest[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/addresses/employee/obsoletesave";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveAddresses2(_response);
        });
    }

    protected processSaveAddresses2(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method creates/updates the addresses associated with customers. It will not create new Address Types, you will need to first create those in the web, but once you do they can be used here.
    Requires the Update Customer permission
    Accepts a maximum of 500 records at a time
     */
    saveCustomerAddresses(request: SaveCustomerAddressRequest[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/addresses/customer/save";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveCustomerAddresses(_response);
        });
    }

    protected processSaveCustomerAddresses(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method creates/updates the addresses associated with supplier. It will not create new Address Types, you will need to first create those in the web, but once you do they can be used here.
    Requires the Update Supplier permission
    Accepts a maximum of 500 records at a time
     */
    saveSupplierAddresses(request: SaveVendorAddressRequest[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/addresses/supplier/save";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveSupplierAddresses(_response);
        });
    }

    protected processSaveSupplierAddresses(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }
}

export class ApiAttachmentsWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * Upload Attachments For Forms works for attaching the list of attachments to an item according to the form type.
    This Api will cover any form in the application which could have attachment.
    Requires the Edit permission of the form you are attempting to Edit, Role Site and Asset Type permissions are enforced when relevant
    Accepts a maximum of 500 records at a time
     */
    uplodAttachmentsForForms(attachmentUplodModel: AttachmentsUploadAssociatedModel | null): Promise<WaspResultOfListOfAttachmentModel> {
        let url_ = this.baseUrl + "/public-api/attachments/uplodAttachmentsForForms";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(attachmentUplodModel);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUplodAttachmentsForForms(_response);
        });
    }

    protected processUplodAttachmentsForForms(response: Response): Promise<WaspResultOfListOfAttachmentModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfAttachmentModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfAttachmentModel>(<any>null);
    }

    /**
     * Upload the batch of Attachments For Forms works for attaching the list of attachments to an item according to the form type for several items as a batch.
    This Api will cover any form in the application which could have attachment.
    Requires the Edit permission of the form you are attempting to Edit, Role Site and Asset Type permissions are enforced when relevant
    Accepts a maximum of 500 records at a time
     */
    uplodBatchAttachmentsForForms(attachmentUplodBatchModel: AttachmentsUploadAssociatedModel[] | null): Promise<WaspResultOfListOfWaspResultOfListOfAttachmentModel> {
        let url_ = this.baseUrl + "/public-api/attachments/uplodBatchAttachmentsForForms";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(attachmentUplodBatchModel);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUplodBatchAttachmentsForForms(_response);
        });
    }

    protected processUplodBatchAttachmentsForForms(response: Response): Promise<WaspResultOfListOfWaspResultOfListOfAttachmentModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfListOfAttachmentModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfListOfAttachmentModel>(<any>null);
    }

    /**
     * Use the API, GetAttachmentMetadataByAssociatedTag, to get a list of the attachments associated with an object.
    You can then loop through the results to download each attachment by using this API to get the attachment by GUID.
    You can use the file name from GetAttachmentMetadataByAssociatedTag to stream the results to a file.
    Please refer to the public api sample solution for an example of how this is done.
     */
    downloadAttachment(guid: string): Promise<FileResponse> {
        let url_ = this.baseUrl + "/public-api/attachments/download/{guid}";
        if (guid === undefined || guid === null)
            throw new Error("The parameter 'guid' must be defined.");
        url_ = url_.replace("{guid}", encodeURIComponent("" + guid));
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDownloadAttachment(_response);
        });
    }

    protected processDownloadAttachment(response: Response): Promise<FileResponse> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200 || status === 206) {
            const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
            const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
            const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
            return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<FileResponse>(<any>null);
    }

    /**
     * Get Attachments By Associated Tag given the associated tag of item and the form name and returns the attachments related to that item nested in the form.
    Requires the Allow permission of the form you are attempting to retrieve attachments for, Role Site and Asset Type permissions are enforced when relevant
    In response , HasSuccessWithMoreDataRemaining and  BatchNumber are not required .
     */
    getAttachmentMetadataByAssociatedTag(associatModel: AttachmentsSearchByAssociatedTagModel | null): Promise<WaspResultOfListOfAttachmentMetadata> {
        let url_ = this.baseUrl + "/public-api/attachments/getAttachmentmetadataByAssociatedTag";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(associatModel);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetAttachmentMetadataByAssociatedTag(_response);
        });
    }

    protected processGetAttachmentMetadataByAssociatedTag(response: Response): Promise<WaspResultOfListOfAttachmentMetadata> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfAttachmentMetadata.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfAttachmentMetadata>(<any>null);
    }

    /**
     * Obsolete, please use GetAttachmentMetadataByAssociatedTag - and download instead
    Get Attachments By Associated Tag given the associated tag of item and the form name and returns the attachments related to that item nested in the form.
    Requires the Allow permission of the form you are attempting to retrieve attachments for, Role Site and Asset Type permissions are enforced when relevant
    In response , HasSuccessWithMoreDataRemaining and  BatchNumber are not required .
     */
    getAttachmentsByAssociatedTag(associatModel: AttachmentsSearchByAssociatedTagModel | null): Promise<WaspResultOfListOfAttachmentModel> {
        let url_ = this.baseUrl + "/public-api/attachments/getAttachmentsByAssociatedTag";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(associatModel);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetAttachmentsByAssociatedTag(_response);
        });
    }

    protected processGetAttachmentsByAssociatedTag(response: Response): Promise<WaspResultOfListOfAttachmentModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfAttachmentModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfAttachmentModel>(<any>null);
    }

    /**
     * Get Attachments By Associated Tag List given the associated tag of items per form by giving the form name and returns the attachments related to those items nested in the form.
    Requires the Allow permission of the form you are attempting to retrieve attachments for, Role Site and Asset Type permissions are enforced when relevant
     */
    getAttachmentsByAssociatedTagList(associatModel: AttachmentsSearchByAssociatedTagListModel | null): Promise<WaspResultOfDictionaryOfStringAndListOfAttachmentModel> {
        let url_ = this.baseUrl + "/public-api/attachments/getAttachmentsByAssociatedTagsList";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(associatModel);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetAttachmentsByAssociatedTagList(_response);
        });
    }

    protected processGetAttachmentsByAssociatedTagList(response: Response): Promise<WaspResultOfDictionaryOfStringAndListOfAttachmentModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfDictionaryOfStringAndListOfAttachmentModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfDictionaryOfStringAndListOfAttachmentModel>(<any>null);
    }
}

export class ApiCustomerWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates new customers. It requires the Create Customer permission.
    It accepts a maximum of 500 records at a time. 
    This will ignore the Customer numbers already in existence. 
    To create/update addresses (instead of ignoring them), please use the API public-api/addresses/customer/save.
    Use “Save” to perform operations including both inserts and updates.
     */
    createNewCustomers(request: CustomerSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/customers/createNew";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreateNewCustomers(_response);
        });
    }

    protected processCreateNewCustomers(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates the existing customers. Every customer will have a  customer number. 
    It requires the Edit Customer permission. It accepts a maximum of 500 records at a time.
    This will not work for customers with unknown customer numbers.
    To create/update addresses (instead of ignoring them), please use the API public-api/addresses/customer/save.
    Use “Save” to perform operations including both inserts and updates.
     */
    updateExisting(request: CustomerSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/customers/updateExisting";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateExisting(_response);
        });
    }

    protected processUpdateExisting(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method allows saving the customer details. 
    This requires both the Create and Update Customer permission. It accepts a maximum of 500 records at a time.
    In case the customer does not exist, a new record is created and on creation, it returns the CustomerId.
    In the case of updating the existing record, then only the columns specified in the request model's "ApplicableFields" field are updated.
    If this field is null/empty then "all" fields are assumed to be updateable.
    To create/update addresses please use the API public-api/addresses/customer/save.
     */
    saveCustomers(request: CustomerSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/customers/save";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveCustomers(_response);
        });
    }

    protected processSaveCustomers(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method was created primarily to use with our LDAP sync tool. It takes a list of customers and will update and insert as necessary. 
    Any customer not in the list, but active in the Cloud system will be deleted.
    It requires the Create, Update, and Delete Customer permission. It accepts a maximum of 500 records at a time.
     */
    saveCustomerModels(models: InvariantCultureIgnoreCaseDictionary[] | null): Promise<WaspResultOfListOfInvariantCultureIgnoreCaseDictionary> {
        let url_ = this.baseUrl + "/public-api/customers/savecustomermodels";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(models);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveCustomerModels(_response);
        });
    }

    protected processSaveCustomerModels(response: Response): Promise<WaspResultOfListOfInvariantCultureIgnoreCaseDictionary> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfInvariantCultureIgnoreCaseDictionary.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfInvariantCultureIgnoreCaseDictionary>(<any>null);
    }

    /**
     * This method is used to delete customers. It takes a list of customer numbers to delete.
    It requires the Delete Customer permission.
    It accepts a maximum of 500 records at a time.
     */
    deleteCustomerModels(models: string[] | null): Promise<WaspResultOfListOfWaspResultOfString> {
        let url_ = this.baseUrl + "/public-api/customers/delete";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(models);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeleteCustomerModels(_response);
        });
    }

    protected processDeleteCustomerModels(response: Response): Promise<WaspResultOfListOfWaspResultOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfString>(<any>null);
    }

    /**
     * This method returns a page full of customers given a precise set of search, sort or filter criteria. 
    It is a paging API so this is meant to be called with a smaller number (ca 100) or records to fetch, repeatedly, until you get em' all.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
    This query does not return Phone or Address Models.
    It requires the Allow Customer permission.
     */
    customerAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfCustomerModelInfo> {
        let url_ = this.baseUrl + "/public-api/customers/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCustomerAdvancedSearch(_response);
        });
    }

    protected processCustomerAdvancedSearch(response: Response): Promise<WaspResultOfListOfCustomerModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfCustomerModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfCustomerModelInfo>(<any>null);
    }

    /**
     * This method returns a page full of customers given a precise set of search, sort or filter criteria. 
    It is a paging API so this is meant to be called with a smaller number (ca 100) or records to fetch, repeatedly, until you get em' all.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
    This query does not return Phone or Address Models.
    It requires the Allow Customer permission.
     */
    getCustomerByNumber(customerNumbers: string[] | null): Promise<WaspResultOfListOfCustomerModelInfo> {
        let url_ = this.baseUrl + "/public-api/customers/GetCustomersByNumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(customerNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetCustomerByNumber(_response);
        });
    }

    protected processGetCustomerByNumber(response: Response): Promise<WaspResultOfListOfCustomerModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfCustomerModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfCustomerModelInfo>(<any>null);
    }
}

export class ApiItemContainerWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    container20ExpandParentContainerIdSdk(containerTags: string[] | null): Promise<WaspResultOfListOfContainer20ExpansionResultModel> {
        let url_ = this.baseUrl + "/public-api/ic/container/expand-by-container-id-sdk";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(containerTags);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processContainer20ExpandParentContainerIdSdk(_response);
        });
    }

    protected processContainer20ExpandParentContainerIdSdk(response: Response): Promise<WaspResultOfListOfContainer20ExpansionResultModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfContainer20ExpansionResultModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfContainer20ExpansionResultModel>(<any>null);
    }
}

export class ApiItemOrderWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    saveOrderExtraFields(req: SaveOrderExtraFieldsRequestModel | null): Promise<WaspResultOfSaveOrderExtraFieldsRequestModel> {
        let url_ = this.baseUrl + "/public-api/ic/order/SaveOrderExtraFields";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(req);

        let options_ = <RequestInit>{
            body: content_,
            method: "PUT",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveOrderExtraFields(_response);
        });
    }

    protected processSaveOrderExtraFields(response: Response): Promise<WaspResultOfSaveOrderExtraFieldsRequestModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfSaveOrderExtraFieldsRequestModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfSaveOrderExtraFieldsRequestModel>(<any>null);
    }
}

export class ApiItemPickPackShipOrderWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates a new pick order.
    Requires a Create Pick Order permission.
    Accepts a maximum of 500 records at a time.
    On success, the Messages collection will contain a message with the Purchase order Number in the FieldName field.
    Negative ResultCode values signal failure.
     */
    create(listPickOrders: PickOrderInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/create";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPickOrders);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreate(_response);
        });
    }

    protected processCreate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method edits an existing pick order.
    Requires an Edit Pick Order permission.
    Accepts a maximum of 500 records at a time.
    On success, the Messages collection will contain a message with the Purchase order Number in the FieldName field.
    Negative ResultCode values signal failure.
     */
    update(listPickOrders: PickOrderInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/update";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPickOrders);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdate(_response);
        });
    }

    protected processUpdate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method returns a page full of active pick orders given a precise set of search, sort or filter criteria. 
    It's a paging API so this is meant to be called with a smaller number (about 100) or records to fetch, repeatedly, until you get them all.
    Requires Allow Pick Order permission and enforces Role Site restrictions.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    itemInfoAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfPickOrderInfo> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processItemInfoAdvancedSearch(_response);
        });
    }

    protected processItemInfoAdvancedSearch(response: Response): Promise<WaspResultOfListOfPickOrderInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfPickOrderInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfPickOrderInfo>(<any>null);
    }

    /**
     * This method returns existing orders by number.
    Requires Allow Pick Order permission and enforces Role Site restrictions.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    getOrdersByNumber(listOrderNumbers: string[] | null): Promise<WaspResultOfListOfWaspResultOfPickOrderInfo> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/getordersbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listOrderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetOrdersByNumber(_response);
        });
    }

    protected processGetOrdersByNumber(response: Response): Promise<WaspResultOfListOfWaspResultOfPickOrderInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfPickOrderInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfPickOrderInfo>(<any>null);
    }

    /**
     * This method returns existing orders by number.
    Unlike the function getordersbynumber, this function returns actual trackby information within each order line (if applicable).
    Requires Allow Pick Order permission and enforces Role Site restrictions.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    getOrdersAndPickTransactionDetails(listOrderNumbers: string[] | null): Promise<WaspResultOfListOfWaspResultOfPickOrderInfo> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/getorderspickdetails";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listOrderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetOrdersAndPickTransactionDetails(_response);
        });
    }

    protected processGetOrdersAndPickTransactionDetails(response: Response): Promise<WaspResultOfListOfWaspResultOfPickOrderInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfPickOrderInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfPickOrderInfo>(<any>null);
    }

    /**
     * This method deletes existing Pick orders by number ONLY if they are in Draft status.
    Requires Delete Pick Order permission and enforces Role Site restrictions.
    Accepts a maximum of 500 records at a time.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    deleteOrdersByNumber(listPickOrderNumbers: string[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/deleteordersbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPickOrderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeleteOrdersByNumber(_response);
        });
    }

    protected processDeleteOrdersByNumber(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates existing pick orders status by order numbers.
    Pick - Order Status and Reason Code Combinations are - "Draft-OK","Open-PoIssued","Closed-GeneralCancel","Closed-CustomerCancel".
    Requires Edit Pick Order permission and enforces Role Site restrictions.
    Accepts a maximum of 500 records at a time.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    updatePickOrderStatusByNumber(listOrders: PickOrderStatusParameters[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/updateorderstatusbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listOrders);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdatePickOrderStatusByNumber(_response);
        });
    }

    protected processUpdatePickOrderStatusByNumber(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method deletes existing purchase orders by number ONLY if they are in Draft status.
    Note: Obsolete. This method remains for backward compatibility. Use DeleteOrdersByNumber instead.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    deletePurchaseOrdersByNumber(listPickOrderNumbers: string[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/deleteordersbynumber_obsolete";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPickOrderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeletePurchaseOrdersByNumber(_response);
        });
    }

    protected processDeletePurchaseOrdersByNumber(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    findOrdersWithMatchingOrderLineItemsSDK(itemNumbers: string[] | null): Promise<WaspResultOfListOfOrderModelSimple> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/FindOrdersWithMatchingOrderLineItemsSDK";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(itemNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processFindOrdersWithMatchingOrderLineItemsSDK(_response);
        });
    }

    protected processFindOrdersWithMatchingOrderLineItemsSDK(response: Response): Promise<WaspResultOfListOfOrderModelSimple> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfOrderModelSimple.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfOrderModelSimple>(<any>null);
    }

    executeContainerAutoPick(request: PickTransactionCreationRequestModel | null): Promise<WaspResultOfPickTransactionModel> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/execute-container-auto-pick";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processExecuteContainerAutoPick(_response);
        });
    }

    protected processExecuteContainerAutoPick(response: Response): Promise<WaspResultOfPickTransactionModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfPickTransactionModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfPickTransactionModel>(<any>null);
    }

    prepareCreatePickOrderRequest(request: PickTransactionCreationRequestModel | null): Promise<WaspResultOfPickTransactionModel> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/prepare-create-pick-order-request";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPrepareCreatePickOrderRequest(_response);
        });
    }

    protected processPrepareCreatePickOrderRequest(response: Response): Promise<WaspResultOfPickTransactionModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfPickTransactionModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfPickTransactionModel>(<any>null);
    }

    /**
     * This method is used to pick items on an order. If an item has trackbys they must be entered. The units being picked must match the units on the order.
    Requires Allow Remove permission and enforces Role Site permission.
    Accepts a maximum of 500 records at a time.
     */
    pickTransaction(pickTransactions: PickTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/pickpackshiporder/pick";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(pickTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPickTransaction(_response);
        });
    }

    protected processPickTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }
}

export class ApiItemPurchaseOrderWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates a new purchase order.
    It requires the Create Purchase Order permission.
    It accepts a maximum of 500 records at a time.
    The Messages collection will contain a message with the Purchase order Number in the FieldName field.
    Negative ResultCode values signal failure.
     */
    create(listPurchaseOrders: PurchaseOrderInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/create";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPurchaseOrders);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreate(_response);
        });
    }

    protected processCreate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method edits an existing purchase order.
    It requires the Edit Purchase Order permission.
    It accepts a maximum of 500 records at a time.
    The Messages collection will contain a message with the Purchase order Number in the FieldName field.
    Negative ResultCode values signal failure.
     */
    update(listPurchaseOrders: PurchaseOrderInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/update";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPurchaseOrders);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdate(_response);
        });
    }

    protected processUpdate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is Obsolete (Use PurchaseOrderSearch instead).
     */
    itemInfoAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfPurchaseOrderSearchResult> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processItemInfoAdvancedSearch(_response);
        });
    }

    protected processItemInfoAdvancedSearch(response: Response): Promise<WaspResultOfListOfPurchaseOrderSearchResult> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfPurchaseOrderSearchResult.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfPurchaseOrderSearchResult>(<any>null);
    }

    /**
     * The method returns a page full of active purchase orders given a precise set of search, sort, or filter criteria. 
    It's a paging API so this is meant to be called with a smaller number (ca 100) or records to fetch, repeatedly, until you get them all.
    It requires the Allow Purchase Order permission and enforces Role Site permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    purchaseOrderSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfPurchaseOrderSearchResult> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/purchaseordersearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPurchaseOrderSearch(_response);
        });
    }

    protected processPurchaseOrderSearch(response: Response): Promise<WaspResultOfListOfPurchaseOrderSearchResult> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfPurchaseOrderSearchResult.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfPurchaseOrderSearchResult>(<any>null);
    }

    /**
     * This method returns existing orders by number.
    It requires the Allow Purchase Order permission and enforces Role Site permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
    The Messages collection will contain a message with the Purchase order Number in the FieldName field
    where negative result codes signal failure
     */
    getOrdersByNumber(listOrderNumbers: string[] | null): Promise<WaspResultOfListOfWaspResultOfPurchaseOrderInfo> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/getordersbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listOrderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetOrdersByNumber(_response);
        });
    }

    protected processGetOrdersByNumber(response: Response): Promise<WaspResultOfListOfWaspResultOfPurchaseOrderInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfPurchaseOrderInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfPurchaseOrderInfo>(<any>null);
    }

    /**
     * This method deletes existing purchase orders by number ONLY if they are in Draft status.
    It requires the Delete Purchase Order permission and enforces Role Site permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    deletePurchaseOrdersByNumber(listPurchaseOrderNumbers: string[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/deleteordersbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listPurchaseOrderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeletePurchaseOrdersByNumber(_response);
        });
    }

    protected processDeletePurchaseOrdersByNumber(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates existing purchase order status by order numbers.
    Purchase Order - Order Status and Reason Code Combinations are - "Draft-OK","Open-PoOpenIssued","Closed-ReceiverCancel","Closed-VendorCancel".
    It requires the Edit Purchase Order permission and enforces Role Site permission.
    The Messages collection will contain a message with the Purchase order Number in the FieldName field.
    Negative ResultCode values signal failure.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    updatePurchaseOrderStatusByNumber(listOrders: PurchaseOrderStatusParameters[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/updateorderstatusbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listOrders);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdatePurchaseOrderStatusByNumber(_response);
        });
    }

    protected processUpdatePurchaseOrderStatusByNumber(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is used to receive items on an order. If an item has trackbys they must be entered. The units being received must match the units on the order.
    Requires Allow Receive permission and enforces Role Site permission.
    Accepts a maximum of 500 records at a time.
     */
    receiveTransaction(receiveTransactions: ReceiveTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/receive-public";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(receiveTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processReceiveTransaction(_response);
        });
    }

    protected processReceiveTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    getOrdersModifiedAfter(startDate: DateTimeRequest | null): Promise<WaspResultOfListOfPurchaseOrderModel> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/GetOrdersModifiedAfter";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(startDate);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetOrdersModifiedAfter(_response);
        });
    }

    protected processGetOrdersModifiedAfter(response: Response): Promise<WaspResultOfListOfPurchaseOrderModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfPurchaseOrderModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfPurchaseOrderModel>(<any>null);
    }

    saveASNOrderLineTrackbyInfo(asnTrackbyValues: OrderLineTrackbyInfoModel[] | null): Promise<WaspResultOfListOfOrderLineTrackbyInfoModel> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/SaveASNOrderLineTrackbyInfo";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(asnTrackbyValues);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveASNOrderLineTrackbyInfo(_response);
        });
    }

    protected processSaveASNOrderLineTrackbyInfo(response: Response): Promise<WaspResultOfListOfOrderLineTrackbyInfoModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfOrderLineTrackbyInfoModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfOrderLineTrackbyInfoModel>(<any>null);
    }

    updateASNOrderLineTrackbyInfo(asnTrackbyValues: OrderLineTrackbyInfoDetailModel[] | null): Promise<WaspResultOfBoolean> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/UpdateASNOrderLineTrackbyInfo";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(asnTrackbyValues);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateASNOrderLineTrackbyInfo(_response);
        });
    }

    protected processUpdateASNOrderLineTrackbyInfo(response: Response): Promise<WaspResultOfBoolean> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfBoolean.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfBoolean>(<any>null);
    }

    findOrdersByASNTrackbyValues(request: OrderSimpleSearch | null): Promise<WaspResultOfListOfSimpleModel> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/FindOrdersByASNTrackbyValues";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processFindOrdersByASNTrackbyValues(_response);
        });
    }

    protected processFindOrdersByASNTrackbyValues(response: Response): Promise<WaspResultOfListOfSimpleModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfSimpleModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfSimpleModel>(<any>null);
    }

    findOrderByASNTrackbyContainerId(containerIds: string[] | null): Promise<WaspResultOfListOfOrderModelSimple> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/FindOrderByASNTrackbyContainerId";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(containerIds);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processFindOrderByASNTrackbyContainerId(_response);
        });
    }

    protected processFindOrderByASNTrackbyContainerId(response: Response): Promise<WaspResultOfListOfOrderModelSimple> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfOrderModelSimple.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfOrderModelSimple>(<any>null);
    }

    autoReceiveFromASNContainerIds(containerIds: string[] | null): Promise<WaspResultOfListOfPurchaseOrderModel> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/AutoReceiveFromASNContainerIds";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(containerIds);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processAutoReceiveFromASNContainerIds(_response);
        });
    }

    protected processAutoReceiveFromASNContainerIds(response: Response): Promise<WaspResultOfListOfPurchaseOrderModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfPurchaseOrderModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfPurchaseOrderModel>(<any>null);
    }

    findOrdersWithMatchingOrderLineItemsSDK(itemNumbers: string[] | null): Promise<WaspResultOfListOfOrderModelSimple> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/FindOrdersWithMatchingOrderLineItemsSDK";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(itemNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processFindOrdersWithMatchingOrderLineItemsSDK(_response);
        });
    }

    protected processFindOrdersWithMatchingOrderLineItemsSDK(response: Response): Promise<WaspResultOfListOfOrderModelSimple> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfOrderModelSimple.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfOrderModelSimple>(<any>null);
    }

    autoReceiveFromASNTrackbyValues(requestModel: ReceivePreStagedTrackbyInfoRequestModel | null): Promise<WaspResultOfPurchaseOrderModel> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/AutoReceiveFromASNTrackbyValues";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(requestModel);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processAutoReceiveFromASNTrackbyValues(_response);
        });
    }

    protected processAutoReceiveFromASNTrackbyValues(response: Response): Promise<WaspResultOfPurchaseOrderModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfPurchaseOrderModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfPurchaseOrderModel>(<any>null);
    }

    getASNOrderLineTrackbyInfo(orderNumbers: string[] | null): Promise<WaspResultOfListOfOrderLineTrackbyInfoDetailModel> {
        let url_ = this.baseUrl + "/public-api/ic/purchaseorder/GetASNOrderLineTrackbyInfo";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(orderNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetASNOrderLineTrackbyInfo(_response);
        });
    }

    protected processGetASNOrderLineTrackbyInfo(response: Response): Promise<WaspResultOfListOfOrderLineTrackbyInfoDetailModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfOrderLineTrackbyInfoDetailModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfOrderLineTrackbyInfoDetailModel>(<any>null);
    }
}

export class ApiItemsWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * Request low stock records as a stream of data in a CSV formated stream.
    If the FieldTitles parameter is null than all available fields are exported with default column titles.
    When you create Custom Fields on items you can call this function with the FieldTitles parameter = null as well to see how custom fields look in the output stream.
    Important! Without this parameter the order and names of fields may change from version to version. 
    Therefore, to ensure consistent results from one version to the next, make sure you provide this
    value after you have determined the values you need. If the FieldTitles parameter is not provided the column names returned will
    be the database column names.
    This API does not support paging as it is intended to stream all of the data at once
     */
    streamGridRequestCSVLowStock(request: GridStreamRequestModel | null): Promise<FileResponse> {
        let url_ = this.baseUrl + "/public-api/ic/item/streamgridrequestcsvlowstock";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processStreamGridRequestCSVLowStock(_response);
        });
    }

    protected processStreamGridRequestCSVLowStock(response: Response): Promise<FileResponse> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200 || status === 206) {
            const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
            const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
            const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
            return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<FileResponse>(<any>null);
    }

    /**
     * This method is used to create a new
    It creates only inventory type items.
    Requires Create Item permission.
     */
    saveContainerItem(containerItem: Container20SaveRequestModel | null): Promise<WaspResultOfContainer20SaveResponseModel> {
        let url_ = this.baseUrl + "/public-api/ic/item/saveContainerItem";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(containerItem);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveContainerItem(_response);
        });
    }

    protected processSaveContainerItem(response: Response): Promise<WaspResultOfContainer20SaveResponseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfContainer20SaveResponseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfContainer20SaveResponseModel>(<any>null);
    }

    /**
     * This method is used to create new inventory items. You can pass in a list of ItemInventoryInfo to create several new items at once.
    It creates only inventory type items.
    Requires Create Item permission.
     */
    createInventoryItem(listItems: ItemInventoryInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/item/createInventoryItems";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItems);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreateInventoryItem(_response);
        });
    }

    protected processCreateInventoryItem(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is used to update existing inventory items. You can pass in a list of ItemInventoryInfo to update several existing items at once.
    It updates only inventory type items.
    Requires Edit Item permission.
     */
    updateInventoryItem(listItems: ItemInventoryInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/item/updateInventoryItems";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItems);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateInventoryItem(_response);
        });
    }

    protected processUpdateInventoryItem(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is used to create new non inventory items. You can pass in a list of ItemNonInventoryInfo to create several new items at once.
    It creates only non-inventory type items.
    Requires Create Item permission.
     */
    createNonInventoryItem(listItems: ItemNonInventoryInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/item/createNonInventoryItems";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItems);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreateNonInventoryItem(_response);
        });
    }

    protected processCreateNonInventoryItem(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is used to update existing non inventory items. You can pass in a list of ItemNonInventoryInfo to update several existing items at once.
    It updates only non-inventory type items.
    Requires Edit Item permission.
     */
    updateNonInventoryItem(listItems: ItemNonInventoryInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/item/updateNonInventoryItems";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItems);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateNonInventoryItem(_response);
        });
    }

    protected processUpdateNonInventoryItem(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is used to create new service items. You can pass in a list of ItemServiceInfo to create several new items at once.
    It creates only service type items.
    Requires Create Item permission.
     */
    createServiceItem(listItems: ItemServiceInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/item/createServiceItems";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItems);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreateServiceItem(_response);
        });
    }

    protected processCreateServiceItem(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method is used to update existing service items. You can pass in a list of ItemServiceInfo to update several existing items at once.
    It updates only service type items.
    Requires Edit Item permission.
     */
    updateServiceItem(listItems: ItemServiceInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/ic/item/updateServiceItems";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItems);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateServiceItem(_response);
        });
    }

    protected processUpdateServiceItem(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method returns existing items by number.
    Requires Allow Item permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    getItemsByNumber(listItemNumbers: string[] | null): Promise<WaspResultOfListOfWaspResultOfItemInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getitemsbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItemNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetItemsByNumber(_response);
        });
    }

    protected processGetItemsByNumber(response: Response): Promise<WaspResultOfListOfWaspResultOfItemInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfItemInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfItemInfo>(<any>null);
    }

    /**
     * This method returns existing item location  by number.
    Requires Allow Item permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    getItemLocationByNumber(listItemNumbers: string[] | null): Promise<WaspResultOfListOfItemLocationModel> {
        let url_ = this.baseUrl + "/public-api/ic/item/getitemlocationbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listItemNumbers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetItemLocationByNumber(_response);
        });
    }

    protected processGetItemLocationByNumber(response: Response): Promise<WaspResultOfListOfItemLocationModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfItemLocationModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfItemLocationModel>(<any>null);
    }

    /**
     * This method returns all active items whose item number, alternate item number or item description contains the specified texts that are entered on the combo box.
    Requires Allow Item permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    itemInfoSearch(param: ItemContainsSearchParameters | null): Promise<WaspResultOfListOfItemInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/infosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(param);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processItemInfoSearch(_response);
        });
    }

    protected processItemInfoSearch(response: Response): Promise<WaspResultOfListOfItemInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfItemInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfItemInfo>(<any>null);
    }

    /**
     * This method returns a page full of active items given a precise set of search, sort or filter criteria. 
    It's a paging API so this is meant to be called with a smaller number (about 100) or records to fetch, repeatedly, until you get them all.
    Requires Allow Item permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    itemInfoAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfItemInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processItemInfoAdvancedSearch(_response);
        });
    }

    protected processItemInfoAdvancedSearch(response: Response): Promise<WaspResultOfListOfItemInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfItemInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfItemInfo>(<any>null);
    }

    /**
     * This method is used to get an inventory item with an item number that matches the string parameter exactly.
    Requires Allow Item permission.
     */
    getInventoryItem(itemNumber: string): Promise<WaspResultOfItemInventoryInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getinventoryitem/{itemNumber}";
        if (itemNumber === undefined || itemNumber === null)
            throw new Error("The parameter 'itemNumber' must be defined.");
        url_ = url_.replace("{itemNumber}", encodeURIComponent("" + itemNumber));
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetInventoryItem(_response);
        });
    }

    protected processGetInventoryItem(response: Response): Promise<WaspResultOfItemInventoryInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfItemInventoryInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfItemInventoryInfo>(<any>null);
    }

    /**
     * This method is used to get up to 20 inventory items by item number, on providing the details about the item.
    Requires Allow Item permission.
     */
    getMultipleInventoryItem(itemNumber: string[] | null): Promise<WaspResultOfListOfItemInventoryInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getmultipleinventoryitem";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(itemNumber);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetMultipleInventoryItem(_response);
        });
    }

    protected processGetMultipleInventoryItem(response: Response): Promise<WaspResultOfListOfItemInventoryInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfItemInventoryInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfItemInventoryInfo>(<any>null);
    }

    /**
     * This method is used to get a non inventory item with an item number that matches the string parameter exactly.
    Requires Allow Item permission.
     */
    getNonInventoryItem(itemNumber: string): Promise<WaspResultOfItemNonInventoryInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getnoninventoryitem/{itemNumber}";
        if (itemNumber === undefined || itemNumber === null)
            throw new Error("The parameter 'itemNumber' must be defined.");
        url_ = url_.replace("{itemNumber}", encodeURIComponent("" + itemNumber));
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetNonInventoryItem(_response);
        });
    }

    protected processGetNonInventoryItem(response: Response): Promise<WaspResultOfItemNonInventoryInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfItemNonInventoryInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfItemNonInventoryInfo>(<any>null);
    }

    /**
     * This method is used to get a service item with an item number that matches the string parameter exactly.
    Requires Allow Item permission.
     */
    getServiceItem(itemNumber: string): Promise<WaspResultOfItemServiceInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getserviceitem/{itemNumber}";
        if (itemNumber === undefined || itemNumber === null)
            throw new Error("The parameter 'itemNumber' must be defined.");
        url_ = url_.replace("{itemNumber}", encodeURIComponent("" + itemNumber));
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetServiceItem(_response);
        });
    }

    protected processGetServiceItem(response: Response): Promise<WaspResultOfItemServiceInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfItemServiceInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfItemServiceInfo>(<any>null);
    }

    /**
     * This method is used to get an assembly item with an item number that matches the string parameter exactly.
    Requires Allow Item permission.
     */
    getAssemblyItem(itemNumber: string): Promise<WaspResultOfItemAssemblyInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getassemblyitem/{itemNumber}";
        if (itemNumber === undefined || itemNumber === null)
            throw new Error("The parameter 'itemNumber' must be defined.");
        url_ = url_.replace("{itemNumber}", encodeURIComponent("" + itemNumber));
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetAssemblyItem(_response);
        });
    }

    protected processGetAssemblyItem(response: Response): Promise<WaspResultOfItemAssemblyInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfItemAssemblyInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfItemAssemblyInfo>(<any>null);
    }

    /**
     * This method is used to get a kit item with an item number that matches the string parameter exactly.
    Requires Allow Item permission.
     */
    getKitItem(itemNumber: string): Promise<WaspResultOfItemKitInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/getkititem/{itemNumber}";
        if (itemNumber === undefined || itemNumber === null)
            throw new Error("The parameter 'itemNumber' must be defined.");
        url_ = url_.replace("{itemNumber}", encodeURIComponent("" + itemNumber));
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetKitItem(_response);
        });
    }

    protected processGetKitItem(response: Response): Promise<WaspResultOfItemKitInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfItemKitInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfItemKitInfo>(<any>null);
    }

    /**
     * This method is a simple inventory query similar to what is found on the Edit Item screen or on the mobile devices. 
    Requires Allow Item permission and enforces role site permission.
     */
    inventorySearch(param: InventorySearchParameters | null): Promise<WaspResultOfListOfInventoryInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/inventorysearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(param);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processInventorySearch(_response);
        });
    }

    protected processInventorySearch(response: Response): Promise<WaspResultOfListOfInventoryInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfInventoryInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfInventoryInfo>(<any>null);
    }

    /**
     * This method is a robust inventory query similar to the main View Item non tree mode grid. This is a paging API.
    Requires Allow Item permission and enforces role site permission.
     */
    inventoryAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfInventoryAdvancedInfo> {
        let url_ = this.baseUrl + "/public-api/ic/item/advancedinventorysearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processInventoryAdvancedSearch(_response);
        });
    }

    protected processInventoryAdvancedSearch(response: Response): Promise<WaspResultOfListOfInventoryAdvancedInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfInventoryAdvancedInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfInventoryAdvancedInfo>(<any>null);
    }

    /**
     * Request item inventory records as a stream of data in a CSV formated stream.
    If the FieldTitles parameter is null than all available fields are exported with default column titles.
    When you create Custom Fields on items you can call this function with the FieldTitles parameter = null as well to see how custom fields look in the output stream.
    Important! Without this parameter the order and names of fields may change from version to version. 
    Therefore, to ensure consistent results from one version to the next, make sure you provide this
    value after you have determined the values you need. If the FieldTitles parameter is not provided the column names returned will
    be the database column names.
    This API does not support paging as it is intended to stream all of the data at once
     */
    streamGridRequestCSVFlat(request: GridStreamRequestModel | null): Promise<FileResponse> {
        let url_ = this.baseUrl + "/public-api/ic/item/streamgridrequestcsvflat";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processStreamGridRequestCSVFlat(_response);
        });
    }

    protected processStreamGridRequestCSVFlat(response: Response): Promise<FileResponse> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200 || status === 206) {
            const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
            const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
            const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
            return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<FileResponse>(<any>null);
    }

    /**
     * Request item records as a stream of data in a CSV formated stream.
    If the FieldTitles parameter is null than all available fields are exported with default column titles
    When you create Custom Fields on items you can call this function with the FieldTitles parameter = null as well to see how custom fields look in the output stream.
    Important! Without this parameter the order and names of fields may change from version to version. 
    Therefore, to ensure consistent results from one version to the next, make sure you provide this
    value after you have determined the values you need.  If the FieldTitles parameter is not provided the column names returned will
    be the database column names.
    This API does not support paging as it is intended to stream all of the data at once
     */
    streamGridRequestCSVUnique(request: GridStreamRequestModel | null): Promise<FileResponse> {
        let url_ = this.baseUrl + "/public-api/ic/item/streamgridrequestcsvunique";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processStreamGridRequestCSVUnique(_response);
        });
    }

    protected processStreamGridRequestCSVUnique(response: Response): Promise<FileResponse> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200 || status === 206) {
            const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
            const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
            const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
            return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<FileResponse>(<any>null);
    }
}

export class ApiLocationsWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates a new location. The existing location is retrieved by calling one of the searches.
    It requires the Create Location permission and access to the Site where the Location is being created.
    It accepts a maximum of 500 records at a time.
    Response Information not display BatchNumber if it's null .
     */
    create(listLocations: LocationModelInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/locations/create";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listLocations);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreate(_response);
        });
    }

    protected processCreate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates an existing location. The existing location is retrieved by calling one of the searches.
    It requires the Edit Location permission and access to the Site where the Location is located.
    It accepts a maximum of 500 records at a time.
     */
    update(listLocations: LocationModelInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/locations/update";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listLocations);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdate(_response);
        });
    }

    protected processUpdate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method gets the location that exactly matches the search string in the specified site.
    It requires Allow Location permission and access to the site where the location is located.
     */
    getExactLocationApi(locationCode: LocationSearchSimpleModel | null): Promise<WaspResultOfLocationModelSimple> {
        let url_ = this.baseUrl + "/public-api/locations/search/exact";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(locationCode);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetExactLocationApi(_response);
        });
    }

    protected processGetExactLocationApi(response: Response): Promise<WaspResultOfLocationModelSimple> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfLocationModelSimple.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfLocationModelSimple>(<any>null);
    }

    /**
     * This method returns a page full of active locations given a precise set of search, sort or filter criteria. 
    It is a paging API so this is meant to be called with a smaller number (ca 100) or records to fetch, repeatedly, until you get them all.
    It requires the Allow Location permission and enforces Role Site permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    locationModelInfoAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfLocationModelInfo> {
        let url_ = this.baseUrl + "/public-api/locations/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processLocationModelInfoAdvancedSearch(_response);
        });
    }

    protected processLocationModelInfoAdvancedSearch(response: Response): Promise<WaspResultOfListOfLocationModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfLocationModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfLocationModelInfo>(<any>null);
    }

    /**
     * This method returns existing locations by name.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
    It requires the Allow Location permission and access to the Site where the Location is located.
     */
    getLocationsByCode(listLocationsRequest: LocationCodeWithSiteName[] | null): Promise<WaspResultOfListOfWaspResultOfLocationModelInfo> {
        let url_ = this.baseUrl + "/public-api/locations/getlocationsbycode";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listLocationsRequest);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetLocationsByCode(_response);
        });
    }

    protected processGetLocationsByCode(response: Response): Promise<WaspResultOfListOfWaspResultOfLocationModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfLocationModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfLocationModelInfo>(<any>null);
    }

    /**
     * This method returns all active locations whose location code or location description matches the location code that is passed in. The site name parameter is optional.
    It requires the Allow Location permission and access to the Site where the Location is located.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    locationModelInfoSearch(param: LocationCodeWithSiteName | null): Promise<WaspResultOfListOfLocationModelInfo> {
        let url_ = this.baseUrl + "/public-api/locations/infosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(param);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processLocationModelInfoSearch(_response);
        });
    }

    protected processLocationModelInfoSearch(response: Response): Promise<WaspResultOfListOfLocationModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfLocationModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfLocationModelInfo>(<any>null);
    }

    /**
     * This method deletes existing locations by code.
    It requires the Delete Location permission and access to the Site where the Location is located.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    deleteLocationByCode(listLocationsRequest: LocationCodeWithSiteName[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/locations/deletelocationsbycode";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listLocationsRequest);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeleteLocationByCode(_response);
        });
    }

    protected processDeleteLocationByCode(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }
}

export class ApiManufacturersWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates new Manufacturers. It requires the Create Manufacturer permission.
    It accepts a maximum of 500 records at a time. 
    This will ignore the Manufacturer name already in existence. 
    To create/update addresses (instead of ignoring them), please use the API public-api/addresses/manufacturers/save.
    Use “Save” to perform operations including both inserts and updates.
     */
    createNewManufacturers(request: ManufacturerSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/manufacturers/createNew";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreateNewManufacturers(_response);
        });
    }

    protected processCreateNewManufacturers(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates the existing manufacturers. Every manufacturer will have a  manufacturer name. 
    It requires the Edit Manufacturer permission. It accepts a maximum of 500 records at a time.
    This will not work for manufacturers with unknown manufacturers names.
    To create/update addresses (instead of ignoring them), please use the API public-api/addresses/manufacturers/save.
    Use “Save” to perform operations including both inserts and updates.
     */
    updateExisting(request: ManufacturerSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/manufacturers/updateExisting";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateExisting(_response);
        });
    }

    protected processUpdateExisting(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }
}

export class ApiPhoneWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates/updates the phones associated with customers. It will not create new Phone Types, you will need to first create those in the web, but once you do they can be used here.
    Requires the Update Customer permission
    Accepts a maximum of 500 records at a time
     */
    saveCustomerPhones(request: SaveCustomerPhoneRequest[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/phones/customer/save";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveCustomerPhones(_response);
        });
    }

    protected processSaveCustomerPhones(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method creates/updates the phones associated with supplier. It will not create new Phone Types, you will need to first create those in the web, but once you do they can be used here.
    Requires the Update Supplier permission
    Accepts a maximum of 500 records at a time
     */
    saveSupplierphones(request: SaveVendorPhoneRequest[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/phones/supplier/save";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveSupplierphones(_response);
        });
    }

    protected processSaveSupplierphones(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }
}

export class ApiSalesTaxCodeWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * Call this method to create or update a sales tax code. It requires “Item Create and Edit permission”. 
    When a request model for a Sales Tax Code is given the function checks if the name already exists. 
    If it already exists, then that record is updated and marked as active. If not, then a new record is created.
    TotalRecordsLongCount field is not used by this API.
     */
    saveSalesTaxCode(model: SalesTaxCodeBaseModel | null): Promise<WaspResultOfSalesTaxCodeBaseModel> {
        let url_ = this.baseUrl + "/public-api/ic/salestaxcode/SaveSalesTaxCode";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSaveSalesTaxCode(_response);
        });
    }

    protected processSaveSalesTaxCode(response: Response): Promise<WaspResultOfSalesTaxCodeBaseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfSalesTaxCodeBaseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfSalesTaxCodeBaseModel>(<any>null);
    }

    /**
     * This method retrieves the details of the sales tax code by name. 
    When a request model for the Sales Tax Code is given the function checks if the name already exists. If it already exists, then that record is updated and marked as active. 
    If not, then a new record is created.The function can accept a maximum of 500 records at a time.
     */
    retrieveSalesTaxCodesByNames(names: string[] | null): Promise<WaspResultOfListOfSalesTaxCodeBaseModel> {
        let url_ = this.baseUrl + "/public-api/ic/salestaxcode/RetrieveSalesTaxCodesByNames";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(names);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processRetrieveSalesTaxCodesByNames(_response);
        });
    }

    protected processRetrieveSalesTaxCodesByNames(response: Response): Promise<WaspResultOfListOfSalesTaxCodeBaseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfSalesTaxCodeBaseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfSalesTaxCodeBaseModel>(<any>null);
    }

    /**
     * Call this method to delete a sales tax code. It requires the Item Edit permission.  
    Given a list of sales tax code names, will mark the given records as deleted. 
    Note that if the record is already deleted, then a success result code will still be returned and the message will indicate that the previous operation is already successful.
    If the name does not exist, then it will be ignored.
     */
    deleteSalesTaxCodesByNames(names: string[] | null): Promise<WaspResultOfListOfString> {
        let url_ = this.baseUrl + "/public-api/ic/salestaxcode/DeleteSalesTaxCodesByNames";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(names);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeleteSalesTaxCodesByNames(_response);
        });
    }

    protected processDeleteSalesTaxCodesByNames(response: Response): Promise<WaspResultOfListOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfString>(<any>null);
    }

    /**
     * This method returns all the sales tax codes.
     */
    taxCodeSearchGetAll(): Promise<WaspResultOfListOfSalesTaxCodeBaseModel> {
        let url_ = this.baseUrl + "/public-api/ic/salestaxcode/TaxCodeSearchGetAll";
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "GET",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processTaxCodeSearchGetAll(_response);
        });
    }

    protected processTaxCodeSearchGetAll(response: Response): Promise<WaspResultOfListOfSalesTaxCodeBaseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfSalesTaxCodeBaseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfSalesTaxCodeBaseModel>(<any>null);
    }

    /**
     * This method returns all the sales tax codes matching the query/search criteria.
     */
    taxCodeSearch(param: SalesCodeSearchParameters | null): Promise<WaspResultOfListOfSalesTaxCodeBaseModel> {
        let url_ = this.baseUrl + "/public-api/ic/salestaxcode/TaxCodeSearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(param);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processTaxCodeSearch(_response);
        });
    }

    protected processTaxCodeSearch(response: Response): Promise<WaspResultOfListOfSalesTaxCodeBaseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfSalesTaxCodeBaseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfSalesTaxCodeBaseModel>(<any>null);
    }
}

export class ApiSitesWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates a new site. The existing site is retrieved by calling API function GetSitesByName() or one of the searches.
    It requires the Create Site permission.
    It accepts a maximum of 500 records at a time.
     */
    create(listSites: SiteModelInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/sites/create";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSites);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreate(_response);
        });
    }

    protected processCreate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates an existing site. The existing site is retrieved by calling API function GetSitesByName() or one of the searches.
    It requires the Edit Site permission and enforces Role Site restriction.
    TotalRecordsLongCount fields as not used by this API.
    It accepts a maximum of 500 records at a time.
     */
    update(listSites: SiteModelInfo[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/sites/update";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSites);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdate(_response);
        });
    }

    protected processUpdate(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method gets the site that exactly matches the search string.
    It requires the Allow Site permission and enforces Role Site restriction.
     */
    getExactSiteApi(val: SearchStringClass | null): Promise<WaspResultOfSiteModelSimple> {
        let url_ = this.baseUrl + "/public-api/sites/search/exact";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(val);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetExactSiteApi(_response);
        });
    }

    protected processGetExactSiteApi(response: Response): Promise<WaspResultOfSiteModelSimple> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfSiteModelSimple.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfSiteModelSimple>(<any>null);
    }

    /**
     * This method gets the site that exactly matches the search string.
    It requires the Allow Site permission and enforces Role Site restriction.
     */
    getExactSiteApiv2(val: SearchStringClass | null): Promise<WaspResultOfSiteModelSimplev2> {
        let url_ = this.baseUrl + "/public-api/sites/search/exact/v2";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(val);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetExactSiteApiv2(_response);
        });
    }

    protected processGetExactSiteApiv2(response: Response): Promise<WaspResultOfSiteModelSimplev2> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfSiteModelSimplev2.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfSiteModelSimplev2>(<any>null);
    }

    /**
     * This method returns existing sites by name.
    It requires the Allow Site permission and enforces Role Site restriction.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    getSitesByName(listSiteNames: string[] | null): Promise<WaspResultOfListOfWaspResultOfSiteModelInfo> {
        let url_ = this.baseUrl + "/public-api/sites/getsitesbyname";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSiteNames);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetSitesByName(_response);
        });
    }

    protected processGetSitesByName(response: Response): Promise<WaspResultOfListOfWaspResultOfSiteModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfSiteModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfSiteModelInfo>(<any>null);
    }

    /**
     * This method returns all active sites whose site name or site description contains the specified texts that are entered on the combo box. It only returns the site name and site description similar to the site drop down controls on the web.
    It requires the Allow Site permission and enforces Role Site restriction.
    This method does not provide List of Messages on response information.   
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    siteModelInfoSearch(param: SiteContainsSearchParameters | null): Promise<WaspResultOfListOfSiteModelInfo> {
        let url_ = this.baseUrl + "/public-api/sites/infosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(param);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSiteModelInfoSearch(_response);
        });
    }

    protected processSiteModelInfoSearch(response: Response): Promise<WaspResultOfListOfSiteModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfSiteModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfSiteModelInfo>(<any>null);
    }

    /**
     * This method returns a page full of active sites given a precise set of search, sort or filter criteria. 
    It's a paging API so this is meant to be called with a smaller number (ca 100) or records to fetch, repeatedly, until you get them all.
    It requires the Allow Site permission and enforces Role Site restriction.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    siteModelInfoAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfSiteModelInfo> {
        let url_ = this.baseUrl + "/public-api/sites/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processSiteModelInfoAdvancedSearch(_response);
        });
    }

    protected processSiteModelInfoAdvancedSearch(response: Response): Promise<WaspResultOfListOfSiteModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfSiteModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfSiteModelInfo>(<any>null);
    }

    /**
     * This method deletes existing site by name.
    It requires the Delete Site permission and enforces Role Site restriction.
    It accepts a maximum of 500 records at a time.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    deleteSitesByName(listSiteNames: string[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/sites/deletesitesbyname";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSiteNames);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeleteSitesByName(_response);
        });
    }

    protected processDeleteSitesByName(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method deletes existing site by name.
    It requires the Delete Site permission and enforces Role Site restriction.
    It accepts a maximum of 500 records at a time.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL. This API is obsolete, supersceeded by deletesitesbyname.
     */
    deleteSitesByNumber(listSiteNames: string[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/sites/deletesitesbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSiteNames);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processDeleteSitesByNumber(_response);
        });
    }

    protected processDeleteSitesByNumber(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    addAllowedCategoriesToSites(listSiteCategories: { [key: string]: string[]; } | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/sites/AddCategoriesToSites";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSiteCategories);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processAddAllowedCategoriesToSites(_response);
        });
    }

    protected processAddAllowedCategoriesToSites(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    removeAllowedCategoriesFromSites(listSiteCategories: { [key: string]: string[]; } | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/sites/RemoveCategoriesFromSites";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listSiteCategories);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processRemoveAllowedCategoriesFromSites(_response);
        });
    }

    protected processRemoveAllowedCategoriesFromSites(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }
}

export class ApiSystemInfoWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method returns the type of application hosted at this URL.
    Returns a WaspResult with Data = MobileAsset or InventoryControl, else some error.
     */
    serverType(): Promise<WaspResultOfString> {
        let url_ = this.baseUrl + "/public-api/systeminfo/servertype";
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "POST",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processServerType(_response);
        });
    }

    protected processServerType(response: Response): Promise<WaspResultOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfString>(<any>null);
    }
}

export class ApiTransactionsWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * The method returns all active adjust-Down reasons in the system.
    Requires the Allow Adjust Reason Code or Adjust permission
     */
    getItemAdjustDownReasons(): Promise<WaspResultOfListOfString> {
        let url_ = this.baseUrl + "/public-api/transactions/item/adjustDown/reasons";
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "GET",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetItemAdjustDownReasons(_response);
        });
    }

    protected processGetItemAdjustDownReasons(response: Response): Promise<WaspResultOfListOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfString>(<any>null);
    }

    /**
     * The method returns all active adjust-Up reasons in the system.
    Requires the Allow Adjust Reason Code or Adjust permission
     */
    getItemAdjustUpReasons(): Promise<WaspResultOfListOfString> {
        let url_ = this.baseUrl + "/public-api/transactions/item/adjustUp/reasons";
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "GET",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetItemAdjustUpReasons(_response);
        });
    }

    protected processGetItemAdjustUpReasons(response: Response): Promise<WaspResultOfListOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfString>(<any>null);
    }

    /**
     * This API is used to perform a reconcile transaction. Any audits that resulted in discrepancies can be accepted or corrected using this transaction
    Requires the Allow Audit permission, enforces Role Site and Asset Type security
    Accepts a maximum of 500 records at a time
     */
    publicApiReconcile(batch: TransactionBatchRequestModel | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/public-api/reconcile";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(batch);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPublicApiReconcile(_response);
        });
    }

    protected processPublicApiReconcile(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This API is used to perform a reconcile transaction. Any audits that resulted in discrepancies can be accepted or corrected using this transaction
    Requires the Allow Audit permission, enforces Role Site and Asset Type security
    Accepts a maximum of 500 records at a time
    Supports Containers
     */
    publicApiReconcileV2(batch: TransactionBatchRequestModelV2 | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/reconcile-v2";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(batch);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPublicApiReconcileV2(_response);
        });
    }

    protected processPublicApiReconcileV2(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This api is used to add quantity to an item. If an item has trackbys they must be entered. Quantity added in this way is always added using the stocking units.
    Requires the Allow Add permission and enforces Role Site permission
    Accepts a maximum of 500 records at a time
     */
    addTransaction(addTransactions: ItemAddTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/item/add";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(addTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processAddTransaction(_response);
        });
    }

    protected processAddTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This api is used to remove quantity of an item. If an item has trackbys they must be entered. Quantity removed in this way is always removed using the stocking units.
    Requires the Allow Remove permission and enforces Role Site permission
    Accepts a maximum of 500 records at a time.
    If error, Returns a list of error message with a zero based index of items that contain errors.
     */
    removeTransaction(removeTransactions: ItemRemoveTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/item/remove";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(removeTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processRemoveTransaction(_response);
        });
    }

    protected processRemoveTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This api is used to adjust the quantity of an item. If an item has trackbys they must be entered. Quantity adjusted in this way is always adjusted using the stocking units.
    An adjust type and reason must be provided
    Requires the Allow Adjust permission and enforces Role Site permission
    Accepts a maximum of 500 records at a time
     */
    adjustTransaction(adjustTransactions: ItemAdjustTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/item/adjust";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(adjustTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processAdjustTransaction(_response);
        });
    }

    protected processAdjustTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This api is used to move quantity of an item. If an item has trackbys they must be entered. Quantity moved in this way is always moved using the stocking units.
    Requires the Allow Move permission, enforces Role Site
    Accepts a maximum of 500 records at a time
     */
    moveTransaction(moveTransactions: ItemMoveTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/item/move";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(moveTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processMoveTransaction(_response);
        });
    }

    protected processMoveTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This API is used to perform an audit count transaction. Any discrepancies found will need to be resolved using the reconcile transaction
    Requires the Allow Audit permission, enforces Role Site and Asset Type security
    Accepts a maximum of 500 records at a time
     */
    publicApiAuditCount(batch: TransactionBatchRequestModel | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/public-api/audit-count";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(batch);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPublicApiAuditCount(_response);
        });
    }

    protected processPublicApiAuditCount(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This API is used to perform an audit count transaction. Any discrepancies found will need to be resolved using the reconcile transaction
    Requires the Allow Audit permission, enforces Role Site and Asset Type security
    Accepts a maximum of 500 records at a time
    Supports Containers
     */
    publicApiAuditCountV2(batch: TransactionBatchRequestModelV2 | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/audit-count-v2";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(batch);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processPublicApiAuditCountV2(_response);
        });
    }

    protected processPublicApiAuditCountV2(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This api is used to check in quantity of an item. If an item has trackbys they must be entered. Quantity checked-in in this way is always checked in using the stocking units.
    A Customer or Vendor must be specified and not both.
    Requires the Allow Check In permission, enforces Role Site security
    Accepts a maximum of 500 records at a time
     */
    checkInTransaction(checkinTransactions: ItemCheckInTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/item/check-in";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(checkinTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCheckInTransaction(_response);
        });
    }

    protected processCheckInTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This api is used to check out quantity of an item. If an item has trackbys they must be entered. Quantity checked out in this way is always checked out using the stocking units.
    A Customer or Vendor must be specified and not both.
    Requires the Allow Check Out permission, enforces Role Site security
    Accepts a maximum of 500 records at a time
     */
    checkOutTransaction(checkoutTransactions: ItemCheckOutTransactionModel[] | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/transactions/item/check-out";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(checkoutTransactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCheckOutTransaction(_response);
        });
    }

    protected processCheckOutTransaction(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    container20AddMultipleContainers(transactions: Container20NestedContainerHierarchyCreationRequestModel[] | null): Promise<WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel> {
        let url_ = this.baseUrl + "/public-api/transactions/container20AddMultipleContainers";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(transactions);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processContainer20AddMultipleContainers(_response);
        });
    }

    protected processContainer20AddMultipleContainers(response: Response): Promise<WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel>(<any>null);
    }

    moveContainerOrInventory(requests: Container20MoveRequestModel[] | null): Promise<WaspResultOfListOfContainer20MoveResponseModel> {
        let url_ = this.baseUrl + "/public-api/transactions/item/move-container-or-inventory";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(requests);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processMoveContainerOrInventory(_response);
        });
    }

    protected processMoveContainerOrInventory(response: Response): Promise<WaspResultOfListOfContainer20MoveResponseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfContainer20MoveResponseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfContainer20MoveResponseModel>(<any>null);
    }

    /**
     * Request transaction history records as a stream of data in a CSV formated stream.
    If the FieldTitles parameter is null than all available fields are exported with default column titles.
    Important! Without this parameter the order and names of fields may change from version to version. 
    Therefore, to ensure consistent results from one version to the next, make sure you provide this
    value after you have determined the values you need. If the FieldTitles parameter is not provided the column names returned will
    be the database column names.
    This API does not support paging as it is intended to stream all of the data at once
    All of datatime field will not convert to local time,showing UTC(UniversalTime) with format yyyy-MM-dd HH:mm:ssZ
     */
    streamGridRequestCSV(request: GridStreamRequestModel | null): Promise<FileResponse> {
        let url_ = this.baseUrl + "/public-api/transactions/streamgridrequestcsv";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processStreamGridRequestCSV(_response);
        });
    }

    protected processStreamGridRequestCSV(response: Response): Promise<FileResponse> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200 || status === 206) {
            const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
            const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
            const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
            return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<FileResponse>(<any>null);
    }

    /**
     * Request transaction history records as a stream of data in a CSV formated stream.
    If the FieldTitles parameter is null than all available fields are exported with default column titles.
    Important! Without this parameter the order and names of fields may change from version to version. 
    Therefore, to ensure consistent results from one version to the next, make sure you provide this
    value after you have determined the values you need. If the FieldTitles parameter is not provided the column names returned will
    be the database column names.
    This API does not support paging as it is intended to stream all of the data at once
    All of datatime field will not convert to local time,showing UTC(UniversalTime) with format yyyy-MM-dd HH:mm:ssZ
     */
    streamGridRequestArchiveCSV(request: GridStreamRequestModel | null): Promise<FileResponse> {
        let url_ = this.baseUrl + "/public-api/transactions/streamgridrequestarchivecsv";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processStreamGridRequestArchiveCSV(_response);
        });
    }

    protected processStreamGridRequestArchiveCSV(response: Response): Promise<FileResponse> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200 || status === 206) {
            const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
            const fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
            const fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
            return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<FileResponse>(<any>null);
    }

    /**
     * returns transaction history by the filter.
    Suitable for public api
     */
    transactionHistory(request: GridRequestModel | null): Promise<WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase> {
        let url_ = this.baseUrl + "/public-api/transactions/grid-query/history-public-api";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processTransactionHistory(_response);
        });
    }

    protected processTransactionHistory(response: Response): Promise<WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase>(<any>null);
    }

    /**
     * Given a list of Unique Transaction History Identifiers, return attachment binary data and any user notes.
    Unique Transaction History Identifiers is the  parameter  TransactionUniqueIdentitifer  from  response  of api call :public-api/transactions/grid-query/history-public-api
     */
    transactionHistoryNotes(transactionUniqueIdentifiers: string[] | null): Promise<WaspResultOfListOfTransactionHistoryNotesBaseResponseModel> {
        let url_ = this.baseUrl + "/public-api/transactions/grid-query/history-notes-public-api";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(transactionUniqueIdentifiers);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processTransactionHistoryNotes(_response);
        });
    }

    protected processTransactionHistoryNotes(response: Response): Promise<WaspResultOfListOfTransactionHistoryNotesBaseResponseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfTransactionHistoryNotesBaseResponseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfTransactionHistoryNotesBaseResponseModel>(<any>null);
    }

    /**
     * Deprecated. Please use grid-query/transaction-history-v2
    This API is filterable, sortable, and page-able. It returns a list of the transaction history, very similar to what is returned in the Transaction History web interface.
     */
    transactionHistoryGridQuery(gridRequest: GridRequestModel | null): Promise<WaspResultOfListOfTransactionHistoryResponseModel> {
        let url_ = this.baseUrl + "/public-api/transactions/grid-query/transaction-history";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(gridRequest);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processTransactionHistoryGridQuery(_response);
        });
    }

    protected processTransactionHistoryGridQuery(response: Response): Promise<WaspResultOfListOfTransactionHistoryResponseModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfTransactionHistoryResponseModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfTransactionHistoryResponseModel>(<any>null);
    }

    /**
     * New transaction history api. This api returns a model that takes out the internal id fields, but works just like the previous one.
    You can use the gridRequest parameter to specify the page number, page size, filter, and sort criteria.
    Requires the Allow Asset Transaction permission, enforces Role Site and Asset Type security
     */
    transactionHistoryGridQueryV2(gridRequest: GridRequestModel | null): Promise<WaspResultOfListOfAssetTransactionHistoryModel> {
        let url_ = this.baseUrl + "/public-api/transactions/grid-query/transaction-history-v2";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(gridRequest);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processTransactionHistoryGridQueryV2(_response);
        });
    }

    protected processTransactionHistoryGridQueryV2(response: Response): Promise<WaspResultOfListOfAssetTransactionHistoryModel> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfAssetTransactionHistoryModel.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfAssetTransactionHistoryModel>(<any>null);
    }

    /**
     * The method returns all active adjust-Count reasons in the system.
    Requires the Allow Adjust Reason Code or Adjust permission
     */
    getItemAdjustCountReasons(): Promise<WaspResultOfListOfString> {
        let url_ = this.baseUrl + "/public-api/transactions/item/adjustCount/reasons";
        url_ = url_.replace(/[?&]$/, "");

        let options_ = <RequestInit>{
            method: "GET",
            headers: {
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetItemAdjustCountReasons(_response);
        });
    }

    protected processGetItemAdjustCountReasons(response: Response): Promise<WaspResultOfListOfString> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfString.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfString>(<any>null);
    }
}

export class ApiVendorWasp.Cloud.Inventory.API extends PublicApiClientBase {
    private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
    private baseUrl: string;
    protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;

    constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
        super();
        this.http = http ? http : <any>window;
        this.baseUrl = baseUrl ? baseUrl : "";
    }

    /**
     * This method creates new Vendor. It requires the Create Vendor permission.
    It accepts a maximum of 500 records at a time. 
    This will ignore the Vendor name already in existence. 
    To create/update addresses (instead of ignoring them), please use the API public-api/addresses/suppliers/save.
    Use “Save” to perform operations including both inserts and updates.
     */
    createNewVendors(request: VendorSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/vendors/createNew";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processCreateNewVendors(_response);
        });
    }

    protected processCreateNewVendors(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method updates the existing Vendors. Every Vendor will have a  Vendor number. 
    It requires the Edit Vendor permission. It accepts a maximum of 500 records at a time.
    This will not work for Vendor with unknown Vendor number.
    To create/update addresses (instead of ignoring them), please use the API public-api/addresses/suppliers/save.
    Use “Save” to perform operations including both inserts and updates.
     */
    updateExisting(request: VendorSaveRequest | null): Promise<WaspResultOfResults> {
        let url_ = this.baseUrl + "/public-api/vendors/updateExisting";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(request);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processUpdateExisting(_response);
        });
    }

    protected processUpdateExisting(response: Response): Promise<WaspResultOfResults> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfResults.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfResults>(<any>null);
    }

    /**
     * This method returns a page full of active vendors given a precise set of search, sort or filter criteria. 
    It's a paging API so this is meant to be called with a smaller number (ca 100) of records to fetch, repeatedly, until you get them all.
    It requires the Allow Vendor permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    vendorAdvancedSearch(model: AdvancedSearchParameters | null): Promise<WaspResultOfListOfVendorModelInfo> {
        let url_ = this.baseUrl + "/public-api/vendors/advancedinfosearch";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(model);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processVendorAdvancedSearch(_response);
        });
    }

    protected processVendorAdvancedSearch(response: Response): Promise<WaspResultOfListOfVendorModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfVendorModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfVendorModelInfo>(<any>null);
    }

    /**
     * This method returns existing vendor by number.
    It requires the Allow Vendor permission.
    Note: This is a Post API to avoid limitations inherent to passing parameters on the URL.
     */
    getVendorByNumber(listVendorNumber: string[] | null): Promise<WaspResultOfListOfWaspResultOfVendorModelInfo> {
        let url_ = this.baseUrl + "/public-api/vendors/getvendorbynumber";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(listVendorNumber);

        let options_ = <RequestInit>{
            body: content_,
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "Accept": "application/json"
            }
        };

        return this.http.fetch(url_, options_).then((_response: Response) => {
            return this.processGetVendorByNumber(_response);
        });
    }

    protected processGetVendorByNumber(response: Response): Promise<WaspResultOfListOfWaspResultOfVendorModelInfo> {
        const status = response.status;
        let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
        if (status === 200) {
            return response.text().then((_responseText) => {
            let result200: any = null;
            let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
            result200 = WaspResultOfListOfWaspResultOfVendorModelInfo.fromJS(resultData200);
            return result200;
            });
        } else if (status !== 200 && status !== 204) {
            return response.text().then((_responseText) => {
            return throwException("An unexpected server error occurred.", status, _responseText, _headers);
            });
        }
        return Promise.resolve<WaspResultOfListOfWaspResultOfVendorModelInfo>(<any>null);
    }
}

export class WaspResultOfString implements IWaspResultOfString {
    /** Type specific result that always depends on the function called. */
    data?: string | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfString) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"];
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfString {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfString();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfString {
    /** Type specific result that always depends on the function called. */
    data?: string | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WtResult implements IWtResult {
    /** The ResultCode of this message. */
    resultCode!: WtResultCode;
    /** A user understandable message about the result. Can be used for logging results. */
    message?: string | undefined;
    /** Contains the HTTP status code that usually would be returned by the server. The server can not return the HTTP error code in the HTTP header becuase all the information would not be sent in all cases. */
    httpStatusCode!: WaspHttpStatusCodes;
    /** We use this field as an identifier for the error message. Ex: can be an "_id" field in a grid, or can be a field that has a validation error on save */
    fieldName?: string | undefined;

    constructor(data?: IWtResult) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.resultCode = _data["ResultCode"];
            this.message = _data["Message"];
            this.httpStatusCode = _data["HttpStatusCode"];
            this.fieldName = _data["FieldName"];
        }
    }

    static fromJS(data: any): WtResult {
        data = typeof data === 'object' ? data : {};
        let result = new WtResult();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ResultCode"] = this.resultCode;
        data["Message"] = this.message;
        data["HttpStatusCode"] = this.httpStatusCode;
        data["FieldName"] = this.fieldName;
        return data; 
    }
}

export interface IWtResult {
    /** The ResultCode of this message. */
    resultCode: WtResultCode;
    /** A user understandable message about the result. Can be used for logging results. */
    message?: string | undefined;
    /** Contains the HTTP status code that usually would be returned by the server. The server can not return the HTTP error code in the HTTP header becuase all the information would not be sent in all cases. */
    httpStatusCode: WaspHttpStatusCodes;
    /** We use this field as an identifier for the error message. Ex: can be an "_id" field in a grid, or can be a field that has a validation error on save */
    fieldName?: string | undefined;
}

/** Result codes enum (see information below) */
export enum WtResultCode {
    SUCCESS = 0,
    LEGACY_FIND_A_DEVICE = 1,
    LEGACY_FIND_INACTIVE_DEVICE = 2,
    LEGACY_FIND_DEVICE_DIFF_NAME = 3,
    LEGACY_FIND_INACTIVE_DEVICE_DIFF_NAME = 4,
    LEGACY_DEVICE_NAME_IS_TAKEN = 5,
    LEGACY_UNMATCH_DEVICE_TYPE = 6,
    LEGACY_UNMATCH_DEVICE_CATEGORY = 7,
    LEGACY_EXCEPTION = 10,
    LEGACY_EMPTY_DEVICE_NAME = 11,
    LEGACY_EMPTY_UUID = 12,
    PRIOR_REQUEST_ALREADY_COMPLETED_SUCCESSFULLY = 10000,
    REQUEST_RECEIVED_AND_CAN_BE_IGNORED = 10001,
    RECORD_RECEIVED_AND_CAN_BE_IGNORED = 10002,
    ASSET_SAVED_SUCCESSFULLY = 20000,
    ASSET_TYPE_SAVED_SUCCESSFULLY = 20001,
    ASSET_INVENTORY_SAVED_SUCCESSFULLY = 20002,
    ASSET_DISPOSED_SUCCESSFULLY = 20003,
    ROLE_SAVED_SUCCESSFULLY = 20004,
    USER_INVITE_SUCCESSFULLY = 20005,
    USER_REGISTER_SUCCESSFULLY = 20006,
    ASSET_RECOVERED_SUCCESSFULLY = 20007,
    USER_STATUS_SAVED_SUCCESSFULLY = 20008,
    USER_INFO_SAVED_SUCCESSFULLY = 20009,
    CUSTOMER_SAVED_SUCCESSFULLY = 20010,
    SUPPLIER_SAVED_SUCCESSFULLY = 20011,
    MANUFACTURER_SAVED_SUCCESSFULLY = 20012,
    SITE_SAVED_SUCCESSFULLY = 20013,
    LOCATION_SAVED_SUCCESSFULLY = 20014,
    EMPLOYEE_SAVED_SUCCESSFULLY = 20015,
    DEPARTMENT_SAVED_SUCCESSFULLY = 20016,
    CONTRACT_SAVED_SUCCESSFULLY = 20017,
    FUNDING_SAVED_SUCCESSFULLY = 20018,
    ASSETS_DEPRECIATED_SUCCESSFULLY = 20019,
    DCF_SAVED_SUCCESSFULLY = 20020,
    NOTIFICATION_SAVED_SUCCESSFULLY = 20021,
    AUDIT_WINDOW_SAVED_SUCCESSFULLY = 20022,
    BUILTIN_FIELD_SAVED_SUCCESSFULLY = 20023,
    REPORT_SCHEDULE_DELETED_SUCCESSFULLY = 20024,
    REPORT_SAVED_SUCCESSFULLY = 20025,
    FILTER_SAVED_SUCCESSFULLY = 20026,
    LICENSE_DELETED_SUCCESSFULLY = 20027,
    REPORT_SCHEDULE_SAVED_SUCCESSFULLY = 20028,
    DEPRECIATION_CLASS_SAVED_SUCCESSFULLY = 20029,
    COMPANY_INFO_SAVED_SUCCESSFULLY = 20030,
    ITEM_SUPPLIER_SAVED_SUCCESSFULLY = 20031,
    TASK_SAVED_SUCCESSFULLY = 20032,
    LOCATION_RECOVERED_SUCCESSFULLY = 20033,
    LABEL_NAME_SAVED_SUCCESSFULLY = 20034,
    GS1_BARCODE_CONFIG_SAVED_SUCCESSFULLY = 20035,
    RFID_CONFIG_SAVED_SUCCESSFULLY = 20036,
    RFID_CONFIG_DELETED_SUCCESSFULLY = 20037,
    CALLOUT_TRIGGER_SAVED_SUCCESSFULLY = 20038,
    CALLOUT_TRIGGER_PROPERTY_VALUE_SAVED_SUCCESSFULLY = 20039,
    CALLOUT_TRIGGER_NOTICE_SAVED_SUCCESSFULLY = 20040,
    CALLOUT_TRIGGER_RESULT_SAVED_SUCCESSFULLY = 20041,
    CALLOUT_SAVED_SUCCESSFULLY = 20042,
    SUCCESS_NO_DATA = 20043,
    SCHEDULE_TEMPLATE_SAVED_SUCCESSFULLY = 20044,
    PAYCD_SAVED_SUCCESSFULLY = 20045,
    HOLCD_SAVED_SUCCESSFULLY = 20046,
    ABSCD_SAVED_SUCCESSFULLY = 20047,
    PAYSET_SAVED_SUCCESSFULLY = 20048,
    PUSH_CLOCK_PRIVILEGE_SAVED_SUCCESSFULLY = 20049,
    PUSH_CLOCK_TYPE_SAVED_SUCCESSFULLY = 20050,
    PUSH_CLOCK_VERIFY_MODE_SAVED_SUCCESSFULLY = 20051,
    PUSH_CLOCK_SAVED_SUCCESSFULLY = 20052,
    EMPLOYEE_PAYROLL_SETTINGS_SAVED_SUCCESSFULLY = 20053,
    EMPLOYEE_DEMOGRAPHICS_SAVED_SUCCESSFULLY = 20054,
    EMPLOYEE_RATE_HISTORY_SAVED_SUCCESSFULLY = 20055,
    EMPLOYEE_CLOCK_DETAILS_SAVED_SUCCESSFULLY = 20056,
    EMPLOYEE_CLOCK_SAVED_SUCCESSFULLY = 20057,
    GENDER_SAVED_SUCCESSFULLY = 20058,
    RACE_SAVED_SUCCESSFULLY = 20059,
    OVERTIME_RULES_SAVED_SUCCESSFULLY = 20060,
    EMPLOYEE_GEOFENCE_SAVED_SUCCESSFULLY = 20061,
    SITE_GEOFENCE_SAVED_SUCCESSFULLY = 20062,
    ASSET_TYPE_DELETED_SUCCESSFULLY = 20101,
    CUSTOMER_DELETED_SUCCESSFULLY = 20110,
    SUPPLIER_DELETED_SUCCESSFULLY = 20111,
    MANUFACTURER_DELETED_SUCCESSFULLY = 20112,
    SITE_DELETED_SUCCESSFULLY = 20113,
    LOCATION_DELETED_SUCCESSFULLY = 20114,
    EMPLOYEE_DELETED_SUCCESSFULLY = 20115,
    DEPARTMENT_DELETED_SUCCESSFULLY = 20116,
    CONTRACT_DELETED_SUCCESSFULLY = 20117,
    FUNDING_DELETED_SUCCESSFULLY = 20118,
    DCF_DELETED_SUCCESSFULLY = 20120,
    NOTIFICATION_DELETED_SUCCESSFULLY = 20121,
    ROLE_DELETED_SUCCESSFULLY = 20123,
    FILTER_DELETED_SUCCESSFULLY = 20124,
    REPORT_DELETED_SUCCESSFULLY = 20125,
    DEPRECIATION_CLASS_DELETED_SUCCESSFULLY = 20129,
    DEVICE_DELETED_SUCCESSFULLY = 20130,
    USER_DELETED_SUCCESSFULLY = 20131,
    ITEM_LOCATION_DELETED_SUCCESSFULLY = 20132,
    ITEM_BILLS_OF_MATERIALS_DELETED_SUCCESSFULLY = 20133,
    PRICE_TIER_DELETED_SUCCESSFULLY = 20134,
    ITEM_BILLS_OF_MATERIALS_SAVED_SUCCESSFULLY = 20135,
    TASK_DELETED_SUCCESSFULLY = 20232,
    CUSTOMER_DISABLED_SUCCESSFULLY = 20233,
    CUSTOMER_ENABLED_SUCCESSFULLY = 20234,
    CALLOUT_DELETED_SUCCESSFULLY = 20235,
    SCHEDULE_TEMPLATE_DELETED_SUCCESSFULLY = 20236,
    PAYCD_DELETED_SUCCESSFULLY = 20237,
    HOLCD_DELETED_SUCCESSFULLY = 20238,
    ABSCD_DELETED_SUCCESSFULLY = 20239,
    PUSH_CLOCK_PRIVILEGE_DELETED_SUCCESSFULLY = 20240,
    PUSH_CLOCK_TYPE_DELETED_SUCCESSFULLY = 20241,
    PUSH_CLOCK_VERIFY_MODE_DELETED_SUCCESSFULLY = 20242,
    PUSH_CLOCK_DELETED_SUCCESSFULLY = 20243,
    EMPLOYEE_CLOCK_DELETED_SUCCESSFULLY = 20244,
    GENDER_DELETED_SUCCESSFULLY = 20245,
    RACE_DELETED_SUCCESSFULLY = 20246,
    OVERTIME_RULES_DELETED_SUCCESSFULLY = 20247,
    REQUEST_SEQUENCE_STARTED = 20600,
    REQUEST_SEQUENCE_ALREADY_STARTED = 20601,
    REPORT_RESET_SUCCESSFULLY = 21125,
    USER_LICENSE_EXCEED = 34008,
    IMPORT_COMPLETED_ERRORS = 34009,
    IMPORT_COMPLETED = 34010,
    IMPORT_IN_PROGRESS = 34011,
    ITEM_PRICE_LEVEL_SAVED_SUCCESSFULLY = 34012,
    TRANSACTION_UPDATED_SUCCESSFULLY = 34013,
    PAYMENT_METHOD_SAVED_SUCCESSFULLY = 34014,
    SHIP_METHOD_SAVED_SUCCESSFULLY = 34015,
    SUCCESS_NO_ATTACHMENT = 34016,
    SUCCESS_FOUND_ATTACHMENT = 34017,
    INVITE_COMPLETED_ERRORS = 34018,
    INVITE_COMPLETED = 34019,
    INVITE_IN_PROGRESS = 34020,
    ARCHIVE_SUCCESSFULLY_COMPLETED = 36022,
    ARCHIVE_SUCCESSFULLY_COMPLETED_BOTH_TRANS_AND_ORDERS = 36024,
    ARCHIVE_SUCCESSFULLY_COMPLETED_TRANS_ONLY = 36026,
    ARCHIVE_PROCESS_SUBMITTED = 36032,
    ARCHIVE_PROCESS_STARTING = 36033,
    SITE_ACTIVE_LOCATIONS_NO_PRIVILEGE = 40001,
    CALLOUT_PAYLOAD_SUCCESS = 50040,
    NOTIFICATION_SAVED_AS_INACTIVE = 50110,
    NOTIFICATION_SAVED_AS_DISABLED = 50112,
    NOTIFICATION_SAVED_NO_ACTIVE_RECIPIENTS = 50116,
    NOTIFICATION_SAVED_NO_ACTIVE_EMAIL_RECIPIENTS = 50118,
    NOTIFICATION_SAVED_NO_WEB_EMAIL_ENABLED = 50122,
    DUPLICATE_TENANT_NAME_WITH_TRIAL_LICENSE = 56005,
    CATEGORY_SAVED_SUCCESSFULLY = 61000,
    CATEGORY_DELETED_SUCCESSFULLY = 61005,
    ZUORA_UPLOAD_PENDING = 63002,
    ZUORA_UPLOAD_OK = 63003,
    ZUORA_PRODUCT_ADDED = 63100,
    ZUORA_PRODUCT_REMOVED = 63101,
    ZUORA_PRODUCT_UPDATED = 63102,
    ITEM_DELETED_SUCCESSFULLY = 64005,
    ZONE_SAVED_SUCCESSFULLY = 69000,
    ZONE_DELETED_SUCCESSFULLY = 69003,
    ORDER_DELETED_SUCCESSFULLY = 70003,
    ORDER_CREATED_SUCCESSFULLY = 70004,
    ORDER_UPDATED_SUCCESSFULLY = 70005,
    SHIP_METHOD_DELETED_SUCCESSFULLY = 70008,
    ORDER_CODE_CREATED_SUCCESSFULLY = 70021,
    ORDER_CODE_UPDATED_SUCCESSFULLY = 70022,
    ORDER_CODE_DELETED_SUCCESSFULLY = 70023,
    ORDER_COMPLETED_SUCCESSFULLY = 70026,
    ORDER_COMPLETED_SUCCESSFULLY_NO_BACKORDER_CREATED = 70027,
    ORDER_BUILT_SUCCESSFULLY = 70031,
    CONDITION_SAVED_SUCCESSFULLY = 73000,
    CONDITION_DELETED_SUCCESSFULLY = 73004,
    DISPOSAL_REASON_SAVED_SUCCESSFULLY = 74000,
    DISPOSAL_REASON_DELETED_SUCCESSFULLY = 74004,
    RECOVER_REASON_SAVED_SUCCESSFULLY = 74005,
    RECOVER_REASON_DELETED_SUCCESSFULLY = 74009,
    ADJUST_REASON_SAVED_SUCCESSFULLY = 74015,
    ADJUST_REASON_DELETED_SUCCESSFULLY = 74017,
    PAY_METHOD_SAVED_SUCCESSFULLY = 76000,
    PAY_METHOD_DELETED_SUCCESSFULLY = 76001,
    TAX_CODE_SAVED_SUCCESSFULLY = 77000,
    TAX_CODE_DELETED_SUCCESSFULLY = 77001,
    ORDER_SUBTYPE_SAVED_SUCCESSFULLY = 77500,
    ORDER_SUBTYPE_DELETED_SUCCESSFULLY = 77510,
    PUNCH_ODD_NUMBER = 81001,
    PUNCH_NEGATIVE = 81004,
    PUNCH_OUTSIDE_GEOFENCE = 81005,
    TIMECARD_SAVED_SUCCESSFULLY = 82000,
    PAY_PERIOD_SAVED_SUCCESSFULLY = 82001,
    TOTAL_WEEK_SAVED_SUCCESSFULLY = 82002,
    SUCCESS_WITH_WARNING_BASE_OFFSET = 100000000,
    TRANSACTION_WARN_NO_ACTION_TAKEN = 100001000,
    TRANSACTION_WARN_CHECKOUT_REQUEST_IGNORED = 100001002,
    TRANSACTION_WARN_CHECKIN_REQUEST_IGNORED_NO_ACTION = 100001004,
    SUCCESS_WITH_MORE_DATA_REMAINING = 100001005,
    SUCCESS_WITH_ADDITIONAL_REQUIREMENTS = 100001006,
    CHECK_IN_TRANSACTION = 100001008,
    TRANSACTION_INVALID_DUE_DATE = 100046013,
    TRANSACTION_QUANTITY_ALL_MQA_AVAILABLE_ASSUMED = 100046060,
    TRANSACTION_QUANTITY_ONE_MQA_ASSUMED = 100046061,
    ERROR_CODE_MIN_LIMIT = -2147483648,
    UNABLE_TO_SAVE_CHANGES = -96002,
    SHIPPING_PROVIDER_BAD_BILLING_COUNTRY_CODE = -95074,
    SHIPPING_PROVIDER_BAD_SHIPPING_COUNTRY_CODE = -95070,
    SHIPPING_PROVIDER_CLIENT_ERROR_MESSAGES_FORMAT0 = -95060,
    SHIPPING_PROVIDER_HTTP_REDIRECT_FORMAT0 = -95050,
    SHIPPING_PROVIDER_INTERNAL_SERVER_ERROR = -95040,
    SHIPPING_PROVIDER_BAD_ENDPOINT = -95030,
    SHIPPING_PROVIDER_BAD_SERVICE_PACKAGE_CODE = -95020,
    SHIPPING_PROVIDER_AUTHENTICATION_FAILED = -95010,
    SHIPPING_PROVIDER_NOT_REGISTERED = -95000,
    WEB_STORE_INTERFACE_BASE_ERROR_NUMBER_MAX = -91199,
    WEB_STORE_URL_FORMAT0_IN_USE_BY_ANOTHER_TENANT = -91011,
    WEB_STORE_URL_FORMAT0_IN_USE_BY_TENANT_FORMAT1 = -91002,
    WEB_STORE_DUPLICATE_RECORD_IN_DATABASE = -90316,
    WEB_STORE_TOO_MANY_POSSIBLE_PREFIXES = -90315,
    WEB_STORE_REQUIRED_PARAMETER_IS_NOT_SPECIFIED = -90314,
    WEB_STORE_ENTITY_ALREADY_EXISTS = -90313,
    WEB_STORE_ENTITY_OR_ITEM_NOT_FOUND = -90312,
    WEB_STORE_TOO_MANY_ITEMS_REQUESTED = -90311,
    WEB_STORE_TOO_MANY_REQUESTS_TO_STORE_API = -90310,
    WEB_STORE_INCORRECT_PARAMETERS_FOR_METHOD = -90309,
    WEB_STORE_UNCATEGORIZED_ERROR_RECEIVED_FROM_THE_ST = -90307,
    WEB_STORE_STORE_URL_IS_NOT_REACHABLE = -90306,
    WEB_STORE_CONNECTION_BRIDGE_RESPONSE_ERROR = -90305,
    WEB_STORE_WRONG_FTP_STORE_DIR_OR_BRIDGE = -90304,
    WEB_STORE_INCORRECT_FTP_WRITE_PERMISSIONS = -90303,
    WEB_STORE_INCORRECT_FTP_ACCESS = -90302,
    WEB_STORE_STORE_NOT_FOUND = -90301,
    WEB_STORE_STORE_API_ERROR_OR_RESOURCE_IS_NOT_REACH = -90300,
    WEB_STORE_ACCOUNT_REQUEST_LIMIT_EXCEEDED = -90210,
    WEB_STORE_INTERNAL_SERVICE_ERROR = -90209,
    WEB_STORE_STORE_ALREADY_EXISTS = -90208,
    WEB_STORE_STORE_REQUEST_LIMIT_EXCEEDED = -90207,
    WEB_STORE_API_KEY_IS_DISABLED = -90206,
    WEB_STORE_API_ACCESS_DENIED = -90205,
    WEB_STORE_STORE_ACCESS_DENIED = -90204,
    WEB_STORE_METHOD_IS_NOT_SPECIFIED = -90203,
    WEB_STORE_INCORRECT_API_KEY = -90202,
    WEB_STORE_SERVICE_NOT_AVAILABLE = -90201,
    WEB_STORE_INTERFACE_BASE_ERROR_NUMBER = -90200,
    TIMECARD_RETRIEVE_ERROR = -82005,
    EMPLOYEES_NOT_SPECIFIED = -82004,
    TIMECARD_PAYROLL_SETTINGS_MISSING = -82003,
    PUNCH_DUPLICATE = -81003,
    PUNCH_UNKNOWN_TIMEZONE = -81002,
    PUNCH_CANNOT_BE_IN_FUTURE = -81000,
    GENERIC_NONEXISTENCE_LIST = -80002,
    TOO_MUCH_DATA = -80001,
    TOO_MANY_REQUESTS = -80000,
    RFID_CONFIG_NOT_FOUND = -79002,
    DEFAULT_RFID_RULE_UPDATE_NOT_ALLOWED = -79001,
    RFID_RULE_ALREADY_EXISTS = -79000,
    MASTER_SCHEDULE_ATTEMPT_CHANGE_NEXT_OCCURRENCE_DATE_FAILED = -78006,
    MASTER_SCHEDULE_PERFORM_WORK_ATTEMPTED = -78004,
    ORDER_NO_DELETE_DUE_TO_SCHEDULE_INSTANCE = -78002,
    MASTER_ADD_SCHEDULE_DISALLOWED = -78001,
    MASTER_REMOVE_SCHEDULE_DISALLOWED = -78000,
    ORDER_SUBTYPE_DELETED = -77527,
    DEFAULT_ORDER_SUBTYPE = -77525,
    ORDER_SUBTYPE_DUPLICATE_ERROR = -77521,
    ORDER_SUBTYPE_IN_USE = -77520,
    TAX_CODE_NOT_FOUND = -77003,
    TAX_CODE_IN_USE = -77002,
    DUPLICATE_PAY_METHOD = -76003,
    PAY_METHOD_IN_USE = -76002,
    TASK_RETRIEVE_ERROR = -75004,
    TASK_ACTIVE_STATUS_NOT_FOUND = -75003,
    TASK_IN_USE = -75002,
    TASK_TYPE_INVALID = -75001,
    TASK_DUPLICATE_ERROR = -75000,
    ADJUST_REASON_DUPLICATE_ERROR = -74017,
    RECOVER_REASON_ASSET_ASSOCIATION = -74008,
    RECOVER_REASON_IN_USE = -74007,
    RECOVER_REASON_DUPLICATE_ERROR = -74006,
    DISPOSAL_REASON_ASSET_ASSOCIATION = -74003,
    DISPOSAL_REASON_IN_USE = -74002,
    DISPOSAL_REASON_DUPLICATE_ERROR = -74001,
    CONDITION_ASSET_ASSOCIATION = -73003,
    CONDITION_IN_USE = -73002,
    CONDITION_DUPLICATE_ERROR = -73001,
    AUTO_BUILD_NO_QTY_ERROR = -72002,
    AUTO_BUILD_INV_ERROR = -72001,
    AUTO_BUILD_TRACKBY_ERROR = -72000,
    EXTERNAL_ADFS_LOGIN_ACCOUNT_LOCKED = -71030,
    EXTERNAL_ADFS_LOGIN_AUTHENTICATION_FAILED = -71020,
    EXTERNAL_ADFS_LOGIN_AUTHENTICATION_INCONCLUSIVE = -71010,
    EXTERNAL_ADFS_LOGIN_GENERIC_FAILURE = -71000,
    QUANTITY_CANNOT_BE_FRACTIONAL = -70084,
    ORDER_STATUS_CODE_ALREADY_CLOSED_OR_COMPLETED = -70081,
    PURCHASE_ORDER_MQA_ONLY = -70079,
    PURCHASE_ORDER_QUANTITY_LESS_RECEIVED = -70078,
    ORDER_LINE_ASSET_RESERVED = -70077,
    ORDER_UPDATE_DISALLOWED_SENT_TO_SHIPMENT_PROCESS = -70076,
    RECEIVE_CANNOT_OVER_RECEIVE = -70074,
    ORDER_PRIORITY_NOT_FOUND = -70073,
    WORK_ORDER_TASK_NOT_VALID = -70072,
    WORK_ORDER_ASSET_NOT_VALID = -70071,
    ORDER_OPERATION_05_FAILED = -70070,
    ORDER_OPERATION_04_FAILED = -70068,
    ORDER_OPERATION_03_FAILED = -70066,
    ORDER_OPERATION_02_FAILED = -70064,
    ORDER_OPERATION_01_FAILED = -70062,
    ORDER_CLONE_DUPLICATION_FAILED = -70060,
    ORDER_ATTACHMENT_FAILED_TO_SAVE = -70058,
    ORDER_LINE_UNIT_OF_WORK_HAS_FAILED_TO_SAVE = -70056,
    ORDER_LINE_FAILED_TO_SAVE = -70054,
    ORDER_NUMBER_MISSING_OR_EMPTY = -70052,
    ORDER_SUB_TYPE_ID_NOT_FOUND_ACTIVE = -70050,
    ORDER_STATE_TRANSITION_DISALLOWED = -70048,
    ORDER_LINE_ACTIVE_MISSING_UNIT_OF_WORK_ASSIGNMENTS = -70046,
    ORDER_MISSING_ACTIVE_ORDER_LINE = -70044,
    ORDER_DELETED_CANNOT_UNDO_DELETE = -70042,
    ORDER_CLOSE_INCOMPLETE_BUT_ALL_ACTIONS_FINISHED = -70040,
    ORDER_CLOSE_COMPLETE_BUT_ACTIONS_UNFINISHED = -70038,
    UPDATE_CHANGES_DISALLOWED_STATUS_COMPLETED = -70035,
    UPDATE_CHANGES_DISALLOWED = -70034,
    SHIPPING_PROVIDER_DUPLICATE_ERROR = -70032,
    ORDER_LINE_NEEDS_PROCESS_QTY = -70030,
    ORDER_NO_LINES_TO_PROCESS = -70029,
    ORDER_CODE_CANNOT_DELETE_IN_USE = -70025,
    ORDER_LINE_PROCESSING_TYPE_NOT_FOUND = -70024,
    ORDER_CODE_NOT_FOUND = -70020,
    ORDER_STATUS_REASON_CODE_INVALID = -70016,
    ORDER_TASK_ASSIGNEE_NO_ACCESS = -70015,
    ORDER_STATUS_CODE_INVALID = -70014,
    ORDER_NOT_IN_DRAFT = -70013,
    ORDER_LINE_INVALID_CONTAINER = -70012,
    ORDER_LINE_INVALID_LOCATION = -70011,
    DUPLICATE_ORDER_NUMBER = -70010,
    ORDER_LINE_NOT_FOUND = -70009,
    SHIP_METHOD_DUPLICATE_ERROR = -70007,
    SHIP_METHOD_IN_USE = -70006,
    ORDER_NOT_FOUND = -70002,
    SHIP_METHOD_INVALID = -70001,
    PAYMENT_METHOD_INVALID = -70000,
    ZONE_IN_USE = -69002,
    ZONE_DUPLICATE_ERROR = -69001,
    PRICE_TIER_IN_USE = -68005,
    PRICE_TIER_INVALID = -68004,
    PRICE_TIER_DELETE_ERROR = -68003,
    PRICE_TIER_RETRIEVE_ERROR = -68002,
    PRICE_TIRE_DUPLICATE_NAME = -68001,
    PRICING_TYPE_INVALID = -68000,
    CONTAINER_TRACKBY_BAD_QUANTITY_ERROR = -67102,
    CONTAINER_TRACKBY_IGNORED_INFO_MSG = -67102,
    EXTRA_QTY_TRACKBY_TYPES_IGNORED_INFO_MSG = -67100,
    TRACKBY_INVALID_DATE_CODE = -67009,
    TRACKBY_TYPE_ID_TRANSACTION_CODES_REQUIRED = -67008,
    TRACKBY_TYPE_ID_UNDEFINED_INACTIVE = -67007,
    TRACKBY_VALUES_NOT_FOUND = -67006,
    TRACKBY_VALUES_MISSING = -67005,
    TRACKBY_MISSING_ITEM_TRACK_BY_TYPE = -67004,
    TRACKBY_DUPLICATE_CREATION_ERROR = -67003,
    TRACKBY_REDEFINITION_REJECTED = -67002,
    TRACKBY_TRANSACTION_CODE_DISALLOWED = -67001,
    TRACKBY_TRANSACTION_QTY_EXCEED_ALLOWED = -67000,
    ITEM_SUPPLIER_SKU_DUPLICATE_ERROR = -66000,
    UOM_CONVERSION_OUT_OF_RANGE = -64410,
    UOM_DISCRETE_PREVENTS_CONVERSION = -64409,
    UOM_CANNOT_BE_DISCRETE = -64408,
    UOM_NOT_UNIQUE = -64407,
    UOM_KEEP_TYPE_IF_CONVERSION = -64406,
    UOM_CONVERSION_STUPID_PAIR = -64405,
    UOM_CONVERSION_IN_USE = -64404,
    UOM_CONVERSION_CONTRADICTION = -64403,
    UOM_LIMIT_EXCEEDED = -64402,
    UOM_CONVERSION_INVALID = -64401,
    UOM_INVALID = -64400,
    TRANSACTION_INVENTORY_KEY_NOT_FOUND_APPID_2_0 = -64063,
    TRANSACTION_INVENTORY_KEY_NOT_FOUND_APPID_2 = -64062,
    TRANSACTION_INVENTORY_KEY_NOT_FOUND_APPID_1 = -64061,
    ITEM_DUPLICATE_MOVE_ORDER_NUMBER = -64042,
    ITEM_ON_ORDER_CANNOT_CHANGE_UOM = -64041,
    ITEM_BOM_IN_USE_ORDER = -64040,
    ASSET_ZONE_INVALID = -64039,
    ITEM_SITE_INVALID = -64038,
    ITEM_CATEGORY_RESTRICTED_AT_SITE = -64037,
    IMPORT_COST_METHOD_REQUIRED = -64036,
    ITEM_CANNOT_CHANGE_UNIT_BEFORE_DELETE_ALL_SUPPLIERS_DATA = -64035,
    NEED_PURCHASE_UOM = -64034,
    NEED_SELL_UOM = -64033,
    NEED_BASE_UOM = -64032,
    ITEM_CANNOT_CHANGE_BASE_UOM = -64031,
    ITEM_ON_ORDER = -64030,
    ITEM_ASSEMBLY_CIRCULAR_NESTING = -64029,
    ITEM_CONTAINER_CIRCULAR_NESTING = -64028,
    ITEM_CONTAINER_NESTING_TOO_DEEP = -64027,
    ITEM_CANNOT_CHANGE_COST_METHOD = -64026,
    ITEM_IN_PURCHASE_ORDER = -64025,
    CHANGE_FORMAT_ORDER_NUMBER = -64024,
    ITEM_LOCATION_QTY_MASS_UP = -64023,
    ITEM_COST_REQUIRED = -64022,
    ITEM_DUPLICATE_PICK_ORDER_NUMBER = -64021,
    ITEM_SERIAL_AND_SERIAL_ON_INVOICE = -64020,
    ITEM_DUPLICATE_PURCHASE_ORDER_NUMBER = -64019,
    ITEM_DUPLICATE_NUMBER = -64018,
    ITEM_DUPLICATE_SERIAL_NUMBER = -64017,
    CONTAINER_TRACKBY_DUPLICATE_ERROR = -64016,
    ITEM_CONTAINER_IS_DUPLICATE = -64015,
    ITEM_CONTAINER_IS_NESTED = -64014,
    ITEM_NO_MATCHING_TRACKBYS = -64013,
    ITEM_TOO_MANY_MATCHING_TRACKBYS = -64012,
    ITEM_BOM_LAST_RECORD = -64011,
    CONTAINER_NOT_EMPTY = -64010,
    ITEM_DELETE_ITEM_IN_BOM = -64009,
    ITEM_NO_DEFAULT_SALES_TAX_CODE_DEFINED = -64008,
    ITEM_ASSEMBLY_BOM_REQUIRED = -64007,
    ITEM_KIT_BOM_REQUIRED = -64006,
    ITEM_DELETE_LOCATION_CONTAINS_INVENTORY = -64004,
    ITEM_LOCATION_INVALID = -64003,
    ITEM_RETRIEVE_ERROR = -64002,
    ITEM_NOT_FOUND = -64001,
    ITEM_INVALID = -64000,
    ZUORA_WRONG_POSTAL_CODE = -63105,
    ZUORA_MISSING_TENANT_NAME = -63104,
    ZUORA_ERROR = -63103,
    ZUORA_UNHANDLED_ERROR = -63009,
    ZUORA_SUBSCRIPTION_NOT_ACTIVE = -63008,
    ZUORA_INVALID_SUBSCRIPTION_ID = -63007,
    ZUORA_UPLOAD_MISSING_TENANT = -63006,
    ZUORA_UPLOAD_NO_PRODUCTS = -63005,
    ZUORA_UPLOAD_ERROR = -63004,
    ZUORA_UPLOAD_MISSING_RATEPLANCHARGE = -63001,
    ZUORA_UPLOAD_MISSING_RATEPLAN = -63000,
    SMTP_NO_DATA_SENT = -62008,
    APP_OPTION_NOT_CONFIGURED = -62007,
    ASSET_SETTING_FAILED_ERASE_TRAIL_DATA_BECAUSE_OF_SPECIFIC_ASSETTYPE_CUSTOMFIELDS = -62006,
    APP_OPTION_NEGATIVE_NUMBER_ERROR = -62005,
    APP_OPTION_NUMERIC_DECIMAL_ERROR_MESSAGE = -62004,
    APP_OPTION_INVALID_PAGE_SIZE_FORMAT = -62003,
    SMTP_SETTINGS_INVALID = -62002,
    APP_OPTION_EXCEED_PAGE_SIZE = -62001,
    CATEGORY_ITEM_ASSOCIATION = -61004,
    CATEGORY_ASSETTYPE_ASSOCIATION = -61003,
    CATEGORY_IN_USE = -61002,
    CATEGORY_DUPLICATE_ERROR = -61001,
    LICENSE_NO_MORE_CALLOUTS = -60014,
    UNABLE_READ_LICENSES_DATA = -60013,
    LICENSE_WRONG_APP = -60012,
    TOKEN_USER_DISABLED = -60011,
    TOKEN_INVALID = -60010,
    TOKEN_INVALIDATED = -60009,
    TOKEN_NOT_ISSUED = -60008,
    ACTIVE_LICENSES = -60007,
    LICENSE_EXPIRED = -60006,
    RESOURCE_NOT_FOUND = -60005,
    LICENSE_READ_ISSUE = -60004,
    LICENSE_NO_MORE_NOTIFICATIONS = -60003,
    LICENSE_NO_MORE_CUSTOM_FIELDS = -60002,
    LICENSE_CANNOT_ACCESS_FEATURE = -60001,
    LICENSE_UPDATE_ISSUE = -60000,
    DEVICE_DOWNLOAD_DB_REMOTE_STORAGE_FAILED = -59016,
    DEVICE_DOWNLOAD_DB_APP_VERSION_HIGH_ERROR = -59015,
    DEVICE_DOWNLOAD_DB_APP_VERSION_LOW_ERROR = -59014,
    DEVICE_DOWNLOAD_DB_GENERATION_ERROR = -59013,
    DEVICE_DOWNLOAD_ERROR_CONNECTING_DB = -59012,
    DEVICE_SOURCE_DB_NOT_FOUND = -59011,
    DEVICE_DOWNLOAD_FILE_NOT_FOUND = -59010,
    DEVICE_NAME_IS_TAKEN = -59009,
    FIND_INACTIVE_DEVICE_DIFF_NAME = -59008,
    FIND_DEVICE_DIFF_NAME = -59007,
    FIND_INACTIVE_DEVICE = -59006,
    UNMATCH_DEVICE_CATEGORY = -59005,
    UNMATCH_DEVICE_TYPE = -59004,
    FIND_A_DEVICE = -59003,
    EMPTY_UUID = -59002,
    EMPTY_DEVICE_NAME = -59001,
    CORRECT_MOBILE_ERROR_FAILED = -59000,
    NOT_A_FIXED_ASSET_TYPE_CLASS_ID = -58003,
    INVALID_TARGET_ASSET_CLASS = -58002,
    INVALID_ASSET_TYPE_CONVERSION = -58001,
    IMPORT_COUNTRY_CODE_NOT_EXIST = -57121,
    IMPORT_INVALID_COUNTRY_CODE = -57120,
    IMPORT_DUPLICATE_SERIAL_NUMBER_SPECIFY_ASSET = -57119,
    IMPORT_INVALID_PHONE_TYPE = -57118,
    IMPORT_INVALID_FORM = -57117,
    IMPORT_INVALID_PAYROLL_CODE = -57116,
    IMPORT_INVALID_BOOLEAN_CODE_VALUE = -57115,
    IMPORT_INVALID_MAPPING_MISSING = -57114,
    IMPORT_INVALID_PHONE = -57113,
    IMPORT_INVALID_MARITAL_STATUS = -57112,
    IMPORT_INVALID_SITE_NOT_MAPPED = -57111,
    IMPORT_EMAIL_REQUIRED = -57110,
    IMPORT_INVALID_GENDER = -57109,
    IMPORT_INVALID_RACE = -57108,
    IMPORT_INVALID_SCHEDULE_TEMPLATE = -57107,
    IMPORT_INVALID_TIME_ZONE = -57106,
    IMPORT_INVALID_EMPLOYEE_TYPE = -57105,
    IMPORT_INVALID_EMPLOYEE_STATUS = -57104,
    IMPORT_ITEM_UOM_INVALID = -57103,
    IMPORT_TOLCATIONCODE_IS_REQUIRED = -57102,
    IMPORT_TOSITENAME_IS_REQUIRED = -57101,
    IMPORT_FROMLOCATIONCODE_IS_REQUIRED = -57100,
    IMPORT_FROMSITENAME_IS_REQUIRED = -57099,
    IMPORT_INVALID_YEAR_VALUE = -57098,
    IMPORT_INVALID_GROUP_SETTING = -57097,
    IMPORT_INVALID_ADDRESS_TYPE = -57096,
    IMPORT_INVALID_ASSOCIATION_VALUE = -57095,
    IMPORT_TOO_MANY_ROWS = -57094,
    IMPORT_INVALID_GROUP = -57093,
    IMPORT_INVALID_CONTRACT = -57092,
    IMPORT_SERIAL_NUMBER_FORMAT_INVALID = -57091,
    IMPORT_DUPLICATE_SERIAL_NUMBER = -57090,
    IMPORT_INVALID_SERIAL_NUMBER = -57089,
    IMPORT_INVALID_REASON_CODE = -57088,
    IMPORT_INVALID_DATE_VALUE = -57087,
    IMPORT_ASSET_TYPE_NOT_MAPPED = -57086,
    IMPORT_REFERENCE_NUMBER_FLAG_INVALID = -57085,
    IMPORT_CUSTOMER_FLAG_INVALID = -57084,
    IMPORT_VENDOR_FLAG_INVALID = -57083,
    IMPORT_DATE_CODE_FLAG_INVALID = -57082,
    IMPORT_LOT_FLAG_INVALID = -57081,
    IMPORT_SERIAL_NUMBER_ON_INVOICING_ONLY_FLAG_INVALID = -57080,
    IMPORT_SERIAL_NUMBER_FLAG_INVALID = -57079,
    IMPORT_EMAIL_FORMAT_INVALID = -57078,
    IMPORT_ASSET_TAG_REQUIRED = -57077,
    IMPORT_INVALID_CHARACTER = -57076,
    IMPORT_IC_INVALID_ADJUST_REASON = -57075,
    IMPORT_INVALID_SALES_TAX_CODE = -57074,
    IMPORT_INVALID_COST_METHOD = -57073,
    IMPORT_INVALID_BASE_UNIT = -57072,
    IMPORT_INVALID_SALES_UNIT = -57071,
    IMPORT_INVALID_PURCHASE_UNIT = -57070,
    IMPORT_INVALID_USAGE_TYPE = -57069,
    IMPORT_INVALID_WEIGHT_UNIT = -57068,
    IMPORT_INVALID_VOLUME_UNIT = -57067,
    IMPORT_INVALID_DIMENSION_UNIT = -57066,
    IMPORT_INVALID_PARENT_LOCATION = -57065,
    IMPORT_INVALID_OWNER = -57064,
    IMPORT_IC_INVENTORY_DATECODE_FORMAT_INVALID = -57063,
    IMPORT_ITEM_SN_SN_ON_INVOICE_CONFLICT = -57062,
    IMPORT_ITEM_HAS_INVENTORY = -57061,
    IMPORT_CONTAINER_TYPE_DIFF = -57060,
    IMPORT_ITEM_TYPE_DIFF = -57059,
    IMPORT_WEIGTH_UOM_HAS_DOT = -57058,
    IMPORT_VOLUME_UOM_HAS_DOT = -57057,
    IMPORT_LENGTH_UOM_HAS_DOT = -57056,
    IMPORT_PURCHASE_UOM_HAS_DOT = -57055,
    IMPORT_SALES_UOM_HAS_DOT = -57054,
    IMPORT_BASE_UOM_HAS_DOT = -57053,
    IMPORT_COMMIT_ERROR_IN_A_BATCH = -57052,
    IMPORT_INVALID_ITEM_TYPE = -57051,
    IMPORT_INVALID_RESPONSE_PARTY = -57050,
    IMPORT_IC_INVNETORY_INVALID_LOCATION = -57049,
    IMPORT_IC_INVENTORY_INVALID_DATE = -57048,
    IMPORT_IC_INVENTORY_INVALID_COST = -57047,
    IMPORT_IC_INVENTORY_INVALID_QTY = -57046,
    IMPORT_IC_INVENTORY_ITEM_TYPE_ERROR = -57045,
    IMPORT_IC_INVENTORY_CUSTOMER_MISSING = -57044,
    IMPORT_IC_INVENTORY_SUPPLIER_MISSING = -57043,
    IMPORT_IC_INVENTORY_REF_MISSING = -57042,
    IMPORT_IC_INVENTORY_DATECODE_MISSING = -57041,
    IMPORT_IC_INVENTORY_LOT_MISSING = -57040,
    IMPORT_IC_INVENTORY_SN_MISSING = -57039,
    IMPORT_ITEM_SUPPLIER_DUPLICATE_SKU = -57038,
    IMPORT_ITEM_SUPPLIER_INVALID_SKU = -57037,
    IMPORT_ITEM_SUPPLIER_INVALID_UOM = -57036,
    IMPORT_ITEM_SUPPLIER_INVALID_SUPPLIER = -57035,
    IMPORT_ITEM_SUPPLIER_ITEM_TYPE_ERROR = -57034,
    IMPORT_ITEM_LOCATION_ITEM_TYPE_ERROR = -57033,
    IMPORT_BOM_INVALID_QTY = -57032,
    IMPORT_BOM_SUB_ITEM_TYPE_ERROR = -57031,
    IMPORT_BOM_ITEM_TYPE_ERROR = -57030,
    IMPORT_INVALID_SITE_LOCATION = -57029,
    IMPORT_INVALID_ZONE = -57028,
    IMPORT_UNEXPECTED_VALUE = -57027,
    IMPORT_UOM_CONVERSION_ARGS = -57026,
    IMPORT_UOM_ARGS = -57025,
    IMPORT_INVALID_NOT_INV_ASSET = -57024,
    IMPORT_INVALID_CONDITION = -57023,
    IMPORT_INVALID_CUSTOMER = -57022,
    IMPORT_FILE_FAILED = -57021,
    IMPORT_INVALID_BOOLEAN_VALUE = -57020,
    IMPORT_INVALID_DECIMAL_VALUE = -57019,
    IMPORT_INVALID_DATETIME_VALUE = -57018,
    IMPORT_INVALID_INT_VALUE = -57017,
    IMPORT_INVALID_FUND = -57016,
    IMPORT_INVALID_DEP_METHOD = -57015,
    IMPORT_DUPLICATE_ERROR = -57014,
    IMPORT_INVALID_DEP_CLASS = -57013,
    IMPORT_INVALID_USER = -57012,
    IMPORT_INVALID_ROLE = -57011,
    IMPORT_INVALID_ASSET = -57010,
    IMPORT_INVALID_LOCATION = -57009,
    IMPORT_INVALID_ASSET_TYPE = -57008,
    IMPORT_INVALID_MANUFACTURER = -57007,
    IMPORT_INVALID_CATEGORY = -57006,
    IMPORT_INVALID_SUPPLIER = -57005,
    IMPORT_INVALID_EMPLOYEE = -57004,
    IMPORT_INVALID_MANAGER = -57003,
    IMPORT_INVALID_DEPT = -57002,
    IMPORT_DCF_NOT_EXIST = -57001,
    IMPORT_INVALID_SITE = -57000,
    TENANT_NAME_NOT_EQUALS = -56009,
    TENANT_SCHEMA_CONTAINS_RECENT_TRANSACTIONS_HAS_ERROR = -56008,
    TENANT_SCHEMA_CONTAINS_RECENT_TRANSACTIONS = -56007,
    DUPLICATE_TENANT_DB_SCHEMA_NAME = -56006,
    UNABLE_TO_DELETE_ACTIVE_TENANT = -56005,
    SCHEMA_NAME_RESERVED_WORD = -56004,
    TENANT_NAME_RESERVED_WORD = -56003,
    TENANT_NAME_NOT_GIVEN = -56002,
    TENANT_NAME_NOT_FOUND = -56001,
    DUPLICATE_TENANT_NAME = -56000,
    FILTER_DUPLICATE_NAME = -54005,
    FILTER_DETAIL_INVALID = -54002,
    FILTER_DELETE_ERROR = -54001,
    FILTER_RETRIEVE_ERROR = -54000,
    REPORT_SCHEDULE_NO_VALID_REPORT = -53011,
    REPORT_SCHEDULE_NO_VALID_STATUS = -53010,
    REPORT_SCHEDULE_NO_VALID_USER = -53009,
    REPORT_SCHEDULE_NO_VALID_ROLE = -53008,
    REPORT_ID_NOT_FOUND = -53007,
    REPORT_SCHEDULE_REMOVED = -53006,
    REPORT_SCHEDULE_NO_VALID_EMAIL = -53004,
    REPORT_SCHEDULE_NO_SCHEDULE = -53003,
    REPORT_SCHEDULE_NOT_EXIST = -53002,
    REPORTSCHEDULE_DUPLICATE_ERROR = -53001,
    BUILTIN_FIELD_SAVE_ERROR = -52000,
    AUDIT_WINDOW_SAVE_CONCURRENCY_EXCEPTION = -51003,
    DUPLICATE_AUDIT_WINDOW_NAME = -51002,
    AUDIT_WINDOW_NOT_FOUND = -51001,
    AUDIT_WINDOW_SAVE_ERROR = -51000,
    NOTIFICATION_TRIGGER_EVENT_TYPE_IMMUTABLE = -50126,
    NOTIFICATION_ASAP_BEFORE_AFTER_TYPE_IMMUTABLE = -50124,
    NOTIFICATION_REQUIRE_WEB_EMAIL_CHECKBOXES = -50120,
    DELETE_SCHEDULE_JOB_WITH_EXTREME_PREJUDICE = -50100,
    CALLOUT_EXTERNAL_PAYLOAD_RESPONSE_FAILED = -50042,
    CALLOUT_HTTP_FAILED = -50041,
    CALLOUT_EVENT_INVALID = -50010,
    CALLOUT_DELETE_ERROR = -50009,
    CALLOUT_RETRIEVE_ERROR = -50008,
    CALLOUT_DUPLICATE_NAME = -50007,
    CALLBACK_EVENT_NO_ACTION = -50006,
    NOTIFICATION_DUPLICATE_NAME = -50005,
    NOTIFICATION_WEB_TEMPLATE_INVALID = -50004,
    NOTIFICATION_EMAIL_TEMPLATE_INVALID = -50003,
    NOTIFICATION_EVENT_INVALID = -50002,
    NOTIFICATION_DELETE_ERROR = -50001,
    NOTIFICATION_RETRIEVE_ERROR = -50000,
    DCF_FAILED_TO_RESTORE_VALUE = -49012,
    DCF_FAILED_TO_DELETE_VALUE = -49011,
    DCF_IN_USE = -49010,
    INVALID_DCF_SECTION = -49009,
    INVALID_DCF_DATA_TYPE = -49008,
    DCF_VALUE_NOT_IN_PICKLIST = -49007,
    DCF_VALUE_INVALID = -49006,
    MAX_CUSTOM_FORM_FIELDS = -49005,
    INVALID_DCF_TYPE = -49004,
    DCF_VALUE_MUST_BE_IN_PICKLIST = -49003,
    DCF_ERROR_RETRIEVING_DEFINITION = -49002,
    LABEL_DUPLICATE_ERROR = -49001,
    DCF_DUPLICATE_ERROR = -49000,
    DEPRECIATION_PURCHASE_COST_MISSING = -48004,
    DEPRECIATION_BEGIN_DATE_MISSING = -48003,
    DEPRECIATION_CLASS_IN_USE = -48002,
    DEPRECIATION_DUPLICATE_ERROR = -48001,
    DEPRECIATION_ERRORS = -48000,
    ASSET_TYPE_NOT_API_APPLICABLE = -47014,
    ASSET_TYPE_NOT_ACCESSIBLE = -47013,
    SITES_NOT_ACCESSIBLE = -47012,
    FUNDING_SITE_DOES_NOT_EXIST = -47011,
    FUNDING_SITE_ALREADY_EXIST = -47010,
    FUNDING_ASSET_DOES_NOT_EXIST = -47009,
    FUNDING_ASSET_ALREADY_EXIST = -47008,
    FUNDING_ASSETLOCATION_NOT_ALLOWED = -47007,
    FUNDING_ASSETSITE_FUNDED = -47005,
    FUNDING_ASSET_FUNDED = -47004,
    FUNDING_ASSET_OVER_FUNDED = -47003,
    FUNDING_RETRIEVE_ERROR = -47002,
    FUNDING_ASSET_RETRIEVE_ERROR = -47001,
    FUNDING_DUPLICATE_ERROR = -47000,
    NO_NOTES_FOUND = -46075,
    TRANSACTION_SITE_CATEGORY_RESTRICTION_APPLIED = -46074,
    TRANSACTION_MISSING_LOCATION_ID_OR_GROUP_TAG = -46070,
    TRANSACTION_INVALID_ASSET_GROUP_CONTAINER_ID = -46069,
    TRANSACTION_BATCH_FAILED = -46068,
    TRANSACTION_REJECTED = -46067,
    TRANSACTION_LOOKUP_NOT_FOUND = -46066,
    TRANSACTION_PAST_DUE_DATE = -46065,
    TRANSACTION_TOTAL_COST_OUT_OF_RANGE = -46064,
    TRANSACTION_QUANTITY_OUT_OF_RANGE = -46059,
    TRANSACTION_LOCK_DOWN_MOBILE_ASSET_AUDIT = -46058,
    TRANSACTION_LOCK_DOWN_INVENTORY_CONTROL_AUDIT = -46057,
    TRANSACTION_QUANTITY_ENTANGLED_PARTIAL_MOVES = -46056,
    TRANSACTION_INAPPROPRIATE_CHECKIN_QTY = -46055,
    TRANSACTION_QUANTITY_SPLIT_DESTINATIONS = -46054,
    TRANSACTION_INVALID_INACTIVE_LOCATION_ID = -46053,
    TRANSACTION_ADD_RECEIVE_QTY_NOT_ALLOWED = -46052,
    NO_ROLE_ACCESS_TO_CONTAINER = -46051,
    NO_ROLE_ACCESS_TO_LOCATION = -46050,
    TRACKBY_QUANTITY_MULTIPLE_LOCATION_KEYS = -46035,
    TRACKBY_QUANTITY_EXCEEDS_ONE = -46034,
    TRANSACTION_QUANTITY_MULTIPLE_LOCATION_KEYS = -46033,
    TRANSACTION_QUANTITY_EXCEEDS_ONE = -46032,
    TRANSACTION_CAPITAL_ASSET_QUANTITY_MULTIPLE_LOCATION_KEYS = -46031,
    TRANSACTION_CAPITAL_ASSET_QUANTITY_EXCEEDS_ONE = -46030,
    MULTIPLE_QUANTITIES_AMBIGUOUS_LOCATION = -46029,
    TRANSACTION_COST_NULL_OR_MISSING = -46028,
    TRANSACTION_INSUFFICIENT_COST_QUEUE_QTY = -46027,
    TRANSACTION_NO_DUE_DATE = -46026,
    TRANSACTION_APP_OPTION_TENANT_LOCK_IN_PROGRESS = -46025,
    TRANSACTION_INSUFFICIENT_CHECKOUT_QTY = -46024,
    INVALID_MODEL_DUPLICATES_FOUND = -46023,
    TRANSACTION_CHECKED_IN = -46022,
    TRANSACTION_BATCH_NUMBER_CREATION_FAILED = -46021,
    TRANSACTION_AMBIGUOUS_LOCATION_ID_OR_CONTAINER_ID = -46020,
    TRANSACTION_MISSING_LOCATION_ID_OR_CONTAINER_ID = -46019,
    TRANSACTION_COST_CALCULATION_FAILED = -46018,
    TRANSACTION_CONTAINER_IN_USE = -46017,
    TRANSACTION_INVALID_CONTAINER_ID = -46016,
    TRANSACTION_ASSET_DISPOSE_QTY_CHECKED_OUT = -46015,
    TRANSACTION_ASSET_QTY_ALREADY_CHECKED_OUT = -46014,
    TRANSACTION_MISSING_RESPONSIBLE_PARTY_ID = -46012,
    TRANSACTION_CHECKIN_MISSING_CHECKOUT = -46011,
    TRANSACTION_SITE_NOT_FOUND = -46010,
    TRANSACTION_MULTIPLE_RESPONSIBLE_PARTIES = -46009,
    TRANSACTION_INVALID_TRANS_DATE = -46008,
    TRANSACTION_ASSET_SERIAL_NUMBER_LENGTH = -46007,
    TRANSACTION_INVALID_PURCHASE_ID = -46006,
    TRANSACTION_INVALID_SUPPLIER_ID = -46005,
    TRANSACTION_INVALID_EMPLOYEE_ID = -46004,
    TRANSACTION_INVALID_CUSTOMER_ID = -46003,
    TRANSACTION_INSUFFICIENT_QTY = -46002,
    TRANSACTION_INVALID_QTY = -46001,
    TRANS_MAINT_ERROR = -46000,
    CONTRACT_INFO_NOT_PROVIDED = -45010,
    ASSETS_NOT_ACCESSIBLE = -45009,
    CONTRACT_ASSET_DOES_NOT_EXIST = -45008,
    CONTRACT_ASSET_ALREADY_EXIST = -45007,
    CONTRACT_ALREADY_DELETED = -45006,
    CONTRACT_END_DATE_IS_REQUIRED = -45005,
    CONTRACT_RECORD_NOT_FOUND = -45004,
    CONTRACT_ASSET_TYPE_ERROR = -45003,
    CONTRACT_DATE_ERROR = -45002,
    CONTRACT_IN_USE = -45001,
    CONTRACT_DUPLICATE_ERROR = -45000,
    PHONE_TYPE_DUPLICATE = -44001,
    ADDRESS_TYPE_DUPLICATE = -44000,
    DEFAULT_OVERTIME_RULES_ERROR = -43139,
    PUSH_CLOCK_SERIAL_DUPLICATE_ERROR = -43138,
    OVERTIME_RULES_NOT_CONFIGURED = -43137,
    OVERTIME_RULES_DEFAULT_NOT_CONFIGURED = -43136,
    PAYCD_NOT_CONFIGURED = -43135,
    PAYROLL_EXPORT_TYPE_NOT_CONFIGURED = -43134,
    OVERTIME_RULES_IN_USE = -43133,
    EMPLOYEE_PAY_EFFECTIVE_DATE_ALREADY_EXISTS = -43132,
    OVERTIME_RULES_DUPLICATE_ERROR = -43131,
    OVERTIME_RULES_RETRIEVE_ERROR = -43130,
    RACE_DUPLICATE_ERROR = -43129,
    RACE_RETRIEVE_ERROR = -43128,
    GENDER_DUPLICATE_ERROR = -43127,
    GENDER_RETRIEVE_ERROR = -43126,
    EMPLOYEE_CLOCK_DUPLICATE_ERROR = -43125,
    EMPLOYEE_CLOCK_RETRIEVE_ERROR = -43124,
    PUSH_CLOCK_RETRIEVE_ERROR = -43123,
    PUSH_CLOCK_IN_USE = -43122,
    PUSH_CLOCK_DUPLICATE_ERROR = -43121,
    PUSH_CLOCK_VERIFY_MODE_RETRIEVE_ERROR = -43120,
    PUSH_CLOCK_VERIFY_MODE_IN_USE = -43119,
    PUSH_CLOCK_VERIFY_MODE_DUPLICATE_ERROR = -43118,
    PUSH_CLOCK_TYPE_RETRIEVE_ERROR = -43117,
    PUSH_CLOCK_TYPE_IN_USE = -43116,
    PUSH_CLOCK_TYPE_DUPLICATE_ERROR = -43115,
    PUSH_CLOCK_PRIVILEGE_RETRIEVE_ERROR = -43114,
    PUSH_CLOCK_PRIVILEGE_IN_USE = -43113,
    PUSH_CLOCK_PRIVILEGE_DUPLICATE_ERROR = -43112,
    ABSCD_RETRIEVE_ERROR = -43111,
    ABSCD_IN_USE = -43110,
    ABSCD_DUPLICATE_ERROR = -43109,
    HOLCD_RETRIEVE_ERROR = -43108,
    HOLCD_IN_USE = -43107,
    HOLCD_DUPLICATE_ERROR = -43106,
    PAYCD_RETRIEVE_ERROR = -43105,
    PAYCD_IN_USE = -43104,
    PAYCD_DUPLICATE_ERROR = -43103,
    SCHEDULE_TEMPLATE_RETRIEVE_ERROR = -43102,
    SCHEDULE_TEMPLATE_IN_USE = -43101,
    SCHEDULE_TEMPLATE_DUPLICATE_ERROR = -43100,
    DEPARTMENT_RETRIEVE_ERROR = -43002,
    DEPARTMENT_IN_USE = -43001,
    DEPARTMENT_DUPLICATE_ERROR = -43000,
    GEOFENCE_TOO_MANY = -42017,
    EMPLOYEE_CLOCK_USER_ID_IN_USE = -42016,
    EMPLOYEE_CLOCK_USER_ID_UNIQUE = -42015,
    EMPLOYEE_CLOCK_USER_ID_EMPTY = -42014,
    EMPLOYEE_SAVE_FAILED = -42013,
    EMPLOYEE_INVITE_MESSAGE = -42012,
    EMPLOYEE_IN_CIRCULAR_LINKING = -42011,
    EMPLOYEE_IN_USE_WITH_APP_ACCESS = -42010,
    EMPLOYEE_IN_USE_IN_CLOCK = -42009,
    EMPLOYEE_IN_USE_AS_MANAGER = -42008,
    EMPLOYEE_LIMIT_REACHED = -42007,
    EMPLOYEE_IN_USE_IN_UNPROCESSED_PUNCH = -42006,
    EMPLOYEE_WAS_DELETED_ERROR = -42005,
    EMPLOYEE_IN_USE_IN_CHECKOUT = -42004,
    EMPLOYEE_IN_USE_AS_OWNER = -42003,
    EMPLOYEE_RETRIEVE_ERROR = -42002,
    EMPLOYEE_IN_USE = -42001,
    EMPLOYEE_DUPLICATE_ERROR = -42000,
    LOCATION_IN_CIRCULAR_LINKING = -41005,
    LOCATION_HANDLEDBY_TRANSACTION_TYPE_ERROR = -41004,
    LOCATION_NO_ACCESS_TO_SITE = -41003,
    LOCATION_RETRIEVE_ERROR = -41002,
    LOCATION_IN_USE = -41001,
    LOCATION_DUPLICATE_ERROR = -41000,
    SITE_IN_USE_IN_CLOCK = -40009,
    SITE_IN_USE_IN_EMPLOYEE = -40008,
    SITE_CATEGORIES_CAN_NOT_BE_RESTRICTED = -40007,
    SITE_CATEGORY_CAN_NOT_BE_RESTRICTED = -40006,
    SITE_LIMIT_REACHED = -40005,
    SITE_STANDARD_USER_SITE_ADD = -40004,
    SITE_INVALID = -40003,
    SITE_IN_USE = -40002,
    SITE_DUPLICATE_ERROR = -40000,
    MANUFACTURER_RECORD_NOT_FOUND = -39002,
    MANUFACTURER_IN_USE = -39001,
    MANUFACTURER_DUPLICATE_ERROR = -39000,
    SUPPLIER_WAS_DELETED_ERROR = -38010,
    SUPPLIER_ITEM_ASSOCIATION = -38009,
    SUPPLIER_INVALID = -38008,
    SUPPLIER_ON_ASSET_TYPE = -38007,
    SUPPLIER_ON_ASSET = -38006,
    SUPPLIER_ON_PO = -38005,
    SUPPLIER_ON_CONTRACT = -38004,
    SUPPLIER_CHECKED_OUT = -38003,
    SUPPLIER_RETRIEVE_ERROR = -38002,
    SUPPLIER_IN_USE = -38001,
    SUPPLIER_DUPLICATE_ERROR = -38000,
    CUSTOMER_HAS_ACTIVE_PICK_ORDERS = -37005,
    CUSTOMER_HAS_ACTIVE_CHECKOUTS = -37004,
    CUSTOMER_WAS_DELETED_ERROR = -37003,
    CUSTOMER_RETRIEVE_ERROR = -37002,
    CUSTOMER_IN_USE = -37001,
    CUSTOMER_DUPLICATE_ERROR = -37000,
    ARCHIVE_FAIL_INFO = -36034,
    ARCHIVE_PROCESS_ALREADY_SUBMITTED = -36031,
    ARCHIVE_CRASHED_AND_BURNED = -36030,
    ARCHIVE_DATE_INVALID = -36011,
    ARCHIVE_ORDER_TYPE_INVALID = -36010,
    NO_ACCESS_GENERAL_MSG_FOR_ASSIGNEE = -36009,
    NO_ACCESS_TO_ASSET_TYPE_FOR_ASSIGNEE = -36008,
    NO_ACCESS_TO_SITE_FOR_ASSIGNEE = -36007,
    NOT_ALLOWED_EDIT_MSG = -36006,
    NO_ACCESS_GENERAL_MSG = -36005,
    NO_ACCESS_TO_ASSET_TYPE = -36004,
    NO_ACCESS_TO_SITE = -36003,
    SECURITY_NOT_INIT_PROPERLY = -36002,
    SECURITY_USER_INIT_ERROR = -36001,
    SECURITY_USER_ID_BLANK = -36000,
    ROLE_RETRIEVE_ERROR = -35001,
    ROLE_DUPLICATE_ERROR = -35000,
    USER_LOGIN_FORMAT0_API_TOKEN_MINI_CLAIM_FAILED = -34023,
    USER_LOGIN_FORMAT0_IS_NOT_API_USER = -34022,
    USER_WAS_LOGGED_OUT = -34021,
    USER_WAS_DISABLED_DELETED_ERROR = -34020,
    USER_DELETE_ERROR = -34019,
    USER_UNKNOW_APPLICATION_ERROR = -34018,
    USER_CLIENT_ID_NOT_SPECIFIED_ERROR = -34017,
    USER_API_NOT_RESPONDING_ERROR = -34016,
    USER_URL_NOT_SPECIFIED_ERROR = -34014,
    USER_NOT_ACTIVE_ERROR = -34013,
    USER_EXCESS_ERROR = -34012,
    USERID_STRING_IS_NOT_GUID = -34011,
    ONE_APPLICATION_MANAGER_SHOULD_EXIST = -34010,
    USER_NOT_AN_APPLICATION_MANAGER = -34009,
    USER_LICENSE_EXCEED_ERROR = -34008,
    USER_MANAGER_INVALID = -34007,
    USER_DEPARTMENT_INVALID = -34006,
    USER_ROLE_INVALID = -34005,
    USER_LOGON_MUST_BE_UNIQUE = -34004,
    USER_EMAIL_MUST_BE_UNIQUE = -34003,
    USER_RETRIEVE_ERROR = -34002,
    USER_SAVE_ERROR = -34001,
    USER_REGISTRATION_INFO_INVALID = -34000,
    MISSING_FILENAME = -33002,
    ATTACHMENT_FAIL = -33001,
    INVALID_ATTACHMENT_TYPE = -33000,
    CUSTOM_VIEW_ERROR_ASSIGNING_SYSTEM_VIEWS = -32007,
    CUSTOM_VIEW_DELETE_ERROR = -32006,
    CUSTOM_VIEW_ONLY_ADMIN_CAN_MODIFY_GLOBAL = -32005,
    CUSTOM_VIEW_CANNOT_MODIFY_SYSTEM = -32004,
    CUSTOM_VIEW_DUPLICATE_NAME = -32003,
    CUSTOM_VIEW_SAVE_ERROR = -32002,
    CUSTOM_VIEW_EXISTING_NOT_FOUND = -32001,
    CUSTOM_VIEW_RETRIEVE_ERROR = -32000,
    QUALIFICATION_NONE = -31011,
    QUALIFICATION_SPECIFIC_ASSET_TYPE = -31010,
    ASSET_TYPE_LAST_DCF = -31009,
    ASSET_TYPE_NOT_GROUP = -31008,
    ASSET_TYPE_INVALID_CLASS_ID = -31007,
    ASSET_TYPE_NOT_ACTIVE = -31006,
    ASSET_TYPE_ACTIVE_ASSETS = -31005,
    ASSET_TYPE_MASS_UPDATE_NO_INVENTORY_TYPE = -31004,
    ASSET_TYPE_NOT_EXIST = -31003,
    CLASS_CHANGE_ON_USED_TYPE = -31002,
    ASSET_TYPE_RETRIEVE_ERROR = -31001,
    ASSET_TYPE_DUPLICATE_ERROR = -31000,
    PASSWORD_EXPIRATION_DATE_TOO_SMALL = -30060,
    ASSET_GROUP_INAPPROPRIATE_TRANSACT_AS_WHOLE = -30056,
    ASSET_GROUP_REQUIRES_TRANSACT_AS_WHOLE = -30054,
    ASSET_GROUP_SEALED_INDIRECTLY_DESTINATION = -30053,
    ASSET_GROUP_SEALED_INDIRECTLY_SOURCE = -30052,
    ASSET_GROUP_SEALED_DIRECTLY_DESTINATION = -30051,
    ASSET_GROUP_SEALED_DIRECTLY_SOURCE = -30050,
    ASSET_GROUP_NESTING_TOO_DEEP = -30047,
    GROUP_RETRIEVE_ERROR = -30035,
    ASSET_GROUP_NOT_EMPTY = -30034,
    ASSET_IN_USE = -30033,
    ASSET_DEPRECIATION_BEGIN_DATE_BEFORE_PURCHASE_DATE = -30032,
    ASSET_LIMIT_REACHED = -30031,
    ASSET_NOT_EXIST = -30030,
    ASSET_EMPLOYEE_INVALID = -30029,
    ADJUST_REASON_CODE_INVALID = -30028,
    ASSET_DUPLICATE_LOCATION = -30027,
    ASSET_SALVAGE_GREATER_THAN_PURCHASE = -30026,
    ASSET_INV_CHECKED_OUT_MOVE = -30025,
    ASSET_DEPRECIATION_NO_PURCHASE_COST = -30024,
    ASSET_DEPRECIATION_ONLY_ON_FIXED = -30023,
    ASSET_INV_CHECKED_OUT = -30022,
    ASSET_RECOVER_SELECT_ONE = -30021,
    RECOVER_REASON_CODE_INVALID = -30020,
    DISPOSE_REASON_CODE_INVALID = -30019,
    ASSET_SUPPLIER_INVALID = -30018,
    ASSET_NOT_FOUND = -30017,
    ASSET_LOCATION_INVALID = -30016,
    ASSET_DEPARTMENT_INVALID = -30015,
    ASSET_DISPOSE_QUANTITY_INVALID = -30014,
    ASSET_DISPOSE_CONDITION_INVALID = -30013,
    ASSET_INV_NOT_ENOUGH_QTY_AVAILABLE = -30012,
    ASSET_INVENTORY_CONDITION_INVALID = -30011,
    PURCHASE_DETAIL_RETRIEVE_ERROR = -30010,
    ASSET_CONDITION_INVALID = -30009,
    ASSET_CANNOT_DEPRECIATE_WITHOUT_TYPE = -30008,
    ASSET_ERROR_GENERATING_ASSET_TAG = -30007,
    ASSET_INV_ONLY_ONE_ASSET_PER_INV_TYPE = -30006,
    ASSET_MANUFACTURER_INVALID = -30005,
    ASSET_INV_SERIAL_NO_MUST_BE_BLANK = -30004,
    ASSET_DEPRECIATION_NO_BEGIN_DATE = -30003,
    ASSET_DUPLICATE_SERIAL_NUMBER = -30002,
    ASSET_DUPLICATE_TAG = -30001,
    ASSET_RETRIEVE_ERROR = -30000,
    REPORT_RESET_FAILURE = -21126,
    SPECIFIED_DATE_MUST_BE_BEFORE_USER_DATE_FORMAT0 = -20710,
    REQUEST_SEQUENCE_END_VALUE = -20699,
    REQUEST_TOO_SOON_TRY_AGAIN_X_DAYS_FORMAT0 = -20609,
    REQUEST_TOO_SOON_TRY_AGAIN_X_HOURS_FORMAT0 = -20608,
    REQUEST_TOO_SOON_TRY_AGAIN_X_MINUTES_FORMAT0 = -20607,
    REQUEST_TOO_SOON_TRY_AGAIN_X_SECONDS_FORMAT0 = -20606,
    REQUEST_SEQUENCE_MISSING_PARAMS = -20605,
    REQUEST_SEQUENCE_FAILED_VALIDATION = -20604,
    REQUEST_SEQUENCE_MISMATCH_EXPECTED = -20603,
    REQUEST_SEQUENCE_OUT_OF_ORDER = -20602,
    SEARCH_CRITERIA_TOO_GENERAL = -20511,
    SEARCH_CRITERIA_RESULT_TOO_MANY_MATCHES = -20510,
    INVALID_MODEL = -20501,
    CALL_INIALIZATION_ERROR = -20500,
    READONLY_FIELD_CHANGED = -20120,
    SCHEMA_INVALID = -20119,
    INVALID_FORMAT_OF_NUMBER = -20118,
    LICENSE_NOT_EXPIRED = -20117,
    DELETE_PROTECTED_ROLE = -20117,
    INVALID_ARGUMENT = -20116,
    VALUE_MUST_NUMERIC = -20115,
    DELETE_ISSUE = -20114,
    INVALID_PSEUDO_IDENT_CHARACTERS = -20113,
    EMAIL_FORMAT_INVALID = -20112,
    VALUE_TOO_LARGE = -20111,
    VALUE_TOO_SMALL = -20110,
    LENGTH_TOO_SHORT = -20109,
    CONCURRENCY_ISSUE = -20108,
    ERROR_PREPARING_CONTROLLER_METHOD = -20107,
    INVALID_MODEL_STATE = -20106,
    RECORD_ID_NOT_ACTIVE = -20105,
    RECORD_ID_NOT_FOUND = -20104,
    INVALID_LANGUAGE_SPECIFIED = -20103,
    INVALID_FORM_SPECIFIED = -20102,
    LENGTH_TOO_LONG = -20101,
    REQUIRED_FIELD_MISSING = -20100,
    EXCEPTION_LOCK_ERROR = -20020,
    EXCEPTION_TRANS_ERROR = -20010,
    EXCEPTION_READ_ONLY_ERROR = -20001,
    EXCEPTION_ERROR = -20000,
    LEGACY_EXCEPTION_ERROR = -99,
    LEGACY_ASSET_EXISTS = -4,
    LEGACY_PICTURE_NOT_FOUND = -2,
    FAIL = -1,
}

export enum WaspHttpStatusCodes {
    OK = 200,
    NoContent = 204,
    Warning = 207,
    MultipleChoices = 300,
    BusinessLogicError = 300,
    BadRequest = 400,
    Forbidden = 403,
    NotFound = 404,
    GoneNoLongerAvailable = 410,
    UnprocessableEntity = 422,
    UpgradeRequired = 426,
    InternalServerError = 500,
}

export class WaspResultOfResults implements IWaspResultOfResults {
    /** Type specific result that always depends on the function called. */
    data?: Results | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfResults) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? Results.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfResults {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfResults();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfResults {
    /** Type specific result that always depends on the function called. */
    data?: Results | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class Results implements IResults {
    /** It contains detailed results. For create and update APIs, this list has exactly one result per input line. */
    resultList?: Result[] | undefined;
    /** It is the number of records that were handled successfully.
NP:  Eventually, I think this could be a computed property that runs a Func&lt;int&gt; that tallies its own results
, e.g.:  ResultsList.Count(x=&gt; x...) and our constructor takes the actual computation Function
as an optional parameter. */
    successfullResults!: number;
    /** It is the total number of records processed. */
    totalResults!: number;
    errorCount!: number;

    constructor(data?: IResults) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["ResultList"])) {
                this.resultList = [] as any;
                for (let item of _data["ResultList"])
                    this.resultList!.push(Result.fromJS(item));
            }
            this.successfullResults = _data["SuccessfullResults"];
            this.totalResults = _data["TotalResults"];
            this.errorCount = _data["ErrorCount"];
        }
    }

    static fromJS(data: any): Results {
        data = typeof data === 'object' ? data : {};
        let result = new Results();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.resultList)) {
            data["ResultList"] = [];
            for (let item of this.resultList)
                data["ResultList"].push(item.toJSON());
        }
        data["SuccessfullResults"] = this.successfullResults;
        data["TotalResults"] = this.totalResults;
        data["ErrorCount"] = this.errorCount;
        return data; 
    }
}

export interface IResults {
    /** It contains detailed results. For create and update APIs, this list has exactly one result per input line. */
    resultList?: Result[] | undefined;
    /** It is the number of records that were handled successfully.
NP:  Eventually, I think this could be a computed property that runs a Func&lt;int&gt; that tallies its own results
, e.g.:  ResultsList.Count(x=&gt; x...) and our constructor takes the actual computation Function
as an optional parameter. */
    successfullResults: number;
    /** It is the total number of records processed. */
    totalResults: number;
    errorCount: number;
}

/** Used to return results of SDK operations */
export class Result extends WtResult implements IResult {

    constructor(data?: IResult) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): Result {
        data = typeof data === 'object' ? data : {};
        let result = new Result();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

/** Used to return results of SDK operations */
export interface IResult extends IWtResult {
}

export class AddressInfo implements IAddressInfo {
    /** The first line of the address. */
    addressLine1?: string | undefined;
    /** The second line of the address. */
    addressLine2?: string | undefined;
    /** The third line of the address. */
    addressLine3?: string | undefined;
    /** The fourth line of the address. */
    addressLine4?: string | undefined;
    /** The city name of the address. */
    addressCity?: string | undefined;
    /** The state or province name of the address. */
    addressStateProvince?: string | undefined;
    /** The country name of the address. */
    addressCountry?: string | undefined;
    /** The zip/postal code. */
    addressPostalCode?: string | undefined;
    /** The type of address, these are form unique. Meaning that a customer address type does not apply to employees. */
    addressTypeName?: string | undefined;
    /** The phone number at this address. This is used only for Orders. */
    contactPhone?: string | undefined;
    /** The email address. This is used only for Orders. */
    contactEmail?: string | undefined;

    constructor(data?: IAddressInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.addressLine1 = _data["AddressLine1"];
            this.addressLine2 = _data["AddressLine2"];
            this.addressLine3 = _data["AddressLine3"];
            this.addressLine4 = _data["AddressLine4"];
            this.addressCity = _data["AddressCity"];
            this.addressStateProvince = _data["AddressStateProvince"];
            this.addressCountry = _data["AddressCountry"];
            this.addressPostalCode = _data["AddressPostalCode"];
            this.addressTypeName = _data["AddressTypeName"];
            this.contactPhone = _data["ContactPhone"];
            this.contactEmail = _data["ContactEmail"];
        }
    }

    static fromJS(data: any): AddressInfo {
        data = typeof data === 'object' ? data : {};
        let result = new AddressInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AddressLine1"] = this.addressLine1;
        data["AddressLine2"] = this.addressLine2;
        data["AddressLine3"] = this.addressLine3;
        data["AddressLine4"] = this.addressLine4;
        data["AddressCity"] = this.addressCity;
        data["AddressStateProvince"] = this.addressStateProvince;
        data["AddressCountry"] = this.addressCountry;
        data["AddressPostalCode"] = this.addressPostalCode;
        data["AddressTypeName"] = this.addressTypeName;
        data["ContactPhone"] = this.contactPhone;
        data["ContactEmail"] = this.contactEmail;
        return data; 
    }
}

export interface IAddressInfo {
    /** The first line of the address. */
    addressLine1?: string | undefined;
    /** The second line of the address. */
    addressLine2?: string | undefined;
    /** The third line of the address. */
    addressLine3?: string | undefined;
    /** The fourth line of the address. */
    addressLine4?: string | undefined;
    /** The city name of the address. */
    addressCity?: string | undefined;
    /** The state or province name of the address. */
    addressStateProvince?: string | undefined;
    /** The country name of the address. */
    addressCountry?: string | undefined;
    /** The zip/postal code. */
    addressPostalCode?: string | undefined;
    /** The type of address, these are form unique. Meaning that a customer address type does not apply to employees. */
    addressTypeName?: string | undefined;
    /** The phone number at this address. This is used only for Orders. */
    contactPhone?: string | undefined;
    /** The email address. This is used only for Orders. */
    contactEmail?: string | undefined;
}

export class SaveAddressInfoRequest extends AddressInfo implements ISaveAddressInfoRequest {
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    formId!: WtFormId;
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    primaryNumber?: string | undefined;

    constructor(data?: ISaveAddressInfoRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.formId = _data["FormId"];
            this.primaryNumber = _data["PrimaryNumber"];
        }
    }

    static fromJS(data: any): SaveAddressInfoRequest {
        data = typeof data === 'object' ? data : {};
        let result = new SaveAddressInfoRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["FormId"] = this.formId;
        data["PrimaryNumber"] = this.primaryNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface ISaveAddressInfoRequest extends IAddressInfo {
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    formId: WtFormId;
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    primaryNumber?: string | undefined;
}

export class SaveCustomerAddressRequest extends SaveAddressInfoRequest implements ISaveCustomerAddressRequest {
    /** The Customer Number associated with the address. */
    customerNo?: string | undefined;
    customerNumber?: string | undefined;

    constructor(data?: ISaveCustomerAddressRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.customerNo = _data["CustomerNo"];
            this.customerNumber = _data["CustomerNumber"];
        }
    }

    static fromJS(data: any): SaveCustomerAddressRequest {
        data = typeof data === 'object' ? data : {};
        let result = new SaveCustomerAddressRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["CustomerNo"] = this.customerNo;
        data["CustomerNumber"] = this.customerNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface ISaveCustomerAddressRequest extends ISaveAddressInfoRequest {
    /** The Customer Number associated with the address. */
    customerNo?: string | undefined;
    customerNumber?: string | undefined;
}

export enum WtFormId {
    Unknown = 0,
    Common = 100,
    CompanyInfo = 101,
    Customer = 104,
    Manufacturer = 105,
    Site = 107,
    Location = 108,
    Supplier = 109,
    Vendor = 109,
    Category = 110,
    Inventory = 111,
    Employee = 112,
    User = 113,
    CustomView = 114,
    Attachment = 115,
    Role = 116,
    Contract = 117,
    Department = 118,
    FormCustomization = 119,
    Condition = 120,
    DisposalReason = 121,
    RecoverReason = 122,
    WorkOrderType = 123,
    ResetData = 124,
    ArchivedTransactions = 130,
    ActivityLog = 131,
    FixedAsset = 190,
    Asset = 200,
    AssetType = 201,
    AssetGroup = 202,
    AssetFunding = 203,
    AssetDCF = 204,
    AssetNotification = 205,
    OpenSealedGroups = 206,
    DepreciationClass = 209,
    InventoriedAsset = 210,
    InventoriedAssetType = 211,
    Qualification = 212,
    AssetTransaction = 250,
    AssetAdd = 251,
    AssetDispose = 252,
    AssetMove = 253,
    AssetCheckIn = 254,
    AssetCheckOut = 255,
    AssetAudit = 256,
    AssetTransfer = 257,
    AssetMaintenance = 258,
    AssetDepreciation = 259,
    ApproveReservation = 260,
    CreateReservation = 261,
    AssetRecover = 262,
    AssetPurchaseDetail = 270,
    AssetConversion = 271,
    AssetMassUpdate = 272,
    AssetSetting = 273,
    AuditWindow = 274,
    AuditReconciliation = 275,
    MobileFilter = 276,
    MobileError = 277,
    Import = 278,
    TransHistory = 279,
    Task = 280,
    TaskType = 281,
    MaintenanceManagement = 282,
    AssetFundingAssociation = 283,
    AssetContractAssociation = 284,
    UpdateAssetTags = 285,
    EditReadOnly = 299,
    WebLogin = 300,
    Reports = 306,
    AppOptions = 307,
    ReportSchedule = 308,
    Callouts = 310,
    ChangeLog = 312,
    MobileLogin = 400,
    MobileLabelNamesConfig = 410,
    ArchiveOrder = 420,
    Item = 1100,
    InventoryItem = 1101,
    NonInventoryItem = 1102,
    KitItem = 1103,
    AssemblyItem = 1104,
    ContainerItem = 1105,
    ServiceItem = 1106,
    ItemPriceLevel = 1130,
    ItemSupplier = 1131,
    PricingTier = 1132,
    ItemZone = 1133,
    AdvanceShippingNotice = 1140,
    PurchaseOrder = 1160,
    PickOrder = 1161,
    Receive = 1162,
    ShippingProvider = 1163,
    UniversalOrder = 1164,
    PurchaseOrderTotals = 1165,
    Pick = 1166,
    PickOrderPriceTotals = 1167,
    MoveOrder = 1168,
    Build = 1170,
    Disassemble = 1171,
    ViewBuildOrder = 1172,
    AutoBuild = 1173,
    ICInventory = 1249,
    InventoryTransactions = 1250,
    InventoryAdd = 1251,
    InventoryRemove = 1252,
    InventoryMove = 1253,
    InventoryCheckIn = 1254,
    InventoryCheckOut = 1255,
    InventoryAudit = 1256,
    InventoryAdjust = 1257,
    UnitOfMeasure = 1258,
    GenerateLicenesePlateNumber = 1259,
    BillOfMaterial = 1260,
    WorkOrder = 1261,
    WorkOrderHistory = 1262,
    AssetWorkOrderLine = 1263,
    AssetLineWorkOrder = 1265,
    PerformWorkForWorkOrder = 1266,
    OrderStatusReasonCodeForWorkOrder = 1267,
    AddTotals = 1268,
    PayMethod = 1300,
    InventoryMobile = 1400,
    AdjustReasonCode = 1402,
    OrderSubtype = 1405,
    MobileGS1BarcodeConfig = 1500,
    MobileRFIDConfig = 1501,
    ScheduleTemplate = 1600,
    PayrollCode = 1601,
    AbsenceCode = 1602,
    HolidayCode = 1603,
    PayrollSettings = 1604,
    PushClockPrivilege = 1605,
    PushClockType = 1606,
    PushClockVerifyMode = 1607,
    PushClock = 1608,
    Gender = 1609,
    Race = 1610,
    OvertimeRules = 1611,
    EmpViewDetachedEmployee = 1612,
    EmpViewTreeFromEmployee = 1613,
    EmpApplicationAccess = 1614,
    EmpDetailsAndContact = 1615,
    EmpSsnSinNinOthers = 1616,
    EmpSsnSinNinSelf = 1617,
    EmpDemographicsOthers = 1618,
    EmpDemographicsSelf = 1619,
    EmpClockAssignments = 1620,
    EmpPersonal = 1621,
    EmpTimecardSettings = 1622,
    EmpNotes = 1623,
    EmpPayRates = 1624,
    EmpAttachments = 1625,
    Timecard = 1626,
    TimeMobile = 1627,
    TimecardOthers = 1628,
    TimecardPunchesSelf = 1629,
    TimecardPunchesOthers = 1630,
    WebPunch = 1631,
    TimecardAbsence = 1632,
    EmpViewChangeHistory = 1633,
    EmpArchiveChangeHistory = 1634,
    EmpGeofence = 1635,
    MobileMain = 10200,
    MobileNew = 10201,
    MobileEdit = 10202,
    MobileAudit = 10203,
    MobileCheckin = 10204,
    MobileCheckout = 10205,
    MobileDispose = 10206,
    MobileMove = 10207,
    MobileMaintenance = 10208,
    MobileAssetLookup = 10209,
    MobileFundingAudit = 10210,
    MobileLabelTemplates = 10211,
    MobileNewInventoryAsset = 10212,
    MobileReceive = 10213,
    MobilePick = 10214,
    MobileDetails = 10215,
    MobileAdjust = 10216,
    MobileAddContainerQuantity = 10217,
    MobileAssignContainerTrackby = 10218,
    MobileAddInventory = 10251,
    MobileRemoveInventory = 10252,
    MobileBuild = 10253,
    MobileAssetConversion = 10271,
    MobileWorkOrderAsset = 10272,
    MobileWorkOrderTask = 10273,
    TransactionHistoryGridConfiguration = 10280,
    ThirdPartyEcommerceApi2CartIntegration = 10290,
    ThirdPartyShippingProviderApi2CartIntegration = 10291,
    InternalHighOrderMultiplier = 100000,
    ItemSite = 110000107,
    ItemLocation = 110000108,
}

export class SaveVendorAddressRequest extends SaveAddressInfoRequest implements ISaveVendorAddressRequest {
    /** The Vendor Number associated with the address. */
    vendorNumber?: string | undefined;

    constructor(data?: ISaveVendorAddressRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.vendorNumber = _data["VendorNumber"];
        }
    }

    static fromJS(data: any): SaveVendorAddressRequest {
        data = typeof data === 'object' ? data : {};
        let result = new SaveVendorAddressRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["VendorNumber"] = this.vendorNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface ISaveVendorAddressRequest extends ISaveAddressInfoRequest {
    /** The Vendor Number associated with the address. */
    vendorNumber?: string | undefined;
}

export class WaspResultOfListOfAttachmentModel implements IWaspResultOfListOfAttachmentModel {
    /** Type specific result that always depends on the function called. */
    data?: AttachmentModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfAttachmentModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(AttachmentModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfAttachmentModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfAttachmentModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfAttachmentModel {
    /** Type specific result that always depends on the function called. */
    data?: AttachmentModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** This model can be used to return attachment information - without actually returing the bulk of the data (or a thumbnail of the data) */
export class AttachmentMetadata implements IAttachmentMetadata {
    attachmentId!: number;
    formId!: number;
    associationId!: number;
    attachmentFileName?: string | undefined;
    attachmentDataType?: string | undefined;
    attachmentGuid?: string | undefined;
    attachmentDataSize?: number | undefined;
    attachmentUploadedDate?: Date | undefined;
    attachmentUploadedBy?: string | undefined;
    userName?: string | undefined;
    attachmentUriPath?: string | undefined;
    attachmentIsDefault?: boolean | undefined;
    attachmentIsReadOnly!: boolean;
    hasAttachment!: boolean;
    attachmentMobileDownload!: boolean;
    applicationId!: number;

    constructor(data?: IAttachmentMetadata) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.attachmentId = _data["AttachmentId"];
            this.formId = _data["FormId"];
            this.associationId = _data["AssociationId"];
            this.attachmentFileName = _data["AttachmentFileName"];
            this.attachmentDataType = _data["AttachmentDataType"];
            this.attachmentGuid = _data["AttachmentGuid"];
            this.attachmentDataSize = _data["AttachmentDataSize"];
            this.attachmentUploadedDate = _data["AttachmentUploadedDate"] ? new Date(_data["AttachmentUploadedDate"].toString()) : <any>undefined;
            this.attachmentUploadedBy = _data["AttachmentUploadedBy"];
            this.userName = _data["UserName"];
            this.attachmentUriPath = _data["AttachmentUriPath"];
            this.attachmentIsDefault = _data["AttachmentIsDefault"];
            this.attachmentIsReadOnly = _data["AttachmentIsReadOnly"];
            this.hasAttachment = _data["HasAttachment"];
            this.attachmentMobileDownload = _data["AttachmentMobileDownload"];
            this.applicationId = _data["ApplicationId"];
        }
    }

    static fromJS(data: any): AttachmentMetadata {
        data = typeof data === 'object' ? data : {};
        let result = new AttachmentMetadata();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AttachmentId"] = this.attachmentId;
        data["FormId"] = this.formId;
        data["AssociationId"] = this.associationId;
        data["AttachmentFileName"] = this.attachmentFileName;
        data["AttachmentDataType"] = this.attachmentDataType;
        data["AttachmentGuid"] = this.attachmentGuid;
        data["AttachmentDataSize"] = this.attachmentDataSize;
        data["AttachmentUploadedDate"] = this.attachmentUploadedDate ? this.attachmentUploadedDate.toISOString() : <any>undefined;
        data["AttachmentUploadedBy"] = this.attachmentUploadedBy;
        data["UserName"] = this.userName;
        data["AttachmentUriPath"] = this.attachmentUriPath;
        data["AttachmentIsDefault"] = this.attachmentIsDefault;
        data["AttachmentIsReadOnly"] = this.attachmentIsReadOnly;
        data["HasAttachment"] = this.hasAttachment;
        data["AttachmentMobileDownload"] = this.attachmentMobileDownload;
        data["ApplicationId"] = this.applicationId;
        return data; 
    }
}

/** This model can be used to return attachment information - without actually returing the bulk of the data (or a thumbnail of the data) */
export interface IAttachmentMetadata {
    attachmentId: number;
    formId: number;
    associationId: number;
    attachmentFileName?: string | undefined;
    attachmentDataType?: string | undefined;
    attachmentGuid?: string | undefined;
    attachmentDataSize?: number | undefined;
    attachmentUploadedDate?: Date | undefined;
    attachmentUploadedBy?: string | undefined;
    userName?: string | undefined;
    attachmentUriPath?: string | undefined;
    attachmentIsDefault?: boolean | undefined;
    attachmentIsReadOnly: boolean;
    hasAttachment: boolean;
    attachmentMobileDownload: boolean;
    applicationId: number;
}

/** This model can be used to return attachment information - It also returns the bulk of the data (possibly just a thumbnail of an image) */
export class AttachmentModel extends AttachmentMetadata implements IAttachmentModel {
    attachmentData?: string | undefined;

    constructor(data?: IAttachmentModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.attachmentData = _data["AttachmentData"];
        }
    }

    static fromJS(data: any): AttachmentModel {
        data = typeof data === 'object' ? data : {};
        let result = new AttachmentModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AttachmentData"] = this.attachmentData;
        super.toJSON(data);
        return data; 
    }
}

/** This model can be used to return attachment information - It also returns the bulk of the data (possibly just a thumbnail of an image) */
export interface IAttachmentModel extends IAttachmentMetadata {
    attachmentData?: string | undefined;
}

export class AttachmentsUploadAssociatedModel implements IAttachmentsUploadAssociatedModel {
    attachmentsList?: AttachmentUploadAttributes[] | undefined;
    /** WtFormId.Contract- WtFormId.AssetFunding- WtFormId.Customer- WtFormId.Employee- WtFormId.AssetType- WtFormId.Asset 
WtFormId.InventoryItem - WtFormId.NonInventoryItem - WtFormId.KitItem - WtFormId.AssemblyItem - WtFormId.ServiceItem */
    attachmentFormType!: WtFormId;
    /** A list of objects to associate the attachments with. For example, a list of Asset Tags or Customer Numbers
User must have permission to the form and Role Site and Asset Type restrictions are enforced where necessary */
    associatedObjectList?: string[] | undefined;

    constructor(data?: IAttachmentsUploadAssociatedModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["AttachmentsList"])) {
                this.attachmentsList = [] as any;
                for (let item of _data["AttachmentsList"])
                    this.attachmentsList!.push(AttachmentUploadAttributes.fromJS(item));
            }
            this.attachmentFormType = _data["AttachmentFormType"];
            if (Array.isArray(_data["AssociatedObjectList"])) {
                this.associatedObjectList = [] as any;
                for (let item of _data["AssociatedObjectList"])
                    this.associatedObjectList!.push(item);
            }
        }
    }

    static fromJS(data: any): AttachmentsUploadAssociatedModel {
        data = typeof data === 'object' ? data : {};
        let result = new AttachmentsUploadAssociatedModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.attachmentsList)) {
            data["AttachmentsList"] = [];
            for (let item of this.attachmentsList)
                data["AttachmentsList"].push(item.toJSON());
        }
        data["AttachmentFormType"] = this.attachmentFormType;
        if (Array.isArray(this.associatedObjectList)) {
            data["AssociatedObjectList"] = [];
            for (let item of this.associatedObjectList)
                data["AssociatedObjectList"].push(item);
        }
        return data; 
    }
}

export interface IAttachmentsUploadAssociatedModel {
    attachmentsList?: AttachmentUploadAttributes[] | undefined;
    /** WtFormId.Contract- WtFormId.AssetFunding- WtFormId.Customer- WtFormId.Employee- WtFormId.AssetType- WtFormId.Asset 
WtFormId.InventoryItem - WtFormId.NonInventoryItem - WtFormId.KitItem - WtFormId.AssemblyItem - WtFormId.ServiceItem */
    attachmentFormType: WtFormId;
    /** A list of objects to associate the attachments with. For example, a list of Asset Tags or Customer Numbers
User must have permission to the form and Role Site and Asset Type restrictions are enforced where necessary */
    associatedObjectList?: string[] | undefined;
}

export class AttachmentUploadAttributes implements IAttachmentUploadAttributes {
    /** The attachment as a byte array */
    attachmentFileByteArray?: string | undefined;
    /** Specifies the type of file being uploaded. 0 - Unknown, 1 - Text, 2 - Image, 3 - Signature */
    attachmentType!: UploadFileType;
    /** The file name of the attachment */
    attachmentFileName?: string | undefined;
    /** An indicator of whether or not to set this attachment as the default */
    isDefaultAttachment!: boolean;

    constructor(data?: IAttachmentUploadAttributes) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.attachmentFileByteArray = _data["AttachmentFileByteArray"];
            this.attachmentType = _data["AttachmentType"];
            this.attachmentFileName = _data["AttachmentFileName"];
            this.isDefaultAttachment = _data["IsDefaultAttachment"];
        }
    }

    static fromJS(data: any): AttachmentUploadAttributes {
        data = typeof data === 'object' ? data : {};
        let result = new AttachmentUploadAttributes();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AttachmentFileByteArray"] = this.attachmentFileByteArray;
        data["AttachmentType"] = this.attachmentType;
        data["AttachmentFileName"] = this.attachmentFileName;
        data["IsDefaultAttachment"] = this.isDefaultAttachment;
        return data; 
    }
}

export interface IAttachmentUploadAttributes {
    /** The attachment as a byte array */
    attachmentFileByteArray?: string | undefined;
    /** Specifies the type of file being uploaded. 0 - Unknown, 1 - Text, 2 - Image, 3 - Signature */
    attachmentType: UploadFileType;
    /** The file name of the attachment */
    attachmentFileName?: string | undefined;
    /** An indicator of whether or not to set this attachment as the default */
    isDefaultAttachment: boolean;
}

export enum UploadFileType {
    Unknown = 0,
    TextFile = 1,
    ImageFile = 2,
    SignatureFile = 3,
}

export class WaspResultOfListOfWaspResultOfListOfAttachmentModel implements IWaspResultOfListOfWaspResultOfListOfAttachmentModel {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfListOfAttachmentModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfListOfAttachmentModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfListOfAttachmentModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfListOfAttachmentModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfListOfAttachmentModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfListOfAttachmentModel {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfListOfAttachmentModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfAttachmentMetadata implements IWaspResultOfListOfAttachmentMetadata {
    /** Type specific result that always depends on the function called. */
    data?: AttachmentMetadata[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfAttachmentMetadata) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(AttachmentMetadata.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfAttachmentMetadata {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfAttachmentMetadata();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfAttachmentMetadata {
    /** Type specific result that always depends on the function called. */
    data?: AttachmentMetadata[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class AttachmentsSearchByAssociatedTagModel implements IAttachmentsSearchByAssociatedTagModel {
    /** The primary identifier of the object you want to get the attachments for */
    associatedTag?: string | undefined;
    /** The form associated with the associated tag you want attachments for */
    formName?: string | undefined;

    constructor(data?: IAttachmentsSearchByAssociatedTagModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.associatedTag = _data["AssociatedTag"];
            this.formName = _data["FormName"];
        }
    }

    static fromJS(data: any): AttachmentsSearchByAssociatedTagModel {
        data = typeof data === 'object' ? data : {};
        let result = new AttachmentsSearchByAssociatedTagModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AssociatedTag"] = this.associatedTag;
        data["FormName"] = this.formName;
        return data; 
    }
}

export interface IAttachmentsSearchByAssociatedTagModel {
    /** The primary identifier of the object you want to get the attachments for */
    associatedTag?: string | undefined;
    /** The form associated with the associated tag you want attachments for */
    formName?: string | undefined;
}

export class WaspResultOfDictionaryOfStringAndListOfAttachmentModel implements IWaspResultOfDictionaryOfStringAndListOfAttachmentModel {
    /** Type specific result that always depends on the function called. */
    data?: { [key: string]: AttachmentModel[]; } | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfDictionaryOfStringAndListOfAttachmentModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (_data["Data"]) {
                this.data = {} as any;
                for (let key in _data["Data"]) {
                    if (_data["Data"].hasOwnProperty(key))
                        this.data![key] = _data["Data"][key] ? _data["Data"][key].map((i: any) => AttachmentModel.fromJS(i)) : [];
                }
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfDictionaryOfStringAndListOfAttachmentModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfDictionaryOfStringAndListOfAttachmentModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (this.data) {
            data["Data"] = {};
            for (let key in this.data) {
                if (this.data.hasOwnProperty(key))
                    data["Data"][key] = this.data[key];
            }
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfDictionaryOfStringAndListOfAttachmentModel {
    /** Type specific result that always depends on the function called. */
    data?: { [key: string]: AttachmentModel[]; } | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class AttachmentsSearchByAssociatedTagListModel implements IAttachmentsSearchByAssociatedTagListModel {
    associatedTags?: string[] | undefined;
    formName?: string | undefined;

    constructor(data?: IAttachmentsSearchByAssociatedTagListModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["AssociatedTags"])) {
                this.associatedTags = [] as any;
                for (let item of _data["AssociatedTags"])
                    this.associatedTags!.push(item);
            }
            this.formName = _data["FormName"];
        }
    }

    static fromJS(data: any): AttachmentsSearchByAssociatedTagListModel {
        data = typeof data === 'object' ? data : {};
        let result = new AttachmentsSearchByAssociatedTagListModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.associatedTags)) {
            data["AssociatedTags"] = [];
            for (let item of this.associatedTags)
                data["AssociatedTags"].push(item);
        }
        data["FormName"] = this.formName;
        return data; 
    }
}

export interface IAttachmentsSearchByAssociatedTagListModel {
    associatedTags?: string[] | undefined;
    formName?: string | undefined;
}

export class BulkSaveRequestOfCustomerModelInfo implements IBulkSaveRequestOfCustomerModelInfo {
    /** By default this is a null or empty string array.
However, if (during an update operation) it is sometimes desirable to update only certain properties/columns
in the set ''Data''. */
    applicableFields?: string[] | undefined;
    /** The payload member containing the actual values supplied by the consumer.
This is a list that should contain at least one instance of data to be inserted or updated. */
    data?: CustomerModelInfo[] | undefined;

    constructor(data?: IBulkSaveRequestOfCustomerModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["ApplicableFields"])) {
                this.applicableFields = [] as any;
                for (let item of _data["ApplicableFields"])
                    this.applicableFields!.push(item);
            }
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(CustomerModelInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): BulkSaveRequestOfCustomerModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new BulkSaveRequestOfCustomerModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.applicableFields)) {
            data["ApplicableFields"] = [];
            for (let item of this.applicableFields)
                data["ApplicableFields"].push(item);
        }
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IBulkSaveRequestOfCustomerModelInfo {
    /** By default this is a null or empty string array.
However, if (during an update operation) it is sometimes desirable to update only certain properties/columns
in the set ''Data''. */
    applicableFields?: string[] | undefined;
    /** The payload member containing the actual values supplied by the consumer.
This is a list that should contain at least one instance of data to be inserted or updated. */
    data?: CustomerModelInfo[] | undefined;
}

export class CustomerSaveRequest extends BulkSaveRequestOfCustomerModelInfo implements ICustomerSaveRequest {

    constructor(data?: ICustomerSaveRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): CustomerSaveRequest {
        data = typeof data === 'object' ? data : {};
        let result = new CustomerSaveRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface ICustomerSaveRequest extends IBulkSaveRequestOfCustomerModelInfo {
}

export class CustomerModelInfo implements ICustomerModelInfo {
    /** This indicates that the import record is associated with this customer. It is only used when importing customers. */
    importRowNumber!: number;
    /** The unique string identifier of the customer. */
    customerNumber?: string | undefined;
    /** The customer's first name. */
    customerFirstName?: string | undefined;
    /** The customer's last name. */
    customerLastName?: string | undefined;
    /** The customer's email. */
    customerEmail?: string | undefined;
    /** The customer's department. */
    customerDepartment?: string | undefined;
    /** The company the customer works for. */
    customerCompanyName?: string | undefined;
    /** The customer's contact email. */
    customerContactEmail?: string | undefined;
    /** The customer's website. */
    customerWebsite?: string | undefined;
    /** The first name of the customer's contact. */
    customerContactFirstName?: string | undefined;
    /** The last name of the customer's contact. */
    customerContactLastName?: string | undefined;
    /** Read Only. The addresses associated with the customer. Please use the address public api to create and edit addresses. */
    addresses?: AddressInfo[] | undefined;
    /** The cell phone number of the customer's contact. */
    customerContactCellNumber?: string | undefined;
    /** The customer's business phone number. */
    customerBusinessPhoneNumber?: string | undefined;
    /** The phone number of the customer's contact. */
    customerContactPhoneNumber?: string | undefined;
    /** The customer's business fax number. */
    customerBusinessFaxNumber?: string | undefined;
    /** The fax number of the customer's contact. */
    customerContactFaxNumber?: string | undefined;
    /** Read Only. */
    customerContactCell?: PhoneInfo | undefined;
    /** Read Only. */
    customerBusinessPhone?: PhoneInfo | undefined;
    /** Read Only. */
    customerContactPhone?: PhoneInfo | undefined;
    /** Read Only. */
    customerBusinessFax?: PhoneInfo | undefined;
    /** Read Only. */
    customerContactFax?: PhoneInfo | undefined;
    /** Indicates new customer notes. */
    customerNote?: string | undefined;
    /** Read Only. Indicates existing notes for the customer. */
    customerNotes?: NoteInfo[] | undefined;
    /** This is the custom fields associated with the customer. */
    customFields?: DcfValueInfo[] | undefined;
    /** This will be true if there is an attachment. */
    hasAttachment!: boolean;
    /** Internal. A concatenation of the first and last name. */
    customerName?: string | undefined;
    /** This is used to automatically generate a customer number when creating a new customer. */
    isAutogeneratedCustomerNumber!: boolean;
    /** Not Used. This is used to add attachments (or attach files). */
    attachmentsToAdd?: string[] | undefined;
    /** Not Used. This is used to delete attachments from the customer details. */
    attachmentsToDelete?: string[] | undefined;
    /** The date or time the entity was last updated */
    lastUpdated?: Date | undefined;
    /** Not Used. This is the list of attachments associated with the customer. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;

    constructor(data?: ICustomerModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.customerNumber = _data["CustomerNumber"];
            this.customerFirstName = _data["CustomerFirstName"];
            this.customerLastName = _data["CustomerLastName"];
            this.customerEmail = _data["CustomerEmail"];
            this.customerDepartment = _data["CustomerDepartment"];
            this.customerCompanyName = _data["CustomerCompanyName"];
            this.customerContactEmail = _data["CustomerContactEmail"];
            this.customerWebsite = _data["CustomerWebsite"];
            this.customerContactFirstName = _data["CustomerContactFirstName"];
            this.customerContactLastName = _data["CustomerContactLastName"];
            if (Array.isArray(_data["Addresses"])) {
                this.addresses = [] as any;
                for (let item of _data["Addresses"])
                    this.addresses!.push(AddressInfo.fromJS(item));
            }
            this.customerContactCellNumber = _data["CustomerContactCellNumber"];
            this.customerBusinessPhoneNumber = _data["CustomerBusinessPhoneNumber"];
            this.customerContactPhoneNumber = _data["CustomerContactPhoneNumber"];
            this.customerBusinessFaxNumber = _data["CustomerBusinessFaxNumber"];
            this.customerContactFaxNumber = _data["CustomerContactFaxNumber"];
            this.customerContactCell = _data["CustomerContactCell"] ? PhoneInfo.fromJS(_data["CustomerContactCell"]) : <any>undefined;
            this.customerBusinessPhone = _data["CustomerBusinessPhone"] ? PhoneInfo.fromJS(_data["CustomerBusinessPhone"]) : <any>undefined;
            this.customerContactPhone = _data["CustomerContactPhone"] ? PhoneInfo.fromJS(_data["CustomerContactPhone"]) : <any>undefined;
            this.customerBusinessFax = _data["CustomerBusinessFax"] ? PhoneInfo.fromJS(_data["CustomerBusinessFax"]) : <any>undefined;
            this.customerContactFax = _data["CustomerContactFax"] ? PhoneInfo.fromJS(_data["CustomerContactFax"]) : <any>undefined;
            this.customerNote = _data["CustomerNote"];
            if (Array.isArray(_data["CustomerNotes"])) {
                this.customerNotes = [] as any;
                for (let item of _data["CustomerNotes"])
                    this.customerNotes!.push(NoteInfo.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            this.hasAttachment = _data["HasAttachment"];
            this.customerName = _data["CustomerName"];
            this.isAutogeneratedCustomerNumber = _data["IsAutogeneratedCustomerNumber"];
            if (Array.isArray(_data["AttachmentsToAdd"])) {
                this.attachmentsToAdd = [] as any;
                for (let item of _data["AttachmentsToAdd"])
                    this.attachmentsToAdd!.push(item);
            }
            if (Array.isArray(_data["AttachmentsToDelete"])) {
                this.attachmentsToDelete = [] as any;
                for (let item of _data["AttachmentsToDelete"])
                    this.attachmentsToDelete!.push(item);
            }
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
            if (Array.isArray(_data["AttachmentNames"])) {
                this.attachmentNames = [] as any;
                for (let item of _data["AttachmentNames"])
                    this.attachmentNames!.push(KeyValuePairOfStringAndString.fromJS(item));
            }
        }
    }

    static fromJS(data: any): CustomerModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new CustomerModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["CustomerNumber"] = this.customerNumber;
        data["CustomerFirstName"] = this.customerFirstName;
        data["CustomerLastName"] = this.customerLastName;
        data["CustomerEmail"] = this.customerEmail;
        data["CustomerDepartment"] = this.customerDepartment;
        data["CustomerCompanyName"] = this.customerCompanyName;
        data["CustomerContactEmail"] = this.customerContactEmail;
        data["CustomerWebsite"] = this.customerWebsite;
        data["CustomerContactFirstName"] = this.customerContactFirstName;
        data["CustomerContactLastName"] = this.customerContactLastName;
        if (Array.isArray(this.addresses)) {
            data["Addresses"] = [];
            for (let item of this.addresses)
                data["Addresses"].push(item.toJSON());
        }
        data["CustomerContactCellNumber"] = this.customerContactCellNumber;
        data["CustomerBusinessPhoneNumber"] = this.customerBusinessPhoneNumber;
        data["CustomerContactPhoneNumber"] = this.customerContactPhoneNumber;
        data["CustomerBusinessFaxNumber"] = this.customerBusinessFaxNumber;
        data["CustomerContactFaxNumber"] = this.customerContactFaxNumber;
        data["CustomerContactCell"] = this.customerContactCell ? this.customerContactCell.toJSON() : <any>undefined;
        data["CustomerBusinessPhone"] = this.customerBusinessPhone ? this.customerBusinessPhone.toJSON() : <any>undefined;
        data["CustomerContactPhone"] = this.customerContactPhone ? this.customerContactPhone.toJSON() : <any>undefined;
        data["CustomerBusinessFax"] = this.customerBusinessFax ? this.customerBusinessFax.toJSON() : <any>undefined;
        data["CustomerContactFax"] = this.customerContactFax ? this.customerContactFax.toJSON() : <any>undefined;
        data["CustomerNote"] = this.customerNote;
        if (Array.isArray(this.customerNotes)) {
            data["CustomerNotes"] = [];
            for (let item of this.customerNotes)
                data["CustomerNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["HasAttachment"] = this.hasAttachment;
        data["CustomerName"] = this.customerName;
        data["IsAutogeneratedCustomerNumber"] = this.isAutogeneratedCustomerNumber;
        if (Array.isArray(this.attachmentsToAdd)) {
            data["AttachmentsToAdd"] = [];
            for (let item of this.attachmentsToAdd)
                data["AttachmentsToAdd"].push(item);
        }
        if (Array.isArray(this.attachmentsToDelete)) {
            data["AttachmentsToDelete"] = [];
            for (let item of this.attachmentsToDelete)
                data["AttachmentsToDelete"].push(item);
        }
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        if (Array.isArray(this.attachmentNames)) {
            data["AttachmentNames"] = [];
            for (let item of this.attachmentNames)
                data["AttachmentNames"].push(item.toJSON());
        }
        return data; 
    }
}

export interface ICustomerModelInfo {
    /** This indicates that the import record is associated with this customer. It is only used when importing customers. */
    importRowNumber: number;
    /** The unique string identifier of the customer. */
    customerNumber?: string | undefined;
    /** The customer's first name. */
    customerFirstName?: string | undefined;
    /** The customer's last name. */
    customerLastName?: string | undefined;
    /** The customer's email. */
    customerEmail?: string | undefined;
    /** The customer's department. */
    customerDepartment?: string | undefined;
    /** The company the customer works for. */
    customerCompanyName?: string | undefined;
    /** The customer's contact email. */
    customerContactEmail?: string | undefined;
    /** The customer's website. */
    customerWebsite?: string | undefined;
    /** The first name of the customer's contact. */
    customerContactFirstName?: string | undefined;
    /** The last name of the customer's contact. */
    customerContactLastName?: string | undefined;
    /** Read Only. The addresses associated with the customer. Please use the address public api to create and edit addresses. */
    addresses?: AddressInfo[] | undefined;
    /** The cell phone number of the customer's contact. */
    customerContactCellNumber?: string | undefined;
    /** The customer's business phone number. */
    customerBusinessPhoneNumber?: string | undefined;
    /** The phone number of the customer's contact. */
    customerContactPhoneNumber?: string | undefined;
    /** The customer's business fax number. */
    customerBusinessFaxNumber?: string | undefined;
    /** The fax number of the customer's contact. */
    customerContactFaxNumber?: string | undefined;
    /** Read Only. */
    customerContactCell?: PhoneInfo | undefined;
    /** Read Only. */
    customerBusinessPhone?: PhoneInfo | undefined;
    /** Read Only. */
    customerContactPhone?: PhoneInfo | undefined;
    /** Read Only. */
    customerBusinessFax?: PhoneInfo | undefined;
    /** Read Only. */
    customerContactFax?: PhoneInfo | undefined;
    /** Indicates new customer notes. */
    customerNote?: string | undefined;
    /** Read Only. Indicates existing notes for the customer. */
    customerNotes?: NoteInfo[] | undefined;
    /** This is the custom fields associated with the customer. */
    customFields?: DcfValueInfo[] | undefined;
    /** This will be true if there is an attachment. */
    hasAttachment: boolean;
    /** Internal. A concatenation of the first and last name. */
    customerName?: string | undefined;
    /** This is used to automatically generate a customer number when creating a new customer. */
    isAutogeneratedCustomerNumber: boolean;
    /** Not Used. This is used to add attachments (or attach files). */
    attachmentsToAdd?: string[] | undefined;
    /** Not Used. This is used to delete attachments from the customer details. */
    attachmentsToDelete?: string[] | undefined;
    /** The date or time the entity was last updated */
    lastUpdated?: Date | undefined;
    /** Not Used. This is the list of attachments associated with the customer. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;
}

export class PhoneInfo implements IPhoneInfo {
    /** Indicates phone number. */
    phoneNumber?: string | undefined;
    /** Indicates phone number extension. */
    phoneExtension?: string | undefined;
    /** Indicates the type of phone number (i.e. Cell Phone, Fax). */
    phoneTypeName?: string | undefined;

    constructor(data?: IPhoneInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.phoneNumber = _data["PhoneNumber"];
            this.phoneExtension = _data["PhoneExtension"];
            this.phoneTypeName = _data["PhoneTypeName"];
        }
    }

    static fromJS(data: any): PhoneInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PhoneInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PhoneNumber"] = this.phoneNumber;
        data["PhoneExtension"] = this.phoneExtension;
        data["PhoneTypeName"] = this.phoneTypeName;
        return data; 
    }
}

export interface IPhoneInfo {
    /** Indicates phone number. */
    phoneNumber?: string | undefined;
    /** Indicates phone number extension. */
    phoneExtension?: string | undefined;
    /** Indicates the type of phone number (i.e. Cell Phone, Fax). */
    phoneTypeName?: string | undefined;
}

export class NoteInfo implements INoteInfo {
    /** Indicates the contents of the note. */
    noteText?: string | undefined;
    /** Indicates the date on which the note was captured/entered. */
    noteDate?: Date | undefined;
    /** Indicates the user login details. It the user who entered the note. */
    userLogon?: string | undefined;

    constructor(data?: INoteInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.noteText = _data["NoteText"];
            this.noteDate = _data["NoteDate"] ? new Date(_data["NoteDate"].toString()) : <any>undefined;
            this.userLogon = _data["UserLogon"];
        }
    }

    static fromJS(data: any): NoteInfo {
        data = typeof data === 'object' ? data : {};
        let result = new NoteInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["NoteText"] = this.noteText;
        data["NoteDate"] = this.noteDate ? this.noteDate.toISOString() : <any>undefined;
        data["UserLogon"] = this.userLogon;
        return data; 
    }
}

export interface INoteInfo {
    /** Indicates the contents of the note. */
    noteText?: string | undefined;
    /** Indicates the date on which the note was captured/entered. */
    noteDate?: Date | undefined;
    /** Indicates the user login details. It the user who entered the note. */
    userLogon?: string | undefined;
}

export class DcfValueInfo implements IDcfValueInfo {
    /** Optional. It is used internally to map DCFs to the corresponding record.  */
    importRowNumber!: number;
    /** Required. It is a custom field label. */
    dcfLabel?: string | undefined;
    /** Read Only. It is a type of custom field. */
    dCFDataType!: DataType;
    /** Indicates custom field text value. If the custom field is a number or date type then a value will be returned here as well, but can be ignored. */
    dcfTextValue?: string | undefined;
    /** Indicates custom field numeric value. */
    dcfNumberValue?: number | undefined;
    /** Indicates custom field date value. */
    dcfDateValue?: Date | undefined;
    /** Read Only. Indicates if the custom field is active. */
    dcfValueRecordStatus!: RecordStatus;

    constructor(data?: IDcfValueInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.dcfLabel = _data["DcfLabel"];
            this.dCFDataType = _data["DCFDataType"];
            this.dcfTextValue = _data["DcfTextValue"];
            this.dcfNumberValue = _data["DcfNumberValue"];
            this.dcfDateValue = _data["DcfDateValue"] ? new Date(_data["DcfDateValue"].toString()) : <any>undefined;
            this.dcfValueRecordStatus = _data["DcfValueRecordStatus"];
        }
    }

    static fromJS(data: any): DcfValueInfo {
        data = typeof data === 'object' ? data : {};
        let result = new DcfValueInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["DcfLabel"] = this.dcfLabel;
        data["DCFDataType"] = this.dCFDataType;
        data["DcfTextValue"] = this.dcfTextValue;
        data["DcfNumberValue"] = this.dcfNumberValue;
        data["DcfDateValue"] = this.dcfDateValue ? this.dcfDateValue.toISOString() : <any>undefined;
        data["DcfValueRecordStatus"] = this.dcfValueRecordStatus;
        return data; 
    }
}

export interface IDcfValueInfo {
    /** Optional. It is used internally to map DCFs to the corresponding record.  */
    importRowNumber: number;
    /** Required. It is a custom field label. */
    dcfLabel?: string | undefined;
    /** Read Only. It is a type of custom field. */
    dCFDataType: DataType;
    /** Indicates custom field text value. If the custom field is a number or date type then a value will be returned here as well, but can be ignored. */
    dcfTextValue?: string | undefined;
    /** Indicates custom field numeric value. */
    dcfNumberValue?: number | undefined;
    /** Indicates custom field date value. */
    dcfDateValue?: Date | undefined;
    /** Read Only. Indicates if the custom field is active. */
    dcfValueRecordStatus: RecordStatus;
}

export enum DataType {
    Text = 1,
    Number = 2,
    Money = 3,
    Bool = 4,
    DateTime = 5,
    Date = 6,
    Time = 7,
    PickList = 8,
    Lookup = 9,
    Operator = 10,
    ExtendedText = 11,
    Hyperlink = 12,
}

export enum RecordStatus {
    Unknown = 0,
    Active = 1,
    Inactive = 2,
    Disposed = 3,
    Deleted = 3,
    Downgrade = 6,
}

export class KeyValuePairOfStringAndString implements IKeyValuePairOfStringAndString {
    key?: string | undefined;
    value?: string | undefined;

    constructor(data?: IKeyValuePairOfStringAndString) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.key = _data["Key"];
            this.value = _data["Value"];
        }
    }

    static fromJS(data: any): KeyValuePairOfStringAndString {
        data = typeof data === 'object' ? data : {};
        let result = new KeyValuePairOfStringAndString();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Key"] = this.key;
        data["Value"] = this.value;
        return data; 
    }
}

export interface IKeyValuePairOfStringAndString {
    key?: string | undefined;
    value?: string | undefined;
}

export class WaspResultOfListOfInvariantCultureIgnoreCaseDictionary implements IWaspResultOfListOfInvariantCultureIgnoreCaseDictionary {
    /** Type specific result that always depends on the function called. */
    data?: InvariantCultureIgnoreCaseDictionary[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfInvariantCultureIgnoreCaseDictionary) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(InvariantCultureIgnoreCaseDictionary.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfInvariantCultureIgnoreCaseDictionary {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfInvariantCultureIgnoreCaseDictionary();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfInvariantCultureIgnoreCaseDictionary {
    /** Type specific result that always depends on the function called. */
    data?: InvariantCultureIgnoreCaseDictionary[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** a non-generic version of case-insensitive key dictionary of objects */
export class InvariantCultureIgnoreCaseDictionary implements IInvariantCultureIgnoreCaseDictionary {

    [key: string]: any; 

    constructor(data?: IInvariantCultureIgnoreCaseDictionary) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            for (var property in _data) {
                if (_data.hasOwnProperty(property))
                    this[property] = _data[property];
            }
        }
    }

    static fromJS(data: any): InvariantCultureIgnoreCaseDictionary {
        data = typeof data === 'object' ? data : {};
        let result = new InvariantCultureIgnoreCaseDictionary();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        for (var property in this) {
            if (this.hasOwnProperty(property))
                data[property] = this[property];
        }
        return data; 
    }
}

/** a non-generic version of case-insensitive key dictionary of objects */
export interface IInvariantCultureIgnoreCaseDictionary {

    [key: string]: any; 
}

export class InvariantCultureIgnoreCaseDictionaryOfObject implements IInvariantCultureIgnoreCaseDictionaryOfObject {

    [key: string]: any; 

    constructor(data?: IInvariantCultureIgnoreCaseDictionaryOfObject) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            for (var property in _data) {
                if (_data.hasOwnProperty(property))
                    this[property] = _data[property];
            }
        }
    }

    static fromJS(data: any): InvariantCultureIgnoreCaseDictionaryOfObject {
        data = typeof data === 'object' ? data : {};
        let result = new InvariantCultureIgnoreCaseDictionaryOfObject();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        for (var property in this) {
            if (this.hasOwnProperty(property))
                data[property] = this[property];
        }
        return data; 
    }
}

export interface IInvariantCultureIgnoreCaseDictionaryOfObject {

    [key: string]: any; 
}

export class WaspResultOfListOfWaspResultOfString implements IWaspResultOfListOfWaspResultOfString {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfString[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfString) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfString.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfString {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfString();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfString {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfString[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfCustomerModelInfo implements IWaspResultOfListOfCustomerModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: CustomerModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfCustomerModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(CustomerModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfCustomerModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfCustomerModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfCustomerModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: CustomerModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** Used to request data, mainly from Grids and other advances search API functions */
export class GridRequestModel implements IGridRequestModel {
    /** <![CDATA[
This field helps to skip the page count recalculation that goes into calculating the TotalRecordsLongCount. 
For example - When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is a time-consuming operation. 
To avoid that extra calculation, and help prevent throttling, TotalRecordsLongCount is assigned to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page through the records faster.

By default, this value is a null value, meaning the api should peform a record count of the data prior to fetching the records.
]]> */
    totalCountFromPriorFetch?: number | undefined;
    /** This is the additional number of records to skip, in addition to page size and page #.
This is useful for quick filter (more) mode of operation.
This field is not implemented. */
    additionalSkipCount!: number;
    /** Due to the large number of records this API may return, this is a paging API. 
Set this value to specify the number of records you wish to process per API call. (Recommended 100-500).
Note: some grid query api will ignore or cap this value if the requested page size is too large.
A large page size (several thousands) could overflow or degrade the serialization of return data. */
    pageSize!: number;
    /** Due to the large number of records this API may return, this is a paging API. 
Set this value to specify the page number or record set you wish to process. 
Generally you would want to keep the PageSize constant (Recommended 100-500) 
and loop thru the results incrementing this PageNumber until the number of records returned is less than the value you specified for PageSize. */
    pageNumber!: number;
    /** This is an expression tree. Set this to specify all the columns you wish to sort the data by. Default None.
<![CDATA[
Expects a collection of fieldnames and sort direction:

[{"Field":"TotalAvailable","Dir":"desc"}]
            
]]> */
    sort?: SortModel[] | undefined;
    /** This is an expression tree. Set this to specify all the columns, values and operators you wish to filter the data by. Default None. */
    filter?: TopLevelFilterType | undefined;
    /** If you provide a valid expression tree for the Filter parameter and the filter expression you provide performs one or more comparisons of DateTime values with constants then set this to specify which time zone your DateTime constants represent. 
Common ClientUtcOffset string values include: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Marquesas Standard Time, Alaskan Standard Time, Pacific Standard Time, Mountain Standard Time, Central Standard Time, Eastern Standard Time, 
Venezuela Standard Time, Atlantic Standard Time, Newfoundland Standard Time, Greenland Standard Time, UTC-02, Cape Verde Standard Time, GMT Standard Time, W. Europe Standard Time, GTB Standard Time, Russian Standard Time, Arabian Standard Time, 
Afghanistan Standard Time, Pakistan Standard Time, India Standard Time, China Standard Time, Tokyo Standard Time, AUS Central Standard Time, West Pacific Standard Time, Central Pacific Standard Time, Fiji Standard Time, Samoa Standard Time.   */
    clientUtcOffset?: TimeZoneInfoId | undefined;
    /** Internal - specific filter behaviors */
    filterBehavior!: FilterBehaviorFlags;
    /** When set to true, does not get the attachment data */
    ignoreAttachments!: boolean;
    /** When set to true, does not get the geo location data */
    ignoreGeoLocation!: boolean;
    /** Use this comma separated list for values to efficiently filter results to one or more sites. */
    workingSiteIdCsvList?: string | undefined;

    constructor(data?: IGridRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.totalCountFromPriorFetch = _data["TotalCountFromPriorFetch"];
            this.additionalSkipCount = _data["AdditionalSkipCount"];
            this.pageSize = _data["PageSize"];
            this.pageNumber = _data["PageNumber"];
            if (Array.isArray(_data["Sort"])) {
                this.sort = [] as any;
                for (let item of _data["Sort"])
                    this.sort!.push(SortModel.fromJS(item));
            }
            this.filter = _data["Filter"] ? TopLevelFilterType.fromJS(_data["Filter"]) : <any>undefined;
            this.clientUtcOffset = _data["ClientUtcOffset"] ? TimeZoneInfoId.fromJS(_data["ClientUtcOffset"]) : <any>undefined;
            this.filterBehavior = _data["FilterBehavior"];
            this.ignoreAttachments = _data["IgnoreAttachments"];
            this.ignoreGeoLocation = _data["IgnoreGeoLocation"];
            this.workingSiteIdCsvList = _data["WorkingSiteIdCsvList"];
        }
    }

    static fromJS(data: any): GridRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new GridRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TotalCountFromPriorFetch"] = this.totalCountFromPriorFetch;
        data["AdditionalSkipCount"] = this.additionalSkipCount;
        data["PageSize"] = this.pageSize;
        data["PageNumber"] = this.pageNumber;
        if (Array.isArray(this.sort)) {
            data["Sort"] = [];
            for (let item of this.sort)
                data["Sort"].push(item.toJSON());
        }
        data["Filter"] = this.filter ? this.filter.toJSON() : <any>undefined;
        data["ClientUtcOffset"] = this.clientUtcOffset ? this.clientUtcOffset.toJSON() : <any>undefined;
        data["FilterBehavior"] = this.filterBehavior;
        data["IgnoreAttachments"] = this.ignoreAttachments;
        data["IgnoreGeoLocation"] = this.ignoreGeoLocation;
        data["WorkingSiteIdCsvList"] = this.workingSiteIdCsvList;
        return data; 
    }
}

/** Used to request data, mainly from Grids and other advances search API functions */
export interface IGridRequestModel {
    /** <![CDATA[
This field helps to skip the page count recalculation that goes into calculating the TotalRecordsLongCount. 
For example - When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is a time-consuming operation. 
To avoid that extra calculation, and help prevent throttling, TotalRecordsLongCount is assigned to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page through the records faster.

By default, this value is a null value, meaning the api should peform a record count of the data prior to fetching the records.
]]> */
    totalCountFromPriorFetch?: number | undefined;
    /** This is the additional number of records to skip, in addition to page size and page #.
This is useful for quick filter (more) mode of operation.
This field is not implemented. */
    additionalSkipCount: number;
    /** Due to the large number of records this API may return, this is a paging API. 
Set this value to specify the number of records you wish to process per API call. (Recommended 100-500).
Note: some grid query api will ignore or cap this value if the requested page size is too large.
A large page size (several thousands) could overflow or degrade the serialization of return data. */
    pageSize: number;
    /** Due to the large number of records this API may return, this is a paging API. 
Set this value to specify the page number or record set you wish to process. 
Generally you would want to keep the PageSize constant (Recommended 100-500) 
and loop thru the results incrementing this PageNumber until the number of records returned is less than the value you specified for PageSize. */
    pageNumber: number;
    /** This is an expression tree. Set this to specify all the columns you wish to sort the data by. Default None.
<![CDATA[
Expects a collection of fieldnames and sort direction:

[{"Field":"TotalAvailable","Dir":"desc"}]
            
]]> */
    sort?: SortModel[] | undefined;
    /** This is an expression tree. Set this to specify all the columns, values and operators you wish to filter the data by. Default None. */
    filter?: TopLevelFilterType | undefined;
    /** If you provide a valid expression tree for the Filter parameter and the filter expression you provide performs one or more comparisons of DateTime values with constants then set this to specify which time zone your DateTime constants represent. 
Common ClientUtcOffset string values include: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Marquesas Standard Time, Alaskan Standard Time, Pacific Standard Time, Mountain Standard Time, Central Standard Time, Eastern Standard Time, 
Venezuela Standard Time, Atlantic Standard Time, Newfoundland Standard Time, Greenland Standard Time, UTC-02, Cape Verde Standard Time, GMT Standard Time, W. Europe Standard Time, GTB Standard Time, Russian Standard Time, Arabian Standard Time, 
Afghanistan Standard Time, Pakistan Standard Time, India Standard Time, China Standard Time, Tokyo Standard Time, AUS Central Standard Time, West Pacific Standard Time, Central Pacific Standard Time, Fiji Standard Time, Samoa Standard Time.   */
    clientUtcOffset?: TimeZoneInfoId | undefined;
    /** Internal - specific filter behaviors */
    filterBehavior: FilterBehaviorFlags;
    /** When set to true, does not get the attachment data */
    ignoreAttachments: boolean;
    /** When set to true, does not get the geo location data */
    ignoreGeoLocation: boolean;
    /** Use this comma separated list for values to efficiently filter results to one or more sites. */
    workingSiteIdCsvList?: string | undefined;
}

export class AdvancedSearchParameters extends GridRequestModel implements IAdvancedSearchParameters {

    constructor(data?: IAdvancedSearchParameters) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): AdvancedSearchParameters {
        data = typeof data === 'object' ? data : {};
        let result = new AdvancedSearchParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface IAdvancedSearchParameters extends IGridRequestModel {
}

export class Sort implements ISort {
    /** Gets or sets the name of the sorted field (property). */
    field?: string | undefined;
    /** <![CDATA[
Gets or sets the sort direction. Should be either "asc" or "desc".
The default is ASC (ascending sort order)
]]> */
    dir?: string | undefined;

    constructor(data?: ISort) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.field = _data["field"];
            this.dir = _data["dir"];
        }
    }

    static fromJS(data: any): Sort {
        data = typeof data === 'object' ? data : {};
        let result = new Sort();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["field"] = this.field;
        data["dir"] = this.dir;
        return data; 
    }
}

export interface ISort {
    /** Gets or sets the name of the sorted field (property). */
    field?: string | undefined;
    /** <![CDATA[
Gets or sets the sort direction. Should be either "asc" or "desc".
The default is ASC (ascending sort order)
]]> */
    dir?: string | undefined;
}

export class SortModel extends Sort implements ISortModel {

    constructor(data?: ISortModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): SortModel {
        data = typeof data === 'object' ? data : {};
        let result = new SortModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface ISortModel extends ISort {
}

export class TopLevelFilterType implements ITopLevelFilterType {
    /**            Gets or sets the name of the sorted field (property). Set to null if the Filters property is set.
            */
    field?: string | undefined;
    /** Gets or sets the filtering operator. Set to null if the Filters property is set.
<![CDATA[
Possible values include: eq, neq, lt, lte, gt, gte, startswith, endswith, contains, doesnotcontain.
Note: The operators (startswith, endswith, contains, doesnotcontain) are applicable only to text fields,
and are not appropriate for datetime or numerical (decimal) fields
]]> */
    operator?: string | undefined;
    /** Gets or sets the filtering value. Set to null if the Filters property is set. */
    value?: any | undefined;
    /** Gets or sets the filtering logic.
This is not used and is ignored. The API always assume this is 'AND'.
The filtering logic is always assumed to be AND.
The value of OR is typically NOT implemented. */
    logic?: string | undefined;
    /** Gets or sets the child filter expressions. Set to null if there are no child expressions.
The API back end does not use nested filtering.
This is because all filter expressions are joined together using logical ''AND''. */
    filters?: FilterModel[] | undefined;

    constructor(data?: ITopLevelFilterType) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.field = _data["field"];
            this.operator = _data["operator"];
            this.value = _data["value"];
            this.logic = _data["logic"];
            if (Array.isArray(_data["filters"])) {
                this.filters = [] as any;
                for (let item of _data["filters"])
                    this.filters!.push(FilterModel.fromJS(item));
            }
        }
    }

    static fromJS(data: any): TopLevelFilterType {
        data = typeof data === 'object' ? data : {};
        let result = new TopLevelFilterType();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["field"] = this.field;
        data["operator"] = this.operator;
        data["value"] = this.value;
        data["logic"] = this.logic;
        if (Array.isArray(this.filters)) {
            data["filters"] = [];
            for (let item of this.filters)
                data["filters"].push(item.toJSON());
        }
        return data; 
    }
}

export interface ITopLevelFilterType {
    /**            Gets or sets the name of the sorted field (property). Set to null if the Filters property is set.
            */
    field?: string | undefined;
    /** Gets or sets the filtering operator. Set to null if the Filters property is set.
<![CDATA[
Possible values include: eq, neq, lt, lte, gt, gte, startswith, endswith, contains, doesnotcontain.
Note: The operators (startswith, endswith, contains, doesnotcontain) are applicable only to text fields,
and are not appropriate for datetime or numerical (decimal) fields
]]> */
    operator?: string | undefined;
    /** Gets or sets the filtering value. Set to null if the Filters property is set. */
    value?: any | undefined;
    /** Gets or sets the filtering logic.
This is not used and is ignored. The API always assume this is 'AND'.
The filtering logic is always assumed to be AND.
The value of OR is typically NOT implemented. */
    logic?: string | undefined;
    /** Gets or sets the child filter expressions. Set to null if there are no child expressions.
The API back end does not use nested filtering.
This is because all filter expressions are joined together using logical ''AND''. */
    filters?: FilterModel[] | undefined;
}

export class FilterFlatModel implements IFilterFlatModel {
    /** Gets or sets the name of the sorted field (property). Set to null if the Filters property is set. */
    field?: string | undefined;
    /** <![CDATA[
Gets or sets the filtering operator. Set to <c>null</c> if the <c>Filters</c> property is set.
Possible values include: eq (==), neq (!=), lt (<), lte (<=), gt (>), gte (>=), startswith, endswith, contains, doesnotcontain
Note that the operators startsWith, EndsWith, Contains, and DoesNotContain are for string/text fields only,
and do NOT support any wild card characters.
]]> */
    operator?: string | undefined;
    /** Gets or sets the filtering value. Set to null if the Filters property is set. */
    value?: any | undefined;

    constructor(data?: IFilterFlatModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.field = _data["field"];
            this.operator = _data["operator"];
            this.value = _data["value"];
        }
    }

    static fromJS(data: any): FilterFlatModel {
        data = typeof data === 'object' ? data : {};
        let result = new FilterFlatModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["field"] = this.field;
        data["operator"] = this.operator;
        data["value"] = this.value;
        return data; 
    }
}

export interface IFilterFlatModel {
    /** Gets or sets the name of the sorted field (property). Set to null if the Filters property is set. */
    field?: string | undefined;
    /** <![CDATA[
Gets or sets the filtering operator. Set to <c>null</c> if the <c>Filters</c> property is set.
Possible values include: eq (==), neq (!=), lt (<), lte (<=), gt (>), gte (>=), startswith, endswith, contains, doesnotcontain
Note that the operators startsWith, EndsWith, Contains, and DoesNotContain are for string/text fields only,
and do NOT support any wild card characters.
]]> */
    operator?: string | undefined;
    /** Gets or sets the filtering value. Set to null if the Filters property is set. */
    value?: any | undefined;
}

export class FilterModel extends FilterFlatModel implements IFilterModel {

    constructor(data?: IFilterModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): FilterModel {
        data = typeof data === 'object' ? data : {};
        let result = new FilterModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface IFilterModel extends IFilterFlatModel {
}

export class TimeZoneInfoId implements ITimeZoneInfoId {
    id?: string | undefined;

    constructor(data?: ITimeZoneInfoId) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.id = _data["Id"];
        }
    }

    static fromJS(data: any): TimeZoneInfoId {
        data = typeof data === 'object' ? data : {};
        let result = new TimeZoneInfoId();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Id"] = this.id;
        return data; 
    }
}

export interface ITimeZoneInfoId {
    id?: string | undefined;
}

export enum FilterBehaviorFlags {
    None = 0,
    Default = 0,
    IgnoreDynamicColumnFilters = 4,
    LogPrematerializationQuery = 16,
    RenderFiltersAndCountOnlyDoNotFetch = 32,
    UseRealNamesForCustomDynamicFields = 128,
    UsePrimaryKeyIdsInExclusionList = 256,
    SpecialQuickSearchFeature = 512,
    SpecialSubsetProjectionAlpha = 1024,
    DoNotReturnDcfLabels = 2048,
    FetchExtraDataFromSatellites = 32768,
    FetchUpperRecord = 131072,
    FetchNestedDetailRecords = 262144,
    EnableOrElseNullDuringIEnumerableContainsRendering = 1048576,
}

export class WaspResultOfListOfContainer20ExpansionResultModel implements IWaspResultOfListOfContainer20ExpansionResultModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20ExpansionResultModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfContainer20ExpansionResultModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(Container20ExpansionResultModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfContainer20ExpansionResultModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfContainer20ExpansionResultModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfContainer20ExpansionResultModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20ExpansionResultModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class Container20ExpansionPublicApiResultModel implements IContainer20ExpansionPublicApiResultModel {
    currentQuantity?: number | undefined;
    itemContainerFlags!: ContainerEnumFlags;
    itemNumber?: string | undefined;
    /** trackby value container id OR asset_group_id.asset_tag */
    trackbyQuantityValueContainerId?: string | undefined;
    trackbyQuantityValueSerialNumber?: string | undefined;
    trackbyQuantityValueLot?: string | undefined;
    trackbyQuantityValueDateCode?: string | undefined;
    trackbyQuantityValueCustom1?: string | undefined;
    trackbyQuantityValueCustom2?: string | undefined;
    trackbyQuantityValueCustom3?: string | undefined;
    trackbyQuantityValueCustom4?: string | undefined;
    trackbyQuantityValueCustom5?: string | undefined;
    trackbyQuantityValueCustom6?: string | undefined;
    trackbyQuantityValueCustom7?: string | undefined;
    trackbyQuantityValueCustom8?: string | undefined;
    trackbyQuantityValueCustom9?: string | undefined;
    altItemNumber?: string | undefined;
    resultKeyNumber?: string | undefined;
    immediateSpatialParentContainerTag?: string | undefined;
    immediateLocationCode?: string | undefined;
    immedidateLocationDescription?: string | undefined;
    immediateSiteName?: string | undefined;
    immediateSiteDescription?: string | undefined;
    atlkTopLevelLocationCode?: string | undefined;
    waspResultCode!: WtResultCode;

    constructor(data?: IContainer20ExpansionPublicApiResultModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.currentQuantity = _data["CurrentQuantity"];
            this.itemContainerFlags = _data["ItemContainerFlags"];
            this.itemNumber = _data["ItemNumber"];
            this.trackbyQuantityValueContainerId = _data["TrackbyQuantityValueContainerId"];
            this.trackbyQuantityValueSerialNumber = _data["TrackbyQuantityValueSerialNumber"];
            this.trackbyQuantityValueLot = _data["TrackbyQuantityValueLot"];
            this.trackbyQuantityValueDateCode = _data["TrackbyQuantityValueDateCode"];
            this.trackbyQuantityValueCustom1 = _data["TrackbyQuantityValueCustom1"];
            this.trackbyQuantityValueCustom2 = _data["TrackbyQuantityValueCustom2"];
            this.trackbyQuantityValueCustom3 = _data["TrackbyQuantityValueCustom3"];
            this.trackbyQuantityValueCustom4 = _data["TrackbyQuantityValueCustom4"];
            this.trackbyQuantityValueCustom5 = _data["TrackbyQuantityValueCustom5"];
            this.trackbyQuantityValueCustom6 = _data["TrackbyQuantityValueCustom6"];
            this.trackbyQuantityValueCustom7 = _data["TrackbyQuantityValueCustom7"];
            this.trackbyQuantityValueCustom8 = _data["TrackbyQuantityValueCustom8"];
            this.trackbyQuantityValueCustom9 = _data["TrackbyQuantityValueCustom9"];
            this.altItemNumber = _data["AltItemNumber"];
            this.resultKeyNumber = _data["ResultKeyNumber"];
            this.immediateSpatialParentContainerTag = _data["ImmediateSpatialParentContainerTag"];
            this.immediateLocationCode = _data["ImmediateLocationCode"];
            this.immedidateLocationDescription = _data["ImmedidateLocationDescription"];
            this.immediateSiteName = _data["ImmediateSiteName"];
            this.immediateSiteDescription = _data["ImmediateSiteDescription"];
            this.atlkTopLevelLocationCode = _data["AtlkTopLevelLocationCode"];
            this.waspResultCode = _data["WaspResultCode"];
        }
    }

    static fromJS(data: any): Container20ExpansionPublicApiResultModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20ExpansionPublicApiResultModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["CurrentQuantity"] = this.currentQuantity;
        data["ItemContainerFlags"] = this.itemContainerFlags;
        data["ItemNumber"] = this.itemNumber;
        data["TrackbyQuantityValueContainerId"] = this.trackbyQuantityValueContainerId;
        data["TrackbyQuantityValueSerialNumber"] = this.trackbyQuantityValueSerialNumber;
        data["TrackbyQuantityValueLot"] = this.trackbyQuantityValueLot;
        data["TrackbyQuantityValueDateCode"] = this.trackbyQuantityValueDateCode;
        data["TrackbyQuantityValueCustom1"] = this.trackbyQuantityValueCustom1;
        data["TrackbyQuantityValueCustom2"] = this.trackbyQuantityValueCustom2;
        data["TrackbyQuantityValueCustom3"] = this.trackbyQuantityValueCustom3;
        data["TrackbyQuantityValueCustom4"] = this.trackbyQuantityValueCustom4;
        data["TrackbyQuantityValueCustom5"] = this.trackbyQuantityValueCustom5;
        data["TrackbyQuantityValueCustom6"] = this.trackbyQuantityValueCustom6;
        data["TrackbyQuantityValueCustom7"] = this.trackbyQuantityValueCustom7;
        data["TrackbyQuantityValueCustom8"] = this.trackbyQuantityValueCustom8;
        data["TrackbyQuantityValueCustom9"] = this.trackbyQuantityValueCustom9;
        data["AltItemNumber"] = this.altItemNumber;
        data["ResultKeyNumber"] = this.resultKeyNumber;
        data["ImmediateSpatialParentContainerTag"] = this.immediateSpatialParentContainerTag;
        data["ImmediateLocationCode"] = this.immediateLocationCode;
        data["ImmedidateLocationDescription"] = this.immedidateLocationDescription;
        data["ImmediateSiteName"] = this.immediateSiteName;
        data["ImmediateSiteDescription"] = this.immediateSiteDescription;
        data["AtlkTopLevelLocationCode"] = this.atlkTopLevelLocationCode;
        data["WaspResultCode"] = this.waspResultCode;
        return data; 
    }
}

export interface IContainer20ExpansionPublicApiResultModel {
    currentQuantity?: number | undefined;
    itemContainerFlags: ContainerEnumFlags;
    itemNumber?: string | undefined;
    /** trackby value container id OR asset_group_id.asset_tag */
    trackbyQuantityValueContainerId?: string | undefined;
    trackbyQuantityValueSerialNumber?: string | undefined;
    trackbyQuantityValueLot?: string | undefined;
    trackbyQuantityValueDateCode?: string | undefined;
    trackbyQuantityValueCustom1?: string | undefined;
    trackbyQuantityValueCustom2?: string | undefined;
    trackbyQuantityValueCustom3?: string | undefined;
    trackbyQuantityValueCustom4?: string | undefined;
    trackbyQuantityValueCustom5?: string | undefined;
    trackbyQuantityValueCustom6?: string | undefined;
    trackbyQuantityValueCustom7?: string | undefined;
    trackbyQuantityValueCustom8?: string | undefined;
    trackbyQuantityValueCustom9?: string | undefined;
    altItemNumber?: string | undefined;
    resultKeyNumber?: string | undefined;
    immediateSpatialParentContainerTag?: string | undefined;
    immediateLocationCode?: string | undefined;
    immedidateLocationDescription?: string | undefined;
    immediateSiteName?: string | undefined;
    immediateSiteDescription?: string | undefined;
    atlkTopLevelLocationCode?: string | undefined;
    waspResultCode: WtResultCode;
}

export class Container20ExpansionResultModel extends Container20ExpansionPublicApiResultModel implements IContainer20ExpansionResultModel {
    relativeNestingLevel?: number | undefined;
    itemContainerTrackbyGeneratorFormat?: string | undefined;
    messageStatus?: string | undefined;
    nestingMessageStatus?: string | undefined;
    processStatusWordDbg?: string | undefined;
    listIndex0?: number | undefined;
    totalNestingLevels!: number;
    minNestingLevel!: number;
    deepestNestingLevel!: number;
    atlkTrackById32Hierarchy?: string | undefined;
    atlkAssetId32?: number | undefined;
    atlkAssetTag128?: number | undefined;
    atlkAssetTypeId32?: number | undefined;
    trackbyIdent32?: number | undefined;
    atlkPkIdent32?: number | undefined;
    /** positive value: location_id, negative value: atlk_container_id */
    atlkSpatialId32?: number | undefined;
    atlkTopLevelLocId32?: number | undefined;
    atlkTopLevelSiteId32?: number | undefined;
    tqvAssetGroupId32?: number | undefined;
    atlkPKid32Debug?: string | undefined;

    constructor(data?: IContainer20ExpansionResultModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.relativeNestingLevel = _data["RelativeNestingLevel"];
            this.itemContainerTrackbyGeneratorFormat = _data["ItemContainerTrackbyGeneratorFormat"];
            this.messageStatus = _data["MessageStatus"];
            this.nestingMessageStatus = _data["NestingMessageStatus"];
            this.processStatusWordDbg = _data["ProcessStatusWordDbg"];
            this.listIndex0 = _data["ListIndex0"];
            this.totalNestingLevels = _data["TotalNestingLevels"];
            this.minNestingLevel = _data["MinNestingLevel"];
            this.deepestNestingLevel = _data["DeepestNestingLevel"];
            this.atlkTrackById32Hierarchy = _data["AtlkTrackById32Hierarchy"];
            this.atlkAssetId32 = _data["AtlkAssetId32"];
            this.atlkAssetTag128 = _data["AtlkAssetTag128"];
            this.atlkAssetTypeId32 = _data["AtlkAssetTypeId32"];
            this.trackbyIdent32 = _data["TrackbyIdent32"];
            this.atlkPkIdent32 = _data["AtlkPkIdent32"];
            this.atlkSpatialId32 = _data["AtlkSpatialId32"];
            this.atlkTopLevelLocId32 = _data["AtlkTopLevelLocId32"];
            this.atlkTopLevelSiteId32 = _data["AtlkTopLevelSiteId32"];
            this.tqvAssetGroupId32 = _data["TqvAssetGroupId32"];
            this.atlkPKid32Debug = _data["AtlkPKid32Debug"];
        }
    }

    static fromJS(data: any): Container20ExpansionResultModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20ExpansionResultModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RelativeNestingLevel"] = this.relativeNestingLevel;
        data["ItemContainerTrackbyGeneratorFormat"] = this.itemContainerTrackbyGeneratorFormat;
        data["MessageStatus"] = this.messageStatus;
        data["NestingMessageStatus"] = this.nestingMessageStatus;
        data["ProcessStatusWordDbg"] = this.processStatusWordDbg;
        data["ListIndex0"] = this.listIndex0;
        data["TotalNestingLevels"] = this.totalNestingLevels;
        data["MinNestingLevel"] = this.minNestingLevel;
        data["DeepestNestingLevel"] = this.deepestNestingLevel;
        data["AtlkTrackById32Hierarchy"] = this.atlkTrackById32Hierarchy;
        data["AtlkAssetId32"] = this.atlkAssetId32;
        data["AtlkAssetTag128"] = this.atlkAssetTag128;
        data["AtlkAssetTypeId32"] = this.atlkAssetTypeId32;
        data["TrackbyIdent32"] = this.trackbyIdent32;
        data["AtlkPkIdent32"] = this.atlkPkIdent32;
        data["AtlkSpatialId32"] = this.atlkSpatialId32;
        data["AtlkTopLevelLocId32"] = this.atlkTopLevelLocId32;
        data["AtlkTopLevelSiteId32"] = this.atlkTopLevelSiteId32;
        data["TqvAssetGroupId32"] = this.tqvAssetGroupId32;
        data["AtlkPKid32Debug"] = this.atlkPKid32Debug;
        super.toJSON(data);
        return data; 
    }
}

export interface IContainer20ExpansionResultModel extends IContainer20ExpansionPublicApiResultModel {
    relativeNestingLevel?: number | undefined;
    itemContainerTrackbyGeneratorFormat?: string | undefined;
    messageStatus?: string | undefined;
    nestingMessageStatus?: string | undefined;
    processStatusWordDbg?: string | undefined;
    listIndex0?: number | undefined;
    totalNestingLevels: number;
    minNestingLevel: number;
    deepestNestingLevel: number;
    atlkTrackById32Hierarchy?: string | undefined;
    atlkAssetId32?: number | undefined;
    atlkAssetTag128?: number | undefined;
    atlkAssetTypeId32?: number | undefined;
    trackbyIdent32?: number | undefined;
    atlkPkIdent32?: number | undefined;
    /** positive value: location_id, negative value: atlk_container_id */
    atlkSpatialId32?: number | undefined;
    atlkTopLevelLocId32?: number | undefined;
    atlkTopLevelSiteId32?: number | undefined;
    tqvAssetGroupId32?: number | undefined;
    atlkPKid32Debug?: string | undefined;
}

export enum ContainerEnumFlags {
    None = 0,
    CheckoutContainerOnPick = 16,
    DisposeTemporaryContainer = 64,
    CreateNewItemNumberOnly = 1048576,
}

export class WaspResultOfSaveOrderExtraFieldsRequestModel implements IWaspResultOfSaveOrderExtraFieldsRequestModel {
    /** Type specific result that always depends on the function called. */
    data?: SaveOrderExtraFieldsRequestModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfSaveOrderExtraFieldsRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? SaveOrderExtraFieldsRequestModel.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfSaveOrderExtraFieldsRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfSaveOrderExtraFieldsRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfSaveOrderExtraFieldsRequestModel {
    /** Type specific result that always depends on the function called. */
    data?: SaveOrderExtraFieldsRequestModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SaveOrderExtraFieldsRequestModel implements ISaveOrderExtraFieldsRequestModel {
    orderNumber?: string | undefined;
    newOrderNumber?: string | undefined;
    orderType?: string | undefined;
    /** In order to ADD NEW attachment, both the file name and the OrderNumber must form a logically distinct (unique) value pair.
If the combination of the 2 already exist, then the attachment data will be updated instead of insert(add). */
    attachmentFileName?: string | undefined;
    attachmentData?: string | undefined;
    orderLinesToUpdate?: OrderLineUpdateModelSDK[] | undefined;
    /** should be a value from 0 (unspecified/lowest) to 10 (highest)
any value out of this range will be normalized back to inclusive range 0 to 10.
Specify null to skip update */
    orderPriority?: number | undefined;
    /** The source or name of the system which produced this order.
Specify null/empty/white spaces to skip update.
Any value greater than 100 characters will be truncated */
    orderSourceText?: string | undefined;
    /** update order default site
set to null to disable update.
set to empty string to remove existing value
  */
    siteName?: string | undefined;
    locationCode?: string | undefined;
    orderReferenceNumber?: string | undefined;
    orderAltReference?: string | undefined;
    dateStarted?: Date | undefined;
    orderDueDate?: Date | undefined;
    orderDateCompleted?: Date | undefined;
    orderSupplier?: string | undefined;
    orderDescriptionText?: string | undefined;
    /** set order requestor. set to null to disable update. */
    requestor?: string | undefined;
    /** set order drop shipment flag. set to null to disable update */
    isDropShip?: boolean | undefined;

    constructor(data?: ISaveOrderExtraFieldsRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.orderNumber = _data["OrderNumber"];
            this.newOrderNumber = _data["NewOrderNumber"];
            this.orderType = _data["OrderType"];
            this.attachmentFileName = _data["AttachmentFileName"];
            this.attachmentData = _data["AttachmentData"];
            if (Array.isArray(_data["OrderLinesToUpdate"])) {
                this.orderLinesToUpdate = [] as any;
                for (let item of _data["OrderLinesToUpdate"])
                    this.orderLinesToUpdate!.push(OrderLineUpdateModelSDK.fromJS(item));
            }
            this.orderPriority = _data["OrderPriority"];
            this.orderSourceText = _data["OrderSourceText"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.orderReferenceNumber = _data["OrderReferenceNumber"];
            this.orderAltReference = _data["OrderAltReference"];
            this.dateStarted = _data["DateStarted"] ? new Date(_data["DateStarted"].toString()) : <any>undefined;
            this.orderDueDate = _data["OrderDueDate"] ? new Date(_data["OrderDueDate"].toString()) : <any>undefined;
            this.orderDateCompleted = _data["OrderDateCompleted"] ? new Date(_data["OrderDateCompleted"].toString()) : <any>undefined;
            this.orderSupplier = _data["OrderSupplier"];
            this.orderDescriptionText = _data["OrderDescriptionText"];
            this.requestor = _data["Requestor"];
            this.isDropShip = _data["IsDropShip"];
        }
    }

    static fromJS(data: any): SaveOrderExtraFieldsRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new SaveOrderExtraFieldsRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OrderNumber"] = this.orderNumber;
        data["NewOrderNumber"] = this.newOrderNumber;
        data["OrderType"] = this.orderType;
        data["AttachmentFileName"] = this.attachmentFileName;
        data["AttachmentData"] = this.attachmentData;
        if (Array.isArray(this.orderLinesToUpdate)) {
            data["OrderLinesToUpdate"] = [];
            for (let item of this.orderLinesToUpdate)
                data["OrderLinesToUpdate"].push(item.toJSON());
        }
        data["OrderPriority"] = this.orderPriority;
        data["OrderSourceText"] = this.orderSourceText;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["OrderReferenceNumber"] = this.orderReferenceNumber;
        data["OrderAltReference"] = this.orderAltReference;
        data["DateStarted"] = this.dateStarted ? this.dateStarted.toISOString() : <any>undefined;
        data["OrderDueDate"] = this.orderDueDate ? this.orderDueDate.toISOString() : <any>undefined;
        data["OrderDateCompleted"] = this.orderDateCompleted ? this.orderDateCompleted.toISOString() : <any>undefined;
        data["OrderSupplier"] = this.orderSupplier;
        data["OrderDescriptionText"] = this.orderDescriptionText;
        data["Requestor"] = this.requestor;
        data["IsDropShip"] = this.isDropShip;
        return data; 
    }
}

export interface ISaveOrderExtraFieldsRequestModel {
    orderNumber?: string | undefined;
    newOrderNumber?: string | undefined;
    orderType?: string | undefined;
    /** In order to ADD NEW attachment, both the file name and the OrderNumber must form a logically distinct (unique) value pair.
If the combination of the 2 already exist, then the attachment data will be updated instead of insert(add). */
    attachmentFileName?: string | undefined;
    attachmentData?: string | undefined;
    orderLinesToUpdate?: OrderLineUpdateModelSDK[] | undefined;
    /** should be a value from 0 (unspecified/lowest) to 10 (highest)
any value out of this range will be normalized back to inclusive range 0 to 10.
Specify null to skip update */
    orderPriority?: number | undefined;
    /** The source or name of the system which produced this order.
Specify null/empty/white spaces to skip update.
Any value greater than 100 characters will be truncated */
    orderSourceText?: string | undefined;
    /** update order default site
set to null to disable update.
set to empty string to remove existing value
  */
    siteName?: string | undefined;
    locationCode?: string | undefined;
    orderReferenceNumber?: string | undefined;
    orderAltReference?: string | undefined;
    dateStarted?: Date | undefined;
    orderDueDate?: Date | undefined;
    orderDateCompleted?: Date | undefined;
    orderSupplier?: string | undefined;
    orderDescriptionText?: string | undefined;
    /** set order requestor. set to null to disable update. */
    requestor?: string | undefined;
    /** set order drop shipment flag. set to null to disable update */
    isDropShip?: boolean | undefined;
}

export class OrderLineUpdateModelSDK implements IOrderLineUpdateModelSDK {
    /** the item number (or asset tag to update) the order line with */
    itemNumber?: string | undefined;
    requestedQuantity?: number | undefined;

    constructor(data?: IOrderLineUpdateModelSDK) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.requestedQuantity = _data["RequestedQuantity"];
        }
    }

    static fromJS(data: any): OrderLineUpdateModelSDK {
        data = typeof data === 'object' ? data : {};
        let result = new OrderLineUpdateModelSDK();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["RequestedQuantity"] = this.requestedQuantity;
        return data; 
    }
}

export interface IOrderLineUpdateModelSDK {
    /** the item number (or asset tag to update) the order line with */
    itemNumber?: string | undefined;
    requestedQuantity?: number | undefined;
}

export class PickOrderInfo implements IPickOrderInfo {
    /** Internal. This is used to help identify errors if any. */
    rowNumber!: number;
    /** The unique order number for the pick order. */
    pickOrderNumber?: string | undefined;
    /** Indicates the customer number the product is being picked for. */
    customerNumber?: string | undefined;
    /** Indicates the reference number of the order. */
    referenceNumber?: string | undefined;
    /** Indicates the Pick Order Site Name */
    siteName?: string | undefined;
    /** Indicates the Alt Reference Number of the order for edi 945 . */
    altReferenceNumber?: string | undefined;
    /** Indicates the date on which the order was placed. */
    orderDate?: Date | undefined;
    /** Indicates the date on which the order is due. */
    dueDate?: Date | undefined;
    /** ship method is being returned, so as might as well return shipper name (such as FedEx, USPS, UPS, DHL, etc) */
    shipperName?: string | undefined;
    /** Indicates the shipping method used to ship the order. */
    shipMethod?: string | undefined;
    /** Indicates the cost of shipping the entire order. */
    shippingCost!: number;
    /** Indicates the tax percentage used on the order. */
    taxPercentage!: number;
    /** By default the pick orders are created in a "Draft" state that require validation on the web. 
By setting this value to true pick orders, it will be created in a "Ready" state to immediately be picked, bypassing the "Draft" state. */
    issueOrder!: boolean;
    /** Indicates the status of the order. */
    orderStatus?: string | undefined;
    /** Indicates the Order Status Code. */
    orderStatusCode?: string | undefined;
    /** Indicates the Order Status Reason Code. */
    orderStatusReasonCode?: string | undefined;
    /** Indicates the location the pick order is being shipped to. */
    shipToContact?: AddressInfo | undefined;
    /** Indicates the billing information. */
    billToContact?: AddressInfo | undefined;
    /** Indicates the line item information of the order. */
    pickOrderLines?: PickOrderLineInfo[] | undefined;
    /** Indicates the notes related to the pick order. */
    pickOrderNotes?: NoteInfo[] | undefined;
    /** Date Time the order was last updated. */
    lastUpdated?: Date | undefined;
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IPickOrderInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.pickOrderNumber = _data["PickOrderNumber"];
            this.customerNumber = _data["CustomerNumber"];
            this.referenceNumber = _data["ReferenceNumber"];
            this.siteName = _data["SiteName"];
            this.altReferenceNumber = _data["AltReferenceNumber"];
            this.orderDate = _data["OrderDate"] ? new Date(_data["OrderDate"].toString()) : <any>undefined;
            this.dueDate = _data["DueDate"] ? new Date(_data["DueDate"].toString()) : <any>undefined;
            this.shipperName = _data["ShipperName"];
            this.shipMethod = _data["ShipMethod"];
            this.shippingCost = _data["ShippingCost"];
            this.taxPercentage = _data["TaxPercentage"];
            this.issueOrder = _data["IssueOrder"];
            this.orderStatus = _data["OrderStatus"];
            this.orderStatusCode = _data["OrderStatusCode"];
            this.orderStatusReasonCode = _data["OrderStatusReasonCode"];
            this.shipToContact = _data["ShipToContact"] ? AddressInfo.fromJS(_data["ShipToContact"]) : <any>undefined;
            this.billToContact = _data["BillToContact"] ? AddressInfo.fromJS(_data["BillToContact"]) : <any>undefined;
            if (Array.isArray(_data["PickOrderLines"])) {
                this.pickOrderLines = [] as any;
                for (let item of _data["PickOrderLines"])
                    this.pickOrderLines!.push(PickOrderLineInfo.fromJS(item));
            }
            if (Array.isArray(_data["PickOrderNotes"])) {
                this.pickOrderNotes = [] as any;
                for (let item of _data["PickOrderNotes"])
                    this.pickOrderNotes!.push(NoteInfo.fromJS(item));
            }
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): PickOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PickOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["PickOrderNumber"] = this.pickOrderNumber;
        data["CustomerNumber"] = this.customerNumber;
        data["ReferenceNumber"] = this.referenceNumber;
        data["SiteName"] = this.siteName;
        data["AltReferenceNumber"] = this.altReferenceNumber;
        data["OrderDate"] = this.orderDate ? this.orderDate.toISOString() : <any>undefined;
        data["DueDate"] = this.dueDate ? this.dueDate.toISOString() : <any>undefined;
        data["ShipperName"] = this.shipperName;
        data["ShipMethod"] = this.shipMethod;
        data["ShippingCost"] = this.shippingCost;
        data["TaxPercentage"] = this.taxPercentage;
        data["IssueOrder"] = this.issueOrder;
        data["OrderStatus"] = this.orderStatus;
        data["OrderStatusCode"] = this.orderStatusCode;
        data["OrderStatusReasonCode"] = this.orderStatusReasonCode;
        data["ShipToContact"] = this.shipToContact ? this.shipToContact.toJSON() : <any>undefined;
        data["BillToContact"] = this.billToContact ? this.billToContact.toJSON() : <any>undefined;
        if (Array.isArray(this.pickOrderLines)) {
            data["PickOrderLines"] = [];
            for (let item of this.pickOrderLines)
                data["PickOrderLines"].push(item.toJSON());
        }
        if (Array.isArray(this.pickOrderNotes)) {
            data["PickOrderNotes"] = [];
            for (let item of this.pickOrderNotes)
                data["PickOrderNotes"].push(item.toJSON());
        }
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IPickOrderInfo {
    /** Internal. This is used to help identify errors if any. */
    rowNumber: number;
    /** The unique order number for the pick order. */
    pickOrderNumber?: string | undefined;
    /** Indicates the customer number the product is being picked for. */
    customerNumber?: string | undefined;
    /** Indicates the reference number of the order. */
    referenceNumber?: string | undefined;
    /** Indicates the Pick Order Site Name */
    siteName?: string | undefined;
    /** Indicates the Alt Reference Number of the order for edi 945 . */
    altReferenceNumber?: string | undefined;
    /** Indicates the date on which the order was placed. */
    orderDate?: Date | undefined;
    /** Indicates the date on which the order is due. */
    dueDate?: Date | undefined;
    /** ship method is being returned, so as might as well return shipper name (such as FedEx, USPS, UPS, DHL, etc) */
    shipperName?: string | undefined;
    /** Indicates the shipping method used to ship the order. */
    shipMethod?: string | undefined;
    /** Indicates the cost of shipping the entire order. */
    shippingCost: number;
    /** Indicates the tax percentage used on the order. */
    taxPercentage: number;
    /** By default the pick orders are created in a "Draft" state that require validation on the web. 
By setting this value to true pick orders, it will be created in a "Ready" state to immediately be picked, bypassing the "Draft" state. */
    issueOrder: boolean;
    /** Indicates the status of the order. */
    orderStatus?: string | undefined;
    /** Indicates the Order Status Code. */
    orderStatusCode?: string | undefined;
    /** Indicates the Order Status Reason Code. */
    orderStatusReasonCode?: string | undefined;
    /** Indicates the location the pick order is being shipped to. */
    shipToContact?: AddressInfo | undefined;
    /** Indicates the billing information. */
    billToContact?: AddressInfo | undefined;
    /** Indicates the line item information of the order. */
    pickOrderLines?: PickOrderLineInfo[] | undefined;
    /** Indicates the notes related to the pick order. */
    pickOrderNotes?: NoteInfo[] | undefined;
    /** Date Time the order was last updated. */
    lastUpdated?: Date | undefined;
    customFields?: DcfValueInfo[] | undefined;
}

export class PickOrderLineInfo implements IPickOrderLineInfo {
    /** Indicates the item number. */
    itemNumber?: string | undefined;
    /** Indicates the quantity to be picked. */
    quantity!: number;
    /** Indicates the unit of measure being picked. */
    uomName?: string | undefined;
    /** Indicates the unit price of the item charged to the customer. */
    salesPrice!: number;
    /** The quantity of items which have been picked for this order. */
    completeQuantity!: number;
    /** The quantity of items that were requested but which have not yet been picked for this order. */
    outstandingQuantity!: number;
    /** The api function getorderspickdetails will return a list of picked items.
The api function getordersbynumber will NOT reuturn any data for this member. */
    pickDetails?: PickOrderInfoTrackby[] | undefined;

    constructor(data?: IPickOrderLineInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.quantity = _data["Quantity"];
            this.uomName = _data["UomName"];
            this.salesPrice = _data["SalesPrice"];
            this.completeQuantity = _data["CompleteQuantity"];
            this.outstandingQuantity = _data["OutstandingQuantity"];
            if (Array.isArray(_data["PickDetails"])) {
                this.pickDetails = [] as any;
                for (let item of _data["PickDetails"])
                    this.pickDetails!.push(PickOrderInfoTrackby.fromJS(item));
            }
        }
    }

    static fromJS(data: any): PickOrderLineInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PickOrderLineInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["Quantity"] = this.quantity;
        data["UomName"] = this.uomName;
        data["SalesPrice"] = this.salesPrice;
        data["CompleteQuantity"] = this.completeQuantity;
        data["OutstandingQuantity"] = this.outstandingQuantity;
        if (Array.isArray(this.pickDetails)) {
            data["PickDetails"] = [];
            for (let item of this.pickDetails)
                data["PickDetails"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IPickOrderLineInfo {
    /** Indicates the item number. */
    itemNumber?: string | undefined;
    /** Indicates the quantity to be picked. */
    quantity: number;
    /** Indicates the unit of measure being picked. */
    uomName?: string | undefined;
    /** Indicates the unit price of the item charged to the customer. */
    salesPrice: number;
    /** The quantity of items which have been picked for this order. */
    completeQuantity: number;
    /** The quantity of items that were requested but which have not yet been picked for this order. */
    outstandingQuantity: number;
    /** The api function getorderspickdetails will return a list of picked items.
The api function getordersbynumber will NOT reuturn any data for this member. */
    pickDetails?: PickOrderInfoTrackby[] | undefined;
}

/** data returned by the public api function POST:getorderspickdetails */
export class PickOrderInfoTrackby implements IPickOrderInfoTrackby {
    /** Actual inventory quantity picked.
If the item is tracked by Serial Number or by a unique Container Id, then this value will never exceed 1. */
    quantityPicked!: number;
    /** Normally, inventories are picked. If this is populated, then a container was picked, and not the inventory itself.         */
    trackbyContainer?: string | undefined;
    /** The location code where the inventory was picked from. */
    locationCode?: string | undefined;
    /** The site name where the inventory was picked from. */
    siteName?: string | undefined;
    /**     If populated, then this is a parent container from which the pick transaction occurred.
    Typically, inventory is picked from a  location, so this member will not contain data.
     */
    parentContainer?: string | undefined;
    /** The serial number of the tracked item that was picked. */
    serialNumber?: string | undefined;
    /** the lot number of the tracked item that was picked */
    lot?: string | undefined;
    /** the date code tracked item that was picked */
    dateCode?: string | undefined;

    constructor(data?: IPickOrderInfoTrackby) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.quantityPicked = _data["QuantityPicked"];
            this.trackbyContainer = _data["TrackbyContainer"];
            this.locationCode = _data["LocationCode"];
            this.siteName = _data["SiteName"];
            this.parentContainer = _data["ParentContainer"];
            this.serialNumber = _data["SerialNumber"];
            this.lot = _data["Lot"];
            this.dateCode = _data["DateCode"];
        }
    }

    static fromJS(data: any): PickOrderInfoTrackby {
        data = typeof data === 'object' ? data : {};
        let result = new PickOrderInfoTrackby();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["QuantityPicked"] = this.quantityPicked;
        data["TrackbyContainer"] = this.trackbyContainer;
        data["LocationCode"] = this.locationCode;
        data["SiteName"] = this.siteName;
        data["ParentContainer"] = this.parentContainer;
        data["SerialNumber"] = this.serialNumber;
        data["Lot"] = this.lot;
        data["DateCode"] = this.dateCode;
        return data; 
    }
}

/** data returned by the public api function POST:getorderspickdetails */
export interface IPickOrderInfoTrackby {
    /** Actual inventory quantity picked.
If the item is tracked by Serial Number or by a unique Container Id, then this value will never exceed 1. */
    quantityPicked: number;
    /** Normally, inventories are picked. If this is populated, then a container was picked, and not the inventory itself.         */
    trackbyContainer?: string | undefined;
    /** The location code where the inventory was picked from. */
    locationCode?: string | undefined;
    /** The site name where the inventory was picked from. */
    siteName?: string | undefined;
    /**     If populated, then this is a parent container from which the pick transaction occurred.
    Typically, inventory is picked from a  location, so this member will not contain data.
     */
    parentContainer?: string | undefined;
    /** The serial number of the tracked item that was picked. */
    serialNumber?: string | undefined;
    /** the lot number of the tracked item that was picked */
    lot?: string | undefined;
    /** the date code tracked item that was picked */
    dateCode?: string | undefined;
}

export class WaspResultOfListOfPickOrderInfo implements IWaspResultOfListOfPickOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: PickOrderInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfPickOrderInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(PickOrderInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfPickOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfPickOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfPickOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: PickOrderInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfWaspResultOfPickOrderInfo implements IWaspResultOfListOfWaspResultOfPickOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfPickOrderInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfPickOrderInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfPickOrderInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfPickOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfPickOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfPickOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfPickOrderInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfPickOrderInfo implements IWaspResultOfPickOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: PickOrderInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfPickOrderInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? PickOrderInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfPickOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfPickOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfPickOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: PickOrderInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class PickOrderStatusParameters implements IPickOrderStatusParameters {
    /** The unique pick order number.  */
    pickOrderNumber?: string | undefined;
    /** Indicates the Order Status Code. */
    orderStatusCode?: string | undefined;
    /** Indicates the Order Status Reason Code. */
    orderStatusReasonCode?: string | undefined;

    constructor(data?: IPickOrderStatusParameters) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.pickOrderNumber = _data["PickOrderNumber"];
            this.orderStatusCode = _data["OrderStatusCode"];
            this.orderStatusReasonCode = _data["OrderStatusReasonCode"];
        }
    }

    static fromJS(data: any): PickOrderStatusParameters {
        data = typeof data === 'object' ? data : {};
        let result = new PickOrderStatusParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PickOrderNumber"] = this.pickOrderNumber;
        data["OrderStatusCode"] = this.orderStatusCode;
        data["OrderStatusReasonCode"] = this.orderStatusReasonCode;
        return data; 
    }
}

export interface IPickOrderStatusParameters {
    /** The unique pick order number.  */
    pickOrderNumber?: string | undefined;
    /** Indicates the Order Status Code. */
    orderStatusCode?: string | undefined;
    /** Indicates the Order Status Reason Code. */
    orderStatusReasonCode?: string | undefined;
}

export class WaspResultOfListOfOrderModelSimple implements IWaspResultOfListOfOrderModelSimple {
    /** Type specific result that always depends on the function called. */
    data?: OrderModelSimple[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfOrderModelSimple) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(OrderModelSimple.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfOrderModelSimple {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfOrderModelSimple();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfOrderModelSimple {
    /** Type specific result that always depends on the function called. */
    data?: OrderModelSimple[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** This is a simpler model to be used when you just need a list of the orders with minimal additional information */
export class OrderModelSimple implements IOrderModelSimple {
    orderId!: number;
    orderNumber?: string | undefined;
    orderTypeId!: OrderTypeEnum;
    orderStatusId!: OrderStatusEnum;
    orderStatusReasonCodeId!: OrderStatusReasonCodeEnum;
    orderSourceId!: OrderSourceEnum;
    orderPriorityId!: OrderPriorityEnum;
    assignedUserId?: string | undefined;
    dateStarted?: Date | undefined;
    dateDue?: Date | undefined;
    dateComplete?: Date | undefined;
    referenceNumber?: string | undefined;
    supplierId!: number;
    customerId!: number;
    orderSiteId!: number;
    orderSiteName?: string | undefined;
    orderContainerId?: string | undefined;

    constructor(data?: IOrderModelSimple) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.orderId = _data["OrderId"];
            this.orderNumber = _data["OrderNumber"];
            this.orderTypeId = _data["OrderTypeId"];
            this.orderStatusId = _data["OrderStatusId"];
            this.orderStatusReasonCodeId = _data["OrderStatusReasonCodeId"];
            this.orderSourceId = _data["OrderSourceId"];
            this.orderPriorityId = _data["OrderPriorityId"];
            this.assignedUserId = _data["AssignedUserId"];
            this.dateStarted = _data["DateStarted"] ? new Date(_data["DateStarted"].toString()) : <any>undefined;
            this.dateDue = _data["DateDue"] ? new Date(_data["DateDue"].toString()) : <any>undefined;
            this.dateComplete = _data["DateComplete"] ? new Date(_data["DateComplete"].toString()) : <any>undefined;
            this.referenceNumber = _data["ReferenceNumber"];
            this.supplierId = _data["SupplierId"];
            this.customerId = _data["CustomerId"];
            this.orderSiteId = _data["OrderSiteId"];
            this.orderSiteName = _data["OrderSiteName"];
            this.orderContainerId = _data["OrderContainerId"];
        }
    }

    static fromJS(data: any): OrderModelSimple {
        data = typeof data === 'object' ? data : {};
        let result = new OrderModelSimple();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OrderId"] = this.orderId;
        data["OrderNumber"] = this.orderNumber;
        data["OrderTypeId"] = this.orderTypeId;
        data["OrderStatusId"] = this.orderStatusId;
        data["OrderStatusReasonCodeId"] = this.orderStatusReasonCodeId;
        data["OrderSourceId"] = this.orderSourceId;
        data["OrderPriorityId"] = this.orderPriorityId;
        data["AssignedUserId"] = this.assignedUserId;
        data["DateStarted"] = this.dateStarted ? this.dateStarted.toISOString() : <any>undefined;
        data["DateDue"] = this.dateDue ? this.dateDue.toISOString() : <any>undefined;
        data["DateComplete"] = this.dateComplete ? this.dateComplete.toISOString() : <any>undefined;
        data["ReferenceNumber"] = this.referenceNumber;
        data["SupplierId"] = this.supplierId;
        data["CustomerId"] = this.customerId;
        data["OrderSiteId"] = this.orderSiteId;
        data["OrderSiteName"] = this.orderSiteName;
        data["OrderContainerId"] = this.orderContainerId;
        return data; 
    }
}

/** This is a simpler model to be used when you just need a list of the orders with minimal additional information */
export interface IOrderModelSimple {
    orderId: number;
    orderNumber?: string | undefined;
    orderTypeId: OrderTypeEnum;
    orderStatusId: OrderStatusEnum;
    orderStatusReasonCodeId: OrderStatusReasonCodeEnum;
    orderSourceId: OrderSourceEnum;
    orderPriorityId: OrderPriorityEnum;
    assignedUserId?: string | undefined;
    dateStarted?: Date | undefined;
    dateDue?: Date | undefined;
    dateComplete?: Date | undefined;
    referenceNumber?: string | undefined;
    supplierId: number;
    customerId: number;
    orderSiteId: number;
    orderSiteName?: string | undefined;
    orderContainerId?: string | undefined;
}

export enum OrderTypeEnum {
    NoOrder = 0,
    PurchaseOrder = 1,
    SalesOrder = 2,
    PackOrder = 4,
    RMA = 5,
    WorkOrder = 6,
    ProcessOrder = 7,
    PickPackShipOrder = 8,
    MoveOrder = 9,
    MaintenanceOrder = 10,
    SchedulingTemplateOrderTypeIdMinOffset = 1000,
    WorkOrderTemplate = 1006,
    MaintenanceOrderTemplate = 1010,
}

export enum OrderStatusEnum {
    Draft = 1,
    Open = 2,
    MaintenanceOrderSave = 2,
    InProgress = 3,
    Complete = 4,
    CloseCompleted = 4,
    Closed = 5,
    CloseIncomplete = 5,
    Cancelled = 6,
    Deleted = 7,
    Rejected = 8,
    Reopen = 9,
    ECommercePreShippingPreparation = 1005,
    ECommerceShipped = 2005,
    ECommerceDeliveredToBuyer = 3005,
    NoStatus = -1,
}

export enum OrderStatusReasonCodeEnum {
    Inherit = 0,
    OK = 1,
    ItemOverage = 2,
    ItemShortage = 3,
    ClosedWithDiscrepencies = 4,
    CompleteWithDiscrepencies = 5,
    PartialRecdeipt = 6,
    VendorCancel = 7,
    ReceiverCancel = 8,
    OrderRefused = 9,
    CustomerCancel = 10,
    GeneralCancel = 11,
    PoClosedShort = 101,
    PoClosedComplete = 102,
    PoInProgressReceived = 103,
    PoInProgressReceivedShort = 104,
    PoOpenIssued = 105,
    POReceivedComplete = 106,
    ProcessPicking = 200,
    ProcessPutaway = 201,
    ProcessAssembling = 202,
    ProcessDisassembling = 203,
    ProcessShort = 204,
    ProcessOver = 205,
    ProcessDisposed = 206,
    ProcessDisposing = 207,
    PoIssued = 300,
    PoPicked = 301,
    PickedShort = 302,
    ClosedWithBackorder = 303,
    PickComplete = 304,
    NewRequest = 401,
    Inprogress = 402,
    Complete = 403,
    Incomplete = 404,
    Declined = 405,
    PartsOnOrder = 406,
    Duplicate = 407,
    OnHold = 408,
    AwaitingApproval = 409,
    MoClosedShort = 501,
    MoClosedComplete = 502,
    MoInProgressReceived = 503,
    MoInProgressReceivedShort = 504,
    MoOpenIssued = 505,
    MoReceivedComplete = 506,
    ShippingProviderRejected = 900,
    NoReason = -1,
}

export enum OrderSourceEnum {
    NotSpecified = 0,
    Manual = 1,
    AutoBuild = 2,
}

/**  */
export enum OrderPriorityEnum {
    NotApplicable = 0,
    None = 1,
    One = 1,
    Low = 2,
    Two = 2,
    Three = 3,
    Medium = 3,
    High = 4,
    Four = 4,
    Five = 5,
    Six = 6,
    Seven = 7,
    Eight = 8,
    Nine = 9,
    Ten = 10,
    PriorityLimitValue = 10,
}

export class WaspResultOfPickTransactionModel implements IWaspResultOfPickTransactionModel {
    /** Type specific result that always depends on the function called. */
    data?: PickTransactionModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfPickTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? PickTransactionModel.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfPickTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfPickTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfPickTransactionModel {
    /** Type specific result that always depends on the function called. */
    data?: PickTransactionModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class PickTransactionModel implements IPickTransactionModel {
    /** Required. Indicates the unique identifier of the pick order. */
    pickOrderNumber?: string | undefined;
    /** Optional. It is used to specify where this transaction came from (i.e. Kiosk 1, Warehouse DR3). */
    recordSource?: string | undefined;
    /** Optional. Indicates when the pick transaction occurred. By default, it will set to Today UTC. */
    receiptDate!: Date;
    /** Optional. Indicates the notes about the pick transaction. */
    notes?: string | undefined;
    pickLines?: PickLineItemModel[] | undefined;
    /** default behavior is to DISALLOW commit when some of the order lines failed preliminary validation.
If this flag is enabled, then the pick order is now inconsistent, and it will be difficult to determine which order lines were picked,
and which were not.
default behavior is to allow partial commits, which is a legacy behvior and a NON-deterministic behavior. */
    allowCommitOnPartialValidationFailures!: boolean;

    constructor(data?: IPickTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.pickOrderNumber = _data["PickOrderNumber"];
            this.recordSource = _data["RecordSource"];
            this.receiptDate = _data["ReceiptDate"] ? new Date(_data["ReceiptDate"].toString()) : <any>undefined;
            this.notes = _data["Notes"];
            if (Array.isArray(_data["PickLines"])) {
                this.pickLines = [] as any;
                for (let item of _data["PickLines"])
                    this.pickLines!.push(PickLineItemModel.fromJS(item));
            }
            this.allowCommitOnPartialValidationFailures = _data["AllowCommitOnPartialValidationFailures"];
        }
    }

    static fromJS(data: any): PickTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new PickTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PickOrderNumber"] = this.pickOrderNumber;
        data["RecordSource"] = this.recordSource;
        data["ReceiptDate"] = this.receiptDate ? this.receiptDate.toISOString() : <any>undefined;
        data["Notes"] = this.notes;
        if (Array.isArray(this.pickLines)) {
            data["PickLines"] = [];
            for (let item of this.pickLines)
                data["PickLines"].push(item.toJSON());
        }
        data["AllowCommitOnPartialValidationFailures"] = this.allowCommitOnPartialValidationFailures;
        return data; 
    }
}

export interface IPickTransactionModel {
    /** Required. Indicates the unique identifier of the pick order. */
    pickOrderNumber?: string | undefined;
    /** Optional. It is used to specify where this transaction came from (i.e. Kiosk 1, Warehouse DR3). */
    recordSource?: string | undefined;
    /** Optional. Indicates when the pick transaction occurred. By default, it will set to Today UTC. */
    receiptDate: Date;
    /** Optional. Indicates the notes about the pick transaction. */
    notes?: string | undefined;
    pickLines?: PickLineItemModel[] | undefined;
    /** default behavior is to DISALLOW commit when some of the order lines failed preliminary validation.
If this flag is enabled, then the pick order is now inconsistent, and it will be difficult to determine which order lines were picked,
and which were not.
default behavior is to allow partial commits, which is a legacy behvior and a NON-deterministic behavior. */
    allowCommitOnPartialValidationFailures: boolean;
}

export class PickLineItemModel implements IPickLineItemModel {
    /** Required. Indicates the unique identifier for this item. */
    itemNumber?: string | undefined;
    /** Required. Indicates the unit of measure associated with the item being picked, must be specified even if there is only one unit on this order. Conversion from one unit of measure to another is not handled by this API. */
    unitOfMeasure?: string | undefined;
    /** Required. Indicates the site the inventory is located. */
    siteName?: string | undefined;
    /** Required. Indicates the location in the site where the inventory is located. */
    locationCode?: string | undefined;
    /** The license plate of the container the quantity is located in */
    parentContainerId?: string | undefined;
    /** Required. Indicates the quantity to pick. */
    quantity!: number;
    /** Indicates the date code of the inventory. */
    dateCode?: Date | undefined;
    /** Indicates the lot of the inventory. */
    lot?: string | undefined;
    /** Indicates the unique serial number of the inventory. */
    serialNumber?: string | undefined;
    /** Indicates the unique license plate of the container you want picked.
This will pick the entire contents of the container as well. */
    containerId?: string | undefined;

    constructor(data?: IPickLineItemModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.unitOfMeasure = _data["UnitOfMeasure"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.parentContainerId = _data["ParentContainerId"];
            this.quantity = _data["Quantity"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.containerId = _data["ContainerId"];
        }
    }

    static fromJS(data: any): PickLineItemModel {
        data = typeof data === 'object' ? data : {};
        let result = new PickLineItemModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["UnitOfMeasure"] = this.unitOfMeasure;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["ParentContainerId"] = this.parentContainerId;
        data["Quantity"] = this.quantity;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["ContainerId"] = this.containerId;
        return data; 
    }
}

export interface IPickLineItemModel {
    /** Required. Indicates the unique identifier for this item. */
    itemNumber?: string | undefined;
    /** Required. Indicates the unit of measure associated with the item being picked, must be specified even if there is only one unit on this order. Conversion from one unit of measure to another is not handled by this API. */
    unitOfMeasure?: string | undefined;
    /** Required. Indicates the site the inventory is located. */
    siteName?: string | undefined;
    /** Required. Indicates the location in the site where the inventory is located. */
    locationCode?: string | undefined;
    /** The license plate of the container the quantity is located in */
    parentContainerId?: string | undefined;
    /** Required. Indicates the quantity to pick. */
    quantity: number;
    /** Indicates the date code of the inventory. */
    dateCode?: Date | undefined;
    /** Indicates the lot of the inventory. */
    lot?: string | undefined;
    /** Indicates the unique serial number of the inventory. */
    serialNumber?: string | undefined;
    /** Indicates the unique license plate of the container you want picked.
This will pick the entire contents of the container as well. */
    containerId?: string | undefined;
}

/** given a pick order number, and optional list of container identifiers use this to create a list of PickTransactionModel.PickLines */
export class PickTransactionCreationRequestModel implements IPickTransactionCreationRequestModel {
    /** the name or ip address of the mobile device
or default to WEB MVC or PUBLIC API */
    recordSource?: string | undefined;
    returnPickLineDetails!: boolean;
    orderId!: number;
    action!: POAction;
    /** Required. Indicates the unique identifier of the pick order. */
    pickOrderNumber?: string | undefined;
    /** if empty list, or list of empty/null values, then  store a null reference */
    sourceContainerIdList?: string[] | undefined;

    constructor(data?: IPickTransactionCreationRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.recordSource = _data["RecordSource"];
            this.returnPickLineDetails = _data["ReturnPickLineDetails"];
            this.orderId = _data["OrderId"];
            this.action = _data["Action"];
            this.pickOrderNumber = _data["PickOrderNumber"];
            if (Array.isArray(_data["SourceContainerIdList"])) {
                this.sourceContainerIdList = [] as any;
                for (let item of _data["SourceContainerIdList"])
                    this.sourceContainerIdList!.push(item);
            }
        }
    }

    static fromJS(data: any): PickTransactionCreationRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new PickTransactionCreationRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RecordSource"] = this.recordSource;
        data["ReturnPickLineDetails"] = this.returnPickLineDetails;
        data["OrderId"] = this.orderId;
        data["Action"] = this.action;
        data["PickOrderNumber"] = this.pickOrderNumber;
        if (Array.isArray(this.sourceContainerIdList)) {
            data["SourceContainerIdList"] = [];
            for (let item of this.sourceContainerIdList)
                data["SourceContainerIdList"].push(item);
        }
        return data; 
    }
}

/** given a pick order number, and optional list of container identifiers use this to create a list of PickTransactionModel.PickLines */
export interface IPickTransactionCreationRequestModel {
    /** the name or ip address of the mobile device
or default to WEB MVC or PUBLIC API */
    recordSource?: string | undefined;
    returnPickLineDetails: boolean;
    orderId: number;
    action: POAction;
    /** Required. Indicates the unique identifier of the pick order. */
    pickOrderNumber?: string | undefined;
    /** if empty list, or list of empty/null values, then  store a null reference */
    sourceContainerIdList?: string[] | undefined;
}

export enum POAction {
    NoAction = 0,
    Save = 1,
    SaveSend = 2,
    SaveClose = 3,
    Cancel = 4,
    CancelVendor = 5,
    CloseCreateBO = 6,
    Delete = 7,
    CancelCustomer = 8,
}

export class PurchaseOrderInfoBaseOfPurchaseOrderLineInfo implements IPurchaseOrderInfoBaseOfPurchaseOrderLineInfo {
    /** Internal. This is used to help identify errors if any. */
    rowNumber!: number;
    /** the unique order id. */
    orderId!: number;
    /** Required. It is the unique order number for the purchase order. */
    purchaseOrderNumber?: string | undefined;
    /** A brief description of this order. */
    descriptionText?: string | undefined;
    /** A field that can be used to reference another order. */
    referenceNumber?: string | undefined;
    /** Indicates the date the order was started. */
    dateStarted?: Date | undefined;
    /** Indicates the date the order is supposed to be completed. */
    dateDue?: Date | undefined;
    /** Indicates the vendor number the items are being purchased from. */
    vendorNumber?: string | undefined;
    /** Indicates the order status. */
    orderStatus?: string | undefined;
    /** Indicates the order status reason code.    */
    orderStatusReasonCode?: string | undefined;
    /** Indicates the type of shipping method, needs to already exist in the system. */
    shipMethod?: string | undefined;
    /** Indicates how the items are being paid, needs to already exist in the system. */
    payMethod?: string | undefined;
    /** Indicates the cost to ship the items. */
    shippingCost!: number;
    /** Indicates the cost from tax. */
    taxCost!: number;
    /** Indicates the total cost of the order. */
    totalCost!: number;
    /** Indicates the address of where the items should be shipped to. */
    shipToContact?: AddressInfo | undefined;
    /** Indicates the vendor's address. */
    vendorContact?: AddressInfo | undefined;
    /** Indicates the details of the items on the order. */
    purchaseOrderLines?: PurchaseOrderLineInfo[] | undefined;
    /** Indicates the notes associated with the order. */
    purchaseOrderNotes?: NoteInfo[] | undefined;
    quantity?: number | undefined;
    locationId?: number | undefined;
    siteName?: string | undefined;
    containerId!: number;
    purchaseDate!: Date;
    supplierId?: number | undefined;
    supplierName?: string | undefined;
    purchaseCost!: number;
    /** the total cost of the received assets */
    accrual?: number | undefined;
    /** the total cost of the oustanding assets */
    outstanding?: number | undefined;
    /** This is the custom fields associated with the order. */
    customFields?: DcfValueInfo[] | undefined;
    supplierContact?: OrderContactModel | undefined;
    supplier?: SupplierModel | undefined;

    constructor(data?: IPurchaseOrderInfoBaseOfPurchaseOrderLineInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.orderId = _data["OrderId"];
            this.purchaseOrderNumber = _data["PurchaseOrderNumber"];
            this.descriptionText = _data["DescriptionText"];
            this.referenceNumber = _data["ReferenceNumber"];
            this.dateStarted = _data["DateStarted"] ? new Date(_data["DateStarted"].toString()) : <any>undefined;
            this.dateDue = _data["DateDue"] ? new Date(_data["DateDue"].toString()) : <any>undefined;
            this.vendorNumber = _data["VendorNumber"];
            this.orderStatus = _data["OrderStatus"];
            this.orderStatusReasonCode = _data["OrderStatusReasonCode"];
            this.shipMethod = _data["ShipMethod"];
            this.payMethod = _data["PayMethod"];
            this.shippingCost = _data["ShippingCost"];
            this.taxCost = _data["TaxCost"];
            this.totalCost = _data["TotalCost"];
            this.shipToContact = _data["ShipToContact"] ? AddressInfo.fromJS(_data["ShipToContact"]) : <any>undefined;
            this.vendorContact = _data["VendorContact"] ? AddressInfo.fromJS(_data["VendorContact"]) : <any>undefined;
            if (Array.isArray(_data["PurchaseOrderLines"])) {
                this.purchaseOrderLines = [] as any;
                for (let item of _data["PurchaseOrderLines"])
                    this.purchaseOrderLines!.push(PurchaseOrderLineInfo.fromJS(item));
            }
            if (Array.isArray(_data["PurchaseOrderNotes"])) {
                this.purchaseOrderNotes = [] as any;
                for (let item of _data["PurchaseOrderNotes"])
                    this.purchaseOrderNotes!.push(NoteInfo.fromJS(item));
            }
            this.quantity = _data["Quantity"];
            this.locationId = _data["LocationId"];
            this.siteName = _data["SiteName"];
            this.containerId = _data["ContainerId"];
            this.purchaseDate = _data["PurchaseDate"] ? new Date(_data["PurchaseDate"].toString()) : <any>undefined;
            this.supplierId = _data["SupplierId"];
            this.supplierName = _data["SupplierName"];
            this.purchaseCost = _data["PurchaseCost"];
            this.accrual = _data["Accrual"];
            this.outstanding = _data["Outstanding"];
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            this.supplierContact = _data["SupplierContact"] ? OrderContactModel.fromJS(_data["SupplierContact"]) : <any>undefined;
            this.supplier = _data["Supplier"] ? SupplierModel.fromJS(_data["Supplier"]) : <any>undefined;
        }
    }

    static fromJS(data: any): PurchaseOrderInfoBaseOfPurchaseOrderLineInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderInfoBaseOfPurchaseOrderLineInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["OrderId"] = this.orderId;
        data["PurchaseOrderNumber"] = this.purchaseOrderNumber;
        data["DescriptionText"] = this.descriptionText;
        data["ReferenceNumber"] = this.referenceNumber;
        data["DateStarted"] = this.dateStarted ? this.dateStarted.toISOString() : <any>undefined;
        data["DateDue"] = this.dateDue ? this.dateDue.toISOString() : <any>undefined;
        data["VendorNumber"] = this.vendorNumber;
        data["OrderStatus"] = this.orderStatus;
        data["OrderStatusReasonCode"] = this.orderStatusReasonCode;
        data["ShipMethod"] = this.shipMethod;
        data["PayMethod"] = this.payMethod;
        data["ShippingCost"] = this.shippingCost;
        data["TaxCost"] = this.taxCost;
        data["TotalCost"] = this.totalCost;
        data["ShipToContact"] = this.shipToContact ? this.shipToContact.toJSON() : <any>undefined;
        data["VendorContact"] = this.vendorContact ? this.vendorContact.toJSON() : <any>undefined;
        if (Array.isArray(this.purchaseOrderLines)) {
            data["PurchaseOrderLines"] = [];
            for (let item of this.purchaseOrderLines)
                data["PurchaseOrderLines"].push(item.toJSON());
        }
        if (Array.isArray(this.purchaseOrderNotes)) {
            data["PurchaseOrderNotes"] = [];
            for (let item of this.purchaseOrderNotes)
                data["PurchaseOrderNotes"].push(item.toJSON());
        }
        data["Quantity"] = this.quantity;
        data["LocationId"] = this.locationId;
        data["SiteName"] = this.siteName;
        data["ContainerId"] = this.containerId;
        data["PurchaseDate"] = this.purchaseDate ? this.purchaseDate.toISOString() : <any>undefined;
        data["SupplierId"] = this.supplierId;
        data["SupplierName"] = this.supplierName;
        data["PurchaseCost"] = this.purchaseCost;
        data["Accrual"] = this.accrual;
        data["Outstanding"] = this.outstanding;
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["SupplierContact"] = this.supplierContact ? this.supplierContact.toJSON() : <any>undefined;
        data["Supplier"] = this.supplier ? this.supplier.toJSON() : <any>undefined;
        return data; 
    }
}

export interface IPurchaseOrderInfoBaseOfPurchaseOrderLineInfo {
    /** Internal. This is used to help identify errors if any. */
    rowNumber: number;
    /** the unique order id. */
    orderId: number;
    /** Required. It is the unique order number for the purchase order. */
    purchaseOrderNumber?: string | undefined;
    /** A brief description of this order. */
    descriptionText?: string | undefined;
    /** A field that can be used to reference another order. */
    referenceNumber?: string | undefined;
    /** Indicates the date the order was started. */
    dateStarted?: Date | undefined;
    /** Indicates the date the order is supposed to be completed. */
    dateDue?: Date | undefined;
    /** Indicates the vendor number the items are being purchased from. */
    vendorNumber?: string | undefined;
    /** Indicates the order status. */
    orderStatus?: string | undefined;
    /** Indicates the order status reason code.    */
    orderStatusReasonCode?: string | undefined;
    /** Indicates the type of shipping method, needs to already exist in the system. */
    shipMethod?: string | undefined;
    /** Indicates how the items are being paid, needs to already exist in the system. */
    payMethod?: string | undefined;
    /** Indicates the cost to ship the items. */
    shippingCost: number;
    /** Indicates the cost from tax. */
    taxCost: number;
    /** Indicates the total cost of the order. */
    totalCost: number;
    /** Indicates the address of where the items should be shipped to. */
    shipToContact?: AddressInfo | undefined;
    /** Indicates the vendor's address. */
    vendorContact?: AddressInfo | undefined;
    /** Indicates the details of the items on the order. */
    purchaseOrderLines?: PurchaseOrderLineInfo[] | undefined;
    /** Indicates the notes associated with the order. */
    purchaseOrderNotes?: NoteInfo[] | undefined;
    quantity?: number | undefined;
    locationId?: number | undefined;
    siteName?: string | undefined;
    containerId: number;
    purchaseDate: Date;
    supplierId?: number | undefined;
    supplierName?: string | undefined;
    purchaseCost: number;
    /** the total cost of the received assets */
    accrual?: number | undefined;
    /** the total cost of the oustanding assets */
    outstanding?: number | undefined;
    /** This is the custom fields associated with the order. */
    customFields?: DcfValueInfo[] | undefined;
    supplierContact?: OrderContactModel | undefined;
    supplier?: SupplierModel | undefined;
}

export class PurchaseOrderInfo extends PurchaseOrderInfoBaseOfPurchaseOrderLineInfo implements IPurchaseOrderInfo {
    lastUpdatedDate?: Date | undefined;

    constructor(data?: IPurchaseOrderInfo) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.lastUpdatedDate = _data["LastUpdatedDate"] ? new Date(_data["LastUpdatedDate"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): PurchaseOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["LastUpdatedDate"] = this.lastUpdatedDate ? this.lastUpdatedDate.toISOString() : <any>undefined;
        super.toJSON(data);
        return data; 
    }
}

export interface IPurchaseOrderInfo extends IPurchaseOrderInfoBaseOfPurchaseOrderLineInfo {
    lastUpdatedDate?: Date | undefined;
}

export class PurchaseOrderLineBaseInfo implements IPurchaseOrderLineBaseInfo {
    /** A description of the item on the order. */
    lineItemDescription?: string | undefined;
    /** Indicates the vendor's sku for the item. */
    vendorSku?: string | undefined;
    /** Indicates the tax cost of the line item. */
    taxCost!: number;
    /** Indicates the cost to ship the line item. */
    shippingCost!: number;
    /** Indicates the total cost of the line item, excluding shipping and tax. */
    totalLineCost!: number;
    /** Internal. Indicates the total cost of the line item, including shipping and tax. */
    grandTotalLineCost!: number;
    /** Indicates the quantity (or amount) requested from the vendor. */
    quantityRequested!: number;
    /** Read-only. Indicates the requested quantity of the item that has been fulfilled. */
    quantityComplete!: number;

    constructor(data?: IPurchaseOrderLineBaseInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.lineItemDescription = _data["LineItemDescription"];
            this.vendorSku = _data["VendorSku"];
            this.taxCost = _data["TaxCost"];
            this.shippingCost = _data["ShippingCost"];
            this.totalLineCost = _data["TotalLineCost"];
            this.grandTotalLineCost = _data["GrandTotalLineCost"];
            this.quantityRequested = _data["QuantityRequested"];
            this.quantityComplete = _data["QuantityComplete"];
        }
    }

    static fromJS(data: any): PurchaseOrderLineBaseInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderLineBaseInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["LineItemDescription"] = this.lineItemDescription;
        data["VendorSku"] = this.vendorSku;
        data["TaxCost"] = this.taxCost;
        data["ShippingCost"] = this.shippingCost;
        data["TotalLineCost"] = this.totalLineCost;
        data["GrandTotalLineCost"] = this.grandTotalLineCost;
        data["QuantityRequested"] = this.quantityRequested;
        data["QuantityComplete"] = this.quantityComplete;
        return data; 
    }
}

export interface IPurchaseOrderLineBaseInfo {
    /** A description of the item on the order. */
    lineItemDescription?: string | undefined;
    /** Indicates the vendor's sku for the item. */
    vendorSku?: string | undefined;
    /** Indicates the tax cost of the line item. */
    taxCost: number;
    /** Indicates the cost to ship the line item. */
    shippingCost: number;
    /** Indicates the total cost of the line item, excluding shipping and tax. */
    totalLineCost: number;
    /** Internal. Indicates the total cost of the line item, including shipping and tax. */
    grandTotalLineCost: number;
    /** Indicates the quantity (or amount) requested from the vendor. */
    quantityRequested: number;
    /** Read-only. Indicates the requested quantity of the item that has been fulfilled. */
    quantityComplete: number;
}

export class PurchaseOrderLineInfo extends PurchaseOrderLineBaseInfo implements IPurchaseOrderLineInfo {
    /** Indicates the unique identifier of the item. */
    itemNumber?: string | undefined;
    /** Read-only. Indicates the abbreviation for the unit of measure used. */
    uomAbbreviation?: string | undefined;
    /** Indicates the unit of measure used on the line item. */
    uomName?: string | undefined;
    /** Indicates the price of the item purchased from the vendor. */
    itemPrice!: number;
    groupCode?: string | undefined;

    constructor(data?: IPurchaseOrderLineInfo) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.uomAbbreviation = _data["UomAbbreviation"];
            this.uomName = _data["UomName"];
            this.itemPrice = _data["ItemPrice"];
            this.groupCode = _data["GroupCode"];
        }
    }

    static fromJS(data: any): PurchaseOrderLineInfo {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderLineInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["UomAbbreviation"] = this.uomAbbreviation;
        data["UomName"] = this.uomName;
        data["ItemPrice"] = this.itemPrice;
        data["GroupCode"] = this.groupCode;
        super.toJSON(data);
        return data; 
    }
}

export interface IPurchaseOrderLineInfo extends IPurchaseOrderLineBaseInfo {
    /** Indicates the unique identifier of the item. */
    itemNumber?: string | undefined;
    /** Read-only. Indicates the abbreviation for the unit of measure used. */
    uomAbbreviation?: string | undefined;
    /** Indicates the unit of measure used on the line item. */
    uomName?: string | undefined;
    /** Indicates the price of the item purchased from the vendor. */
    itemPrice: number;
    groupCode?: string | undefined;
}

export class OrderContactModel implements IOrderContactModel {
    contactId!: number;
    nameLast?: string | undefined;
    nameFirst?: string | undefined;
    addressLine1?: string | undefined;
    addressLine2?: string | undefined;
    addressLine3?: string | undefined;
    addressLine4?: string | undefined;
    addressCity?: string | undefined;
    addressStateProvince?: string | undefined;
    addressCountry?: string | undefined;
    addressPostalCode?: string | undefined;
    contactPhone?: string | undefined;
    contactEmail?: string | undefined;

    constructor(data?: IOrderContactModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.contactId = _data["ContactId"];
            this.nameLast = _data["NameLast"];
            this.nameFirst = _data["NameFirst"];
            this.addressLine1 = _data["AddressLine1"];
            this.addressLine2 = _data["AddressLine2"];
            this.addressLine3 = _data["AddressLine3"];
            this.addressLine4 = _data["AddressLine4"];
            this.addressCity = _data["AddressCity"];
            this.addressStateProvince = _data["AddressStateProvince"];
            this.addressCountry = _data["AddressCountry"];
            this.addressPostalCode = _data["AddressPostalCode"];
            this.contactPhone = _data["ContactPhone"];
            this.contactEmail = _data["ContactEmail"];
        }
    }

    static fromJS(data: any): OrderContactModel {
        data = typeof data === 'object' ? data : {};
        let result = new OrderContactModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ContactId"] = this.contactId;
        data["NameLast"] = this.nameLast;
        data["NameFirst"] = this.nameFirst;
        data["AddressLine1"] = this.addressLine1;
        data["AddressLine2"] = this.addressLine2;
        data["AddressLine3"] = this.addressLine3;
        data["AddressLine4"] = this.addressLine4;
        data["AddressCity"] = this.addressCity;
        data["AddressStateProvince"] = this.addressStateProvince;
        data["AddressCountry"] = this.addressCountry;
        data["AddressPostalCode"] = this.addressPostalCode;
        data["ContactPhone"] = this.contactPhone;
        data["ContactEmail"] = this.contactEmail;
        return data; 
    }
}

export interface IOrderContactModel {
    contactId: number;
    nameLast?: string | undefined;
    nameFirst?: string | undefined;
    addressLine1?: string | undefined;
    addressLine2?: string | undefined;
    addressLine3?: string | undefined;
    addressLine4?: string | undefined;
    addressCity?: string | undefined;
    addressStateProvince?: string | undefined;
    addressCountry?: string | undefined;
    addressPostalCode?: string | undefined;
    contactPhone?: string | undefined;
    contactEmail?: string | undefined;
}

export class SupplierModel implements ISupplierModel {
    importRowNumber!: number;
    supplierId!: number;
    supplierNumber?: string | undefined;
    supplierName?: string | undefined;
    supplierEmail?: string | undefined;
    supplierWebsite?: string | undefined;
    supplierContactName?: string | undefined;
    supplierContactEmail?: string | undefined;
    supplierRecordStatus!: number;
    supplierUserId?: string | undefined;
    supplierRowVersion?: string | undefined;
    supplierContactPhone?: string | undefined;
    addressCity?: string | undefined;
    addressState?: string | undefined;
    address1?: string | undefined;
    addressPostalCode?: string | undefined;
    addresses?: AddressModel[] | undefined;
    contactCell?: PhoneModel | undefined;
    contactFax?: PhoneModel | undefined;
    contactPhone?: PhoneModel | undefined;
    phone?: PhoneModel | undefined;
    fax?: PhoneModel | undefined;
    supplierNotes?: NoteModel[] | undefined;
    customFields?: DcfValueModel[] | undefined;
    attachmentIdsToAdd?: number[] | undefined;
    attachmentIdsToDelete?: number[] | undefined;
    attachmentNames?: AttachmentModel[] | undefined;
    isAutogeneratedSupplierNumber!: boolean;
    newDefaultAttachmentId?: number | undefined;
    hasAttachment!: boolean;
    payMethodId?: number | undefined;
    lastUpdated?: Date | undefined;

    constructor(data?: ISupplierModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.supplierId = _data["SupplierId"];
            this.supplierNumber = _data["SupplierNumber"];
            this.supplierName = _data["SupplierName"];
            this.supplierEmail = _data["SupplierEmail"];
            this.supplierWebsite = _data["SupplierWebsite"];
            this.supplierContactName = _data["SupplierContactName"];
            this.supplierContactEmail = _data["SupplierContactEmail"];
            this.supplierRecordStatus = _data["SupplierRecordStatus"];
            this.supplierUserId = _data["SupplierUserId"];
            this.supplierRowVersion = _data["SupplierRowVersion"];
            this.supplierContactPhone = _data["SupplierContactPhone"];
            this.addressCity = _data["AddressCity"];
            this.addressState = _data["AddressState"];
            this.address1 = _data["Address1"];
            this.addressPostalCode = _data["AddressPostalCode"];
            if (Array.isArray(_data["Addresses"])) {
                this.addresses = [] as any;
                for (let item of _data["Addresses"])
                    this.addresses!.push(AddressModel.fromJS(item));
            }
            this.contactCell = _data["ContactCell"] ? PhoneModel.fromJS(_data["ContactCell"]) : <any>undefined;
            this.contactFax = _data["ContactFax"] ? PhoneModel.fromJS(_data["ContactFax"]) : <any>undefined;
            this.contactPhone = _data["ContactPhone"] ? PhoneModel.fromJS(_data["ContactPhone"]) : <any>undefined;
            this.phone = _data["Phone"] ? PhoneModel.fromJS(_data["Phone"]) : <any>undefined;
            this.fax = _data["Fax"] ? PhoneModel.fromJS(_data["Fax"]) : <any>undefined;
            if (Array.isArray(_data["SupplierNotes"])) {
                this.supplierNotes = [] as any;
                for (let item of _data["SupplierNotes"])
                    this.supplierNotes!.push(NoteModel.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueModel.fromJS(item));
            }
            if (Array.isArray(_data["AttachmentIdsToAdd"])) {
                this.attachmentIdsToAdd = [] as any;
                for (let item of _data["AttachmentIdsToAdd"])
                    this.attachmentIdsToAdd!.push(item);
            }
            if (Array.isArray(_data["AttachmentIdsToDelete"])) {
                this.attachmentIdsToDelete = [] as any;
                for (let item of _data["AttachmentIdsToDelete"])
                    this.attachmentIdsToDelete!.push(item);
            }
            if (Array.isArray(_data["AttachmentNames"])) {
                this.attachmentNames = [] as any;
                for (let item of _data["AttachmentNames"])
                    this.attachmentNames!.push(AttachmentModel.fromJS(item));
            }
            this.isAutogeneratedSupplierNumber = _data["IsAutogeneratedSupplierNumber"];
            this.newDefaultAttachmentId = _data["NewDefaultAttachmentId"];
            this.hasAttachment = _data["HasAttachment"];
            this.payMethodId = _data["PayMethodId"];
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): SupplierModel {
        data = typeof data === 'object' ? data : {};
        let result = new SupplierModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["SupplierId"] = this.supplierId;
        data["SupplierNumber"] = this.supplierNumber;
        data["SupplierName"] = this.supplierName;
        data["SupplierEmail"] = this.supplierEmail;
        data["SupplierWebsite"] = this.supplierWebsite;
        data["SupplierContactName"] = this.supplierContactName;
        data["SupplierContactEmail"] = this.supplierContactEmail;
        data["SupplierRecordStatus"] = this.supplierRecordStatus;
        data["SupplierUserId"] = this.supplierUserId;
        data["SupplierRowVersion"] = this.supplierRowVersion;
        data["SupplierContactPhone"] = this.supplierContactPhone;
        data["AddressCity"] = this.addressCity;
        data["AddressState"] = this.addressState;
        data["Address1"] = this.address1;
        data["AddressPostalCode"] = this.addressPostalCode;
        if (Array.isArray(this.addresses)) {
            data["Addresses"] = [];
            for (let item of this.addresses)
                data["Addresses"].push(item.toJSON());
        }
        data["ContactCell"] = this.contactCell ? this.contactCell.toJSON() : <any>undefined;
        data["ContactFax"] = this.contactFax ? this.contactFax.toJSON() : <any>undefined;
        data["ContactPhone"] = this.contactPhone ? this.contactPhone.toJSON() : <any>undefined;
        data["Phone"] = this.phone ? this.phone.toJSON() : <any>undefined;
        data["Fax"] = this.fax ? this.fax.toJSON() : <any>undefined;
        if (Array.isArray(this.supplierNotes)) {
            data["SupplierNotes"] = [];
            for (let item of this.supplierNotes)
                data["SupplierNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        if (Array.isArray(this.attachmentIdsToAdd)) {
            data["AttachmentIdsToAdd"] = [];
            for (let item of this.attachmentIdsToAdd)
                data["AttachmentIdsToAdd"].push(item);
        }
        if (Array.isArray(this.attachmentIdsToDelete)) {
            data["AttachmentIdsToDelete"] = [];
            for (let item of this.attachmentIdsToDelete)
                data["AttachmentIdsToDelete"].push(item);
        }
        if (Array.isArray(this.attachmentNames)) {
            data["AttachmentNames"] = [];
            for (let item of this.attachmentNames)
                data["AttachmentNames"].push(item.toJSON());
        }
        data["IsAutogeneratedSupplierNumber"] = this.isAutogeneratedSupplierNumber;
        data["NewDefaultAttachmentId"] = this.newDefaultAttachmentId;
        data["HasAttachment"] = this.hasAttachment;
        data["PayMethodId"] = this.payMethodId;
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        return data; 
    }
}

export interface ISupplierModel {
    importRowNumber: number;
    supplierId: number;
    supplierNumber?: string | undefined;
    supplierName?: string | undefined;
    supplierEmail?: string | undefined;
    supplierWebsite?: string | undefined;
    supplierContactName?: string | undefined;
    supplierContactEmail?: string | undefined;
    supplierRecordStatus: number;
    supplierUserId?: string | undefined;
    supplierRowVersion?: string | undefined;
    supplierContactPhone?: string | undefined;
    addressCity?: string | undefined;
    addressState?: string | undefined;
    address1?: string | undefined;
    addressPostalCode?: string | undefined;
    addresses?: AddressModel[] | undefined;
    contactCell?: PhoneModel | undefined;
    contactFax?: PhoneModel | undefined;
    contactPhone?: PhoneModel | undefined;
    phone?: PhoneModel | undefined;
    fax?: PhoneModel | undefined;
    supplierNotes?: NoteModel[] | undefined;
    customFields?: DcfValueModel[] | undefined;
    attachmentIdsToAdd?: number[] | undefined;
    attachmentIdsToDelete?: number[] | undefined;
    attachmentNames?: AttachmentModel[] | undefined;
    isAutogeneratedSupplierNumber: boolean;
    newDefaultAttachmentId?: number | undefined;
    hasAttachment: boolean;
    payMethodId?: number | undefined;
    lastUpdated?: Date | undefined;
}

export class AddressModel implements IAddressModel {
    addressImportRowNumber!: number;
    addressId!: number;
    addressTypeId!: number;
    addressAssociationId!: number;
    address1?: string | undefined;
    address2?: string | undefined;
    address3?: string | undefined;
    address4?: string | undefined;
    addressCity?: string | undefined;
    addressState?: string | undefined;
    addressPostalCode?: string | undefined;
    addressCountry?: string | undefined;
    addressMailStop?: string | undefined;
    addressTypeName?: string | undefined;
    addressTypeLangLabel?: string | undefined;
    addressTypeFormId!: number;
    addressChangeType?: number | undefined;
    hdnAddressTypeId!: number;
    addressRecordStatus!: number;
    addressIsPrimary!: boolean;

    constructor(data?: IAddressModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.addressImportRowNumber = _data["AddressImportRowNumber"];
            this.addressId = _data["AddressId"];
            this.addressTypeId = _data["AddressTypeId"];
            this.addressAssociationId = _data["AddressAssociationId"];
            this.address1 = _data["Address1"];
            this.address2 = _data["Address2"];
            this.address3 = _data["Address3"];
            this.address4 = _data["Address4"];
            this.addressCity = _data["AddressCity"];
            this.addressState = _data["AddressState"];
            this.addressPostalCode = _data["AddressPostalCode"];
            this.addressCountry = _data["AddressCountry"];
            this.addressMailStop = _data["AddressMailStop"];
            this.addressTypeName = _data["AddressTypeName"];
            this.addressTypeLangLabel = _data["AddressTypeLangLabel"];
            this.addressTypeFormId = _data["AddressTypeFormId"];
            this.addressChangeType = _data["AddressChangeType"];
            this.hdnAddressTypeId = _data["HdnAddressTypeId"];
            this.addressRecordStatus = _data["AddressRecordStatus"];
            this.addressIsPrimary = _data["AddressIsPrimary"];
        }
    }

    static fromJS(data: any): AddressModel {
        data = typeof data === 'object' ? data : {};
        let result = new AddressModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AddressImportRowNumber"] = this.addressImportRowNumber;
        data["AddressId"] = this.addressId;
        data["AddressTypeId"] = this.addressTypeId;
        data["AddressAssociationId"] = this.addressAssociationId;
        data["Address1"] = this.address1;
        data["Address2"] = this.address2;
        data["Address3"] = this.address3;
        data["Address4"] = this.address4;
        data["AddressCity"] = this.addressCity;
        data["AddressState"] = this.addressState;
        data["AddressPostalCode"] = this.addressPostalCode;
        data["AddressCountry"] = this.addressCountry;
        data["AddressMailStop"] = this.addressMailStop;
        data["AddressTypeName"] = this.addressTypeName;
        data["AddressTypeLangLabel"] = this.addressTypeLangLabel;
        data["AddressTypeFormId"] = this.addressTypeFormId;
        data["AddressChangeType"] = this.addressChangeType;
        data["HdnAddressTypeId"] = this.hdnAddressTypeId;
        data["AddressRecordStatus"] = this.addressRecordStatus;
        data["AddressIsPrimary"] = this.addressIsPrimary;
        return data; 
    }
}

export interface IAddressModel {
    addressImportRowNumber: number;
    addressId: number;
    addressTypeId: number;
    addressAssociationId: number;
    address1?: string | undefined;
    address2?: string | undefined;
    address3?: string | undefined;
    address4?: string | undefined;
    addressCity?: string | undefined;
    addressState?: string | undefined;
    addressPostalCode?: string | undefined;
    addressCountry?: string | undefined;
    addressMailStop?: string | undefined;
    addressTypeName?: string | undefined;
    addressTypeLangLabel?: string | undefined;
    addressTypeFormId: number;
    addressChangeType?: number | undefined;
    hdnAddressTypeId: number;
    addressRecordStatus: number;
    addressIsPrimary: boolean;
}

export class PhoneModel implements IPhoneModel {
    phoneImportRowNumber!: number;
    phoneId!: number;
    phoneTypeId!: number;
    phoneAssociationId!: number;
    phoneNumber?: string | undefined;
    phoneExtension?: string | undefined;
    phoneTypeFormId?: number | undefined;
    phoneTypeName?: string | undefined;
    phoneTypeLangLabel?: string | undefined;
    phoneChangeType?: number | undefined;

    constructor(data?: IPhoneModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.phoneImportRowNumber = _data["PhoneImportRowNumber"];
            this.phoneId = _data["PhoneId"];
            this.phoneTypeId = _data["PhoneTypeId"];
            this.phoneAssociationId = _data["PhoneAssociationId"];
            this.phoneNumber = _data["PhoneNumber"];
            this.phoneExtension = _data["PhoneExtension"];
            this.phoneTypeFormId = _data["PhoneTypeFormId"];
            this.phoneTypeName = _data["PhoneTypeName"];
            this.phoneTypeLangLabel = _data["PhoneTypeLangLabel"];
            this.phoneChangeType = _data["PhoneChangeType"];
        }
    }

    static fromJS(data: any): PhoneModel {
        data = typeof data === 'object' ? data : {};
        let result = new PhoneModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PhoneImportRowNumber"] = this.phoneImportRowNumber;
        data["PhoneId"] = this.phoneId;
        data["PhoneTypeId"] = this.phoneTypeId;
        data["PhoneAssociationId"] = this.phoneAssociationId;
        data["PhoneNumber"] = this.phoneNumber;
        data["PhoneExtension"] = this.phoneExtension;
        data["PhoneTypeFormId"] = this.phoneTypeFormId;
        data["PhoneTypeName"] = this.phoneTypeName;
        data["PhoneTypeLangLabel"] = this.phoneTypeLangLabel;
        data["PhoneChangeType"] = this.phoneChangeType;
        return data; 
    }
}

export interface IPhoneModel {
    phoneImportRowNumber: number;
    phoneId: number;
    phoneTypeId: number;
    phoneAssociationId: number;
    phoneNumber?: string | undefined;
    phoneExtension?: string | undefined;
    phoneTypeFormId?: number | undefined;
    phoneTypeName?: string | undefined;
    phoneTypeLangLabel?: string | undefined;
    phoneChangeType?: number | undefined;
}

export class NoteModel implements INoteModel {
    noteText?: string | undefined;
    noteDate?: Date | undefined;
    userLogon?: string | undefined;

    constructor(data?: INoteModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.noteText = _data["NoteText"];
            this.noteDate = _data["NoteDate"] ? new Date(_data["NoteDate"].toString()) : <any>undefined;
            this.userLogon = _data["UserLogon"];
        }
    }

    static fromJS(data: any): NoteModel {
        data = typeof data === 'object' ? data : {};
        let result = new NoteModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["NoteText"] = this.noteText;
        data["NoteDate"] = this.noteDate ? this.noteDate.toISOString() : <any>undefined;
        data["UserLogon"] = this.userLogon;
        return data; 
    }
}

export interface INoteModel {
    noteText?: string | undefined;
    noteDate?: Date | undefined;
    userLogon?: string | undefined;
}

export class DcfValueModel implements IDcfValueModel {
    importRowNumber!: number;
    dcfId!: number;
    dcfLabel?: string | undefined;
    dcfValueAssociationId!: number;
    dcfTextValue?: string | undefined;
    dcfNumberValue?: number | undefined;
    dcfDateValue?: Date | undefined;
    dcfValueRecordStatus!: number;
    /** AssetTypeIDFilter is used during Asset DCF validation */
    assetTypeIDFilter!: number;
    mobileFormId!: number;
    /** for form id 1263 this will point back to the original form 200 dcf id
For form id 200, this will point forward to the new dcf id copied during maintenance close complete or incomplete. */
    backOrForwardingDcfId!: number;

    constructor(data?: IDcfValueModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.dcfId = _data["DcfId"];
            this.dcfLabel = _data["DcfLabel"];
            this.dcfValueAssociationId = _data["DcfValueAssociationId"];
            this.dcfTextValue = _data["DcfTextValue"];
            this.dcfNumberValue = _data["DcfNumberValue"];
            this.dcfDateValue = _data["DcfDateValue"] ? new Date(_data["DcfDateValue"].toString()) : <any>undefined;
            this.dcfValueRecordStatus = _data["DcfValueRecordStatus"];
            this.assetTypeIDFilter = _data["AssetTypeIDFilter"];
            this.mobileFormId = _data["mobileFormId"];
            this.backOrForwardingDcfId = _data["BackOrForwardingDcfId"];
        }
    }

    static fromJS(data: any): DcfValueModel {
        data = typeof data === 'object' ? data : {};
        let result = new DcfValueModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["DcfId"] = this.dcfId;
        data["DcfLabel"] = this.dcfLabel;
        data["DcfValueAssociationId"] = this.dcfValueAssociationId;
        data["DcfTextValue"] = this.dcfTextValue;
        data["DcfNumberValue"] = this.dcfNumberValue;
        data["DcfDateValue"] = this.dcfDateValue ? this.dcfDateValue.toISOString() : <any>undefined;
        data["DcfValueRecordStatus"] = this.dcfValueRecordStatus;
        data["AssetTypeIDFilter"] = this.assetTypeIDFilter;
        data["mobileFormId"] = this.mobileFormId;
        data["BackOrForwardingDcfId"] = this.backOrForwardingDcfId;
        return data; 
    }
}

export interface IDcfValueModel {
    importRowNumber: number;
    dcfId: number;
    dcfLabel?: string | undefined;
    dcfValueAssociationId: number;
    dcfTextValue?: string | undefined;
    dcfNumberValue?: number | undefined;
    dcfDateValue?: Date | undefined;
    dcfValueRecordStatus: number;
    /** AssetTypeIDFilter is used during Asset DCF validation */
    assetTypeIDFilter: number;
    mobileFormId: number;
    /** for form id 1263 this will point back to the original form 200 dcf id
For form id 200, this will point forward to the new dcf id copied during maintenance close complete or incomplete. */
    backOrForwardingDcfId: number;
}

export class WaspResultOfListOfPurchaseOrderSearchResult implements IWaspResultOfListOfPurchaseOrderSearchResult {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderSearchResult[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfPurchaseOrderSearchResult) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(PurchaseOrderSearchResult.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfPurchaseOrderSearchResult {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfPurchaseOrderSearchResult();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfPurchaseOrderSearchResult {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderSearchResult[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class PurchaseOrderSearchResult implements IPurchaseOrderSearchResult {
    /** Required. It is the unique order number for the purchase order. */
    purchaseOrderNumber?: string | undefined;
    orderSiteId?: number | undefined;
    /** optional field: name of the site that has been associated with this order */
    orderSiteName?: string | undefined;
    /** optional field: name of the site description that has been associated with this order */
    orderSiteDescription?: string | undefined;
    /** Indicates the order status. */
    orderStatus?: string | undefined;
    /** A brief description of this order. */
    descriptionText?: string | undefined;
    /** A field that can be used to reference another order. */
    referenceNumber?: string | undefined;
    /** Indicates the date the order was started.
Note: when filtering for DateTime and Date fields, make sure the value is an ISO representation of UTC date/time */
    dateStarted?: Date | undefined;
    /** Indicates the date the order is supposed to be completed.
Note: when filtering for DateTime and Date fields, make sure the value is an ISO representation of UTC date/time */
    dateDue?: Date | undefined;
    /** Indicates the order status code. */
    orderStatusCode?: string | undefined;
    /** Indicates the order status reason code. */
    orderStatusReasonCode?: string | undefined;
    /** Indicates the vendor's number. */
    vendorNumber?: string | undefined;
    /** Indicates the vendor's name. */
    vendorName?: string | undefined;
    /** Indicates the vendor's email. */
    vendorEmail?: string | undefined;
    /** Indicates the type of shipping method, needs to already exist in the system. */
    shipMethod?: string | undefined;
    /** Indicates how the items are being paid, needs to already exist in the system. */
    payMethod?: string | undefined;
    /** A drop ship order option allows to create the pick order's that are Overdue.  */
    dropShip!: boolean;
    /** Indicates the total cost. */
    totalCost!: number;
    /** list of DcfValueInfo, which represents the dynamic custom field values associated with this order.
Note: when filtering for DateTime and Date fields, make sure the value is an ISO representation of UTC date/time */
    customFields?: DcfValueInfo[] | undefined;
    /** Date Time entity was last updated. */
    lastUpdated?: Date | undefined;
    /** SUM: of each ACTIVE order line QuantityComplete * ItemPrice */
    accrual?: number | undefined;
    /** SUM: of each ACTIVE order line ( QuantityRequested - QuantityComplete ) * ItemPrice */
    outstanding?: number | undefined;

    constructor(data?: IPurchaseOrderSearchResult) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.purchaseOrderNumber = _data["PurchaseOrderNumber"];
            this.orderSiteId = _data["OrderSiteId"];
            this.orderSiteName = _data["OrderSiteName"];
            this.orderSiteDescription = _data["OrderSiteDescription"];
            this.orderStatus = _data["OrderStatus"];
            this.descriptionText = _data["DescriptionText"];
            this.referenceNumber = _data["ReferenceNumber"];
            this.dateStarted = _data["DateStarted"] ? new Date(_data["DateStarted"].toString()) : <any>undefined;
            this.dateDue = _data["DateDue"] ? new Date(_data["DateDue"].toString()) : <any>undefined;
            this.orderStatusCode = _data["OrderStatusCode"];
            this.orderStatusReasonCode = _data["OrderStatusReasonCode"];
            this.vendorNumber = _data["VendorNumber"];
            this.vendorName = _data["VendorName"];
            this.vendorEmail = _data["VendorEmail"];
            this.shipMethod = _data["ShipMethod"];
            this.payMethod = _data["PayMethod"];
            this.dropShip = _data["DropShip"];
            this.totalCost = _data["TotalCost"];
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
            this.accrual = _data["Accrual"];
            this.outstanding = _data["Outstanding"];
        }
    }

    static fromJS(data: any): PurchaseOrderSearchResult {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderSearchResult();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PurchaseOrderNumber"] = this.purchaseOrderNumber;
        data["OrderSiteId"] = this.orderSiteId;
        data["OrderSiteName"] = this.orderSiteName;
        data["OrderSiteDescription"] = this.orderSiteDescription;
        data["OrderStatus"] = this.orderStatus;
        data["DescriptionText"] = this.descriptionText;
        data["ReferenceNumber"] = this.referenceNumber;
        data["DateStarted"] = this.dateStarted ? this.dateStarted.toISOString() : <any>undefined;
        data["DateDue"] = this.dateDue ? this.dateDue.toISOString() : <any>undefined;
        data["OrderStatusCode"] = this.orderStatusCode;
        data["OrderStatusReasonCode"] = this.orderStatusReasonCode;
        data["VendorNumber"] = this.vendorNumber;
        data["VendorName"] = this.vendorName;
        data["VendorEmail"] = this.vendorEmail;
        data["ShipMethod"] = this.shipMethod;
        data["PayMethod"] = this.payMethod;
        data["DropShip"] = this.dropShip;
        data["TotalCost"] = this.totalCost;
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        data["Accrual"] = this.accrual;
        data["Outstanding"] = this.outstanding;
        return data; 
    }
}

export interface IPurchaseOrderSearchResult {
    /** Required. It is the unique order number for the purchase order. */
    purchaseOrderNumber?: string | undefined;
    orderSiteId?: number | undefined;
    /** optional field: name of the site that has been associated with this order */
    orderSiteName?: string | undefined;
    /** optional field: name of the site description that has been associated with this order */
    orderSiteDescription?: string | undefined;
    /** Indicates the order status. */
    orderStatus?: string | undefined;
    /** A brief description of this order. */
    descriptionText?: string | undefined;
    /** A field that can be used to reference another order. */
    referenceNumber?: string | undefined;
    /** Indicates the date the order was started.
Note: when filtering for DateTime and Date fields, make sure the value is an ISO representation of UTC date/time */
    dateStarted?: Date | undefined;
    /** Indicates the date the order is supposed to be completed.
Note: when filtering for DateTime and Date fields, make sure the value is an ISO representation of UTC date/time */
    dateDue?: Date | undefined;
    /** Indicates the order status code. */
    orderStatusCode?: string | undefined;
    /** Indicates the order status reason code. */
    orderStatusReasonCode?: string | undefined;
    /** Indicates the vendor's number. */
    vendorNumber?: string | undefined;
    /** Indicates the vendor's name. */
    vendorName?: string | undefined;
    /** Indicates the vendor's email. */
    vendorEmail?: string | undefined;
    /** Indicates the type of shipping method, needs to already exist in the system. */
    shipMethod?: string | undefined;
    /** Indicates how the items are being paid, needs to already exist in the system. */
    payMethod?: string | undefined;
    /** A drop ship order option allows to create the pick order's that are Overdue.  */
    dropShip: boolean;
    /** Indicates the total cost. */
    totalCost: number;
    /** list of DcfValueInfo, which represents the dynamic custom field values associated with this order.
Note: when filtering for DateTime and Date fields, make sure the value is an ISO representation of UTC date/time */
    customFields?: DcfValueInfo[] | undefined;
    /** Date Time entity was last updated. */
    lastUpdated?: Date | undefined;
    /** SUM: of each ACTIVE order line QuantityComplete * ItemPrice */
    accrual?: number | undefined;
    /** SUM: of each ACTIVE order line ( QuantityRequested - QuantityComplete ) * ItemPrice */
    outstanding?: number | undefined;
}

export class WaspResultOfListOfWaspResultOfPurchaseOrderInfo implements IWaspResultOfListOfWaspResultOfPurchaseOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfPurchaseOrderInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfPurchaseOrderInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfPurchaseOrderInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfPurchaseOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfPurchaseOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfPurchaseOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfPurchaseOrderInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfPurchaseOrderInfo implements IWaspResultOfPurchaseOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfPurchaseOrderInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? PurchaseOrderInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfPurchaseOrderInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfPurchaseOrderInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfPurchaseOrderInfo {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class PurchaseOrderStatusParameters implements IPurchaseOrderStatusParameters {
    /** Required. It is the unique order number for the purchase order. */
    purchaseOrderNumber?: string | undefined;
    /** Indicates the order status code. */
    orderStatusCode?: string | undefined;
    /** Indicates the order status reason code. */
    orderStatusReasonCode?: string | undefined;

    constructor(data?: IPurchaseOrderStatusParameters) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.purchaseOrderNumber = _data["PurchaseOrderNumber"];
            this.orderStatusCode = _data["OrderStatusCode"];
            this.orderStatusReasonCode = _data["OrderStatusReasonCode"];
        }
    }

    static fromJS(data: any): PurchaseOrderStatusParameters {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderStatusParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PurchaseOrderNumber"] = this.purchaseOrderNumber;
        data["OrderStatusCode"] = this.orderStatusCode;
        data["OrderStatusReasonCode"] = this.orderStatusReasonCode;
        return data; 
    }
}

export interface IPurchaseOrderStatusParameters {
    /** Required. It is the unique order number for the purchase order. */
    purchaseOrderNumber?: string | undefined;
    /** Indicates the order status code. */
    orderStatusCode?: string | undefined;
    /** Indicates the order status reason code. */
    orderStatusReasonCode?: string | undefined;
}

export class ReceiveTransactionBaseModelOfReceiveInfoLineItemModel implements IReceiveTransactionBaseModelOfReceiveInfoLineItemModel {
    /** Required. Indicates the unique identifier of the purchase order. */
    purchaseOrderNumber?: string | undefined;
    /** Optional. It is used to specify where this transaction came from (i.e. Kiosk 1, Warehouse DR3). */
    recordSource?: string | undefined;
    /** Optional. Indicates when the receive transaction occurred. By default, it will set to Today UTC. */
    receiptDate!: Date;
    /** Optional. Indicates the notes about the receive transaction. */
    notes?: string | undefined;
    receiveLines?: ReceiveInfoLineItemModel[] | undefined;

    constructor(data?: IReceiveTransactionBaseModelOfReceiveInfoLineItemModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.purchaseOrderNumber = _data["PurchaseOrderNumber"];
            this.recordSource = _data["RecordSource"];
            this.receiptDate = _data["ReceiptDate"] ? new Date(_data["ReceiptDate"].toString()) : <any>undefined;
            this.notes = _data["Notes"];
            if (Array.isArray(_data["ReceiveLines"])) {
                this.receiveLines = [] as any;
                for (let item of _data["ReceiveLines"])
                    this.receiveLines!.push(ReceiveInfoLineItemModel.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ReceiveTransactionBaseModelOfReceiveInfoLineItemModel {
        data = typeof data === 'object' ? data : {};
        let result = new ReceiveTransactionBaseModelOfReceiveInfoLineItemModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PurchaseOrderNumber"] = this.purchaseOrderNumber;
        data["RecordSource"] = this.recordSource;
        data["ReceiptDate"] = this.receiptDate ? this.receiptDate.toISOString() : <any>undefined;
        data["Notes"] = this.notes;
        if (Array.isArray(this.receiveLines)) {
            data["ReceiveLines"] = [];
            for (let item of this.receiveLines)
                data["ReceiveLines"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IReceiveTransactionBaseModelOfReceiveInfoLineItemModel {
    /** Required. Indicates the unique identifier of the purchase order. */
    purchaseOrderNumber?: string | undefined;
    /** Optional. It is used to specify where this transaction came from (i.e. Kiosk 1, Warehouse DR3). */
    recordSource?: string | undefined;
    /** Optional. Indicates when the receive transaction occurred. By default, it will set to Today UTC. */
    receiptDate: Date;
    /** Optional. Indicates the notes about the receive transaction. */
    notes?: string | undefined;
    receiveLines?: ReceiveInfoLineItemModel[] | undefined;
}

export class ReceiveTransactionModel extends ReceiveTransactionBaseModelOfReceiveInfoLineItemModel implements IReceiveTransactionModel {

    constructor(data?: IReceiveTransactionModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): ReceiveTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ReceiveTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface IReceiveTransactionModel extends IReceiveTransactionBaseModelOfReceiveInfoLineItemModel {
}

export class ReceiveInfoLineItemBaseModel implements IReceiveInfoLineItemBaseModel {
    siteName?: string | undefined;
    /** Required. Indicates the location in the site where the inventory was received. */
    locationCode?: string | undefined;
    /** Required. Indicates the quantity to receive. */
    quantity!: number;

    constructor(data?: IReceiveInfoLineItemBaseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.quantity = _data["Quantity"];
        }
    }

    static fromJS(data: any): ReceiveInfoLineItemBaseModel {
        data = typeof data === 'object' ? data : {};
        let result = new ReceiveInfoLineItemBaseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["Quantity"] = this.quantity;
        return data; 
    }
}

export interface IReceiveInfoLineItemBaseModel {
    siteName?: string | undefined;
    /** Required. Indicates the location in the site where the inventory was received. */
    locationCode?: string | undefined;
    /** Required. Indicates the quantity to receive. */
    quantity: number;
}

export class ReceiveInfoLineItemModel extends ReceiveInfoLineItemBaseModel implements IReceiveInfoLineItemModel {
    /** Required. Indicates the unique identifier for this item. */
    itemNumber?: string | undefined;
    /** The name of the site, along with the LocationCode, should specify where the item inventory quantity is to be added/received. */
    siteName?: string | undefined;
    /** If the SiteName and LocationCode are null, then this field is required.
This is the immediate parent container Id which will receive the inventory.
Note that the container must be added or received with its trackby container Id and quantity = 1.000 ( and the trackby container Id has not been removed or picked). */
    parentContainerId?: string | undefined;
    /** <![CDATA[
sometimes we are receiving a quantity of exactly 1.0 and the inventory is a new ContainerId.
The new Trackby Container Id, the same restriction as track-by Serial Number applies.
The quantity must be exactly 1.0000.
]]> */
    newContainerId?: string | undefined;
    /** Any number alpha-numeric value used to tag the Receive Transaction record.
This value should be less than 64 characters.

This value is NOT the order number and may or MAY NOT correlate to the ORDER REFERENCE NUMBER. */
    transactionReferenceNumber?: string | undefined;
    transactionCustomerNumber?: string | undefined;
    /** the vendor (supplier) number used to tag the Receive Transaction record. */
    transactionVendorNumber?: string | undefined;
    /** Indicates the date code of the inventory. */
    dateCode?: Date | undefined;
    /** Indicates the lot of the inventory. */
    lot?: string | undefined;
    /** Indicates the unique serial number of the inventory.
For track-by Serial Number, the quantity must be exactly 1.0000. */
    serialNumber?: string | undefined;
    /** Required. Indicates the unit of measure associated with the item being received, must be specified even if there is only one unit on this order. Conversion from one unit of measure to another is not handled by this API. */
    unitOfMeasure?: string | undefined;

    constructor(data?: IReceiveInfoLineItemModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.siteName = _data["SiteName"];
            this.parentContainerId = _data["ParentContainerId"];
            this.newContainerId = _data["NewContainerId"];
            this.transactionReferenceNumber = _data["TransactionReferenceNumber"];
            this.transactionCustomerNumber = _data["TransactionCustomerNumber"];
            this.transactionVendorNumber = _data["TransactionVendorNumber"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.unitOfMeasure = _data["UnitOfMeasure"];
        }
    }

    static fromJS(data: any): ReceiveInfoLineItemModel {
        data = typeof data === 'object' ? data : {};
        let result = new ReceiveInfoLineItemModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["SiteName"] = this.siteName;
        data["ParentContainerId"] = this.parentContainerId;
        data["NewContainerId"] = this.newContainerId;
        data["TransactionReferenceNumber"] = this.transactionReferenceNumber;
        data["TransactionCustomerNumber"] = this.transactionCustomerNumber;
        data["TransactionVendorNumber"] = this.transactionVendorNumber;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["UnitOfMeasure"] = this.unitOfMeasure;
        super.toJSON(data);
        return data; 
    }
}

export interface IReceiveInfoLineItemModel extends IReceiveInfoLineItemBaseModel {
    /** Required. Indicates the unique identifier for this item. */
    itemNumber?: string | undefined;
    /** The name of the site, along with the LocationCode, should specify where the item inventory quantity is to be added/received. */
    siteName?: string | undefined;
    /** If the SiteName and LocationCode are null, then this field is required.
This is the immediate parent container Id which will receive the inventory.
Note that the container must be added or received with its trackby container Id and quantity = 1.000 ( and the trackby container Id has not been removed or picked). */
    parentContainerId?: string | undefined;
    /** <![CDATA[
sometimes we are receiving a quantity of exactly 1.0 and the inventory is a new ContainerId.
The new Trackby Container Id, the same restriction as track-by Serial Number applies.
The quantity must be exactly 1.0000.
]]> */
    newContainerId?: string | undefined;
    /** Any number alpha-numeric value used to tag the Receive Transaction record.
This value should be less than 64 characters.

This value is NOT the order number and may or MAY NOT correlate to the ORDER REFERENCE NUMBER. */
    transactionReferenceNumber?: string | undefined;
    transactionCustomerNumber?: string | undefined;
    /** the vendor (supplier) number used to tag the Receive Transaction record. */
    transactionVendorNumber?: string | undefined;
    /** Indicates the date code of the inventory. */
    dateCode?: Date | undefined;
    /** Indicates the lot of the inventory. */
    lot?: string | undefined;
    /** Indicates the unique serial number of the inventory.
For track-by Serial Number, the quantity must be exactly 1.0000. */
    serialNumber?: string | undefined;
    /** Required. Indicates the unit of measure associated with the item being received, must be specified even if there is only one unit on this order. Conversion from one unit of measure to another is not handled by this API. */
    unitOfMeasure?: string | undefined;
}

export class WaspResultOfListOfPurchaseOrderModel implements IWaspResultOfListOfPurchaseOrderModel {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfPurchaseOrderModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(PurchaseOrderModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfPurchaseOrderModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfPurchaseOrderModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfPurchaseOrderModel {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class OrderModelBaseOfPurchaseOrderLineModel implements IOrderModelBaseOfPurchaseOrderLineModel {
    importRowNumber!: number;
    orderId!: number;
    orderNumber?: string | undefined;
    orderSiteId?: number | undefined;
    orderLocationId?: number | undefined;
    orderTypeId!: OrderTypeEnum;
    orderStatusId!: OrderStatusEnum;
    orderStatus?: string | undefined;
    orderStatusReasonCodeId!: OrderStatusReasonCodeEnum;
    orderSourceId!: OrderSourceEnum;
    orderSourceText?: string | undefined;
    orderPriorityId!: OrderPriorityEnum;
    assignedUserId?: string | undefined;
    dateStarted?: Date | undefined;
    dateDue?: Date | undefined;
    dateComplete?: Date | undefined;
    referenceNumber?: string | undefined;
    orderNotes?: NoteModel[] | undefined;
    rowVersion?: string | undefined;
    orderRecordStatus!: number;
    orderCodes?: OrderOrderCodeModel[] | undefined;
    totalCost?: number | undefined;
    grandTotalCost?: number | undefined;
    totalQuantityRequested!: number;
    totalQuantityComplete!: number;
    discountTypeId?: number | undefined;
    discountAmount?: number | undefined;
    orderLines?: PurchaseOrderLineModel[] | undefined;
    createdById!: string;
    updatedById!: string;
    createDate!: Date;
    updateDate!: Date;
    attachmentIdsToAdd?: number[] | undefined;
    attachmentIdsToDelete?: number[] | undefined;
    attachmentNames?: AttachmentModel[] | undefined;
    customFields?: DcfValueModel[] | undefined;
    requestor?: string | undefined;
    requestorEmail?: string | undefined;
    orderLineIdsToDelete?: number[] | undefined;
    /** Default is true. 
If this value is false, then orderlines cannot be silently and implicitly deleted.
When Silent Delete is disabled, thew order lines must be deleted using the DTO property OrderLineIdsToDelete */
    allowSilentDeleteOrderLines!: boolean;

    constructor(data?: IOrderModelBaseOfPurchaseOrderLineModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.orderId = _data["OrderId"];
            this.orderNumber = _data["OrderNumber"];
            this.orderSiteId = _data["OrderSiteId"];
            this.orderLocationId = _data["OrderLocationId"];
            this.orderTypeId = _data["OrderTypeId"];
            this.orderStatusId = _data["OrderStatusId"];
            this.orderStatus = _data["OrderStatus"];
            this.orderStatusReasonCodeId = _data["OrderStatusReasonCodeId"];
            this.orderSourceId = _data["OrderSourceId"];
            this.orderSourceText = _data["OrderSourceText"];
            this.orderPriorityId = _data["OrderPriorityId"];
            this.assignedUserId = _data["AssignedUserId"];
            this.dateStarted = _data["DateStarted"] ? new Date(_data["DateStarted"].toString()) : <any>undefined;
            this.dateDue = _data["DateDue"] ? new Date(_data["DateDue"].toString()) : <any>undefined;
            this.dateComplete = _data["DateComplete"] ? new Date(_data["DateComplete"].toString()) : <any>undefined;
            this.referenceNumber = _data["ReferenceNumber"];
            if (Array.isArray(_data["OrderNotes"])) {
                this.orderNotes = [] as any;
                for (let item of _data["OrderNotes"])
                    this.orderNotes!.push(NoteModel.fromJS(item));
            }
            this.rowVersion = _data["RowVersion"];
            this.orderRecordStatus = _data["OrderRecordStatus"];
            if (Array.isArray(_data["OrderCodes"])) {
                this.orderCodes = [] as any;
                for (let item of _data["OrderCodes"])
                    this.orderCodes!.push(OrderOrderCodeModel.fromJS(item));
            }
            this.totalCost = _data["TotalCost"];
            this.grandTotalCost = _data["GrandTotalCost"];
            this.totalQuantityRequested = _data["TotalQuantityRequested"];
            this.totalQuantityComplete = _data["TotalQuantityComplete"];
            this.discountTypeId = _data["DiscountTypeId"];
            this.discountAmount = _data["DiscountAmount"];
            if (Array.isArray(_data["OrderLines"])) {
                this.orderLines = [] as any;
                for (let item of _data["OrderLines"])
                    this.orderLines!.push(PurchaseOrderLineModel.fromJS(item));
            }
            this.createdById = _data["CreatedById"];
            this.updatedById = _data["UpdatedById"];
            this.createDate = _data["CreateDate"] ? new Date(_data["CreateDate"].toString()) : <any>undefined;
            this.updateDate = _data["UpdateDate"] ? new Date(_data["UpdateDate"].toString()) : <any>undefined;
            if (Array.isArray(_data["AttachmentIdsToAdd"])) {
                this.attachmentIdsToAdd = [] as any;
                for (let item of _data["AttachmentIdsToAdd"])
                    this.attachmentIdsToAdd!.push(item);
            }
            if (Array.isArray(_data["AttachmentIdsToDelete"])) {
                this.attachmentIdsToDelete = [] as any;
                for (let item of _data["AttachmentIdsToDelete"])
                    this.attachmentIdsToDelete!.push(item);
            }
            if (Array.isArray(_data["AttachmentNames"])) {
                this.attachmentNames = [] as any;
                for (let item of _data["AttachmentNames"])
                    this.attachmentNames!.push(AttachmentModel.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueModel.fromJS(item));
            }
            this.requestor = _data["Requestor"];
            this.requestorEmail = _data["RequestorEmail"];
            if (Array.isArray(_data["OrderLineIdsToDelete"])) {
                this.orderLineIdsToDelete = [] as any;
                for (let item of _data["OrderLineIdsToDelete"])
                    this.orderLineIdsToDelete!.push(item);
            }
            this.allowSilentDeleteOrderLines = _data["AllowSilentDeleteOrderLines"];
        }
    }

    static fromJS(data: any): OrderModelBaseOfPurchaseOrderLineModel {
        data = typeof data === 'object' ? data : {};
        let result = new OrderModelBaseOfPurchaseOrderLineModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["OrderId"] = this.orderId;
        data["OrderNumber"] = this.orderNumber;
        data["OrderSiteId"] = this.orderSiteId;
        data["OrderLocationId"] = this.orderLocationId;
        data["OrderTypeId"] = this.orderTypeId;
        data["OrderStatusId"] = this.orderStatusId;
        data["OrderStatus"] = this.orderStatus;
        data["OrderStatusReasonCodeId"] = this.orderStatusReasonCodeId;
        data["OrderSourceId"] = this.orderSourceId;
        data["OrderSourceText"] = this.orderSourceText;
        data["OrderPriorityId"] = this.orderPriorityId;
        data["AssignedUserId"] = this.assignedUserId;
        data["DateStarted"] = this.dateStarted ? this.dateStarted.toISOString() : <any>undefined;
        data["DateDue"] = this.dateDue ? this.dateDue.toISOString() : <any>undefined;
        data["DateComplete"] = this.dateComplete ? this.dateComplete.toISOString() : <any>undefined;
        data["ReferenceNumber"] = this.referenceNumber;
        if (Array.isArray(this.orderNotes)) {
            data["OrderNotes"] = [];
            for (let item of this.orderNotes)
                data["OrderNotes"].push(item.toJSON());
        }
        data["RowVersion"] = this.rowVersion;
        data["OrderRecordStatus"] = this.orderRecordStatus;
        if (Array.isArray(this.orderCodes)) {
            data["OrderCodes"] = [];
            for (let item of this.orderCodes)
                data["OrderCodes"].push(item.toJSON());
        }
        data["TotalCost"] = this.totalCost;
        data["GrandTotalCost"] = this.grandTotalCost;
        data["TotalQuantityRequested"] = this.totalQuantityRequested;
        data["TotalQuantityComplete"] = this.totalQuantityComplete;
        data["DiscountTypeId"] = this.discountTypeId;
        data["DiscountAmount"] = this.discountAmount;
        if (Array.isArray(this.orderLines)) {
            data["OrderLines"] = [];
            for (let item of this.orderLines)
                data["OrderLines"].push(item.toJSON());
        }
        data["CreatedById"] = this.createdById;
        data["UpdatedById"] = this.updatedById;
        data["CreateDate"] = this.createDate ? this.createDate.toISOString() : <any>undefined;
        data["UpdateDate"] = this.updateDate ? this.updateDate.toISOString() : <any>undefined;
        if (Array.isArray(this.attachmentIdsToAdd)) {
            data["AttachmentIdsToAdd"] = [];
            for (let item of this.attachmentIdsToAdd)
                data["AttachmentIdsToAdd"].push(item);
        }
        if (Array.isArray(this.attachmentIdsToDelete)) {
            data["AttachmentIdsToDelete"] = [];
            for (let item of this.attachmentIdsToDelete)
                data["AttachmentIdsToDelete"].push(item);
        }
        if (Array.isArray(this.attachmentNames)) {
            data["AttachmentNames"] = [];
            for (let item of this.attachmentNames)
                data["AttachmentNames"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["Requestor"] = this.requestor;
        data["RequestorEmail"] = this.requestorEmail;
        if (Array.isArray(this.orderLineIdsToDelete)) {
            data["OrderLineIdsToDelete"] = [];
            for (let item of this.orderLineIdsToDelete)
                data["OrderLineIdsToDelete"].push(item);
        }
        data["AllowSilentDeleteOrderLines"] = this.allowSilentDeleteOrderLines;
        return data; 
    }
}

export interface IOrderModelBaseOfPurchaseOrderLineModel {
    importRowNumber: number;
    orderId: number;
    orderNumber?: string | undefined;
    orderSiteId?: number | undefined;
    orderLocationId?: number | undefined;
    orderTypeId: OrderTypeEnum;
    orderStatusId: OrderStatusEnum;
    orderStatus?: string | undefined;
    orderStatusReasonCodeId: OrderStatusReasonCodeEnum;
    orderSourceId: OrderSourceEnum;
    orderSourceText?: string | undefined;
    orderPriorityId: OrderPriorityEnum;
    assignedUserId?: string | undefined;
    dateStarted?: Date | undefined;
    dateDue?: Date | undefined;
    dateComplete?: Date | undefined;
    referenceNumber?: string | undefined;
    orderNotes?: NoteModel[] | undefined;
    rowVersion?: string | undefined;
    orderRecordStatus: number;
    orderCodes?: OrderOrderCodeModel[] | undefined;
    totalCost?: number | undefined;
    grandTotalCost?: number | undefined;
    totalQuantityRequested: number;
    totalQuantityComplete: number;
    discountTypeId?: number | undefined;
    discountAmount?: number | undefined;
    orderLines?: PurchaseOrderLineModel[] | undefined;
    createdById: string;
    updatedById: string;
    createDate: Date;
    updateDate: Date;
    attachmentIdsToAdd?: number[] | undefined;
    attachmentIdsToDelete?: number[] | undefined;
    attachmentNames?: AttachmentModel[] | undefined;
    customFields?: DcfValueModel[] | undefined;
    requestor?: string | undefined;
    requestorEmail?: string | undefined;
    orderLineIdsToDelete?: number[] | undefined;
    /** Default is true. 
If this value is false, then orderlines cannot be silently and implicitly deleted.
When Silent Delete is disabled, thew order lines must be deleted using the DTO property OrderLineIdsToDelete */
    allowSilentDeleteOrderLines: boolean;
}

export class PurchaseOrderModel extends OrderModelBaseOfPurchaseOrderLineModel implements IPurchaseOrderModel {
    supplierId?: number | undefined;
    isDropShip?: boolean | undefined;
    supplierContactId?: number | undefined;
    shipToContactId?: number | undefined;
    billToContactId?: number | undefined;
    shipMethodId?: number | undefined;
    payMethodId?: number | undefined;
    shippingCost?: number | undefined;
    handlingCost?: number | undefined;
    taxCost?: number | undefined;
    action!: POAction;
    quantityStatus!: POQuantity;
    isReceiving!: boolean;
    descriptionText?: string | undefined;
    isAutoPurchaseOrderNumber!: boolean;
    shipToContact?: OrderContactModel | undefined;
    billToContact?: OrderContactModel | undefined;
    supplierContact?: OrderContactModel | undefined;
    isCumulativeNotes!: boolean;
    orderSiteName?: string | undefined;
    accrual?: number | undefined;
    outstanding?: number | undefined;
    supplier?: SupplierModel | undefined;
    payMethod?: string | undefined;
    shipMethod?: string | undefined;

    constructor(data?: IPurchaseOrderModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.supplierId = _data["SupplierId"];
            this.isDropShip = _data["IsDropShip"];
            this.supplierContactId = _data["SupplierContactId"];
            this.shipToContactId = _data["ShipToContactId"];
            this.billToContactId = _data["BillToContactId"];
            this.shipMethodId = _data["ShipMethodId"];
            this.payMethodId = _data["PayMethodId"];
            this.shippingCost = _data["ShippingCost"];
            this.handlingCost = _data["HandlingCost"];
            this.taxCost = _data["TaxCost"];
            this.action = _data["action"];
            this.quantityStatus = _data["quantityStatus"];
            this.isReceiving = _data["isReceiving"];
            this.descriptionText = _data["DescriptionText"];
            this.isAutoPurchaseOrderNumber = _data["IsAutoPurchaseOrderNumber"];
            this.shipToContact = _data["ShipToContact"] ? OrderContactModel.fromJS(_data["ShipToContact"]) : <any>undefined;
            this.billToContact = _data["BillToContact"] ? OrderContactModel.fromJS(_data["BillToContact"]) : <any>undefined;
            this.supplierContact = _data["SupplierContact"] ? OrderContactModel.fromJS(_data["SupplierContact"]) : <any>undefined;
            this.isCumulativeNotes = _data["IsCumulativeNotes"];
            this.orderSiteName = _data["OrderSiteName"];
            this.accrual = _data["Accrual"];
            this.outstanding = _data["Outstanding"];
            this.supplier = _data["Supplier"] ? SupplierModel.fromJS(_data["Supplier"]) : <any>undefined;
            this.payMethod = _data["PayMethod"];
            this.shipMethod = _data["ShipMethod"];
        }
    }

    static fromJS(data: any): PurchaseOrderModel {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SupplierId"] = this.supplierId;
        data["IsDropShip"] = this.isDropShip;
        data["SupplierContactId"] = this.supplierContactId;
        data["ShipToContactId"] = this.shipToContactId;
        data["BillToContactId"] = this.billToContactId;
        data["ShipMethodId"] = this.shipMethodId;
        data["PayMethodId"] = this.payMethodId;
        data["ShippingCost"] = this.shippingCost;
        data["HandlingCost"] = this.handlingCost;
        data["TaxCost"] = this.taxCost;
        data["action"] = this.action;
        data["quantityStatus"] = this.quantityStatus;
        data["isReceiving"] = this.isReceiving;
        data["DescriptionText"] = this.descriptionText;
        data["IsAutoPurchaseOrderNumber"] = this.isAutoPurchaseOrderNumber;
        data["ShipToContact"] = this.shipToContact ? this.shipToContact.toJSON() : <any>undefined;
        data["BillToContact"] = this.billToContact ? this.billToContact.toJSON() : <any>undefined;
        data["SupplierContact"] = this.supplierContact ? this.supplierContact.toJSON() : <any>undefined;
        data["IsCumulativeNotes"] = this.isCumulativeNotes;
        data["OrderSiteName"] = this.orderSiteName;
        data["Accrual"] = this.accrual;
        data["Outstanding"] = this.outstanding;
        data["Supplier"] = this.supplier ? this.supplier.toJSON() : <any>undefined;
        data["PayMethod"] = this.payMethod;
        data["ShipMethod"] = this.shipMethod;
        super.toJSON(data);
        return data; 
    }
}

export interface IPurchaseOrderModel extends IOrderModelBaseOfPurchaseOrderLineModel {
    supplierId?: number | undefined;
    isDropShip?: boolean | undefined;
    supplierContactId?: number | undefined;
    shipToContactId?: number | undefined;
    billToContactId?: number | undefined;
    shipMethodId?: number | undefined;
    payMethodId?: number | undefined;
    shippingCost?: number | undefined;
    handlingCost?: number | undefined;
    taxCost?: number | undefined;
    action: POAction;
    quantityStatus: POQuantity;
    isReceiving: boolean;
    descriptionText?: string | undefined;
    isAutoPurchaseOrderNumber: boolean;
    shipToContact?: OrderContactModel | undefined;
    billToContact?: OrderContactModel | undefined;
    supplierContact?: OrderContactModel | undefined;
    isCumulativeNotes: boolean;
    orderSiteName?: string | undefined;
    accrual?: number | undefined;
    outstanding?: number | undefined;
    supplier?: SupplierModel | undefined;
    payMethod?: string | undefined;
    shipMethod?: string | undefined;
}

export enum POQuantity {
    Short = 0,
    Exact = 1,
    Over = 2,
}

export class OrderOrderCodeModel implements IOrderOrderCodeModel {
    orderOrderCodeId!: number;
    orderId!: number;
    orderCodeId!: number;
    recordStatus!: WtDatabaseRecordStatus;

    constructor(data?: IOrderOrderCodeModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.orderOrderCodeId = _data["OrderOrderCodeId"];
            this.orderId = _data["OrderId"];
            this.orderCodeId = _data["OrderCodeId"];
            this.recordStatus = _data["RecordStatus"];
        }
    }

    static fromJS(data: any): OrderOrderCodeModel {
        data = typeof data === 'object' ? data : {};
        let result = new OrderOrderCodeModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OrderOrderCodeId"] = this.orderOrderCodeId;
        data["OrderId"] = this.orderId;
        data["OrderCodeId"] = this.orderCodeId;
        data["RecordStatus"] = this.recordStatus;
        return data; 
    }
}

export interface IOrderOrderCodeModel {
    orderOrderCodeId: number;
    orderId: number;
    orderCodeId: number;
    recordStatus: WtDatabaseRecordStatus;
}

export enum WtDatabaseRecordStatus {
    Unknown = 0,
    Active = 1,
    Inactive = 2,
    Delete = 3,
    Pending = 4,
    RePending = 5,
    Downgrade = 6,
    Completed = 7,
    Cancelled = 8,
    Incomplete = 9,
    Disabled = 10,
}

export class OrderLineModelBase implements IOrderLineModelBase {
    orderLineId!: number;
    orderId!: number;
    assetId!: number;
    orderStatusId!: OrderStatusEnum;
    orderStatusReasonCodeId!: OrderStatusReasonCodeEnum;
    quantityRequested!: number;
    actualQuantityRequested!: number;
    currentQuantityComplete!: number;
    quantityComplete!: number;
    quantityAdjusted!: number;
    quantityInvoiced!: number;
    quantityAvailable!: number;
    uomId!: number;
    baseUomId!: number;
    orderUomId!: number;
    itemTypeId!: AssetTypeEnum;
    unit?: string | undefined;
    baseUnitAbbreviation?: string | undefined;
    orderUnitAbbreviation?: string | undefined;
    baseUnitName?: string | undefined;
    orderUnitName?: string | undefined;
    createdById!: string;
    updatedById!: string;
    createDate!: Date;
    updateDate!: Date;
    rowVersion?: string | undefined;
    discountTypeId?: number | undefined;
    discountAmount?: number | undefined;
    itemDefaultCost?: number | undefined;
    itemPrice?: number | undefined;
    totalLineCost?: number | undefined;
    itemCategoryId?: number | undefined;
    assetTag?: string | undefined;
    assetDescription?: string | undefined;
    alterNumber?: string | undefined;
    assetTypeDescription?: string | undefined;
    assetTypeId!: number;
    assetTypeNumber?: string | undefined;
    /** added tnguyen.2018.02.26 The api needs to return this as part of the orderLine by pulling it from the dbo.item table */
    salesCodeId?: number | undefined;
    notEnoughAvailable!: boolean;
    trackedItems?: OrderLineTrackedItem[] | undefined;
    itemHasTrackby!: boolean;
    itemTrackbySet?: OrderLineTrackedItemTrackby[] | undefined;

    constructor(data?: IOrderLineModelBase) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.orderLineId = _data["OrderLineId"];
            this.orderId = _data["OrderId"];
            this.assetId = _data["AssetId"];
            this.orderStatusId = _data["OrderStatusId"];
            this.orderStatusReasonCodeId = _data["OrderStatusReasonCodeId"];
            this.quantityRequested = _data["QuantityRequested"];
            this.actualQuantityRequested = _data["ActualQuantityRequested"];
            this.currentQuantityComplete = _data["CurrentQuantityComplete"];
            this.quantityComplete = _data["QuantityComplete"];
            this.quantityAdjusted = _data["QuantityAdjusted"];
            this.quantityInvoiced = _data["QuantityInvoiced"];
            this.quantityAvailable = _data["QuantityAvailable"];
            this.uomId = _data["UomId"];
            this.baseUomId = _data["BaseUomId"];
            this.orderUomId = _data["OrderUomId"];
            this.itemTypeId = _data["ItemTypeId"];
            this.unit = _data["Unit"];
            this.baseUnitAbbreviation = _data["BaseUnitAbbreviation"];
            this.orderUnitAbbreviation = _data["OrderUnitAbbreviation"];
            this.baseUnitName = _data["BaseUnitName"];
            this.orderUnitName = _data["OrderUnitName"];
            this.createdById = _data["CreatedById"];
            this.updatedById = _data["UpdatedById"];
            this.createDate = _data["CreateDate"] ? new Date(_data["CreateDate"].toString()) : <any>undefined;
            this.updateDate = _data["UpdateDate"] ? new Date(_data["UpdateDate"].toString()) : <any>undefined;
            this.rowVersion = _data["RowVersion"];
            this.discountTypeId = _data["DiscountTypeId"];
            this.discountAmount = _data["DiscountAmount"];
            this.itemDefaultCost = _data["ItemDefaultCost"];
            this.itemPrice = _data["ItemPrice"];
            this.totalLineCost = _data["TotalLineCost"];
            this.itemCategoryId = _data["ItemCategoryId"];
            this.assetTag = _data["AssetTag"];
            this.assetDescription = _data["AssetDescription"];
            this.alterNumber = _data["AlterNumber"];
            this.assetTypeDescription = _data["AssetTypeDescription"];
            this.assetTypeId = _data["AssetTypeId"];
            this.assetTypeNumber = _data["AssetTypeNumber"];
            this.salesCodeId = _data["SalesCodeId"];
            this.notEnoughAvailable = _data["NotEnoughAvailable"];
            if (Array.isArray(_data["TrackedItems"])) {
                this.trackedItems = [] as any;
                for (let item of _data["TrackedItems"])
                    this.trackedItems!.push(OrderLineTrackedItem.fromJS(item));
            }
            this.itemHasTrackby = _data["ItemHasTrackby"];
            if (Array.isArray(_data["ItemTrackbySet"])) {
                this.itemTrackbySet = [] as any;
                for (let item of _data["ItemTrackbySet"])
                    this.itemTrackbySet!.push(OrderLineTrackedItemTrackby.fromJS(item));
            }
        }
    }

    static fromJS(data: any): OrderLineModelBase {
        data = typeof data === 'object' ? data : {};
        let result = new OrderLineModelBase();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OrderLineId"] = this.orderLineId;
        data["OrderId"] = this.orderId;
        data["AssetId"] = this.assetId;
        data["OrderStatusId"] = this.orderStatusId;
        data["OrderStatusReasonCodeId"] = this.orderStatusReasonCodeId;
        data["QuantityRequested"] = this.quantityRequested;
        data["ActualQuantityRequested"] = this.actualQuantityRequested;
        data["CurrentQuantityComplete"] = this.currentQuantityComplete;
        data["QuantityComplete"] = this.quantityComplete;
        data["QuantityAdjusted"] = this.quantityAdjusted;
        data["QuantityInvoiced"] = this.quantityInvoiced;
        data["QuantityAvailable"] = this.quantityAvailable;
        data["UomId"] = this.uomId;
        data["BaseUomId"] = this.baseUomId;
        data["OrderUomId"] = this.orderUomId;
        data["ItemTypeId"] = this.itemTypeId;
        data["Unit"] = this.unit;
        data["BaseUnitAbbreviation"] = this.baseUnitAbbreviation;
        data["OrderUnitAbbreviation"] = this.orderUnitAbbreviation;
        data["BaseUnitName"] = this.baseUnitName;
        data["OrderUnitName"] = this.orderUnitName;
        data["CreatedById"] = this.createdById;
        data["UpdatedById"] = this.updatedById;
        data["CreateDate"] = this.createDate ? this.createDate.toISOString() : <any>undefined;
        data["UpdateDate"] = this.updateDate ? this.updateDate.toISOString() : <any>undefined;
        data["RowVersion"] = this.rowVersion;
        data["DiscountTypeId"] = this.discountTypeId;
        data["DiscountAmount"] = this.discountAmount;
        data["ItemDefaultCost"] = this.itemDefaultCost;
        data["ItemPrice"] = this.itemPrice;
        data["TotalLineCost"] = this.totalLineCost;
        data["ItemCategoryId"] = this.itemCategoryId;
        data["AssetTag"] = this.assetTag;
        data["AssetDescription"] = this.assetDescription;
        data["AlterNumber"] = this.alterNumber;
        data["AssetTypeDescription"] = this.assetTypeDescription;
        data["AssetTypeId"] = this.assetTypeId;
        data["AssetTypeNumber"] = this.assetTypeNumber;
        data["SalesCodeId"] = this.salesCodeId;
        data["NotEnoughAvailable"] = this.notEnoughAvailable;
        if (Array.isArray(this.trackedItems)) {
            data["TrackedItems"] = [];
            for (let item of this.trackedItems)
                data["TrackedItems"].push(item.toJSON());
        }
        data["ItemHasTrackby"] = this.itemHasTrackby;
        if (Array.isArray(this.itemTrackbySet)) {
            data["ItemTrackbySet"] = [];
            for (let item of this.itemTrackbySet)
                data["ItemTrackbySet"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IOrderLineModelBase {
    orderLineId: number;
    orderId: number;
    assetId: number;
    orderStatusId: OrderStatusEnum;
    orderStatusReasonCodeId: OrderStatusReasonCodeEnum;
    quantityRequested: number;
    actualQuantityRequested: number;
    currentQuantityComplete: number;
    quantityComplete: number;
    quantityAdjusted: number;
    quantityInvoiced: number;
    quantityAvailable: number;
    uomId: number;
    baseUomId: number;
    orderUomId: number;
    itemTypeId: AssetTypeEnum;
    unit?: string | undefined;
    baseUnitAbbreviation?: string | undefined;
    orderUnitAbbreviation?: string | undefined;
    baseUnitName?: string | undefined;
    orderUnitName?: string | undefined;
    createdById: string;
    updatedById: string;
    createDate: Date;
    updateDate: Date;
    rowVersion?: string | undefined;
    discountTypeId?: number | undefined;
    discountAmount?: number | undefined;
    itemDefaultCost?: number | undefined;
    itemPrice?: number | undefined;
    totalLineCost?: number | undefined;
    itemCategoryId?: number | undefined;
    assetTag?: string | undefined;
    assetDescription?: string | undefined;
    alterNumber?: string | undefined;
    assetTypeDescription?: string | undefined;
    assetTypeId: number;
    assetTypeNumber?: string | undefined;
    /** added tnguyen.2018.02.26 The api needs to return this as part of the orderLine by pulling it from the dbo.item table */
    salesCodeId?: number | undefined;
    notEnoughAvailable: boolean;
    trackedItems?: OrderLineTrackedItem[] | undefined;
    itemHasTrackby: boolean;
    itemTrackbySet?: OrderLineTrackedItemTrackby[] | undefined;
}

export class PurchaseOrderLineModel extends OrderLineModelBase implements IPurchaseOrderLineModel {
    toLocationId?: number | undefined;
    toContainerId?: number | undefined;
    latestTransactionLocationId?: number | undefined;
    latestTransactionContainerId?: number | undefined;
    latestTransactionLocationCode?: string | undefined;
    latestTransactionSiteId?: number | undefined;
    latestTransactionQuantity?: number | undefined;
    itemType?: string | undefined;
    itemName?: string | undefined;
    containerId?: string | undefined;
    supplierSku?: string | undefined;
    itemDescription?: string | undefined;
    taxCost?: number | undefined;
    shippingCost?: number | undefined;
    handlingCost?: number | undefined;
    grandTotalLineCost?: number | undefined;
    uomAbbreviation?: string | undefined;
    uomName?: string | undefined;
    orderedQuantityText?: string | undefined;
    receivedQuanityText?: string | undefined;
    isFromShipment!: boolean;
    parentContainerId?: string | undefined;
    siteId!: number;
    groupCode?: string | undefined;

    constructor(data?: IPurchaseOrderLineModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.toLocationId = _data["ToLocationId"];
            this.toContainerId = _data["ToContainerId"];
            this.latestTransactionLocationId = _data["LatestTransactionLocationId"];
            this.latestTransactionContainerId = _data["LatestTransactionContainerId"];
            this.latestTransactionLocationCode = _data["LatestTransactionLocationCode"];
            this.latestTransactionSiteId = _data["LatestTransactionSiteId"];
            this.latestTransactionQuantity = _data["LatestTransactionQuantity"];
            this.itemType = _data["ItemType"];
            this.itemName = _data["ItemName"];
            this.containerId = _data["ContainerId"];
            this.supplierSku = _data["SupplierSku"];
            this.itemDescription = _data["ItemDescription"];
            this.taxCost = _data["TaxCost"];
            this.shippingCost = _data["ShippingCost"];
            this.handlingCost = _data["HandlingCost"];
            this.grandTotalLineCost = _data["GrandTotalLineCost"];
            this.uomAbbreviation = _data["UomAbbreviation"];
            this.uomName = _data["UomName"];
            this.orderedQuantityText = _data["OrderedQuantityText"];
            this.receivedQuanityText = _data["ReceivedQuanityText"];
            this.isFromShipment = _data["IsFromShipment"];
            this.parentContainerId = _data["ParentContainerId"];
            this.siteId = _data["SiteId"];
            this.groupCode = _data["GroupCode"];
        }
    }

    static fromJS(data: any): PurchaseOrderLineModel {
        data = typeof data === 'object' ? data : {};
        let result = new PurchaseOrderLineModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ToLocationId"] = this.toLocationId;
        data["ToContainerId"] = this.toContainerId;
        data["LatestTransactionLocationId"] = this.latestTransactionLocationId;
        data["LatestTransactionContainerId"] = this.latestTransactionContainerId;
        data["LatestTransactionLocationCode"] = this.latestTransactionLocationCode;
        data["LatestTransactionSiteId"] = this.latestTransactionSiteId;
        data["LatestTransactionQuantity"] = this.latestTransactionQuantity;
        data["ItemType"] = this.itemType;
        data["ItemName"] = this.itemName;
        data["ContainerId"] = this.containerId;
        data["SupplierSku"] = this.supplierSku;
        data["ItemDescription"] = this.itemDescription;
        data["TaxCost"] = this.taxCost;
        data["ShippingCost"] = this.shippingCost;
        data["HandlingCost"] = this.handlingCost;
        data["GrandTotalLineCost"] = this.grandTotalLineCost;
        data["UomAbbreviation"] = this.uomAbbreviation;
        data["UomName"] = this.uomName;
        data["OrderedQuantityText"] = this.orderedQuantityText;
        data["ReceivedQuanityText"] = this.receivedQuanityText;
        data["IsFromShipment"] = this.isFromShipment;
        data["ParentContainerId"] = this.parentContainerId;
        data["SiteId"] = this.siteId;
        data["GroupCode"] = this.groupCode;
        super.toJSON(data);
        return data; 
    }
}

export interface IPurchaseOrderLineModel extends IOrderLineModelBase {
    toLocationId?: number | undefined;
    toContainerId?: number | undefined;
    latestTransactionLocationId?: number | undefined;
    latestTransactionContainerId?: number | undefined;
    latestTransactionLocationCode?: string | undefined;
    latestTransactionSiteId?: number | undefined;
    latestTransactionQuantity?: number | undefined;
    itemType?: string | undefined;
    itemName?: string | undefined;
    containerId?: string | undefined;
    supplierSku?: string | undefined;
    itemDescription?: string | undefined;
    taxCost?: number | undefined;
    shippingCost?: number | undefined;
    handlingCost?: number | undefined;
    grandTotalLineCost?: number | undefined;
    uomAbbreviation?: string | undefined;
    uomName?: string | undefined;
    orderedQuantityText?: string | undefined;
    receivedQuanityText?: string | undefined;
    isFromShipment: boolean;
    parentContainerId?: string | undefined;
    siteId: number;
    groupCode?: string | undefined;
}

export enum AssetTypeEnum {
    InventoryItem = 2147483635,
    NonInventoryItem = 2147483636,
    Kit = 2147483637,
    Assembly = 2147483638,
    Service = 2147483639,
    Container = 2147483640,
}

export class OrderLineTrackedItem implements IOrderLineTrackedItem {
    orderLineId!: number;
    orderLineTrackedItemId!: number;
    locationId!: number;
    containerId!: number;
    siteId!: number;
    locationCode?: string | undefined;
    siteName?: string | undefined;
    trackbyContainerId?: string | undefined;
    quantityRequested!: number;
    quantityComplete!: number;
    currentQuantityComplete!: number;
    trackbyValues?: OrderLineTrackedItemTrackby[] | undefined;

    constructor(data?: IOrderLineTrackedItem) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.orderLineId = _data["OrderLineId"];
            this.orderLineTrackedItemId = _data["OrderLineTrackedItemId"];
            this.locationId = _data["LocationId"];
            this.containerId = _data["ContainerId"];
            this.siteId = _data["SiteId"];
            this.locationCode = _data["LocationCode"];
            this.siteName = _data["SiteName"];
            this.trackbyContainerId = _data["TrackbyContainerId"];
            this.quantityRequested = _data["QuantityRequested"];
            this.quantityComplete = _data["QuantityComplete"];
            this.currentQuantityComplete = _data["CurrentQuantityComplete"];
            if (Array.isArray(_data["TrackbyValues"])) {
                this.trackbyValues = [] as any;
                for (let item of _data["TrackbyValues"])
                    this.trackbyValues!.push(OrderLineTrackedItemTrackby.fromJS(item));
            }
        }
    }

    static fromJS(data: any): OrderLineTrackedItem {
        data = typeof data === 'object' ? data : {};
        let result = new OrderLineTrackedItem();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OrderLineId"] = this.orderLineId;
        data["OrderLineTrackedItemId"] = this.orderLineTrackedItemId;
        data["LocationId"] = this.locationId;
        data["ContainerId"] = this.containerId;
        data["SiteId"] = this.siteId;
        data["LocationCode"] = this.locationCode;
        data["SiteName"] = this.siteName;
        data["TrackbyContainerId"] = this.trackbyContainerId;
        data["QuantityRequested"] = this.quantityRequested;
        data["QuantityComplete"] = this.quantityComplete;
        data["CurrentQuantityComplete"] = this.currentQuantityComplete;
        if (Array.isArray(this.trackbyValues)) {
            data["TrackbyValues"] = [];
            for (let item of this.trackbyValues)
                data["TrackbyValues"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IOrderLineTrackedItem {
    orderLineId: number;
    orderLineTrackedItemId: number;
    locationId: number;
    containerId: number;
    siteId: number;
    locationCode?: string | undefined;
    siteName?: string | undefined;
    trackbyContainerId?: string | undefined;
    quantityRequested: number;
    quantityComplete: number;
    currentQuantityComplete: number;
    trackbyValues?: OrderLineTrackedItemTrackby[] | undefined;
}

export class OrderLineTrackedItemTrackby implements IOrderLineTrackedItemTrackby {
    orderLineTrackedItemId!: number;
    orderLineItemTrackbyId!: number;
    trackbyValue?: string | undefined;
    trackbyTypeId!: number;

    constructor(data?: IOrderLineTrackedItemTrackby) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.orderLineTrackedItemId = _data["OrderLineTrackedItemId"];
            this.orderLineItemTrackbyId = _data["OrderLineItemTrackbyId"];
            this.trackbyValue = _data["TrackbyValue"];
            this.trackbyTypeId = _data["TrackbyTypeId"];
        }
    }

    static fromJS(data: any): OrderLineTrackedItemTrackby {
        data = typeof data === 'object' ? data : {};
        let result = new OrderLineTrackedItemTrackby();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OrderLineTrackedItemId"] = this.orderLineTrackedItemId;
        data["OrderLineItemTrackbyId"] = this.orderLineItemTrackbyId;
        data["TrackbyValue"] = this.trackbyValue;
        data["TrackbyTypeId"] = this.trackbyTypeId;
        return data; 
    }
}

export interface IOrderLineTrackedItemTrackby {
    orderLineTrackedItemId: number;
    orderLineItemTrackbyId: number;
    trackbyValue?: string | undefined;
    trackbyTypeId: number;
}

export class DateTimeRequest implements IDateTimeRequest {
    dateTime!: Date;

    constructor(data?: IDateTimeRequest) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.dateTime = _data["DateTime"] ? new Date(_data["DateTime"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): DateTimeRequest {
        data = typeof data === 'object' ? data : {};
        let result = new DateTimeRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["DateTime"] = this.dateTime ? this.dateTime.toISOString() : <any>undefined;
        return data; 
    }
}

export interface IDateTimeRequest {
    dateTime: Date;
}

export class WaspResultOfListOfOrderLineTrackbyInfoModel implements IWaspResultOfListOfOrderLineTrackbyInfoModel {
    /** Type specific result that always depends on the function called. */
    data?: OrderLineTrackbyInfoModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfOrderLineTrackbyInfoModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(OrderLineTrackbyInfoModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfOrderLineTrackbyInfoModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfOrderLineTrackbyInfoModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfOrderLineTrackbyInfoModel {
    /** Type specific result that always depends on the function called. */
    data?: OrderLineTrackbyInfoModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class OrderLineTrackbyInfoModel implements IOrderLineTrackbyInfoModel {
    uniqueRecordIdentitifier?: string | undefined;
    resultCode?: string | undefined;
    orderNumber?: string | undefined;
    /** The globally unique tag which identiies  the child container.
In contrast, the value specified by ImmediateParentContainerId
could be duplicated since a tracked parent container (ImmediateParentContainerId)
can have multiple inventory items and/or multiple nested child container identifiers.
When a receive or add transaction is performed, and the total inventory quantity
of a container id exceeds 1, an error will occur to indicate duplicate container identifier. */
    trackbyChildContainerId?: string | undefined;
    trackbySerialNumber?: string | undefined;
    trackbyLot?: string | undefined;
    trackbyDateCode?: string | undefined;
    trackbyCustom1?: string | undefined;
    trackbyCustom2?: string | undefined;
    trackbyCustom3?: string | undefined;
    trackbyCustom4?: string | undefined;
    trackbyCustom5?: string | undefined;
    trackbyCustom6?: string | undefined;
    itemNumber?: string | undefined;
    immediateParentSiteName?: string | undefined;
    immediateParentLocationCode?: string | undefined;
    immediateParentContainerId?: string | undefined;
    orderId!: number;
    orderTypeId!: number;
    orderLineId!: number;
    lineTrackedItemSiteId!: number;
    lineTrackedItemLocationId!: number;
    lineTrackedItemContainerId!: number;
    /** from the order line */
    orderLineQuantityRequested!: number;
    /** from the order line */
    orderLineQuantityCompleted!: number;
    /** (sum of trackby quantities) MINUS the order line (OrderLineQuantityRequested)
if negative that means we have an under-receive potential
if positive that means we have a potential over-receive potential
eg: SumQuantityRequestedOLTI - OrderLineQuantityRequested
eg:  */
    orderLineOverUnderRequestQtyDelta!: number;
    /** sum of all distinct trackby quantity value records */
    recordCountOLTI!: number;
    sumQuantityRequestedOLTI!: number;
    sumQuantityCompletedOLTI!: number;
    /** LineTrackedItemLocationQuantityRequested	LineTrackedItemLocationQuantityComplete        
Trackby detail quantity. For example track by serial # or License Plate Number should have max qty = 1 */
    lineTrackedItemLocationQuantityRequested!: number;
    /** Trackby detail quantity. For example track by serial # or License Plate Number should have max qty = 1
Transactions will NOT allow receive of QTY more than 1 since this violates singularity enforcement rules */
    lineTrackedItemLocationQuantityComplete!: number;
    internalIdentifiers?: string | undefined;
    hierarchy?: string[] | undefined;

    constructor(data?: IOrderLineTrackbyInfoModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.uniqueRecordIdentitifier = _data["UniqueRecordIdentitifier"];
            this.resultCode = _data["ResultCode"];
            this.orderNumber = _data["OrderNumber"];
            this.trackbyChildContainerId = _data["TrackbyChildContainerId"];
            this.trackbySerialNumber = _data["TrackbySerialNumber"];
            this.trackbyLot = _data["TrackbyLot"];
            this.trackbyDateCode = _data["TrackbyDateCode"];
            this.trackbyCustom1 = _data["TrackbyCustom1"];
            this.trackbyCustom2 = _data["TrackbyCustom2"];
            this.trackbyCustom3 = _data["TrackbyCustom3"];
            this.trackbyCustom4 = _data["TrackbyCustom4"];
            this.trackbyCustom5 = _data["TrackbyCustom5"];
            this.trackbyCustom6 = _data["TrackbyCustom6"];
            this.itemNumber = _data["ItemNumber"];
            this.immediateParentSiteName = _data["ImmediateParentSiteName"];
            this.immediateParentLocationCode = _data["ImmediateParentLocationCode"];
            this.immediateParentContainerId = _data["ImmediateParentContainerId"];
            this.orderId = _data["OrderId"];
            this.orderTypeId = _data["OrderTypeId"];
            this.orderLineId = _data["OrderLineId"];
            this.lineTrackedItemSiteId = _data["LineTrackedItemSiteId"];
            this.lineTrackedItemLocationId = _data["LineTrackedItemLocationId"];
            this.lineTrackedItemContainerId = _data["LineTrackedItemContainerId"];
            this.orderLineQuantityRequested = _data["OrderLineQuantityRequested"];
            this.orderLineQuantityCompleted = _data["OrderLineQuantityCompleted"];
            this.orderLineOverUnderRequestQtyDelta = _data["OrderLineOverUnderRequestQtyDelta"];
            this.recordCountOLTI = _data["RecordCountOLTI"];
            this.sumQuantityRequestedOLTI = _data["SumQuantityRequestedOLTI"];
            this.sumQuantityCompletedOLTI = _data["SumQuantityCompletedOLTI"];
            this.lineTrackedItemLocationQuantityRequested = _data["LineTrackedItemLocationQuantityRequested"];
            this.lineTrackedItemLocationQuantityComplete = _data["LineTrackedItemLocationQuantityComplete"];
            this.internalIdentifiers = _data["InternalIdentifiers"];
            if (Array.isArray(_data["Hierarchy"])) {
                this.hierarchy = [] as any;
                for (let item of _data["Hierarchy"])
                    this.hierarchy!.push(item);
            }
        }
    }

    static fromJS(data: any): OrderLineTrackbyInfoModel {
        data = typeof data === 'object' ? data : {};
        let result = new OrderLineTrackbyInfoModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["UniqueRecordIdentitifier"] = this.uniqueRecordIdentitifier;
        data["ResultCode"] = this.resultCode;
        data["OrderNumber"] = this.orderNumber;
        data["TrackbyChildContainerId"] = this.trackbyChildContainerId;
        data["TrackbySerialNumber"] = this.trackbySerialNumber;
        data["TrackbyLot"] = this.trackbyLot;
        data["TrackbyDateCode"] = this.trackbyDateCode;
        data["TrackbyCustom1"] = this.trackbyCustom1;
        data["TrackbyCustom2"] = this.trackbyCustom2;
        data["TrackbyCustom3"] = this.trackbyCustom3;
        data["TrackbyCustom4"] = this.trackbyCustom4;
        data["TrackbyCustom5"] = this.trackbyCustom5;
        data["TrackbyCustom6"] = this.trackbyCustom6;
        data["ItemNumber"] = this.itemNumber;
        data["ImmediateParentSiteName"] = this.immediateParentSiteName;
        data["ImmediateParentLocationCode"] = this.immediateParentLocationCode;
        data["ImmediateParentContainerId"] = this.immediateParentContainerId;
        data["OrderId"] = this.orderId;
        data["OrderTypeId"] = this.orderTypeId;
        data["OrderLineId"] = this.orderLineId;
        data["LineTrackedItemSiteId"] = this.lineTrackedItemSiteId;
        data["LineTrackedItemLocationId"] = this.lineTrackedItemLocationId;
        data["LineTrackedItemContainerId"] = this.lineTrackedItemContainerId;
        data["OrderLineQuantityRequested"] = this.orderLineQuantityRequested;
        data["OrderLineQuantityCompleted"] = this.orderLineQuantityCompleted;
        data["OrderLineOverUnderRequestQtyDelta"] = this.orderLineOverUnderRequestQtyDelta;
        data["RecordCountOLTI"] = this.recordCountOLTI;
        data["SumQuantityRequestedOLTI"] = this.sumQuantityRequestedOLTI;
        data["SumQuantityCompletedOLTI"] = this.sumQuantityCompletedOLTI;
        data["LineTrackedItemLocationQuantityRequested"] = this.lineTrackedItemLocationQuantityRequested;
        data["LineTrackedItemLocationQuantityComplete"] = this.lineTrackedItemLocationQuantityComplete;
        data["InternalIdentifiers"] = this.internalIdentifiers;
        if (Array.isArray(this.hierarchy)) {
            data["Hierarchy"] = [];
            for (let item of this.hierarchy)
                data["Hierarchy"].push(item);
        }
        return data; 
    }
}

export interface IOrderLineTrackbyInfoModel {
    uniqueRecordIdentitifier?: string | undefined;
    resultCode?: string | undefined;
    orderNumber?: string | undefined;
    /** The globally unique tag which identiies  the child container.
In contrast, the value specified by ImmediateParentContainerId
could be duplicated since a tracked parent container (ImmediateParentContainerId)
can have multiple inventory items and/or multiple nested child container identifiers.
When a receive or add transaction is performed, and the total inventory quantity
of a container id exceeds 1, an error will occur to indicate duplicate container identifier. */
    trackbyChildContainerId?: string | undefined;
    trackbySerialNumber?: string | undefined;
    trackbyLot?: string | undefined;
    trackbyDateCode?: string | undefined;
    trackbyCustom1?: string | undefined;
    trackbyCustom2?: string | undefined;
    trackbyCustom3?: string | undefined;
    trackbyCustom4?: string | undefined;
    trackbyCustom5?: string | undefined;
    trackbyCustom6?: string | undefined;
    itemNumber?: string | undefined;
    immediateParentSiteName?: string | undefined;
    immediateParentLocationCode?: string | undefined;
    immediateParentContainerId?: string | undefined;
    orderId: number;
    orderTypeId: number;
    orderLineId: number;
    lineTrackedItemSiteId: number;
    lineTrackedItemLocationId: number;
    lineTrackedItemContainerId: number;
    /** from the order line */
    orderLineQuantityRequested: number;
    /** from the order line */
    orderLineQuantityCompleted: number;
    /** (sum of trackby quantities) MINUS the order line (OrderLineQuantityRequested)
if negative that means we have an under-receive potential
if positive that means we have a potential over-receive potential
eg: SumQuantityRequestedOLTI - OrderLineQuantityRequested
eg:  */
    orderLineOverUnderRequestQtyDelta: number;
    /** sum of all distinct trackby quantity value records */
    recordCountOLTI: number;
    sumQuantityRequestedOLTI: number;
    sumQuantityCompletedOLTI: number;
    /** LineTrackedItemLocationQuantityRequested	LineTrackedItemLocationQuantityComplete        
Trackby detail quantity. For example track by serial # or License Plate Number should have max qty = 1 */
    lineTrackedItemLocationQuantityRequested: number;
    /** Trackby detail quantity. For example track by serial # or License Plate Number should have max qty = 1
Transactions will NOT allow receive of QTY more than 1 since this violates singularity enforcement rules */
    lineTrackedItemLocationQuantityComplete: number;
    internalIdentifiers?: string | undefined;
    hierarchy?: string[] | undefined;
}

export class WaspResultOfBoolean implements IWaspResultOfBoolean {
    /** Type specific result that always depends on the function called. */
    data!: boolean;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfBoolean) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"];
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfBoolean {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfBoolean();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfBoolean {
    /** Type specific result that always depends on the function called. */
    data: boolean;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class OrderLineTrackbyInfoDetailModel extends OrderLineTrackbyInfoModel implements IOrderLineTrackbyInfoDetailModel {
    assetId!: number;
    assetDescription?: string | undefined;
    assetTypeId!: number;
    assetType?: string | undefined;
    categoryId?: number | undefined;
    itemBaseUomId!: number;
    baseUomAbbreviation?: string | undefined;
    itemOrderUomId!: number;
    orderUomAbbreviation?: string | undefined;
    locationId!: number;
    siteId!: number;
    containerId!: number;
    containerTag?: string | undefined;
    cost!: number;

    constructor(data?: IOrderLineTrackbyInfoDetailModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.assetId = _data["AssetId"];
            this.assetDescription = _data["AssetDescription"];
            this.assetTypeId = _data["AssetTypeId"];
            this.assetType = _data["AssetType"];
            this.categoryId = _data["CategoryId"];
            this.itemBaseUomId = _data["ItemBaseUomId"];
            this.baseUomAbbreviation = _data["BaseUomAbbreviation"];
            this.itemOrderUomId = _data["ItemOrderUomId"];
            this.orderUomAbbreviation = _data["OrderUomAbbreviation"];
            this.locationId = _data["LocationId"];
            this.siteId = _data["SiteId"];
            this.containerId = _data["ContainerId"];
            this.containerTag = _data["ContainerTag"];
            this.cost = _data["Cost"];
        }
    }

    static fromJS(data: any): OrderLineTrackbyInfoDetailModel {
        data = typeof data === 'object' ? data : {};
        let result = new OrderLineTrackbyInfoDetailModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AssetId"] = this.assetId;
        data["AssetDescription"] = this.assetDescription;
        data["AssetTypeId"] = this.assetTypeId;
        data["AssetType"] = this.assetType;
        data["CategoryId"] = this.categoryId;
        data["ItemBaseUomId"] = this.itemBaseUomId;
        data["BaseUomAbbreviation"] = this.baseUomAbbreviation;
        data["ItemOrderUomId"] = this.itemOrderUomId;
        data["OrderUomAbbreviation"] = this.orderUomAbbreviation;
        data["LocationId"] = this.locationId;
        data["SiteId"] = this.siteId;
        data["ContainerId"] = this.containerId;
        data["ContainerTag"] = this.containerTag;
        data["Cost"] = this.cost;
        super.toJSON(data);
        return data; 
    }
}

export interface IOrderLineTrackbyInfoDetailModel extends IOrderLineTrackbyInfoModel {
    assetId: number;
    assetDescription?: string | undefined;
    assetTypeId: number;
    assetType?: string | undefined;
    categoryId?: number | undefined;
    itemBaseUomId: number;
    baseUomAbbreviation?: string | undefined;
    itemOrderUomId: number;
    orderUomAbbreviation?: string | undefined;
    locationId: number;
    siteId: number;
    containerId: number;
    containerTag?: string | undefined;
    cost: number;
}

export class WaspResultOfListOfSimpleModel implements IWaspResultOfListOfSimpleModel {
    /** Type specific result that always depends on the function called. */
    data?: SimpleModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfSimpleModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(SimpleModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfSimpleModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfSimpleModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfSimpleModel {
    /** Type specific result that always depends on the function called. */
    data?: SimpleModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SimpleModel implements ISimpleModel {
    id!: number;
    name?: string | undefined;
    /** If this asset is the parent for a group this is its ContainerID.
Only set in response to create or update asset  */
    assetGroupContainerId!: number;

    constructor(data?: ISimpleModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.id = _data["Id"];
            this.name = _data["Name"];
            this.assetGroupContainerId = _data["AssetGroupContainerId"];
        }
    }

    static fromJS(data: any): SimpleModel {
        data = typeof data === 'object' ? data : {};
        let result = new SimpleModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Id"] = this.id;
        data["Name"] = this.name;
        data["AssetGroupContainerId"] = this.assetGroupContainerId;
        return data; 
    }
}

export interface ISimpleModel {
    id: number;
    name?: string | undefined;
    /** If this asset is the parent for a group this is its ContainerID.
Only set in response to create or update asset  */
    assetGroupContainerId: number;
}

export class OrderSimpleSearch implements IOrderSimpleSearch {
    searchForPurchaseOrders!: boolean;
    orderNumber?: string | undefined;
    containerId?: string | undefined;
    lot?: string | undefined;
    serialNumber?: string | undefined;
    retrySearchContainerIdInClosedOrders!: boolean;

    constructor(data?: IOrderSimpleSearch) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.searchForPurchaseOrders = _data["SearchForPurchaseOrders"];
            this.orderNumber = _data["OrderNumber"];
            this.containerId = _data["ContainerId"];
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.retrySearchContainerIdInClosedOrders = _data["RetrySearchContainerIdInClosedOrders"];
        }
    }

    static fromJS(data: any): OrderSimpleSearch {
        data = typeof data === 'object' ? data : {};
        let result = new OrderSimpleSearch();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SearchForPurchaseOrders"] = this.searchForPurchaseOrders;
        data["OrderNumber"] = this.orderNumber;
        data["ContainerId"] = this.containerId;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["RetrySearchContainerIdInClosedOrders"] = this.retrySearchContainerIdInClosedOrders;
        return data; 
    }
}

export interface IOrderSimpleSearch {
    searchForPurchaseOrders: boolean;
    orderNumber?: string | undefined;
    containerId?: string | undefined;
    lot?: string | undefined;
    serialNumber?: string | undefined;
    retrySearchContainerIdInClosedOrders: boolean;
}

export class WaspResultOfPurchaseOrderModel implements IWaspResultOfPurchaseOrderModel {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfPurchaseOrderModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? PurchaseOrderModel.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfPurchaseOrderModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfPurchaseOrderModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfPurchaseOrderModel {
    /** Type specific result that always depends on the function called. */
    data?: PurchaseOrderModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class ReceivePreStagedTrackbyInfoRequestModel implements IReceivePreStagedTrackbyInfoRequestModel {
    /** by default, the top most site name of the container is already stored with preliminary ASN data
but we can override this site */
    overrideSiteName?: string | undefined;
    /** by default, the top most Location Code of the container is already stored with preliminary ASN data
but we can override this Value */
    overrideLocationCode?: string | undefined;
    transactionNotes?: string | undefined;
    transactionReferenceNumber?: string | undefined;
    supplierNumber?: string | undefined;
    customerNumber?: string | undefined;
    geoLocation?: GeoLocation | undefined;
    /** the order #  to perform auto-receive */
    orderNumber?: string | undefined;
    /** sets/gets a distinct list of license plate #'s to limit the auto-receive to. */
    autoReceiveContainerIdList?: string[] | undefined;

    constructor(data?: IReceivePreStagedTrackbyInfoRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.overrideSiteName = _data["OverrideSiteName"];
            this.overrideLocationCode = _data["OverrideLocationCode"];
            this.transactionNotes = _data["TransactionNotes"];
            this.transactionReferenceNumber = _data["TransactionReferenceNumber"];
            this.supplierNumber = _data["SupplierNumber"];
            this.customerNumber = _data["CustomerNumber"];
            this.geoLocation = _data["GeoLocation"] ? GeoLocation.fromJS(_data["GeoLocation"]) : <any>undefined;
            this.orderNumber = _data["OrderNumber"];
            if (Array.isArray(_data["AutoReceiveContainerIdList"])) {
                this.autoReceiveContainerIdList = [] as any;
                for (let item of _data["AutoReceiveContainerIdList"])
                    this.autoReceiveContainerIdList!.push(item);
            }
        }
    }

    static fromJS(data: any): ReceivePreStagedTrackbyInfoRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new ReceivePreStagedTrackbyInfoRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OverrideSiteName"] = this.overrideSiteName;
        data["OverrideLocationCode"] = this.overrideLocationCode;
        data["TransactionNotes"] = this.transactionNotes;
        data["TransactionReferenceNumber"] = this.transactionReferenceNumber;
        data["SupplierNumber"] = this.supplierNumber;
        data["CustomerNumber"] = this.customerNumber;
        data["GeoLocation"] = this.geoLocation ? this.geoLocation.toJSON() : <any>undefined;
        data["OrderNumber"] = this.orderNumber;
        if (Array.isArray(this.autoReceiveContainerIdList)) {
            data["AutoReceiveContainerIdList"] = [];
            for (let item of this.autoReceiveContainerIdList)
                data["AutoReceiveContainerIdList"].push(item);
        }
        return data; 
    }
}

export interface IReceivePreStagedTrackbyInfoRequestModel {
    /** by default, the top most site name of the container is already stored with preliminary ASN data
but we can override this site */
    overrideSiteName?: string | undefined;
    /** by default, the top most Location Code of the container is already stored with preliminary ASN data
but we can override this Value */
    overrideLocationCode?: string | undefined;
    transactionNotes?: string | undefined;
    transactionReferenceNumber?: string | undefined;
    supplierNumber?: string | undefined;
    customerNumber?: string | undefined;
    geoLocation?: GeoLocation | undefined;
    /** the order #  to perform auto-receive */
    orderNumber?: string | undefined;
    /** sets/gets a distinct list of license plate #'s to limit the auto-receive to. */
    autoReceiveContainerIdList?: string[] | undefined;
}

export class GeoLocation implements IGeoLocation {
    importRowNumber!: number;
    /** The internal id of the geo location record */
    geoLocationId!: number;
    latitude?: number | undefined;
    longitude?: number | undefined;
    altitude?: number | undefined;
    timeUTC?: Date | undefined;
    accuracy?: number | undefined;
    deviceReason?: number | undefined;
    deviceStatus?: number | undefined;
    /** The physical address associated with the geo location */
    address?: AddressModel | undefined;
    history?: GeoLocationHistory[] | undefined;

    constructor(data?: IGeoLocation) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.geoLocationId = _data["GeoLocationId"];
            this.latitude = _data["Latitude"];
            this.longitude = _data["Longitude"];
            this.altitude = _data["Altitude"];
            this.timeUTC = _data["TimeUTC"] ? new Date(_data["TimeUTC"].toString()) : <any>undefined;
            this.accuracy = _data["Accuracy"];
            this.deviceReason = _data["DeviceReason"];
            this.deviceStatus = _data["DeviceStatus"];
            this.address = _data["Address"] ? AddressModel.fromJS(_data["Address"]) : <any>undefined;
            if (Array.isArray(_data["History"])) {
                this.history = [] as any;
                for (let item of _data["History"])
                    this.history!.push(GeoLocationHistory.fromJS(item));
            }
        }
    }

    static fromJS(data: any): GeoLocation {
        data = typeof data === 'object' ? data : {};
        let result = new GeoLocation();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["GeoLocationId"] = this.geoLocationId;
        data["Latitude"] = this.latitude;
        data["Longitude"] = this.longitude;
        data["Altitude"] = this.altitude;
        data["TimeUTC"] = this.timeUTC ? this.timeUTC.toISOString() : <any>undefined;
        data["Accuracy"] = this.accuracy;
        data["DeviceReason"] = this.deviceReason;
        data["DeviceStatus"] = this.deviceStatus;
        data["Address"] = this.address ? this.address.toJSON() : <any>undefined;
        if (Array.isArray(this.history)) {
            data["History"] = [];
            for (let item of this.history)
                data["History"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IGeoLocation {
    importRowNumber: number;
    /** The internal id of the geo location record */
    geoLocationId: number;
    latitude?: number | undefined;
    longitude?: number | undefined;
    altitude?: number | undefined;
    timeUTC?: Date | undefined;
    accuracy?: number | undefined;
    deviceReason?: number | undefined;
    deviceStatus?: number | undefined;
    /** The physical address associated with the geo location */
    address?: AddressModel | undefined;
    history?: GeoLocationHistory[] | undefined;
}

export class GeoLocationHistory implements IGeoLocationHistory {
    latitude?: number | undefined;
    longitude?: number | undefined;
    altitude?: number | undefined;
    timeUTC?: Date | undefined;
    accuracy?: number | undefined;
    date!: Date;
    userId!: string;

    constructor(data?: IGeoLocationHistory) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.latitude = _data["Latitude"];
            this.longitude = _data["Longitude"];
            this.altitude = _data["Altitude"];
            this.timeUTC = _data["TimeUTC"] ? new Date(_data["TimeUTC"].toString()) : <any>undefined;
            this.accuracy = _data["Accuracy"];
            this.date = _data["Date"] ? new Date(_data["Date"].toString()) : <any>undefined;
            this.userId = _data["UserId"];
        }
    }

    static fromJS(data: any): GeoLocationHistory {
        data = typeof data === 'object' ? data : {};
        let result = new GeoLocationHistory();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Latitude"] = this.latitude;
        data["Longitude"] = this.longitude;
        data["Altitude"] = this.altitude;
        data["TimeUTC"] = this.timeUTC ? this.timeUTC.toISOString() : <any>undefined;
        data["Accuracy"] = this.accuracy;
        data["Date"] = this.date ? this.date.toISOString() : <any>undefined;
        data["UserId"] = this.userId;
        return data; 
    }
}

export interface IGeoLocationHistory {
    latitude?: number | undefined;
    longitude?: number | undefined;
    altitude?: number | undefined;
    timeUTC?: Date | undefined;
    accuracy?: number | undefined;
    date: Date;
    userId: string;
}

export class WaspResultOfListOfOrderLineTrackbyInfoDetailModel implements IWaspResultOfListOfOrderLineTrackbyInfoDetailModel {
    /** Type specific result that always depends on the function called. */
    data?: OrderLineTrackbyInfoDetailModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfOrderLineTrackbyInfoDetailModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(OrderLineTrackbyInfoDetailModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfOrderLineTrackbyInfoDetailModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfOrderLineTrackbyInfoDetailModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfOrderLineTrackbyInfoDetailModel {
    /** Type specific result that always depends on the function called. */
    data?: OrderLineTrackbyInfoDetailModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** Used to request a data stream, mainly from Grids and other advanced search API functions */
export class GridStreamRequestModel extends GridRequestModel implements IGridStreamRequestModel {
    /** Array of field name, title pairs as they should be exported in the CSV. 
If FieldTitles is null than all available fields are exported with default column titles
Important! Without this parameter the order and names of fields may change from version to version. 
Therefore, to ensure consisteny results from one version to the next, make sure you provide this
value after you have determined the values you need. */
    fieldTitles?: KeyValuePairOfStringAndString[] | undefined;

    constructor(data?: IGridStreamRequestModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            if (Array.isArray(_data["FieldTitles"])) {
                this.fieldTitles = [] as any;
                for (let item of _data["FieldTitles"])
                    this.fieldTitles!.push(KeyValuePairOfStringAndString.fromJS(item));
            }
        }
    }

    static fromJS(data: any): GridStreamRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new GridStreamRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.fieldTitles)) {
            data["FieldTitles"] = [];
            for (let item of this.fieldTitles)
                data["FieldTitles"].push(item.toJSON());
        }
        super.toJSON(data);
        return data; 
    }
}

/** Used to request a data stream, mainly from Grids and other advanced search API functions */
export interface IGridStreamRequestModel extends IGridRequestModel {
    /** Array of field name, title pairs as they should be exported in the CSV. 
If FieldTitles is null than all available fields are exported with default column titles
Important! Without this parameter the order and names of fields may change from version to version. 
Therefore, to ensure consisteny results from one version to the next, make sure you provide this
value after you have determined the values you need. */
    fieldTitles?: KeyValuePairOfStringAndString[] | undefined;
}

export class WaspResultOfContainer20SaveResponseModel implements IWaspResultOfContainer20SaveResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20SaveResponseModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfContainer20SaveResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? Container20SaveResponseModel.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfContainer20SaveResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfContainer20SaveResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfContainer20SaveResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20SaveResponseModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** base model for all things Item */
export class Container20SaveRequestModel implements IContainer20SaveRequestModel {
    containerBehaviorFlags!: ContainerEnumFlags;
    itemNumber?: string | undefined;
    itemDescription?: string | undefined;
    /** This is used to group similar container types together. */
    categoryDescription?: string | undefined;
    alternateItemNumber?: string | undefined;
    manufacturerName?: string | undefined;
    /** FIFO, LIFO, Moving Average, or null value */
    costMethod?: CostMethodEnum | undefined;
    defaultUnitCost?: number | undefined;
    /** null: not applicable and no action will be taken for the sales tax vs non-sales tax indicator
true: sales tax is applicable
false; sales tax is not applicable */
    isSalesTaxApplicable?: boolean | undefined;
    /** If null, assumes the new item will use the default "Global" number generator for Trackby Container Id
if True, then this Item will have a private Trackby Container Id generator */
    usePrivateContainerIdGenerator?: boolean | undefined;
    containerIdGeneratorPrefix?: string | undefined;
    containerIdStartingSeedValue?: number | undefined;
    containerIdGeneratorSuffix?: string | undefined;

    constructor(data?: IContainer20SaveRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.containerBehaviorFlags = _data["ContainerBehaviorFlags"];
            this.itemNumber = _data["ItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.manufacturerName = _data["ManufacturerName"];
            this.costMethod = _data["CostMethod"];
            this.defaultUnitCost = _data["DefaultUnitCost"];
            this.isSalesTaxApplicable = _data["IsSalesTaxApplicable"];
            this.usePrivateContainerIdGenerator = _data["UsePrivateContainerIdGenerator"];
            this.containerIdGeneratorPrefix = _data["ContainerIdGeneratorPrefix"];
            this.containerIdStartingSeedValue = _data["ContainerIdStartingSeedValue"];
            this.containerIdGeneratorSuffix = _data["ContainerIdGeneratorSuffix"];
        }
    }

    static fromJS(data: any): Container20SaveRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20SaveRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ContainerBehaviorFlags"] = this.containerBehaviorFlags;
        data["ItemNumber"] = this.itemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ManufacturerName"] = this.manufacturerName;
        data["CostMethod"] = this.costMethod;
        data["DefaultUnitCost"] = this.defaultUnitCost;
        data["IsSalesTaxApplicable"] = this.isSalesTaxApplicable;
        data["UsePrivateContainerIdGenerator"] = this.usePrivateContainerIdGenerator;
        data["ContainerIdGeneratorPrefix"] = this.containerIdGeneratorPrefix;
        data["ContainerIdStartingSeedValue"] = this.containerIdStartingSeedValue;
        data["ContainerIdGeneratorSuffix"] = this.containerIdGeneratorSuffix;
        return data; 
    }
}

/** base model for all things Item */
export interface IContainer20SaveRequestModel {
    containerBehaviorFlags: ContainerEnumFlags;
    itemNumber?: string | undefined;
    itemDescription?: string | undefined;
    /** This is used to group similar container types together. */
    categoryDescription?: string | undefined;
    alternateItemNumber?: string | undefined;
    manufacturerName?: string | undefined;
    /** FIFO, LIFO, Moving Average, or null value */
    costMethod?: CostMethodEnum | undefined;
    defaultUnitCost?: number | undefined;
    /** null: not applicable and no action will be taken for the sales tax vs non-sales tax indicator
true: sales tax is applicable
false; sales tax is not applicable */
    isSalesTaxApplicable?: boolean | undefined;
    /** If null, assumes the new item will use the default "Global" number generator for Trackby Container Id
if True, then this Item will have a private Trackby Container Id generator */
    usePrivateContainerIdGenerator?: boolean | undefined;
    containerIdGeneratorPrefix?: string | undefined;
    containerIdStartingSeedValue?: number | undefined;
    containerIdGeneratorSuffix?: string | undefined;
}

export class Container20SaveResponseModel extends Container20SaveRequestModel implements IContainer20SaveResponseModel {
    resultKeyNumber?: string | undefined;

    constructor(data?: IContainer20SaveResponseModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.resultKeyNumber = _data["ResultKeyNumber"];
        }
    }

    static fromJS(data: any): Container20SaveResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20SaveResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ResultKeyNumber"] = this.resultKeyNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface IContainer20SaveResponseModel extends IContainer20SaveRequestModel {
    resultKeyNumber?: string | undefined;
}

/** Indicates the different methods using which an item's cost can be tracked. */
export enum CostMethodEnum {
    MovingAverage = 10,
    FIFO = 20,
    LIFO = 30,
}

/** Contains the information specific to an inventory item. */
export class ItemInventoryInfo implements IItemInventoryInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records, this can be used to identify what records has errors, if any. */
    rowNumber!: number;
    /** Required. This is a unique identifier of an item. */
    itemNumber?: string | undefined;
    /** This is a secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** The name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Indicates how long an item can be checked out before it is due back and the checkout length is shown in minutes.  */
    checkOutLengthMinutes!: number;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for purchase, most often used to order items. */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost!: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice!: number;
    /** Indicates the list price from the manufacturer. */
    listPrice!: number;
    /** Required. Indicates how the cost of the item should be tracked. */
    costMethod!: CostMethodEnum;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost!: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** Contains true/false values for how the item is tracked. */
    trackbyInfo?: ItemTrackbyInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of all vendor information for the item. */
    itemVendors?: ItemVendorInfo[] | undefined;
    /** A list of all pricing information for the item. */
    itemPrices?: ItemPrices[] | undefined;
    /** A list of all location settings for the item. */
    itemLocationSettings?: ItemLocationSettings[] | undefined;
    /** A list of all site settings for this item. */
    itemSiteSettings?: ItemSiteSettings[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IItemInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.itemNumber = _data["ItemNumber"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.manufacturerName = _data["ManufacturerName"];
            this.checkOutLengthMinutes = _data["CheckOutLengthMinutes"];
            this.stockingUnit = _data["StockingUnit"];
            this.purchaseUnit = _data["PurchaseUnit"];
            this.salesUnit = _data["SalesUnit"];
            this.cost = _data["Cost"];
            this.salesPrice = _data["SalesPrice"];
            this.listPrice = _data["ListPrice"];
            this.costMethod = _data["CostMethod"];
            this.averageCost = _data["AverageCost"];
            this.taxCode = _data["TaxCode"];
            this.attachmentInfo = _data["AttachmentInfo"] ? ItemAttachmentInfo.fromJS(_data["AttachmentInfo"]) : <any>undefined;
            this.trackbyInfo = _data["TrackbyInfo"] ? ItemTrackbyInfo.fromJS(_data["TrackbyInfo"]) : <any>undefined;
            this.dimensionInfo = _data["DimensionInfo"] ? ItemDimensionInfo.fromJS(_data["DimensionInfo"]) : <any>undefined;
            if (Array.isArray(_data["ItemVendors"])) {
                this.itemVendors = [] as any;
                for (let item of _data["ItemVendors"])
                    this.itemVendors!.push(ItemVendorInfo.fromJS(item));
            }
            if (Array.isArray(_data["ItemPrices"])) {
                this.itemPrices = [] as any;
                for (let item of _data["ItemPrices"])
                    this.itemPrices!.push(ItemPrices.fromJS(item));
            }
            if (Array.isArray(_data["ItemLocationSettings"])) {
                this.itemLocationSettings = [] as any;
                for (let item of _data["ItemLocationSettings"])
                    this.itemLocationSettings!.push(ItemLocationSettings.fromJS(item));
            }
            if (Array.isArray(_data["ItemSiteSettings"])) {
                this.itemSiteSettings = [] as any;
                for (let item of _data["ItemSiteSettings"])
                    this.itemSiteSettings!.push(ItemSiteSettings.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ItemInventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemInventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["ItemNumber"] = this.itemNumber;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["ManufacturerName"] = this.manufacturerName;
        data["CheckOutLengthMinutes"] = this.checkOutLengthMinutes;
        data["StockingUnit"] = this.stockingUnit;
        data["PurchaseUnit"] = this.purchaseUnit;
        data["SalesUnit"] = this.salesUnit;
        data["Cost"] = this.cost;
        data["SalesPrice"] = this.salesPrice;
        data["ListPrice"] = this.listPrice;
        data["CostMethod"] = this.costMethod;
        data["AverageCost"] = this.averageCost;
        data["TaxCode"] = this.taxCode;
        data["AttachmentInfo"] = this.attachmentInfo ? this.attachmentInfo.toJSON() : <any>undefined;
        data["TrackbyInfo"] = this.trackbyInfo ? this.trackbyInfo.toJSON() : <any>undefined;
        data["DimensionInfo"] = this.dimensionInfo ? this.dimensionInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.itemVendors)) {
            data["ItemVendors"] = [];
            for (let item of this.itemVendors)
                data["ItemVendors"].push(item.toJSON());
        }
        if (Array.isArray(this.itemPrices)) {
            data["ItemPrices"] = [];
            for (let item of this.itemPrices)
                data["ItemPrices"].push(item.toJSON());
        }
        if (Array.isArray(this.itemLocationSettings)) {
            data["ItemLocationSettings"] = [];
            for (let item of this.itemLocationSettings)
                data["ItemLocationSettings"].push(item.toJSON());
        }
        if (Array.isArray(this.itemSiteSettings)) {
            data["ItemSiteSettings"] = [];
            for (let item of this.itemSiteSettings)
                data["ItemSiteSettings"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

/** Contains the information specific to an inventory item. */
export interface IItemInventoryInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records, this can be used to identify what records has errors, if any. */
    rowNumber: number;
    /** Required. This is a unique identifier of an item. */
    itemNumber?: string | undefined;
    /** This is a secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** The name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Indicates how long an item can be checked out before it is due back and the checkout length is shown in minutes.  */
    checkOutLengthMinutes: number;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for purchase, most often used to order items. */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice: number;
    /** Indicates the list price from the manufacturer. */
    listPrice: number;
    /** Required. Indicates how the cost of the item should be tracked. */
    costMethod: CostMethodEnum;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** Contains true/false values for how the item is tracked. */
    trackbyInfo?: ItemTrackbyInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of all vendor information for the item. */
    itemVendors?: ItemVendorInfo[] | undefined;
    /** A list of all pricing information for the item. */
    itemPrices?: ItemPrices[] | undefined;
    /** A list of all location settings for the item. */
    itemLocationSettings?: ItemLocationSettings[] | undefined;
    /** A list of all site settings for this item. */
    itemSiteSettings?: ItemSiteSettings[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
}

/** Attachment information about an item */
export class ItemAttachmentInfo implements IItemAttachmentInfo {
    /** Optional. If an attachments is added, you can associate the attachment with this asset type. */
    attachmentsToAdd?: string[] | undefined;
    /** Optional. To update, you need to disassociate (remove) an attachment from the asset type. */
    attachmentsToDelete?: string[] | undefined;
    /** Optional. This is used to specify the name for the attachment. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;
    /** Specify the Identifier of the attachment to display by default.  */
    newDefaultAttachment?: string | undefined;
    /** Read-Only. Indicates that the asset type has at least one attachment. */
    hasAttachment!: boolean;

    constructor(data?: IItemAttachmentInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["AttachmentsToAdd"])) {
                this.attachmentsToAdd = [] as any;
                for (let item of _data["AttachmentsToAdd"])
                    this.attachmentsToAdd!.push(item);
            }
            if (Array.isArray(_data["AttachmentsToDelete"])) {
                this.attachmentsToDelete = [] as any;
                for (let item of _data["AttachmentsToDelete"])
                    this.attachmentsToDelete!.push(item);
            }
            if (Array.isArray(_data["AttachmentNames"])) {
                this.attachmentNames = [] as any;
                for (let item of _data["AttachmentNames"])
                    this.attachmentNames!.push(KeyValuePairOfStringAndString.fromJS(item));
            }
            this.newDefaultAttachment = _data["NewDefaultAttachment"];
            this.hasAttachment = _data["HasAttachment"];
        }
    }

    static fromJS(data: any): ItemAttachmentInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemAttachmentInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.attachmentsToAdd)) {
            data["AttachmentsToAdd"] = [];
            for (let item of this.attachmentsToAdd)
                data["AttachmentsToAdd"].push(item);
        }
        if (Array.isArray(this.attachmentsToDelete)) {
            data["AttachmentsToDelete"] = [];
            for (let item of this.attachmentsToDelete)
                data["AttachmentsToDelete"].push(item);
        }
        if (Array.isArray(this.attachmentNames)) {
            data["AttachmentNames"] = [];
            for (let item of this.attachmentNames)
                data["AttachmentNames"].push(item.toJSON());
        }
        data["NewDefaultAttachment"] = this.newDefaultAttachment;
        data["HasAttachment"] = this.hasAttachment;
        return data; 
    }
}

/** Attachment information about an item */
export interface IItemAttachmentInfo {
    /** Optional. If an attachments is added, you can associate the attachment with this asset type. */
    attachmentsToAdd?: string[] | undefined;
    /** Optional. To update, you need to disassociate (remove) an attachment from the asset type. */
    attachmentsToDelete?: string[] | undefined;
    /** Optional. This is used to specify the name for the attachment. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;
    /** Specify the Identifier of the attachment to display by default.  */
    newDefaultAttachment?: string | undefined;
    /** Read-Only. Indicates that the asset type has at least one attachment. */
    hasAttachment: boolean;
}

/** Trackby information for an item */
export class ItemTrackbyInfo implements IItemTrackbyInfo {
    /** Indicates if an item is tracked by unique serial numbers. */
    trackedBySerialNumber!: boolean;
    /** Indicates if an item is tracked by lot. */
    trackedByLot!: boolean;
    /** Indicates if an item is tracked by date code. */
    trackedByDateCode!: boolean;
    /** Indicates if an item is tracked by serial number only when picking the item. */
    trackedBySerialNumberOnlyOnInvoicing!: boolean;
    /** Indicates if the serial number should be automatically generated. */
    autoGenerateSerialNumber!: boolean;
    /** Indicates if the item is tracked by reference number on relevant transactions. */
    trackedByReferenceNumber!: boolean;
    /** Indicates if the item is tracked by vendor on relevant transactions. */
    trackedByVendor!: boolean;
    /** Indicates if the item is tracked by customer on relevant transactions. */
    trackedByCustomer!: boolean;

    constructor(data?: IItemTrackbyInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.trackedBySerialNumber = _data["TrackedBySerialNumber"];
            this.trackedByLot = _data["TrackedByLot"];
            this.trackedByDateCode = _data["TrackedByDateCode"];
            this.trackedBySerialNumberOnlyOnInvoicing = _data["TrackedBySerialNumberOnlyOnInvoicing"];
            this.autoGenerateSerialNumber = _data["AutoGenerateSerialNumber"];
            this.trackedByReferenceNumber = _data["TrackedByReferenceNumber"];
            this.trackedByVendor = _data["TrackedByVendor"];
            this.trackedByCustomer = _data["TrackedByCustomer"];
        }
    }

    static fromJS(data: any): ItemTrackbyInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemTrackbyInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TrackedBySerialNumber"] = this.trackedBySerialNumber;
        data["TrackedByLot"] = this.trackedByLot;
        data["TrackedByDateCode"] = this.trackedByDateCode;
        data["TrackedBySerialNumberOnlyOnInvoicing"] = this.trackedBySerialNumberOnlyOnInvoicing;
        data["AutoGenerateSerialNumber"] = this.autoGenerateSerialNumber;
        data["TrackedByReferenceNumber"] = this.trackedByReferenceNumber;
        data["TrackedByVendor"] = this.trackedByVendor;
        data["TrackedByCustomer"] = this.trackedByCustomer;
        return data; 
    }
}

/** Trackby information for an item */
export interface IItemTrackbyInfo {
    /** Indicates if an item is tracked by unique serial numbers. */
    trackedBySerialNumber: boolean;
    /** Indicates if an item is tracked by lot. */
    trackedByLot: boolean;
    /** Indicates if an item is tracked by date code. */
    trackedByDateCode: boolean;
    /** Indicates if an item is tracked by serial number only when picking the item. */
    trackedBySerialNumberOnlyOnInvoicing: boolean;
    /** Indicates if the serial number should be automatically generated. */
    autoGenerateSerialNumber: boolean;
    /** Indicates if the item is tracked by reference number on relevant transactions. */
    trackedByReferenceNumber: boolean;
    /** Indicates if the item is tracked by vendor on relevant transactions. */
    trackedByVendor: boolean;
    /** Indicates if the item is tracked by customer on relevant transactions. */
    trackedByCustomer: boolean;
}

/** Dimension information about an item */
export class ItemDimensionInfo implements IItemDimensionInfo {
    /** Indicates the units used to measure length, width, and height. */
    dimensionUnit?: string | undefined;
    /** Indicates the item's height. */
    height!: number;
    /** Indicates the item's width. */
    width!: number;
    /** Indicates the item's depth. */
    depth!: number;
    /** Indicates the unit used to measure weight. */
    weightUnit?: string | undefined;
    /** Indicates the item's weight. */
    weight!: number;
    /** Indicates the unit used to measure volume. */
    volumeUnit?: string | undefined;
    /** Indicates the maximum volume of the item. */
    maxVolume!: number;

    constructor(data?: IItemDimensionInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.dimensionUnit = _data["DimensionUnit"];
            this.height = _data["Height"];
            this.width = _data["Width"];
            this.depth = _data["Depth"];
            this.weightUnit = _data["WeightUnit"];
            this.weight = _data["Weight"];
            this.volumeUnit = _data["VolumeUnit"];
            this.maxVolume = _data["MaxVolume"];
        }
    }

    static fromJS(data: any): ItemDimensionInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemDimensionInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["DimensionUnit"] = this.dimensionUnit;
        data["Height"] = this.height;
        data["Width"] = this.width;
        data["Depth"] = this.depth;
        data["WeightUnit"] = this.weightUnit;
        data["Weight"] = this.weight;
        data["VolumeUnit"] = this.volumeUnit;
        data["MaxVolume"] = this.maxVolume;
        return data; 
    }
}

/** Dimension information about an item */
export interface IItemDimensionInfo {
    /** Indicates the units used to measure length, width, and height. */
    dimensionUnit?: string | undefined;
    /** Indicates the item's height. */
    height: number;
    /** Indicates the item's width. */
    width: number;
    /** Indicates the item's depth. */
    depth: number;
    /** Indicates the unit used to measure weight. */
    weightUnit?: string | undefined;
    /** Indicates the item's weight. */
    weight: number;
    /** Indicates the unit used to measure volume. */
    volumeUnit?: string | undefined;
    /** Indicates the maximum volume of the item. */
    maxVolume: number;
}

/** This is the vendor information for an item. */
export class ItemVendorInfo implements IItemVendorInfo {
    /** Required. This is the unique identifier for the vendor. */
    vendorNumber?: string | undefined;
    /** Required. This is the unique identifier for the item-vendor combination. */
    vendorSKU?: string | undefined;
    /** Required. Indicates the unit of measure for the this item-vendor relation. */
    vendorUnit?: string | undefined;
    /** Indicates whether or not this is the default unit of measure for the item-vendor relation. */
    defaultVendorUnit!: boolean;
    /** Indicates the price for ordering the item at the specified unit of measure from this vendor. */
    vendorPrice!: number;
    /** A description of this item-vendor relation. */
    vendorDescription?: string | undefined;
    /** Indicates the amount of time it takes to order from the vendor. */
    leadTimeMinutes!: number;
    /** Indicates whether or not this is the default vendor for this item. */
    preferredVendor!: boolean;
    /** Notes about this item-vendor relation. */
    vendorNotes?: NoteInfo[] | undefined;

    constructor(data?: IItemVendorInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.vendorNumber = _data["VendorNumber"];
            this.vendorSKU = _data["VendorSKU"];
            this.vendorUnit = _data["VendorUnit"];
            this.defaultVendorUnit = _data["DefaultVendorUnit"];
            this.vendorPrice = _data["VendorPrice"];
            this.vendorDescription = _data["VendorDescription"];
            this.leadTimeMinutes = _data["LeadTimeMinutes"];
            this.preferredVendor = _data["PreferredVendor"];
            if (Array.isArray(_data["VendorNotes"])) {
                this.vendorNotes = [] as any;
                for (let item of _data["VendorNotes"])
                    this.vendorNotes!.push(NoteInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ItemVendorInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemVendorInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["VendorNumber"] = this.vendorNumber;
        data["VendorSKU"] = this.vendorSKU;
        data["VendorUnit"] = this.vendorUnit;
        data["DefaultVendorUnit"] = this.defaultVendorUnit;
        data["VendorPrice"] = this.vendorPrice;
        data["VendorDescription"] = this.vendorDescription;
        data["LeadTimeMinutes"] = this.leadTimeMinutes;
        data["PreferredVendor"] = this.preferredVendor;
        if (Array.isArray(this.vendorNotes)) {
            data["VendorNotes"] = [];
            for (let item of this.vendorNotes)
                data["VendorNotes"].push(item.toJSON());
        }
        return data; 
    }
}

/** This is the vendor information for an item. */
export interface IItemVendorInfo {
    /** Required. This is the unique identifier for the vendor. */
    vendorNumber?: string | undefined;
    /** Required. This is the unique identifier for the item-vendor combination. */
    vendorSKU?: string | undefined;
    /** Required. Indicates the unit of measure for the this item-vendor relation. */
    vendorUnit?: string | undefined;
    /** Indicates whether or not this is the default unit of measure for the item-vendor relation. */
    defaultVendorUnit: boolean;
    /** Indicates the price for ordering the item at the specified unit of measure from this vendor. */
    vendorPrice: number;
    /** A description of this item-vendor relation. */
    vendorDescription?: string | undefined;
    /** Indicates the amount of time it takes to order from the vendor. */
    leadTimeMinutes: number;
    /** Indicates whether or not this is the default vendor for this item. */
    preferredVendor: boolean;
    /** Notes about this item-vendor relation. */
    vendorNotes?: NoteInfo[] | undefined;
}

/** Indicates the pricing information for an item. */
export class ItemPrices implements IItemPrices {
    /** Required. The name of the price tier. */
    priceTier?: string | undefined;
    /** Indicates the price of the item when using this price tier. */
    price!: number;
    /** Indicates the minimum quantity before the price tier can be used. */
    minimumQuantity!: number;
    /** Indicates the maximum quantity the price tier can be used. */
    maximumQuantity!: number;

    constructor(data?: IItemPrices) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.priceTier = _data["PriceTier"];
            this.price = _data["Price"];
            this.minimumQuantity = _data["MinimumQuantity"];
            this.maximumQuantity = _data["MaximumQuantity"];
        }
    }

    static fromJS(data: any): ItemPrices {
        data = typeof data === 'object' ? data : {};
        let result = new ItemPrices();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["PriceTier"] = this.priceTier;
        data["Price"] = this.price;
        data["MinimumQuantity"] = this.minimumQuantity;
        data["MaximumQuantity"] = this.maximumQuantity;
        return data; 
    }
}

/** Indicates the pricing information for an item. */
export interface IItemPrices {
    /** Required. The name of the price tier. */
    priceTier?: string | undefined;
    /** Indicates the price of the item when using this price tier. */
    price: number;
    /** Indicates the minimum quantity before the price tier can be used. */
    minimumQuantity: number;
    /** Indicates the maximum quantity the price tier can be used. */
    maximumQuantity: number;
}

/** The location settings for an item. */
export class ItemLocationSettings implements IItemLocationSettings {
    /** Required. The name of the site where the location is located. */
    siteName?: string | undefined;
    /** Required. The unique identifier for the location. */
    locationCode?: string | undefined;
    /** Indicates whether or not this is the default location at the specified site for this item. */
    primaryLocation!: boolean;
    /** Indicates the minimum quantity that should be stored at this location. */
    minimumQuantity!: number;
    /** Indicates the maximum quantity that can be stored at this location. */
    maximumQuantity!: number;
    /** Indicates when quantity should be reordered. */
    reorderQuantity!: number;

    constructor(data?: IItemLocationSettings) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.primaryLocation = _data["PrimaryLocation"];
            this.minimumQuantity = _data["MinimumQuantity"];
            this.maximumQuantity = _data["MaximumQuantity"];
            this.reorderQuantity = _data["ReorderQuantity"];
        }
    }

    static fromJS(data: any): ItemLocationSettings {
        data = typeof data === 'object' ? data : {};
        let result = new ItemLocationSettings();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["PrimaryLocation"] = this.primaryLocation;
        data["MinimumQuantity"] = this.minimumQuantity;
        data["MaximumQuantity"] = this.maximumQuantity;
        data["ReorderQuantity"] = this.reorderQuantity;
        return data; 
    }
}

/** The location settings for an item. */
export interface IItemLocationSettings {
    /** Required. The name of the site where the location is located. */
    siteName?: string | undefined;
    /** Required. The unique identifier for the location. */
    locationCode?: string | undefined;
    /** Indicates whether or not this is the default location at the specified site for this item. */
    primaryLocation: boolean;
    /** Indicates the minimum quantity that should be stored at this location. */
    minimumQuantity: number;
    /** Indicates the maximum quantity that can be stored at this location. */
    maximumQuantity: number;
    /** Indicates when quantity should be reordered. */
    reorderQuantity: number;
}

/** The site level settings for an item */
export class ItemSiteSettings implements IItemSiteSettings {
    /** The name of the site these settings apply to */
    siteName?: string | undefined;
    /** The minimum quantity intended for this site for this item */
    minimumQuantity!: number;
    /** The maximum intended quantity for this site for this item */
    maximumQuantity!: number;
    /** When reordering quantity for this site this is the default quantity to reorder */
    reorderQuantity!: number;

    constructor(data?: IItemSiteSettings) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.siteName = _data["SiteName"];
            this.minimumQuantity = _data["MinimumQuantity"];
            this.maximumQuantity = _data["MaximumQuantity"];
            this.reorderQuantity = _data["ReorderQuantity"];
        }
    }

    static fromJS(data: any): ItemSiteSettings {
        data = typeof data === 'object' ? data : {};
        let result = new ItemSiteSettings();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SiteName"] = this.siteName;
        data["MinimumQuantity"] = this.minimumQuantity;
        data["MaximumQuantity"] = this.maximumQuantity;
        data["ReorderQuantity"] = this.reorderQuantity;
        return data; 
    }
}

/** The site level settings for an item */
export interface IItemSiteSettings {
    /** The name of the site these settings apply to */
    siteName?: string | undefined;
    /** The minimum quantity intended for this site for this item */
    minimumQuantity: number;
    /** The maximum intended quantity for this site for this item */
    maximumQuantity: number;
    /** When reordering quantity for this site this is the default quantity to reorder */
    reorderQuantity: number;
}

/** Contains the information specific to a non inventory item. */
export class ItemNonInventoryInfo implements IItemNonInventoryInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors. */
    rowNumber!: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** The name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for purchase, most often used to order items */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost!: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice!: number;
    /** Indicates the list price from the manufacturer. */
    listPrice!: number;
    /** Required. Indicates how the cost of the item should be tracked. */
    costMethod!: CostMethodEnum;
    /** Read Only. The current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost!: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of all vendor information for the item. */
    itemVendors?: ItemVendorInfo[] | undefined;
    /** A list of all location settings for the item. */
    itemLocationSettings?: ItemLocationSettings[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IItemNonInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.itemNumber = _data["ItemNumber"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.manufacturerName = _data["ManufacturerName"];
            this.stockingUnit = _data["StockingUnit"];
            this.purchaseUnit = _data["PurchaseUnit"];
            this.salesUnit = _data["SalesUnit"];
            this.cost = _data["Cost"];
            this.salesPrice = _data["SalesPrice"];
            this.listPrice = _data["ListPrice"];
            this.costMethod = _data["CostMethod"];
            this.averageCost = _data["AverageCost"];
            this.taxCode = _data["TaxCode"];
            this.attachmentInfo = _data["AttachmentInfo"] ? ItemAttachmentInfo.fromJS(_data["AttachmentInfo"]) : <any>undefined;
            this.dimensionInfo = _data["DimensionInfo"] ? ItemDimensionInfo.fromJS(_data["DimensionInfo"]) : <any>undefined;
            if (Array.isArray(_data["ItemVendors"])) {
                this.itemVendors = [] as any;
                for (let item of _data["ItemVendors"])
                    this.itemVendors!.push(ItemVendorInfo.fromJS(item));
            }
            if (Array.isArray(_data["ItemLocationSettings"])) {
                this.itemLocationSettings = [] as any;
                for (let item of _data["ItemLocationSettings"])
                    this.itemLocationSettings!.push(ItemLocationSettings.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ItemNonInventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemNonInventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["ItemNumber"] = this.itemNumber;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["ManufacturerName"] = this.manufacturerName;
        data["StockingUnit"] = this.stockingUnit;
        data["PurchaseUnit"] = this.purchaseUnit;
        data["SalesUnit"] = this.salesUnit;
        data["Cost"] = this.cost;
        data["SalesPrice"] = this.salesPrice;
        data["ListPrice"] = this.listPrice;
        data["CostMethod"] = this.costMethod;
        data["AverageCost"] = this.averageCost;
        data["TaxCode"] = this.taxCode;
        data["AttachmentInfo"] = this.attachmentInfo ? this.attachmentInfo.toJSON() : <any>undefined;
        data["DimensionInfo"] = this.dimensionInfo ? this.dimensionInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.itemVendors)) {
            data["ItemVendors"] = [];
            for (let item of this.itemVendors)
                data["ItemVendors"].push(item.toJSON());
        }
        if (Array.isArray(this.itemLocationSettings)) {
            data["ItemLocationSettings"] = [];
            for (let item of this.itemLocationSettings)
                data["ItemLocationSettings"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

/** Contains the information specific to a non inventory item. */
export interface IItemNonInventoryInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors. */
    rowNumber: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** The name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for purchase, most often used to order items */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice: number;
    /** Indicates the list price from the manufacturer. */
    listPrice: number;
    /** Required. Indicates how the cost of the item should be tracked. */
    costMethod: CostMethodEnum;
    /** Read Only. The current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of all vendor information for the item. */
    itemVendors?: ItemVendorInfo[] | undefined;
    /** A list of all location settings for the item. */
    itemLocationSettings?: ItemLocationSettings[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
}

/** Contains the information specific to service items. */
export class ItemServiceInfo implements IItemServiceInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber!: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for purchase, most often used to order items. */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost!: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice!: number;
    /** Indicates the list price from the manufacturer. */
    listPrice!: number;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost!: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** A list of all vendor information for the item. */
    itemVendorInfo?: ItemVendorInfo[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IItemServiceInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.itemNumber = _data["ItemNumber"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.stockingUnit = _data["StockingUnit"];
            this.purchaseUnit = _data["PurchaseUnit"];
            this.salesUnit = _data["SalesUnit"];
            this.cost = _data["Cost"];
            this.salesPrice = _data["SalesPrice"];
            this.listPrice = _data["ListPrice"];
            this.averageCost = _data["AverageCost"];
            this.taxCode = _data["TaxCode"];
            this.attachmentInfo = _data["AttachmentInfo"] ? ItemAttachmentInfo.fromJS(_data["AttachmentInfo"]) : <any>undefined;
            if (Array.isArray(_data["ItemVendorInfo"])) {
                this.itemVendorInfo = [] as any;
                for (let item of _data["ItemVendorInfo"])
                    this.itemVendorInfo!.push(ItemVendorInfo.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ItemServiceInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemServiceInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["ItemNumber"] = this.itemNumber;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["StockingUnit"] = this.stockingUnit;
        data["PurchaseUnit"] = this.purchaseUnit;
        data["SalesUnit"] = this.salesUnit;
        data["Cost"] = this.cost;
        data["SalesPrice"] = this.salesPrice;
        data["ListPrice"] = this.listPrice;
        data["AverageCost"] = this.averageCost;
        data["TaxCode"] = this.taxCode;
        data["AttachmentInfo"] = this.attachmentInfo ? this.attachmentInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.itemVendorInfo)) {
            data["ItemVendorInfo"] = [];
            for (let item of this.itemVendorInfo)
                data["ItemVendorInfo"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

/** Contains the information specific to service items. */
export interface IItemServiceInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for purchase, most often used to order items. */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice: number;
    /** Indicates the list price from the manufacturer. */
    listPrice: number;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** A list of all vendor information for the item. */
    itemVendorInfo?: ItemVendorInfo[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
}

export class WaspResultOfListOfWaspResultOfItemInfo implements IWaspResultOfListOfWaspResultOfItemInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfItemInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfItemInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfItemInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfItemInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfItemInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfItemInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfItemInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfItemInfo implements IWaspResultOfItemInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfItemInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? ItemInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfItemInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfItemInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfItemInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** Contains the information common across all types of items. */
export class ItemInfo implements IItemInfo {
    /** Read only. Enum; Indicates the type of item. */
    itemType!: ItemTypeEnum;
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber!: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** Indicates the name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Indicates how long an item can be checked out before it is due back and the checkout length is shown in minutes.  */
    checkOutLengthMinutes!: number;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required (except on Assembly and Kit Items). Indicates the unit of measure for purchase, most often used to order items. */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost!: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice!: number;
    /** Indicates the list price from the manufacturer. */
    listPrice!: number;
    /** Required (except on Service). Indicates how the cost of the item should be tracked.
Moving Average, First In First Out, or Last In First Out. */
    costMethod!: CostMethodEnum;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost.
For First In First Out, this is the Unit Cost of the OLDEST Add/Receive transaction.
For Last In First Out, this is the Unit Cost of the Most Recent (Newest) Add/Receive transaction. */
    averageCost?: number | undefined;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** Contains true/false values for how the item is tracked. */
    trackbyInfo?: ItemTrackbyInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
    /** Read Only. Indicates the date the item was created. */
    itemCreateDate?: Date | undefined;
    /** Read Only. Indicates the date the item was last updated. */
    itemLastUpdatedDate?: Date | undefined;

    constructor(data?: IItemInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemType = _data["ItemType"];
            this.rowNumber = _data["RowNumber"];
            this.itemNumber = _data["ItemNumber"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.manufacturerName = _data["ManufacturerName"];
            this.checkOutLengthMinutes = _data["CheckOutLengthMinutes"];
            this.stockingUnit = _data["StockingUnit"];
            this.purchaseUnit = _data["PurchaseUnit"];
            this.salesUnit = _data["SalesUnit"];
            this.cost = _data["Cost"];
            this.salesPrice = _data["SalesPrice"];
            this.listPrice = _data["ListPrice"];
            this.costMethod = _data["CostMethod"];
            this.averageCost = _data["AverageCost"];
            this.taxCode = _data["TaxCode"];
            this.attachmentInfo = _data["AttachmentInfo"] ? ItemAttachmentInfo.fromJS(_data["AttachmentInfo"]) : <any>undefined;
            this.trackbyInfo = _data["TrackbyInfo"] ? ItemTrackbyInfo.fromJS(_data["TrackbyInfo"]) : <any>undefined;
            this.dimensionInfo = _data["DimensionInfo"] ? ItemDimensionInfo.fromJS(_data["DimensionInfo"]) : <any>undefined;
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            this.itemCreateDate = _data["ItemCreateDate"] ? new Date(_data["ItemCreateDate"].toString()) : <any>undefined;
            this.itemLastUpdatedDate = _data["ItemLastUpdatedDate"] ? new Date(_data["ItemLastUpdatedDate"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): ItemInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemType"] = this.itemType;
        data["RowNumber"] = this.rowNumber;
        data["ItemNumber"] = this.itemNumber;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["ManufacturerName"] = this.manufacturerName;
        data["CheckOutLengthMinutes"] = this.checkOutLengthMinutes;
        data["StockingUnit"] = this.stockingUnit;
        data["PurchaseUnit"] = this.purchaseUnit;
        data["SalesUnit"] = this.salesUnit;
        data["Cost"] = this.cost;
        data["SalesPrice"] = this.salesPrice;
        data["ListPrice"] = this.listPrice;
        data["CostMethod"] = this.costMethod;
        data["AverageCost"] = this.averageCost;
        data["TaxCode"] = this.taxCode;
        data["AttachmentInfo"] = this.attachmentInfo ? this.attachmentInfo.toJSON() : <any>undefined;
        data["TrackbyInfo"] = this.trackbyInfo ? this.trackbyInfo.toJSON() : <any>undefined;
        data["DimensionInfo"] = this.dimensionInfo ? this.dimensionInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["ItemCreateDate"] = this.itemCreateDate ? this.itemCreateDate.toISOString() : <any>undefined;
        data["ItemLastUpdatedDate"] = this.itemLastUpdatedDate ? this.itemLastUpdatedDate.toISOString() : <any>undefined;
        return data; 
    }
}

/** Contains the information common across all types of items. */
export interface IItemInfo {
    /** Read only. Enum; Indicates the type of item. */
    itemType: ItemTypeEnum;
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** Indicates the name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Indicates how long an item can be checked out before it is due back and the checkout length is shown in minutes.  */
    checkOutLengthMinutes: number;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required (except on Assembly and Kit Items). Indicates the unit of measure for purchase, most often used to order items. */
    purchaseUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice: number;
    /** Indicates the list price from the manufacturer. */
    listPrice: number;
    /** Required (except on Service). Indicates how the cost of the item should be tracked.
Moving Average, First In First Out, or Last In First Out. */
    costMethod: CostMethodEnum;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost.
For First In First Out, this is the Unit Cost of the OLDEST Add/Receive transaction.
For Last In First Out, this is the Unit Cost of the Most Recent (Newest) Add/Receive transaction. */
    averageCost?: number | undefined;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** Contains true/false values for how the item is tracked. */
    trackbyInfo?: ItemTrackbyInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
    /** Read Only. Indicates the date the item was created. */
    itemCreateDate?: Date | undefined;
    /** Read Only. Indicates the date the item was last updated. */
    itemLastUpdatedDate?: Date | undefined;
}

/** Enumerator for different item types. */
export enum ItemTypeEnum {
    All = 0,
    InventoryItem = 2147483635,
    NonInventoryItem = 2147483636,
    Kit = 2147483637,
    Assembly = 2147483638,
    Service = 2147483639,
    Container = 2147483640,
}

export class WaspResultOfListOfItemLocationModel implements IWaspResultOfListOfItemLocationModel {
    /** Type specific result that always depends on the function called. */
    data?: ItemLocationModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfItemLocationModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(ItemLocationModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfItemLocationModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfItemLocationModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfItemLocationModel {
    /** Type specific result that always depends on the function called. */
    data?: ItemLocationModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class LocationModel implements ILocationModel {
    locationId!: number;
    locationCode?: string | undefined;
    locationDescription?: string | undefined;
    siteId!: number;
    zoneId?: number | undefined;
    locationSaleable?: number | undefined;
    defaultLocation?: boolean | undefined;
    locationRecordStatus!: number;
    locationRowVersion?: string | undefined;
    locationNotes?: NoteModel[] | undefined;
    customFields?: DcfValueModel[] | undefined;
    importRowNumber!: number;
    locationSequence?: number | undefined;
    usageTypeId?: number | undefined;
    width?: number | undefined;
    height?: number | undefined;
    depth?: number | undefined;
    dimensionUomId?: number | undefined;
    volume?: number | undefined;
    maxWeight?: number | undefined;
    weightUomId?: number | undefined;
    maxVolume?: number | undefined;
    volumeUomId?: number | undefined;
    locationTypeId!: number;
    parentLocationId?: number | undefined;
    locationPrefix?: string | undefined;

    constructor(data?: ILocationModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.locationId = _data["LocationId"];
            this.locationCode = _data["LocationCode"];
            this.locationDescription = _data["LocationDescription"];
            this.siteId = _data["SiteId"];
            this.zoneId = _data["ZoneId"];
            this.locationSaleable = _data["LocationSaleable"];
            this.defaultLocation = _data["DefaultLocation"];
            this.locationRecordStatus = _data["LocationRecordStatus"];
            this.locationRowVersion = _data["LocationRowVersion"];
            if (Array.isArray(_data["LocationNotes"])) {
                this.locationNotes = [] as any;
                for (let item of _data["LocationNotes"])
                    this.locationNotes!.push(NoteModel.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueModel.fromJS(item));
            }
            this.importRowNumber = _data["ImportRowNumber"];
            this.locationSequence = _data["LocationSequence"];
            this.usageTypeId = _data["UsageTypeId"];
            this.width = _data["Width"];
            this.height = _data["Height"];
            this.depth = _data["Depth"];
            this.dimensionUomId = _data["DimensionUomId"];
            this.volume = _data["Volume"];
            this.maxWeight = _data["MaxWeight"];
            this.weightUomId = _data["WeightUomId"];
            this.maxVolume = _data["MaxVolume"];
            this.volumeUomId = _data["VolumeUomId"];
            this.locationTypeId = _data["LocationTypeId"];
            this.parentLocationId = _data["ParentLocationId"];
            this.locationPrefix = _data["LocationPrefix"];
        }
    }

    static fromJS(data: any): LocationModel {
        data = typeof data === 'object' ? data : {};
        let result = new LocationModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["LocationId"] = this.locationId;
        data["LocationCode"] = this.locationCode;
        data["LocationDescription"] = this.locationDescription;
        data["SiteId"] = this.siteId;
        data["ZoneId"] = this.zoneId;
        data["LocationSaleable"] = this.locationSaleable;
        data["DefaultLocation"] = this.defaultLocation;
        data["LocationRecordStatus"] = this.locationRecordStatus;
        data["LocationRowVersion"] = this.locationRowVersion;
        if (Array.isArray(this.locationNotes)) {
            data["LocationNotes"] = [];
            for (let item of this.locationNotes)
                data["LocationNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["ImportRowNumber"] = this.importRowNumber;
        data["LocationSequence"] = this.locationSequence;
        data["UsageTypeId"] = this.usageTypeId;
        data["Width"] = this.width;
        data["Height"] = this.height;
        data["Depth"] = this.depth;
        data["DimensionUomId"] = this.dimensionUomId;
        data["Volume"] = this.volume;
        data["MaxWeight"] = this.maxWeight;
        data["WeightUomId"] = this.weightUomId;
        data["MaxVolume"] = this.maxVolume;
        data["VolumeUomId"] = this.volumeUomId;
        data["LocationTypeId"] = this.locationTypeId;
        data["ParentLocationId"] = this.parentLocationId;
        data["LocationPrefix"] = this.locationPrefix;
        return data; 
    }
}

export interface ILocationModel {
    locationId: number;
    locationCode?: string | undefined;
    locationDescription?: string | undefined;
    siteId: number;
    zoneId?: number | undefined;
    locationSaleable?: number | undefined;
    defaultLocation?: boolean | undefined;
    locationRecordStatus: number;
    locationRowVersion?: string | undefined;
    locationNotes?: NoteModel[] | undefined;
    customFields?: DcfValueModel[] | undefined;
    importRowNumber: number;
    locationSequence?: number | undefined;
    usageTypeId?: number | undefined;
    width?: number | undefined;
    height?: number | undefined;
    depth?: number | undefined;
    dimensionUomId?: number | undefined;
    volume?: number | undefined;
    maxWeight?: number | undefined;
    weightUomId?: number | undefined;
    maxVolume?: number | undefined;
    volumeUomId?: number | undefined;
    locationTypeId: number;
    parentLocationId?: number | undefined;
    locationPrefix?: string | undefined;
}

export class ItemLocationModel extends LocationModel implements IItemLocationModel {
    assetSimpleId!: number;
    itemLocationPrimary?: boolean | undefined;
    itemLocationMaxQuantity!: number;
    itemLocationMinQuantity!: number;
    itemLocationReorderQuantity!: number;
    itemAvailableQuantity!: number;
    siteName?: string | undefined;
    changeType!: WtChangeType;
    locationUsageType!: WtUsageType;

    constructor(data?: IItemLocationModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.assetSimpleId = _data["AssetSimpleId"];
            this.itemLocationPrimary = _data["ItemLocationPrimary"];
            this.itemLocationMaxQuantity = _data["ItemLocationMaxQuantity"];
            this.itemLocationMinQuantity = _data["ItemLocationMinQuantity"];
            this.itemLocationReorderQuantity = _data["ItemLocationReorderQuantity"];
            this.itemAvailableQuantity = _data["ItemAvailableQuantity"];
            this.siteName = _data["SiteName"];
            this.changeType = _data["ChangeType"];
            this.locationUsageType = _data["LocationUsageType"];
        }
    }

    static fromJS(data: any): ItemLocationModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemLocationModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AssetSimpleId"] = this.assetSimpleId;
        data["ItemLocationPrimary"] = this.itemLocationPrimary;
        data["ItemLocationMaxQuantity"] = this.itemLocationMaxQuantity;
        data["ItemLocationMinQuantity"] = this.itemLocationMinQuantity;
        data["ItemLocationReorderQuantity"] = this.itemLocationReorderQuantity;
        data["ItemAvailableQuantity"] = this.itemAvailableQuantity;
        data["SiteName"] = this.siteName;
        data["ChangeType"] = this.changeType;
        data["LocationUsageType"] = this.locationUsageType;
        super.toJSON(data);
        return data; 
    }
}

export interface IItemLocationModel extends ILocationModel {
    assetSimpleId: number;
    itemLocationPrimary?: boolean | undefined;
    itemLocationMaxQuantity: number;
    itemLocationMinQuantity: number;
    itemLocationReorderQuantity: number;
    itemAvailableQuantity: number;
    siteName?: string | undefined;
    changeType: WtChangeType;
    locationUsageType: WtUsageType;
}

export enum WtChangeType {
    Nothing = 0,
    Add = 1,
    Update = 2,
    Delete = 3,
}

export enum WtUsageType {
    General = 1,
    Pick = 2,
    Receive = 4,
    Repair = 8,
    All = 15,
    Normal = 15,
}

export class WaspResultOfListOfItemInfo implements IWaspResultOfListOfItemInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfItemInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(ItemInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfItemInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfItemInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfItemInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** Search parameter to find items. */
export class ItemContainsSearchParameters implements IItemContainsSearchParameters {
    /** Simple string. Records containing this string are returned. */
    searchPattern?: string | undefined;
    /** Indicates the type of item to search for. */
    itemType!: ItemTypeEnum;

    constructor(data?: IItemContainsSearchParameters) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.searchPattern = _data["SearchPattern"];
            this.itemType = _data["ItemType"];
        }
    }

    static fromJS(data: any): ItemContainsSearchParameters {
        data = typeof data === 'object' ? data : {};
        let result = new ItemContainsSearchParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SearchPattern"] = this.searchPattern;
        data["ItemType"] = this.itemType;
        return data; 
    }
}

/** Search parameter to find items. */
export interface IItemContainsSearchParameters {
    /** Simple string. Records containing this string are returned. */
    searchPattern?: string | undefined;
    /** Indicates the type of item to search for. */
    itemType: ItemTypeEnum;
}

export class WaspResultOfItemInventoryInfo implements IWaspResultOfItemInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInventoryInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfItemInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? ItemInventoryInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfItemInventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfItemInventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfItemInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInventoryInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfItemInventoryInfo implements IWaspResultOfListOfItemInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInventoryInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfItemInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(ItemInventoryInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfItemInventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfItemInventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfItemInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemInventoryInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfItemNonInventoryInfo implements IWaspResultOfItemNonInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemNonInventoryInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfItemNonInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? ItemNonInventoryInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfItemNonInventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfItemNonInventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfItemNonInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemNonInventoryInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfItemServiceInfo implements IWaspResultOfItemServiceInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemServiceInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfItemServiceInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? ItemServiceInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfItemServiceInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfItemServiceInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfItemServiceInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemServiceInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfItemAssemblyInfo implements IWaspResultOfItemAssemblyInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemAssemblyInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfItemAssemblyInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? ItemAssemblyInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfItemAssemblyInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfItemAssemblyInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfItemAssemblyInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemAssemblyInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** Contains the information specific to an assembly item */
export class ItemAssemblyInfo implements IItemAssemblyInfo {
    /** Read Only. Long. When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber!: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** The name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Indicates how long an item can be checked out before it is due back and the checkout length is shown in minutes.   */
    checkOutLengthMinutes!: number;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required, Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost!: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice!: number;
    /** Indicates the list price from the manufacturer. */
    listPrice!: number;
    /** Required. Indicates how the cost of the item should be tracked. */
    costMethod!: CostMethodEnum;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost!: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** Contains true/false values for how the item is tracked. */
    trackbyInfo?: ItemTrackbyInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of all pricing information for the item. */
    itemPrices?: ItemPrices[] | undefined;
    /** A list of all location settings for the item. */
    itemLocationSettings?: ItemLocationSettings[] | undefined;
    /** A list of the contents of the bill of materials. */
    itemBillOfMaterials?: ItemBillOfMaterials[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IItemAssemblyInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.itemNumber = _data["ItemNumber"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.manufacturerName = _data["ManufacturerName"];
            this.checkOutLengthMinutes = _data["CheckOutLengthMinutes"];
            this.stockingUnit = _data["StockingUnit"];
            this.salesUnit = _data["SalesUnit"];
            this.cost = _data["Cost"];
            this.salesPrice = _data["SalesPrice"];
            this.listPrice = _data["ListPrice"];
            this.costMethod = _data["CostMethod"];
            this.averageCost = _data["AverageCost"];
            this.taxCode = _data["TaxCode"];
            this.attachmentInfo = _data["AttachmentInfo"] ? ItemAttachmentInfo.fromJS(_data["AttachmentInfo"]) : <any>undefined;
            this.trackbyInfo = _data["TrackbyInfo"] ? ItemTrackbyInfo.fromJS(_data["TrackbyInfo"]) : <any>undefined;
            this.dimensionInfo = _data["DimensionInfo"] ? ItemDimensionInfo.fromJS(_data["DimensionInfo"]) : <any>undefined;
            if (Array.isArray(_data["ItemPrices"])) {
                this.itemPrices = [] as any;
                for (let item of _data["ItemPrices"])
                    this.itemPrices!.push(ItemPrices.fromJS(item));
            }
            if (Array.isArray(_data["ItemLocationSettings"])) {
                this.itemLocationSettings = [] as any;
                for (let item of _data["ItemLocationSettings"])
                    this.itemLocationSettings!.push(ItemLocationSettings.fromJS(item));
            }
            if (Array.isArray(_data["ItemBillOfMaterials"])) {
                this.itemBillOfMaterials = [] as any;
                for (let item of _data["ItemBillOfMaterials"])
                    this.itemBillOfMaterials!.push(ItemBillOfMaterials.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ItemAssemblyInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemAssemblyInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["ItemNumber"] = this.itemNumber;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["ManufacturerName"] = this.manufacturerName;
        data["CheckOutLengthMinutes"] = this.checkOutLengthMinutes;
        data["StockingUnit"] = this.stockingUnit;
        data["SalesUnit"] = this.salesUnit;
        data["Cost"] = this.cost;
        data["SalesPrice"] = this.salesPrice;
        data["ListPrice"] = this.listPrice;
        data["CostMethod"] = this.costMethod;
        data["AverageCost"] = this.averageCost;
        data["TaxCode"] = this.taxCode;
        data["AttachmentInfo"] = this.attachmentInfo ? this.attachmentInfo.toJSON() : <any>undefined;
        data["TrackbyInfo"] = this.trackbyInfo ? this.trackbyInfo.toJSON() : <any>undefined;
        data["DimensionInfo"] = this.dimensionInfo ? this.dimensionInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.itemPrices)) {
            data["ItemPrices"] = [];
            for (let item of this.itemPrices)
                data["ItemPrices"].push(item.toJSON());
        }
        if (Array.isArray(this.itemLocationSettings)) {
            data["ItemLocationSettings"] = [];
            for (let item of this.itemLocationSettings)
                data["ItemLocationSettings"].push(item.toJSON());
        }
        if (Array.isArray(this.itemBillOfMaterials)) {
            data["ItemBillOfMaterials"] = [];
            for (let item of this.itemBillOfMaterials)
                data["ItemBillOfMaterials"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

/** Contains the information specific to an assembly item */
export interface IItemAssemblyInfo {
    /** Read Only. Long. When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** The name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Indicates how long an item can be checked out before it is due back and the checkout length is shown in minutes.   */
    checkOutLengthMinutes: number;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required, Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice: number;
    /** Indicates the list price from the manufacturer. */
    listPrice: number;
    /** Required. Indicates how the cost of the item should be tracked. */
    costMethod: CostMethodEnum;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** Contains true/false values for how the item is tracked. */
    trackbyInfo?: ItemTrackbyInfo | undefined;
    /** The dimension info, units and measurements, of an item. */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of all pricing information for the item. */
    itemPrices?: ItemPrices[] | undefined;
    /** A list of all location settings for the item. */
    itemLocationSettings?: ItemLocationSettings[] | undefined;
    /** A list of the contents of the bill of materials. */
    itemBillOfMaterials?: ItemBillOfMaterials[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
}

/** The bill of materials for an item. */
export class ItemBillOfMaterials implements IItemBillOfMaterials {
    /** Required. The unique identifier for the sub-item. */
    itemNumber?: string | undefined;
    /** Required. Indicates how much quantity of this sub-item is required. */
    quantity!: number;
    /** Indicates how much each unit of the sub-item cost when using in building an assembly. */
    cost!: number;
    /** Unused at this time. Indicates whether or not the quantity of the items are recovered when disassembling the assembly. */
    scrapOnDisassembly!: boolean;

    constructor(data?: IItemBillOfMaterials) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.quantity = _data["Quantity"];
            this.cost = _data["Cost"];
            this.scrapOnDisassembly = _data["ScrapOnDisassembly"];
        }
    }

    static fromJS(data: any): ItemBillOfMaterials {
        data = typeof data === 'object' ? data : {};
        let result = new ItemBillOfMaterials();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["Quantity"] = this.quantity;
        data["Cost"] = this.cost;
        data["ScrapOnDisassembly"] = this.scrapOnDisassembly;
        return data; 
    }
}

/** The bill of materials for an item. */
export interface IItemBillOfMaterials {
    /** Required. The unique identifier for the sub-item. */
    itemNumber?: string | undefined;
    /** Required. Indicates how much quantity of this sub-item is required. */
    quantity: number;
    /** Indicates how much each unit of the sub-item cost when using in building an assembly. */
    cost: number;
    /** Unused at this time. Indicates whether or not the quantity of the items are recovered when disassembling the assembly. */
    scrapOnDisassembly: boolean;
}

export class WaspResultOfItemKitInfo implements IWaspResultOfItemKitInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemKitInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfItemKitInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? ItemKitInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfItemKitInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfItemKitInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfItemKitInfo {
    /** Type specific result that always depends on the function called. */
    data?: ItemKitInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** contains the information specific to kit items */
export class ItemKitInfo implements IItemKitInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber!: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** Indicates the name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost!: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice!: number;
    /** Indicates the list price from the manufacturer. */
    listPrice!: number;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost!: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** A list of all pricing information for the item. */
    itemPrices?: ItemPrices[] | undefined;
    /** A list of the contents of the bill of materials. */
    itemBillOfMaterials?: ItemBillOfMaterials[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IItemKitInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.itemNumber = _data["ItemNumber"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.categoryDescription = _data["CategoryDescription"];
            this.manufacturerName = _data["ManufacturerName"];
            this.stockingUnit = _data["StockingUnit"];
            this.salesUnit = _data["SalesUnit"];
            this.cost = _data["Cost"];
            this.salesPrice = _data["SalesPrice"];
            this.listPrice = _data["ListPrice"];
            this.averageCost = _data["AverageCost"];
            this.taxCode = _data["TaxCode"];
            this.attachmentInfo = _data["AttachmentInfo"] ? ItemAttachmentInfo.fromJS(_data["AttachmentInfo"]) : <any>undefined;
            if (Array.isArray(_data["ItemPrices"])) {
                this.itemPrices = [] as any;
                for (let item of _data["ItemPrices"])
                    this.itemPrices!.push(ItemPrices.fromJS(item));
            }
            if (Array.isArray(_data["ItemBillOfMaterials"])) {
                this.itemBillOfMaterials = [] as any;
                for (let item of _data["ItemBillOfMaterials"])
                    this.itemBillOfMaterials!.push(ItemBillOfMaterials.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ItemKitInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ItemKitInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["ItemNumber"] = this.itemNumber;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CategoryDescription"] = this.categoryDescription;
        data["ManufacturerName"] = this.manufacturerName;
        data["StockingUnit"] = this.stockingUnit;
        data["SalesUnit"] = this.salesUnit;
        data["Cost"] = this.cost;
        data["SalesPrice"] = this.salesPrice;
        data["ListPrice"] = this.listPrice;
        data["AverageCost"] = this.averageCost;
        data["TaxCode"] = this.taxCode;
        data["AttachmentInfo"] = this.attachmentInfo ? this.attachmentInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.itemPrices)) {
            data["ItemPrices"] = [];
            for (let item of this.itemPrices)
                data["ItemPrices"].push(item.toJSON());
        }
        if (Array.isArray(this.itemBillOfMaterials)) {
            data["ItemBillOfMaterials"] = [];
            for (let item of this.itemBillOfMaterials)
                data["ItemBillOfMaterials"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

/** contains the information specific to kit items */
export interface IItemKitInfo {
    /** Read Only. Long; When creating/updating/deleting multiple records this can be used to identify what records has errors, if any. */
    rowNumber: number;
    /** Required. This is the unique identifier of an item. */
    itemNumber?: string | undefined;
    /** A secondary identifier of an item, can be used in a search to find an item. */
    alternateItemNumber?: string | undefined;
    /** A description about the item. */
    itemDescription?: string | undefined;
    /** This is used to group similar items together. */
    categoryDescription?: string | undefined;
    /** Indicates the name of the manufacturer of the item. */
    manufacturerName?: string | undefined;
    /** Required. Indicates the unit of measure for stocking to keep track of stocked items. */
    stockingUnit?: string | undefined;
    /** Required. Indicates the unit of measure for sales, most often used to sell items. */
    salesUnit?: string | undefined;
    /** Required. Indicates how much it cost to purchase an item. */
    cost: number;
    /** Indicates the price of an item used on pick orders. */
    salesPrice: number;
    /** Indicates the list price from the manufacturer. */
    listPrice: number;
    /** Read Only. Indicates the current average cost of an item. If FIFO or LIFO then this is the next cost. */
    averageCost: number;
    /** Required. Indicates how an item should be taxed on an order. */
    taxCode?: string | undefined;
    /** The attachment information for the item. */
    attachmentInfo?: ItemAttachmentInfo | undefined;
    /** A list of all pricing information for the item. */
    itemPrices?: ItemPrices[] | undefined;
    /** A list of the contents of the bill of materials. */
    itemBillOfMaterials?: ItemBillOfMaterials[] | undefined;
    /** A list of custom fields and their values for the item. */
    customFields?: DcfValueInfo[] | undefined;
}

export class WaspResultOfListOfInventoryInfo implements IWaspResultOfListOfInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: InventoryInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(InventoryInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfInventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfInventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfInventoryInfo {
    /** Type specific result that always depends on the function called. */
    data?: InventoryInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class InventoryInfo implements IInventoryInfo {
    /** the date code in a string format for this inventory */
    dateCodeString?: string | undefined;
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** a description of this item */
    itemDescription?: string | undefined;
    /** Read only; Enum; Used to indicate the type of item */
    itemType!: ItemTypeEnum;
    /** site where the inventory is located */
    siteName?: string | undefined;
    /** location of where the inventory is located */
    locationCode?: string | undefined;
    /** The Item number for the container where the quantity is located */
    containerNumber?: string | undefined;
    /** the unique license plate number for the container this quantity resides in */
    parentContainerId?: string | undefined;
    /** the unique serial number of this item  */
    serialNumber?: string | undefined;
    /** the license plate number of this container */
    containerId?: string | undefined;
    /** the lot of this inventory */
    lot?: string | undefined;
    /** the date code in a DateTime format for this inventory */
    dateCode?: Date | undefined;
    /** total available inventory at this location with this trackby information */
    totalQty!: number;
    /** total checked out inventory at this location with this trackby information */
    checkedOutQty!: number;
    /** an alternate identifier for this item */
    alternateItemNumber?: string | undefined;

    constructor(data?: IInventoryInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.dateCodeString = _data["DateCodeString"];
            this.itemNumber = _data["ItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.itemType = _data["ItemType"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.containerNumber = _data["ContainerNumber"];
            this.parentContainerId = _data["ParentContainerId"];
            this.serialNumber = _data["SerialNumber"];
            this.containerId = _data["ContainerId"];
            this.lot = _data["Lot"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.totalQty = _data["TotalQty"];
            this.checkedOutQty = _data["CheckedOutQty"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
        }
    }

    static fromJS(data: any): InventoryInfo {
        data = typeof data === 'object' ? data : {};
        let result = new InventoryInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["DateCodeString"] = this.dateCodeString;
        data["ItemNumber"] = this.itemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["ItemType"] = this.itemType;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["ContainerNumber"] = this.containerNumber;
        data["ParentContainerId"] = this.parentContainerId;
        data["SerialNumber"] = this.serialNumber;
        data["ContainerId"] = this.containerId;
        data["Lot"] = this.lot;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["TotalQty"] = this.totalQty;
        data["CheckedOutQty"] = this.checkedOutQty;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        return data; 
    }
}

export interface IInventoryInfo {
    /** the date code in a string format for this inventory */
    dateCodeString?: string | undefined;
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** a description of this item */
    itemDescription?: string | undefined;
    /** Read only; Enum; Used to indicate the type of item */
    itemType: ItemTypeEnum;
    /** site where the inventory is located */
    siteName?: string | undefined;
    /** location of where the inventory is located */
    locationCode?: string | undefined;
    /** The Item number for the container where the quantity is located */
    containerNumber?: string | undefined;
    /** the unique license plate number for the container this quantity resides in */
    parentContainerId?: string | undefined;
    /** the unique serial number of this item  */
    serialNumber?: string | undefined;
    /** the license plate number of this container */
    containerId?: string | undefined;
    /** the lot of this inventory */
    lot?: string | undefined;
    /** the date code in a DateTime format for this inventory */
    dateCode?: Date | undefined;
    /** total available inventory at this location with this trackby information */
    totalQty: number;
    /** total checked out inventory at this location with this trackby information */
    checkedOutQty: number;
    /** an alternate identifier for this item */
    alternateItemNumber?: string | undefined;
}

export class InventorySearchParameters implements IInventorySearchParameters {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** site where the inventory is located */
    siteName?: string | undefined;
    /** location of where the inventory is located */
    locationCode?: string | undefined;
    /** the unique serial number of this item  */
    serialNumber?: string | undefined;
    /** the lot of this inventory */
    lot?: string | undefined;
    /** the date code in a DateTime format for this inventory */
    dateCode?: Date | undefined;

    constructor(data?: IInventorySearchParameters) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.serialNumber = _data["SerialNumber"];
            this.lot = _data["Lot"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): InventorySearchParameters {
        data = typeof data === 'object' ? data : {};
        let result = new InventorySearchParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["SerialNumber"] = this.serialNumber;
        data["Lot"] = this.lot;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        return data; 
    }
}

export interface IInventorySearchParameters {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** site where the inventory is located */
    siteName?: string | undefined;
    /** location of where the inventory is located */
    locationCode?: string | undefined;
    /** the unique serial number of this item  */
    serialNumber?: string | undefined;
    /** the lot of this inventory */
    lot?: string | undefined;
    /** the date code in a DateTime format for this inventory */
    dateCode?: Date | undefined;
}

export class WaspResultOfListOfInventoryAdvancedInfo implements IWaspResultOfListOfInventoryAdvancedInfo {
    /** Type specific result that always depends on the function called. */
    data?: InventoryAdvancedInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfInventoryAdvancedInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(InventoryAdvancedInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfInventoryAdvancedInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfInventoryAdvancedInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfInventoryAdvancedInfo {
    /** Type specific result that always depends on the function called. */
    data?: InventoryAdvancedInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class InventoryAdvancedInfo implements IInventoryAdvancedInfo {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** a description of this item */
    itemDescription?: string | undefined;
    /** Required (except on Service), Indicates how the cost of the item should be tracked */
    costMethod!: CostMethodEnum;
    /** Read only; Enum; Used to indicate the type of item */
    itemType!: ItemTypeEnum;
    /** Read Only; Long; When creating/updating/deleting multiple records this can be used to identify what records the errors, if any, are referring to. */
    rowNumber!: number;
    /** site where the inventory is located */
    siteName?: string | undefined;
    /** location of where the inventory is located */
    locationCode?: string | undefined;
    /** the license plate number of the container this inventory resides in */
    parentContainerId?: string | undefined;
    /** total available inventory at this location with this trackby information */
    totalAvailable?: number | undefined;
    /** total checked out inventory at this location with this trackby information */
    totalCheckedOut?: number | undefined;
    /** total in house (available minus checked out) inventory at this location with this trackby information */
    totalInHouse?: number | undefined;
    /** total inventory currently expected to be purchased on purchased orders */
    onOrder?: number | undefined;
    /** total inventory currently expected to go out on pick orders */
    committed?: number | undefined;
    /** The license plate number of this container */
    containerId?: string | undefined;
    /** the serial number of this item  */
    serialNumber?: string | undefined;
    /** the lot of this inventory */
    lot?: string | undefined;
    /** the date code in a string format for this inventory */
    dateCodeString?: string | undefined;
    /** the date code in a DateTime format for this inventory */
    dateCode?: Date | undefined;
    /** the next removal cost of this item according to the selected cost method */
    itemCost?: number | undefined;
    /** the item's list price */
    listPrice?: number | undefined;
    /** the item's sale price */
    salesPrice?: number | undefined;
    /** the item's category */
    categoryDescription?: string | undefined;
    /** the item's manufacturer */
    manufacturerName?: string | undefined;
    /** the base unit of measure to stock this item */
    stockingUnit?: string | undefined;
    /** this item's tax code */
    taxCode?: string | undefined;
    /** an alternate identifier for this item */
    alternateItemNumber?: string | undefined;
    /** The dimension info, units and measurements, of an item */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of custom fields and their values for the item */
    customFields?: DcfValueInfo[] | undefined;

    constructor(data?: IInventoryAdvancedInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.itemDescription = _data["ItemDescription"];
            this.costMethod = _data["CostMethod"];
            this.itemType = _data["ItemType"];
            this.rowNumber = _data["RowNumber"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.parentContainerId = _data["ParentContainerId"];
            this.totalAvailable = _data["TotalAvailable"];
            this.totalCheckedOut = _data["TotalCheckedOut"];
            this.totalInHouse = _data["TotalInHouse"];
            this.onOrder = _data["OnOrder"];
            this.committed = _data["Committed"];
            this.containerId = _data["ContainerId"];
            this.serialNumber = _data["SerialNumber"];
            this.lot = _data["Lot"];
            this.dateCodeString = _data["DateCodeString"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.itemCost = _data["ItemCost"];
            this.listPrice = _data["ListPrice"];
            this.salesPrice = _data["SalesPrice"];
            this.categoryDescription = _data["CategoryDescription"];
            this.manufacturerName = _data["ManufacturerName"];
            this.stockingUnit = _data["StockingUnit"];
            this.taxCode = _data["TaxCode"];
            this.alternateItemNumber = _data["AlternateItemNumber"];
            this.dimensionInfo = _data["DimensionInfo"] ? ItemDimensionInfo.fromJS(_data["DimensionInfo"]) : <any>undefined;
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): InventoryAdvancedInfo {
        data = typeof data === 'object' ? data : {};
        let result = new InventoryAdvancedInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["ItemDescription"] = this.itemDescription;
        data["CostMethod"] = this.costMethod;
        data["ItemType"] = this.itemType;
        data["RowNumber"] = this.rowNumber;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["ParentContainerId"] = this.parentContainerId;
        data["TotalAvailable"] = this.totalAvailable;
        data["TotalCheckedOut"] = this.totalCheckedOut;
        data["TotalInHouse"] = this.totalInHouse;
        data["OnOrder"] = this.onOrder;
        data["Committed"] = this.committed;
        data["ContainerId"] = this.containerId;
        data["SerialNumber"] = this.serialNumber;
        data["Lot"] = this.lot;
        data["DateCodeString"] = this.dateCodeString;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["ItemCost"] = this.itemCost;
        data["ListPrice"] = this.listPrice;
        data["SalesPrice"] = this.salesPrice;
        data["CategoryDescription"] = this.categoryDescription;
        data["ManufacturerName"] = this.manufacturerName;
        data["StockingUnit"] = this.stockingUnit;
        data["TaxCode"] = this.taxCode;
        data["AlternateItemNumber"] = this.alternateItemNumber;
        data["DimensionInfo"] = this.dimensionInfo ? this.dimensionInfo.toJSON() : <any>undefined;
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IInventoryAdvancedInfo {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** a description of this item */
    itemDescription?: string | undefined;
    /** Required (except on Service), Indicates how the cost of the item should be tracked */
    costMethod: CostMethodEnum;
    /** Read only; Enum; Used to indicate the type of item */
    itemType: ItemTypeEnum;
    /** Read Only; Long; When creating/updating/deleting multiple records this can be used to identify what records the errors, if any, are referring to. */
    rowNumber: number;
    /** site where the inventory is located */
    siteName?: string | undefined;
    /** location of where the inventory is located */
    locationCode?: string | undefined;
    /** the license plate number of the container this inventory resides in */
    parentContainerId?: string | undefined;
    /** total available inventory at this location with this trackby information */
    totalAvailable?: number | undefined;
    /** total checked out inventory at this location with this trackby information */
    totalCheckedOut?: number | undefined;
    /** total in house (available minus checked out) inventory at this location with this trackby information */
    totalInHouse?: number | undefined;
    /** total inventory currently expected to be purchased on purchased orders */
    onOrder?: number | undefined;
    /** total inventory currently expected to go out on pick orders */
    committed?: number | undefined;
    /** The license plate number of this container */
    containerId?: string | undefined;
    /** the serial number of this item  */
    serialNumber?: string | undefined;
    /** the lot of this inventory */
    lot?: string | undefined;
    /** the date code in a string format for this inventory */
    dateCodeString?: string | undefined;
    /** the date code in a DateTime format for this inventory */
    dateCode?: Date | undefined;
    /** the next removal cost of this item according to the selected cost method */
    itemCost?: number | undefined;
    /** the item's list price */
    listPrice?: number | undefined;
    /** the item's sale price */
    salesPrice?: number | undefined;
    /** the item's category */
    categoryDescription?: string | undefined;
    /** the item's manufacturer */
    manufacturerName?: string | undefined;
    /** the base unit of measure to stock this item */
    stockingUnit?: string | undefined;
    /** this item's tax code */
    taxCode?: string | undefined;
    /** an alternate identifier for this item */
    alternateItemNumber?: string | undefined;
    /** The dimension info, units and measurements, of an item */
    dimensionInfo?: ItemDimensionInfo | undefined;
    /** A list of custom fields and their values for the item */
    customFields?: DcfValueInfo[] | undefined;
}

export class LocationModelInfo implements ILocationModelInfo {
    /** Optional. It is the ordinal position of the record in the given record set. */
    rowNumber!: number;
    /** Required. It is the unique site name. */
    siteName?: string | undefined;
    /** Optional. Applicable to InventoryCloud only. Indicates the name of the zone the location is a part of. */
    zoneName?: string | undefined;
    /** Required. It is unique within the specified site and location code.  */
    locationCode?: string | undefined;
    /** Recommended. It is the description of the location. */
    locationDescription?: string | undefined;
    /** Applicable to InventoryCloud only. Indicates the primary usage of the location. */
    usageTypeName?: string | undefined;
    /** Applicable to InventoryCloud Only. Indicates if the items in the location are for sale. */
    locationSaleable?: number | undefined;
    /** Unused at this time. Indicates if the location is the default location for the site it belongs to. */
    defaultLocation?: boolean | undefined;
    /** Read-Only. Indicates whether or not the site is active. */
    locationRecordStatus!: RecordStatus;
    /** It is to add new note to a location. */
    locationNotes?: string | undefined;
    /** Read Only. It is the list of notes for the location. */
    allLocationNotes?: NoteInfo[] | undefined;
    /** It retrieve or specify values for the custom fields. */
    customFields?: DcfValueInfo[] | undefined;
    /** Unused at this time. */
    locationSequence?: number | undefined;
    /** Indicates the width of the location. */
    locationWidth?: number | undefined;
    /** Indicates the height of the location. */
    locationHeight?: number | undefined;
    /** Indicates the depth of the location. */
    locationDepth?: number | undefined;
    /** Indicates how the width, height, and depth are measured, i.e. feet, yards, inches. */
    dimensionUnit?: string | undefined;
    /** Indicates how much volume the location has. */
    locationVolume?: number | undefined;
    /** Indicates the maximum weight the location can support. */
    locationMaxWeight?: number | undefined;
    /** Indicates how the weight is measured, i.e. pounds, tons. */
    weightUnit?: string | undefined;
    /** Indicates the maximum volume the location can hold. */
    locationMaxVolume?: number | undefined;
    /** Indicates how the volume is measured. */
    volumeUnit?: string | undefined;
    /** Indicates the parent location where this location belongs within the same site. */
    parentLocation?: string | undefined;
    /** Indicates the number of locations with this location as a parent. */
    childrenLocations!: number;
    /** Date Time the entity was last updated */
    lastUpdated?: Date | undefined;

    constructor(data?: ILocationModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.siteName = _data["SiteName"];
            this.zoneName = _data["ZoneName"];
            this.locationCode = _data["LocationCode"];
            this.locationDescription = _data["LocationDescription"];
            this.usageTypeName = _data["UsageTypeName"];
            this.locationSaleable = _data["LocationSaleable"];
            this.defaultLocation = _data["DefaultLocation"];
            this.locationRecordStatus = _data["LocationRecordStatus"];
            this.locationNotes = _data["LocationNotes"];
            if (Array.isArray(_data["AllLocationNotes"])) {
                this.allLocationNotes = [] as any;
                for (let item of _data["AllLocationNotes"])
                    this.allLocationNotes!.push(NoteInfo.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            this.locationSequence = _data["LocationSequence"];
            this.locationWidth = _data["LocationWidth"];
            this.locationHeight = _data["LocationHeight"];
            this.locationDepth = _data["LocationDepth"];
            this.dimensionUnit = _data["DimensionUnit"];
            this.locationVolume = _data["LocationVolume"];
            this.locationMaxWeight = _data["LocationMaxWeight"];
            this.weightUnit = _data["WeightUnit"];
            this.locationMaxVolume = _data["LocationMaxVolume"];
            this.volumeUnit = _data["VolumeUnit"];
            this.parentLocation = _data["ParentLocation"];
            this.childrenLocations = _data["ChildrenLocations"];
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): LocationModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new LocationModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["SiteName"] = this.siteName;
        data["ZoneName"] = this.zoneName;
        data["LocationCode"] = this.locationCode;
        data["LocationDescription"] = this.locationDescription;
        data["UsageTypeName"] = this.usageTypeName;
        data["LocationSaleable"] = this.locationSaleable;
        data["DefaultLocation"] = this.defaultLocation;
        data["LocationRecordStatus"] = this.locationRecordStatus;
        data["LocationNotes"] = this.locationNotes;
        if (Array.isArray(this.allLocationNotes)) {
            data["AllLocationNotes"] = [];
            for (let item of this.allLocationNotes)
                data["AllLocationNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["LocationSequence"] = this.locationSequence;
        data["LocationWidth"] = this.locationWidth;
        data["LocationHeight"] = this.locationHeight;
        data["LocationDepth"] = this.locationDepth;
        data["DimensionUnit"] = this.dimensionUnit;
        data["LocationVolume"] = this.locationVolume;
        data["LocationMaxWeight"] = this.locationMaxWeight;
        data["WeightUnit"] = this.weightUnit;
        data["LocationMaxVolume"] = this.locationMaxVolume;
        data["VolumeUnit"] = this.volumeUnit;
        data["ParentLocation"] = this.parentLocation;
        data["ChildrenLocations"] = this.childrenLocations;
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        return data; 
    }
}

export interface ILocationModelInfo {
    /** Optional. It is the ordinal position of the record in the given record set. */
    rowNumber: number;
    /** Required. It is the unique site name. */
    siteName?: string | undefined;
    /** Optional. Applicable to InventoryCloud only. Indicates the name of the zone the location is a part of. */
    zoneName?: string | undefined;
    /** Required. It is unique within the specified site and location code.  */
    locationCode?: string | undefined;
    /** Recommended. It is the description of the location. */
    locationDescription?: string | undefined;
    /** Applicable to InventoryCloud only. Indicates the primary usage of the location. */
    usageTypeName?: string | undefined;
    /** Applicable to InventoryCloud Only. Indicates if the items in the location are for sale. */
    locationSaleable?: number | undefined;
    /** Unused at this time. Indicates if the location is the default location for the site it belongs to. */
    defaultLocation?: boolean | undefined;
    /** Read-Only. Indicates whether or not the site is active. */
    locationRecordStatus: RecordStatus;
    /** It is to add new note to a location. */
    locationNotes?: string | undefined;
    /** Read Only. It is the list of notes for the location. */
    allLocationNotes?: NoteInfo[] | undefined;
    /** It retrieve or specify values for the custom fields. */
    customFields?: DcfValueInfo[] | undefined;
    /** Unused at this time. */
    locationSequence?: number | undefined;
    /** Indicates the width of the location. */
    locationWidth?: number | undefined;
    /** Indicates the height of the location. */
    locationHeight?: number | undefined;
    /** Indicates the depth of the location. */
    locationDepth?: number | undefined;
    /** Indicates how the width, height, and depth are measured, i.e. feet, yards, inches. */
    dimensionUnit?: string | undefined;
    /** Indicates how much volume the location has. */
    locationVolume?: number | undefined;
    /** Indicates the maximum weight the location can support. */
    locationMaxWeight?: number | undefined;
    /** Indicates how the weight is measured, i.e. pounds, tons. */
    weightUnit?: string | undefined;
    /** Indicates the maximum volume the location can hold. */
    locationMaxVolume?: number | undefined;
    /** Indicates how the volume is measured. */
    volumeUnit?: string | undefined;
    /** Indicates the parent location where this location belongs within the same site. */
    parentLocation?: string | undefined;
    /** Indicates the number of locations with this location as a parent. */
    childrenLocations: number;
    /** Date Time the entity was last updated */
    lastUpdated?: Date | undefined;
}

export class WaspResultOfLocationModelSimple implements IWaspResultOfLocationModelSimple {
    /** Type specific result that always depends on the function called. */
    data?: LocationModelSimple | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfLocationModelSimple) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? LocationModelSimple.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfLocationModelSimple {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfLocationModelSimple();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfLocationModelSimple {
    /** Type specific result that always depends on the function called. */
    data?: LocationModelSimple | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class LocationModelSimple implements ILocationModelSimple {
    /** Indicates the name of the site that the location belongs to. */
    siteName?: string | undefined;
    /** Indicates the name of the parent location. */
    parentLocationCode?: string | undefined;
    /** Indicates the unique identifier of the location. */
    locationCode?: string | undefined;
    /** It is the description of the location. */
    locationDescription?: string | undefined;
    /** Read Only. This is the calculated value that traces the locations parents all the way up. */
    locationPrefix?: string | undefined;

    constructor(data?: ILocationModelSimple) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.siteName = _data["SiteName"];
            this.parentLocationCode = _data["ParentLocationCode"];
            this.locationCode = _data["LocationCode"];
            this.locationDescription = _data["LocationDescription"];
            this.locationPrefix = _data["LocationPrefix"];
        }
    }

    static fromJS(data: any): LocationModelSimple {
        data = typeof data === 'object' ? data : {};
        let result = new LocationModelSimple();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SiteName"] = this.siteName;
        data["ParentLocationCode"] = this.parentLocationCode;
        data["LocationCode"] = this.locationCode;
        data["LocationDescription"] = this.locationDescription;
        data["LocationPrefix"] = this.locationPrefix;
        return data; 
    }
}

export interface ILocationModelSimple {
    /** Indicates the name of the site that the location belongs to. */
    siteName?: string | undefined;
    /** Indicates the name of the parent location. */
    parentLocationCode?: string | undefined;
    /** Indicates the unique identifier of the location. */
    locationCode?: string | undefined;
    /** It is the description of the location. */
    locationDescription?: string | undefined;
    /** Read Only. This is the calculated value that traces the locations parents all the way up. */
    locationPrefix?: string | undefined;
}

export class LocationSearchSimpleModel implements ILocationSearchSimpleModel {
    /** Indicates the name of the location to lookup. */
    locationCode?: string | undefined;
    /** Indicates the name of the site the location exists in. */
    siteName?: string | undefined;

    constructor(data?: ILocationSearchSimpleModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.locationCode = _data["LocationCode"];
            this.siteName = _data["SiteName"];
        }
    }

    static fromJS(data: any): LocationSearchSimpleModel {
        data = typeof data === 'object' ? data : {};
        let result = new LocationSearchSimpleModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["LocationCode"] = this.locationCode;
        data["SiteName"] = this.siteName;
        return data; 
    }
}

export interface ILocationSearchSimpleModel {
    /** Indicates the name of the location to lookup. */
    locationCode?: string | undefined;
    /** Indicates the name of the site the location exists in. */
    siteName?: string | undefined;
}

export class WaspResultOfListOfLocationModelInfo implements IWaspResultOfListOfLocationModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: LocationModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfLocationModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(LocationModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfLocationModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfLocationModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfLocationModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: LocationModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfWaspResultOfLocationModelInfo implements IWaspResultOfListOfWaspResultOfLocationModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfLocationModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfLocationModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfLocationModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfLocationModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfLocationModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfLocationModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfLocationModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfLocationModelInfo implements IWaspResultOfLocationModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: LocationModelInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfLocationModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? LocationModelInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfLocationModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfLocationModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfLocationModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: LocationModelInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class LocationCodeWithSiteName implements ILocationCodeWithSiteName {
    /** Simple string. Indicates the code for the location. */
    locationCode?: string | undefined;
    /** Simple string. Indicates the name of the site where the location resides. */
    siteName?: string | undefined;

    constructor(data?: ILocationCodeWithSiteName) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.locationCode = _data["LocationCode"];
            this.siteName = _data["SiteName"];
        }
    }

    static fromJS(data: any): LocationCodeWithSiteName {
        data = typeof data === 'object' ? data : {};
        let result = new LocationCodeWithSiteName();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["LocationCode"] = this.locationCode;
        data["SiteName"] = this.siteName;
        return data; 
    }
}

export interface ILocationCodeWithSiteName {
    /** Simple string. Indicates the code for the location. */
    locationCode?: string | undefined;
    /** Simple string. Indicates the name of the site where the location resides. */
    siteName?: string | undefined;
}

export class BulkSaveRequestOfManufacturerModelInfo implements IBulkSaveRequestOfManufacturerModelInfo {
    /** By default this is a null or empty string array.
However, if (during an update operation) it is sometimes desirable to update only certain properties/columns
in the set ''Data''. */
    applicableFields?: string[] | undefined;
    /** The payload member containing the actual values supplied by the consumer.
This is a list that should contain at least one instance of data to be inserted or updated. */
    data?: ManufacturerModelInfo[] | undefined;

    constructor(data?: IBulkSaveRequestOfManufacturerModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["ApplicableFields"])) {
                this.applicableFields = [] as any;
                for (let item of _data["ApplicableFields"])
                    this.applicableFields!.push(item);
            }
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(ManufacturerModelInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): BulkSaveRequestOfManufacturerModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new BulkSaveRequestOfManufacturerModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.applicableFields)) {
            data["ApplicableFields"] = [];
            for (let item of this.applicableFields)
                data["ApplicableFields"].push(item);
        }
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IBulkSaveRequestOfManufacturerModelInfo {
    /** By default this is a null or empty string array.
However, if (during an update operation) it is sometimes desirable to update only certain properties/columns
in the set ''Data''. */
    applicableFields?: string[] | undefined;
    /** The payload member containing the actual values supplied by the consumer.
This is a list that should contain at least one instance of data to be inserted or updated. */
    data?: ManufacturerModelInfo[] | undefined;
}

export class ManufacturerSaveRequest extends BulkSaveRequestOfManufacturerModelInfo implements IManufacturerSaveRequest {

    constructor(data?: IManufacturerSaveRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): ManufacturerSaveRequest {
        data = typeof data === 'object' ? data : {};
        let result = new ManufacturerSaveRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface IManufacturerSaveRequest extends IBulkSaveRequestOfManufacturerModelInfo {
}

export class ManufacturerModelInfo implements IManufacturerModelInfo {
    importRowNumber!: number;
    manufacturerName?: string | undefined;
    manufacturerEmail?: string | undefined;
    manufacturerWebsite?: string | undefined;
    manufacturerContactName?: string | undefined;
    manufacturerContactEmail?: string | undefined;
    /** Read Only. The addresses associated with the manufacturer. Please use the address public api to create and edit addresses. */
    addresses?: AddressInfo[] | undefined;
    /** The cell phone number of the manufacturer's contact. */
    manufacturerContactCellNumber?: string | undefined;
    /** The manufacturer's business phone number. */
    manufacturerPhoneNumber?: string | undefined;
    /** The phone number of the manufacturer's contact. */
    manufacturerContactPhoneNumber?: string | undefined;
    /** The manufacturer's business fax number. */
    manufacturerFaxNumber?: string | undefined;
    /** The fax number of the manufacturer's contact. */
    manufacturerContactFaxNumber?: string | undefined;
    /** Read Only. */
    manufacturerContactCell?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerPhone?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerContactPhone?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerFax?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerContactFax?: PhoneInfo | undefined;
    /** Indicates new manufacturer notes. */
    manufacturerNote?: string | undefined;
    /** Read Only. Indicates existing notes for the manufacturer. */
    manufacturerNotes?: NoteInfo[] | undefined;
    /** This is the custom fields associated with the manufacturer. */
    customFields?: DcfValueInfo[] | undefined;
    /** This will be true if there is an attachment. */
    hasAttachment!: boolean;
    /** Not Used. This is used to add attachments (or attach files). */
    attachmentsToAdd?: string[] | undefined;
    /** Not Used. This is used to delete attachments from the manufacturer details. */
    attachmentsToDelete?: string[] | undefined;
    /** Not Used. This is the list of attachments associated with the manufacturer. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;

    constructor(data?: IManufacturerModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.manufacturerName = _data["ManufacturerName"];
            this.manufacturerEmail = _data["ManufacturerEmail"];
            this.manufacturerWebsite = _data["ManufacturerWebsite"];
            this.manufacturerContactName = _data["ManufacturerContactName"];
            this.manufacturerContactEmail = _data["ManufacturerContactEmail"];
            if (Array.isArray(_data["Addresses"])) {
                this.addresses = [] as any;
                for (let item of _data["Addresses"])
                    this.addresses!.push(AddressInfo.fromJS(item));
            }
            this.manufacturerContactCellNumber = _data["ManufacturerContactCellNumber"];
            this.manufacturerPhoneNumber = _data["ManufacturerPhoneNumber"];
            this.manufacturerContactPhoneNumber = _data["ManufacturerContactPhoneNumber"];
            this.manufacturerFaxNumber = _data["ManufacturerFaxNumber"];
            this.manufacturerContactFaxNumber = _data["ManufacturerContactFaxNumber"];
            this.manufacturerContactCell = _data["ManufacturerContactCell"] ? PhoneInfo.fromJS(_data["ManufacturerContactCell"]) : <any>undefined;
            this.manufacturerPhone = _data["ManufacturerPhone"] ? PhoneInfo.fromJS(_data["ManufacturerPhone"]) : <any>undefined;
            this.manufacturerContactPhone = _data["ManufacturerContactPhone"] ? PhoneInfo.fromJS(_data["ManufacturerContactPhone"]) : <any>undefined;
            this.manufacturerFax = _data["ManufacturerFax"] ? PhoneInfo.fromJS(_data["ManufacturerFax"]) : <any>undefined;
            this.manufacturerContactFax = _data["ManufacturerContactFax"] ? PhoneInfo.fromJS(_data["ManufacturerContactFax"]) : <any>undefined;
            this.manufacturerNote = _data["ManufacturerNote"];
            if (Array.isArray(_data["ManufacturerNotes"])) {
                this.manufacturerNotes = [] as any;
                for (let item of _data["ManufacturerNotes"])
                    this.manufacturerNotes!.push(NoteInfo.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            this.hasAttachment = _data["HasAttachment"];
            if (Array.isArray(_data["AttachmentsToAdd"])) {
                this.attachmentsToAdd = [] as any;
                for (let item of _data["AttachmentsToAdd"])
                    this.attachmentsToAdd!.push(item);
            }
            if (Array.isArray(_data["AttachmentsToDelete"])) {
                this.attachmentsToDelete = [] as any;
                for (let item of _data["AttachmentsToDelete"])
                    this.attachmentsToDelete!.push(item);
            }
            if (Array.isArray(_data["AttachmentNames"])) {
                this.attachmentNames = [] as any;
                for (let item of _data["AttachmentNames"])
                    this.attachmentNames!.push(KeyValuePairOfStringAndString.fromJS(item));
            }
        }
    }

    static fromJS(data: any): ManufacturerModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new ManufacturerModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["ManufacturerName"] = this.manufacturerName;
        data["ManufacturerEmail"] = this.manufacturerEmail;
        data["ManufacturerWebsite"] = this.manufacturerWebsite;
        data["ManufacturerContactName"] = this.manufacturerContactName;
        data["ManufacturerContactEmail"] = this.manufacturerContactEmail;
        if (Array.isArray(this.addresses)) {
            data["Addresses"] = [];
            for (let item of this.addresses)
                data["Addresses"].push(item.toJSON());
        }
        data["ManufacturerContactCellNumber"] = this.manufacturerContactCellNumber;
        data["ManufacturerPhoneNumber"] = this.manufacturerPhoneNumber;
        data["ManufacturerContactPhoneNumber"] = this.manufacturerContactPhoneNumber;
        data["ManufacturerFaxNumber"] = this.manufacturerFaxNumber;
        data["ManufacturerContactFaxNumber"] = this.manufacturerContactFaxNumber;
        data["ManufacturerContactCell"] = this.manufacturerContactCell ? this.manufacturerContactCell.toJSON() : <any>undefined;
        data["ManufacturerPhone"] = this.manufacturerPhone ? this.manufacturerPhone.toJSON() : <any>undefined;
        data["ManufacturerContactPhone"] = this.manufacturerContactPhone ? this.manufacturerContactPhone.toJSON() : <any>undefined;
        data["ManufacturerFax"] = this.manufacturerFax ? this.manufacturerFax.toJSON() : <any>undefined;
        data["ManufacturerContactFax"] = this.manufacturerContactFax ? this.manufacturerContactFax.toJSON() : <any>undefined;
        data["ManufacturerNote"] = this.manufacturerNote;
        if (Array.isArray(this.manufacturerNotes)) {
            data["ManufacturerNotes"] = [];
            for (let item of this.manufacturerNotes)
                data["ManufacturerNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        data["HasAttachment"] = this.hasAttachment;
        if (Array.isArray(this.attachmentsToAdd)) {
            data["AttachmentsToAdd"] = [];
            for (let item of this.attachmentsToAdd)
                data["AttachmentsToAdd"].push(item);
        }
        if (Array.isArray(this.attachmentsToDelete)) {
            data["AttachmentsToDelete"] = [];
            for (let item of this.attachmentsToDelete)
                data["AttachmentsToDelete"].push(item);
        }
        if (Array.isArray(this.attachmentNames)) {
            data["AttachmentNames"] = [];
            for (let item of this.attachmentNames)
                data["AttachmentNames"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IManufacturerModelInfo {
    importRowNumber: number;
    manufacturerName?: string | undefined;
    manufacturerEmail?: string | undefined;
    manufacturerWebsite?: string | undefined;
    manufacturerContactName?: string | undefined;
    manufacturerContactEmail?: string | undefined;
    /** Read Only. The addresses associated with the manufacturer. Please use the address public api to create and edit addresses. */
    addresses?: AddressInfo[] | undefined;
    /** The cell phone number of the manufacturer's contact. */
    manufacturerContactCellNumber?: string | undefined;
    /** The manufacturer's business phone number. */
    manufacturerPhoneNumber?: string | undefined;
    /** The phone number of the manufacturer's contact. */
    manufacturerContactPhoneNumber?: string | undefined;
    /** The manufacturer's business fax number. */
    manufacturerFaxNumber?: string | undefined;
    /** The fax number of the manufacturer's contact. */
    manufacturerContactFaxNumber?: string | undefined;
    /** Read Only. */
    manufacturerContactCell?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerPhone?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerContactPhone?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerFax?: PhoneInfo | undefined;
    /** Read Only. */
    manufacturerContactFax?: PhoneInfo | undefined;
    /** Indicates new manufacturer notes. */
    manufacturerNote?: string | undefined;
    /** Read Only. Indicates existing notes for the manufacturer. */
    manufacturerNotes?: NoteInfo[] | undefined;
    /** This is the custom fields associated with the manufacturer. */
    customFields?: DcfValueInfo[] | undefined;
    /** This will be true if there is an attachment. */
    hasAttachment: boolean;
    /** Not Used. This is used to add attachments (or attach files). */
    attachmentsToAdd?: string[] | undefined;
    /** Not Used. This is used to delete attachments from the manufacturer details. */
    attachmentsToDelete?: string[] | undefined;
    /** Not Used. This is the list of attachments associated with the manufacturer. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;
}

export class SavePhoneInfoRequest extends PhoneInfo implements ISavePhoneInfoRequest {
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    formId!: WtFormId;
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    primaryNumber?: string | undefined;

    constructor(data?: ISavePhoneInfoRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.formId = _data["FormId"];
            this.primaryNumber = _data["PrimaryNumber"];
        }
    }

    static fromJS(data: any): SavePhoneInfoRequest {
        data = typeof data === 'object' ? data : {};
        let result = new SavePhoneInfoRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["FormId"] = this.formId;
        data["PrimaryNumber"] = this.primaryNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface ISavePhoneInfoRequest extends IPhoneInfo {
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    formId: WtFormId;
    /** Internal. This is set programmatically, any value put here will be overwritten. */
    primaryNumber?: string | undefined;
}

export class SaveCustomerPhoneRequest extends SavePhoneInfoRequest implements ISaveCustomerPhoneRequest {
    /** The Customer Number associated with the Phone. */
    customerNo?: string | undefined;
    customerNumber?: string | undefined;

    constructor(data?: ISaveCustomerPhoneRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.customerNo = _data["CustomerNo"];
            this.customerNumber = _data["CustomerNumber"];
        }
    }

    static fromJS(data: any): SaveCustomerPhoneRequest {
        data = typeof data === 'object' ? data : {};
        let result = new SaveCustomerPhoneRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["CustomerNo"] = this.customerNo;
        data["CustomerNumber"] = this.customerNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface ISaveCustomerPhoneRequest extends ISavePhoneInfoRequest {
    /** The Customer Number associated with the Phone. */
    customerNo?: string | undefined;
    customerNumber?: string | undefined;
}

export class SaveVendorPhoneRequest extends SavePhoneInfoRequest implements ISaveVendorPhoneRequest {
    /** The Vendor Number associated with the Phone. */
    vendorNumber?: string | undefined;

    constructor(data?: ISaveVendorPhoneRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.vendorNumber = _data["VendorNumber"];
        }
    }

    static fromJS(data: any): SaveVendorPhoneRequest {
        data = typeof data === 'object' ? data : {};
        let result = new SaveVendorPhoneRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["VendorNumber"] = this.vendorNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface ISaveVendorPhoneRequest extends ISavePhoneInfoRequest {
    /** The Vendor Number associated with the Phone. */
    vendorNumber?: string | undefined;
}

export class WaspResultOfSalesTaxCodeBaseModel implements IWaspResultOfSalesTaxCodeBaseModel {
    /** Type specific result that always depends on the function called. */
    data?: SalesTaxCodeBaseModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfSalesTaxCodeBaseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? SalesTaxCodeBaseModel.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfSalesTaxCodeBaseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfSalesTaxCodeBaseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfSalesTaxCodeBaseModel {
    /** Type specific result that always depends on the function called. */
    data?: SalesTaxCodeBaseModel | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SalesTaxCodeBaseModel implements ISalesTaxCodeBaseModel {
    /** The unique name of the sales tax code. */
    salesTaxCodeName?: string | undefined;
    /** Internal. */
    salesTaxCodeLangLabel?: string | undefined;
    /** A description of the sales tax code. */
    salesTaxCodeDesc?: string | undefined;
    /** Internal. */
    salesTaxCodeDescLangLabel?: string | undefined;
    /** Indicates whether or not this tax code is taxable. */
    salesTaxCodeTaxable!: boolean;
    /** Indicates whether or not this is the default tax code. */
    salesTaxCodeDefault!: boolean;
    /** Internal and Read-only. */
    salesTaxCodeRowVerson?: string | undefined;

    constructor(data?: ISalesTaxCodeBaseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.salesTaxCodeName = _data["SalesTaxCodeName"];
            this.salesTaxCodeLangLabel = _data["SalesTaxCodeLangLabel"];
            this.salesTaxCodeDesc = _data["SalesTaxCodeDesc"];
            this.salesTaxCodeDescLangLabel = _data["SalesTaxCodeDescLangLabel"];
            this.salesTaxCodeTaxable = _data["SalesTaxCodeTaxable"];
            this.salesTaxCodeDefault = _data["SalesTaxCodeDefault"];
            this.salesTaxCodeRowVerson = _data["SalesTaxCodeRowVerson"];
        }
    }

    static fromJS(data: any): SalesTaxCodeBaseModel {
        data = typeof data === 'object' ? data : {};
        let result = new SalesTaxCodeBaseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SalesTaxCodeName"] = this.salesTaxCodeName;
        data["SalesTaxCodeLangLabel"] = this.salesTaxCodeLangLabel;
        data["SalesTaxCodeDesc"] = this.salesTaxCodeDesc;
        data["SalesTaxCodeDescLangLabel"] = this.salesTaxCodeDescLangLabel;
        data["SalesTaxCodeTaxable"] = this.salesTaxCodeTaxable;
        data["SalesTaxCodeDefault"] = this.salesTaxCodeDefault;
        data["SalesTaxCodeRowVerson"] = this.salesTaxCodeRowVerson;
        return data; 
    }
}

export interface ISalesTaxCodeBaseModel {
    /** The unique name of the sales tax code. */
    salesTaxCodeName?: string | undefined;
    /** Internal. */
    salesTaxCodeLangLabel?: string | undefined;
    /** A description of the sales tax code. */
    salesTaxCodeDesc?: string | undefined;
    /** Internal. */
    salesTaxCodeDescLangLabel?: string | undefined;
    /** Indicates whether or not this tax code is taxable. */
    salesTaxCodeTaxable: boolean;
    /** Indicates whether or not this is the default tax code. */
    salesTaxCodeDefault: boolean;
    /** Internal and Read-only. */
    salesTaxCodeRowVerson?: string | undefined;
}

export class WaspResultOfListOfSalesTaxCodeBaseModel implements IWaspResultOfListOfSalesTaxCodeBaseModel {
    /** Type specific result that always depends on the function called. */
    data?: SalesTaxCodeBaseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfSalesTaxCodeBaseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(SalesTaxCodeBaseModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfSalesTaxCodeBaseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfSalesTaxCodeBaseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfSalesTaxCodeBaseModel {
    /** Type specific result that always depends on the function called. */
    data?: SalesTaxCodeBaseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfString implements IWaspResultOfListOfString {
    /** Type specific result that always depends on the function called. */
    data?: string[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfString) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(item);
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfString {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfString();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item);
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfString {
    /** Type specific result that always depends on the function called. */
    data?: string[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SalesCodeSearchParameters implements ISalesCodeSearchParameters {
    /** Simple string. Records containing this string are returned. */
    searchPattern?: string | undefined;

    constructor(data?: ISalesCodeSearchParameters) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.searchPattern = _data["SearchPattern"];
        }
    }

    static fromJS(data: any): SalesCodeSearchParameters {
        data = typeof data === 'object' ? data : {};
        let result = new SalesCodeSearchParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SearchPattern"] = this.searchPattern;
        return data; 
    }
}

export interface ISalesCodeSearchParameters {
    /** Simple string. Records containing this string are returned. */
    searchPattern?: string | undefined;
}

export class SiteModelInfo implements ISiteModelInfo {
    /** Optional. This is the ordinal position of the record in the given record set. */
    rowNumber!: number;
    /** Required. This is the unique site name. */
    siteName?: string | undefined;
    /** Recommended. Indicates the site description. */
    siteDescription?: string | undefined;
    /** Read Only. This will returns the number of locations associated with this site. */
    locationCount!: number;
    /** Read-Only. Indicates whether the site is active or inactive. */
    siteRecordStatus!: RecordStatus;
    /** Optional. This is used to add a new note to a site. */
    siteNotes?: string | undefined;
    /** Optional. This is set to true if all categories are allowed at this site. */
    accessAllCatgories!: boolean;
    /** Read Only. This will contain a list of all notes associated with this site. */
    allSiteNotes?: NoteInfo[] | undefined;
    /** Retrieve or Specify values for custom fields. */
    customFields?: DcfValueInfo[] | undefined;
    /** Read Only. It is a list of categories that are allowed at this site. You will need to call a separate API to add or remove from this list. */
    allowedCategories?: string[] | undefined;
    /** Date Time the entity was last updated. */
    lastUpdated?: Date | undefined;

    constructor(data?: ISiteModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.rowNumber = _data["RowNumber"];
            this.siteName = _data["SiteName"];
            this.siteDescription = _data["SiteDescription"];
            this.locationCount = _data["LocationCount"];
            this.siteRecordStatus = _data["SiteRecordStatus"];
            this.siteNotes = _data["SiteNotes"];
            this.accessAllCatgories = _data["AccessAllCatgories"];
            if (Array.isArray(_data["AllSiteNotes"])) {
                this.allSiteNotes = [] as any;
                for (let item of _data["AllSiteNotes"])
                    this.allSiteNotes!.push(NoteInfo.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            if (Array.isArray(_data["AllowedCategories"])) {
                this.allowedCategories = [] as any;
                for (let item of _data["AllowedCategories"])
                    this.allowedCategories!.push(item);
            }
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): SiteModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new SiteModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["RowNumber"] = this.rowNumber;
        data["SiteName"] = this.siteName;
        data["SiteDescription"] = this.siteDescription;
        data["LocationCount"] = this.locationCount;
        data["SiteRecordStatus"] = this.siteRecordStatus;
        data["SiteNotes"] = this.siteNotes;
        data["AccessAllCatgories"] = this.accessAllCatgories;
        if (Array.isArray(this.allSiteNotes)) {
            data["AllSiteNotes"] = [];
            for (let item of this.allSiteNotes)
                data["AllSiteNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        if (Array.isArray(this.allowedCategories)) {
            data["AllowedCategories"] = [];
            for (let item of this.allowedCategories)
                data["AllowedCategories"].push(item);
        }
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        return data; 
    }
}

export interface ISiteModelInfo {
    /** Optional. This is the ordinal position of the record in the given record set. */
    rowNumber: number;
    /** Required. This is the unique site name. */
    siteName?: string | undefined;
    /** Recommended. Indicates the site description. */
    siteDescription?: string | undefined;
    /** Read Only. This will returns the number of locations associated with this site. */
    locationCount: number;
    /** Read-Only. Indicates whether the site is active or inactive. */
    siteRecordStatus: RecordStatus;
    /** Optional. This is used to add a new note to a site. */
    siteNotes?: string | undefined;
    /** Optional. This is set to true if all categories are allowed at this site. */
    accessAllCatgories: boolean;
    /** Read Only. This will contain a list of all notes associated with this site. */
    allSiteNotes?: NoteInfo[] | undefined;
    /** Retrieve or Specify values for custom fields. */
    customFields?: DcfValueInfo[] | undefined;
    /** Read Only. It is a list of categories that are allowed at this site. You will need to call a separate API to add or remove from this list. */
    allowedCategories?: string[] | undefined;
    /** Date Time the entity was last updated. */
    lastUpdated?: Date | undefined;
}

export class WaspResultOfSiteModelSimple implements IWaspResultOfSiteModelSimple {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelSimple | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfSiteModelSimple) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? SiteModelSimple.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfSiteModelSimple {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfSiteModelSimple();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfSiteModelSimple {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelSimple | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SiteModelSimple implements ISiteModelSimple {
    /** This is the unique name of the site. */
    siteName?: string | undefined;
    /** A description of the site. */
    siteDescription?: string | undefined;
    /** Denotes whether or not this site is restricted to only certain categories */
    hasCategoryRestrictions!: boolean;

    constructor(data?: ISiteModelSimple) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.siteName = _data["SiteName"];
            this.siteDescription = _data["SiteDescription"];
            this.hasCategoryRestrictions = _data["HasCategoryRestrictions"];
        }
    }

    static fromJS(data: any): SiteModelSimple {
        data = typeof data === 'object' ? data : {};
        let result = new SiteModelSimple();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SiteName"] = this.siteName;
        data["SiteDescription"] = this.siteDescription;
        data["HasCategoryRestrictions"] = this.hasCategoryRestrictions;
        return data; 
    }
}

export interface ISiteModelSimple {
    /** This is the unique name of the site. */
    siteName?: string | undefined;
    /** A description of the site. */
    siteDescription?: string | undefined;
    /** Denotes whether or not this site is restricted to only certain categories */
    hasCategoryRestrictions: boolean;
}

export class SearchStringClass implements ISearchStringClass {
    /** It is a generic search string. */
    searchString?: string | undefined;

    constructor(data?: ISearchStringClass) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.searchString = _data["SearchString"];
        }
    }

    static fromJS(data: any): SearchStringClass {
        data = typeof data === 'object' ? data : {};
        let result = new SearchStringClass();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SearchString"] = this.searchString;
        return data; 
    }
}

export interface ISearchStringClass {
    /** It is a generic search string. */
    searchString?: string | undefined;
}

export class WaspResultOfSiteModelSimplev2 implements IWaspResultOfSiteModelSimplev2 {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelSimplev2 | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfSiteModelSimplev2) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? SiteModelSimplev2.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfSiteModelSimplev2 {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfSiteModelSimplev2();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfSiteModelSimplev2 {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelSimplev2 | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SiteModelSimplev2 extends SiteModelSimple implements ISiteModelSimplev2 {
    /** This will be true if the site is allowed to have all categories of items here. */
    accessAllCategories!: boolean;
    /** This is the list of the categories that are allowed to be at this site. */
    allowedCategories?: string[] | undefined;

    constructor(data?: ISiteModelSimplev2) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.accessAllCategories = _data["AccessAllCategories"];
            if (Array.isArray(_data["AllowedCategories"])) {
                this.allowedCategories = [] as any;
                for (let item of _data["AllowedCategories"])
                    this.allowedCategories!.push(item);
            }
        }
    }

    static fromJS(data: any): SiteModelSimplev2 {
        data = typeof data === 'object' ? data : {};
        let result = new SiteModelSimplev2();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AccessAllCategories"] = this.accessAllCategories;
        if (Array.isArray(this.allowedCategories)) {
            data["AllowedCategories"] = [];
            for (let item of this.allowedCategories)
                data["AllowedCategories"].push(item);
        }
        super.toJSON(data);
        return data; 
    }
}

export interface ISiteModelSimplev2 extends ISiteModelSimple {
    /** This will be true if the site is allowed to have all categories of items here. */
    accessAllCategories: boolean;
    /** This is the list of the categories that are allowed to be at this site. */
    allowedCategories?: string[] | undefined;
}

export class WaspResultOfListOfWaspResultOfSiteModelInfo implements IWaspResultOfListOfWaspResultOfSiteModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfSiteModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfSiteModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfSiteModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfSiteModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfSiteModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfSiteModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfSiteModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfSiteModelInfo implements IWaspResultOfSiteModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfSiteModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? SiteModelInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfSiteModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfSiteModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfSiteModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfSiteModelInfo implements IWaspResultOfListOfSiteModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfSiteModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(SiteModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfSiteModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfSiteModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfSiteModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: SiteModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class SiteContainsSearchParameters implements ISiteContainsSearchParameters {
    /** Simple string. Records containing this string are returned. */
    searchPattern?: string | undefined;

    constructor(data?: ISiteContainsSearchParameters) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.searchPattern = _data["SearchPattern"];
        }
    }

    static fromJS(data: any): SiteContainsSearchParameters {
        data = typeof data === 'object' ? data : {};
        let result = new SiteContainsSearchParameters();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SearchPattern"] = this.searchPattern;
        return data; 
    }
}

export interface ISiteContainsSearchParameters {
    /** Simple string. Records containing this string are returned. */
    searchPattern?: string | undefined;
}

export class TransactionBatchRequestModel implements ITransactionBatchRequestModel {
    /** this is usually the machine name, IP address, MAC address that identifies the device/workstation
which initiated the API call. This value is recorded into the system transaction history and have no other intrinsic processing value to the API. */
    clientDeviceId?: string | undefined;
    /** A list of the assets/items to perform the transaction on and any relevant information */
    requests?: QuantifiedRequestModel[] | undefined;

    constructor(data?: ITransactionBatchRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.clientDeviceId = _data["ClientDeviceId"];
            if (Array.isArray(_data["Requests"])) {
                this.requests = [] as any;
                for (let item of _data["Requests"])
                    this.requests!.push(QuantifiedRequestModel.fromJS(item));
            }
        }
    }

    static fromJS(data: any): TransactionBatchRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionBatchRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ClientDeviceId"] = this.clientDeviceId;
        if (Array.isArray(this.requests)) {
            data["Requests"] = [];
            for (let item of this.requests)
                data["Requests"].push(item.toJSON());
        }
        return data; 
    }
}

export interface ITransactionBatchRequestModel {
    /** this is usually the machine name, IP address, MAC address that identifies the device/workstation
which initiated the API call. This value is recorded into the system transaction history and have no other intrinsic processing value to the API. */
    clientDeviceId?: string | undefined;
    /** A list of the assets/items to perform the transaction on and any relevant information */
    requests?: QuantifiedRequestModel[] | undefined;
}

export class QuantifiedRequestModel implements IQuantifiedRequestModel {
    /** this is the Asset Tag or Item # which uniquely identifies the object */
    assetItemNumber?: string | undefined;
    /** Set of values which help define identities of items for Inventory Control.
For Mobile Asset, this is not used and is usually ignored. */
    trackby?: ItemIdentTrackby | undefined;
    /** Transaction specific tag data (These are NON-Quantity trackby tags)
These are not used by Mobile Asset Cloud. */
    transTags?: TransactionalTags | undefined;
    /** The Site/Location information related to the transaction */
    spacialLocation?: SpacialLocation | undefined;
    /** The number of items/assets in this transaction. Fixed assets will always be 1. */
    quantity!: number;
    /** The cost of an individual item in this transaction */
    unitCost!: number;
    /** The date the transaction was performed in UTC */
    transDateUtc?: Date | undefined;
    /** Additional optional information */
    other?: OptionalUserData | undefined;

    constructor(data?: IQuantifiedRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.assetItemNumber = _data["AssetItemNumber"];
            this.trackby = _data["Trackby"] ? ItemIdentTrackby.fromJS(_data["Trackby"]) : <any>undefined;
            this.transTags = _data["TransTags"] ? TransactionalTags.fromJS(_data["TransTags"]) : <any>undefined;
            this.spacialLocation = _data["SpacialLocation"] ? SpacialLocation.fromJS(_data["SpacialLocation"]) : <any>undefined;
            this.quantity = _data["Quantity"];
            this.unitCost = _data["UnitCost"];
            this.transDateUtc = _data["TransDateUtc"] ? new Date(_data["TransDateUtc"].toString()) : <any>undefined;
            this.other = _data["Other"] ? OptionalUserData.fromJS(_data["Other"]) : <any>undefined;
        }
    }

    static fromJS(data: any): QuantifiedRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new QuantifiedRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AssetItemNumber"] = this.assetItemNumber;
        data["Trackby"] = this.trackby ? this.trackby.toJSON() : <any>undefined;
        data["TransTags"] = this.transTags ? this.transTags.toJSON() : <any>undefined;
        data["SpacialLocation"] = this.spacialLocation ? this.spacialLocation.toJSON() : <any>undefined;
        data["Quantity"] = this.quantity;
        data["UnitCost"] = this.unitCost;
        data["TransDateUtc"] = this.transDateUtc ? this.transDateUtc.toISOString() : <any>undefined;
        data["Other"] = this.other ? this.other.toJSON() : <any>undefined;
        return data; 
    }
}

export interface IQuantifiedRequestModel {
    /** this is the Asset Tag or Item # which uniquely identifies the object */
    assetItemNumber?: string | undefined;
    /** Set of values which help define identities of items for Inventory Control.
For Mobile Asset, this is not used and is usually ignored. */
    trackby?: ItemIdentTrackby | undefined;
    /** Transaction specific tag data (These are NON-Quantity trackby tags)
These are not used by Mobile Asset Cloud. */
    transTags?: TransactionalTags | undefined;
    /** The Site/Location information related to the transaction */
    spacialLocation?: SpacialLocation | undefined;
    /** The number of items/assets in this transaction. Fixed assets will always be 1. */
    quantity: number;
    /** The cost of an individual item in this transaction */
    unitCost: number;
    /** The date the transaction was performed in UTC */
    transDateUtc?: Date | undefined;
    /** Additional optional information */
    other?: OptionalUserData | undefined;
}

export class ItemIdentTrackby implements IItemIdentTrackby {
    /** for items this is the track by serial number that ''uniquely'' identifies the item.
A tracked serial # must be unique per asset/item and can have quantities of either 0.000 or 1.000 in existence. */
    serialNumber?: string | undefined;
    /** A generic string value that can be used to tie together groups of items */
    lot?: string | undefined;
    /** this is more or less the batch or date code of an item.
example of such a value is sortable format ( ''2017-12-31'' ) or not so sortable (per tenant definition): 'Q4/2017/31', etc. */
    dateCode?: string | undefined;
    /** The globally unique license plate number identifying the exact container the transaction is being performed on. */
    containerId?: string | undefined;
    /** Not Implemented */
    custom1?: string | undefined;
    /** Not Implemented */
    custom2?: string | undefined;
    /** Not Implemented */
    custom3?: string | undefined;
    /** Not Implemented */
    custom4?: string | undefined;
    /** Not Implemented */
    custom5?: string | undefined;
    /** Not Implemented */
    custom6?: string | undefined;
    /** Not Implemented */
    custom7?: string | undefined;
    /** Not Implemented */
    custom8?: string | undefined;
    /** Not Implemented */
    custom9?: string | undefined;
    /** Not Implemented */
    custom10?: string | undefined;

    constructor(data?: IItemIdentTrackby) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.serialNumber = _data["SerialNumber"];
            this.lot = _data["Lot"];
            this.dateCode = _data["DateCode"];
            this.containerId = _data["ContainerId"];
            this.custom1 = _data["Custom1"];
            this.custom2 = _data["Custom2"];
            this.custom3 = _data["Custom3"];
            this.custom4 = _data["Custom4"];
            this.custom5 = _data["Custom5"];
            this.custom6 = _data["Custom6"];
            this.custom7 = _data["Custom7"];
            this.custom8 = _data["Custom8"];
            this.custom9 = _data["Custom9"];
            this.custom10 = _data["Custom10"];
        }
    }

    static fromJS(data: any): ItemIdentTrackby {
        data = typeof data === 'object' ? data : {};
        let result = new ItemIdentTrackby();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SerialNumber"] = this.serialNumber;
        data["Lot"] = this.lot;
        data["DateCode"] = this.dateCode;
        data["ContainerId"] = this.containerId;
        data["Custom1"] = this.custom1;
        data["Custom2"] = this.custom2;
        data["Custom3"] = this.custom3;
        data["Custom4"] = this.custom4;
        data["Custom5"] = this.custom5;
        data["Custom6"] = this.custom6;
        data["Custom7"] = this.custom7;
        data["Custom8"] = this.custom8;
        data["Custom9"] = this.custom9;
        data["Custom10"] = this.custom10;
        return data; 
    }
}

export interface IItemIdentTrackby {
    /** for items this is the track by serial number that ''uniquely'' identifies the item.
A tracked serial # must be unique per asset/item and can have quantities of either 0.000 or 1.000 in existence. */
    serialNumber?: string | undefined;
    /** A generic string value that can be used to tie together groups of items */
    lot?: string | undefined;
    /** this is more or less the batch or date code of an item.
example of such a value is sortable format ( ''2017-12-31'' ) or not so sortable (per tenant definition): 'Q4/2017/31', etc. */
    dateCode?: string | undefined;
    /** The globally unique license plate number identifying the exact container the transaction is being performed on. */
    containerId?: string | undefined;
    /** Not Implemented */
    custom1?: string | undefined;
    /** Not Implemented */
    custom2?: string | undefined;
    /** Not Implemented */
    custom3?: string | undefined;
    /** Not Implemented */
    custom4?: string | undefined;
    /** Not Implemented */
    custom5?: string | undefined;
    /** Not Implemented */
    custom6?: string | undefined;
    /** Not Implemented */
    custom7?: string | undefined;
    /** Not Implemented */
    custom8?: string | undefined;
    /** Not Implemented */
    custom9?: string | undefined;
    /** Not Implemented */
    custom10?: string | undefined;
}

export class TransactionalTags implements ITransactionalTags {
    /** The serial number defined when it is removed from the system. Used on Remove and Pick transactions */
    serialOnRemove?: string | undefined;
    /** The customer the transaction is associated with */
    customer?: string | undefined;
    /** The vendor the transaction is associated with */
    supplier?: string | undefined;
    /** The reference number for the transaction */
    reference?: string | undefined;
    /** Not Implemented */
    custom1?: string | undefined;
    /** Not Implemented */
    custom2?: string | undefined;
    /** Not Implemented */
    custom3?: string | undefined;
    /** Not Implemented */
    custom4?: string | undefined;
    /** Not Implemented */
    custom5?: string | undefined;
    /** Not Implemented */
    custom6?: string | undefined;
    /** Not Implemented */
    custom7?: string | undefined;
    /** Not Implemented */
    custom8?: string | undefined;
    /** Not Implemented */
    custom9?: string | undefined;
    /** Not Implemented */
    custom10?: string | undefined;

    constructor(data?: ITransactionalTags) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.serialOnRemove = _data["SerialOnRemove"];
            this.customer = _data["Customer"];
            this.supplier = _data["Supplier"];
            this.reference = _data["Reference"];
            this.custom1 = _data["Custom1"];
            this.custom2 = _data["Custom2"];
            this.custom3 = _data["Custom3"];
            this.custom4 = _data["Custom4"];
            this.custom5 = _data["Custom5"];
            this.custom6 = _data["Custom6"];
            this.custom7 = _data["Custom7"];
            this.custom8 = _data["Custom8"];
            this.custom9 = _data["Custom9"];
            this.custom10 = _data["Custom10"];
        }
    }

    static fromJS(data: any): TransactionalTags {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionalTags();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SerialOnRemove"] = this.serialOnRemove;
        data["Customer"] = this.customer;
        data["Supplier"] = this.supplier;
        data["Reference"] = this.reference;
        data["Custom1"] = this.custom1;
        data["Custom2"] = this.custom2;
        data["Custom3"] = this.custom3;
        data["Custom4"] = this.custom4;
        data["Custom5"] = this.custom5;
        data["Custom6"] = this.custom6;
        data["Custom7"] = this.custom7;
        data["Custom8"] = this.custom8;
        data["Custom9"] = this.custom9;
        data["Custom10"] = this.custom10;
        return data; 
    }
}

export interface ITransactionalTags {
    /** The serial number defined when it is removed from the system. Used on Remove and Pick transactions */
    serialOnRemove?: string | undefined;
    /** The customer the transaction is associated with */
    customer?: string | undefined;
    /** The vendor the transaction is associated with */
    supplier?: string | undefined;
    /** The reference number for the transaction */
    reference?: string | undefined;
    /** Not Implemented */
    custom1?: string | undefined;
    /** Not Implemented */
    custom2?: string | undefined;
    /** Not Implemented */
    custom3?: string | undefined;
    /** Not Implemented */
    custom4?: string | undefined;
    /** Not Implemented */
    custom5?: string | undefined;
    /** Not Implemented */
    custom6?: string | undefined;
    /** Not Implemented */
    custom7?: string | undefined;
    /** Not Implemented */
    custom8?: string | undefined;
    /** Not Implemented */
    custom9?: string | undefined;
    /** Not Implemented */
    custom10?: string | undefined;
}

export class SpacialLocation implements ISpacialLocation {
    /** Exact site name that should be uniquely defined by the tenant.
This is NOT the site description. */
    site?: string | undefined;
    /** Read Only, traces the location through each parent */
    locationPrefix?: string | undefined;
    /** this is the location code, such as room# that must be unique within the Site.
For example, we could have Floor.1.Room.113 in site called 'Bldg 86B'
and another 'Floor.1.Room.113' in another site called 'Bldg 87X'. */
    location?: string | undefined;
    /** Not Implemented, instead of the combination of Site and Location, the alternative - Container License Plate Number could be used instead
to describe the position (location) of the item/asset in question.
Note that each value of Container License Plate Number is considered globally unique per tenant.
Not Supported (2018/04/26) */
    altLpnContainer?: string | undefined;

    constructor(data?: ISpacialLocation) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.site = _data["Site"];
            this.locationPrefix = _data["LocationPrefix"];
            this.location = _data["Location"];
            this.altLpnContainer = _data["AltLpnContainer"];
        }
    }

    static fromJS(data: any): SpacialLocation {
        data = typeof data === 'object' ? data : {};
        let result = new SpacialLocation();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Site"] = this.site;
        data["LocationPrefix"] = this.locationPrefix;
        data["Location"] = this.location;
        data["AltLpnContainer"] = this.altLpnContainer;
        return data; 
    }
}

export interface ISpacialLocation {
    /** Exact site name that should be uniquely defined by the tenant.
This is NOT the site description. */
    site?: string | undefined;
    /** Read Only, traces the location through each parent */
    locationPrefix?: string | undefined;
    /** this is the location code, such as room# that must be unique within the Site.
For example, we could have Floor.1.Room.113 in site called 'Bldg 86B'
and another 'Floor.1.Room.113' in another site called 'Bldg 87X'. */
    location?: string | undefined;
    /** Not Implemented, instead of the combination of Site and Location, the alternative - Container License Plate Number could be used instead
to describe the position (location) of the item/asset in question.
Note that each value of Container License Plate Number is considered globally unique per tenant.
Not Supported (2018/04/26) */
    altLpnContainer?: string | undefined;
}

export class OptionalUserData implements IOptionalUserData {
    /** the unique customer number */
    customerNumber?: string | undefined;
    /** the unique employee identifier / number */
    employeeNumber?: string | undefined;
    /** the unique vendor / supplier number/code */
    vendorNumber?: string | undefined;
    /** comments/notes to be inserted to annotate a transaction */
    comments?: string | undefined;
    /** this is basically any kind of id that uniquely identifies the record #
in the batch.
The most common use-case is the grid-row-number that is used to identify the record # on the user interface
so that any error messages returned by the API could be correlated and displayed correctly to the user.
This value is purely passed back to the consumer and have no intrinsic value to the API. */
    recordNumber?: string | undefined;

    constructor(data?: IOptionalUserData) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.customerNumber = _data["CustomerNumber"];
            this.employeeNumber = _data["EmployeeNumber"];
            this.vendorNumber = _data["VendorNumber"];
            this.comments = _data["Comments"];
            this.recordNumber = _data["RecordNumber"];
        }
    }

    static fromJS(data: any): OptionalUserData {
        data = typeof data === 'object' ? data : {};
        let result = new OptionalUserData();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["CustomerNumber"] = this.customerNumber;
        data["EmployeeNumber"] = this.employeeNumber;
        data["VendorNumber"] = this.vendorNumber;
        data["Comments"] = this.comments;
        data["RecordNumber"] = this.recordNumber;
        return data; 
    }
}

export interface IOptionalUserData {
    /** the unique customer number */
    customerNumber?: string | undefined;
    /** the unique employee identifier / number */
    employeeNumber?: string | undefined;
    /** the unique vendor / supplier number/code */
    vendorNumber?: string | undefined;
    /** comments/notes to be inserted to annotate a transaction */
    comments?: string | undefined;
    /** this is basically any kind of id that uniquely identifies the record #
in the batch.
The most common use-case is the grid-row-number that is used to identify the record # on the user interface
so that any error messages returned by the API could be correlated and displayed correctly to the user.
This value is purely passed back to the consumer and have no intrinsic value to the API. */
    recordNumber?: string | undefined;
}

export class TransactionBatchRequestModelV2 extends TransactionBatchRequestModel implements ITransactionBatchRequestModelV2 {
    /** A list of the assets/items to perform the transaction on and any relevant information */
    requests?: QuantifiedRequestModelV2[] | undefined;

    constructor(data?: ITransactionBatchRequestModelV2) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            if (Array.isArray(_data["Requests"])) {
                this.requests = [] as any;
                for (let item of _data["Requests"])
                    this.requests!.push(QuantifiedRequestModelV2.fromJS(item));
            }
        }
    }

    static fromJS(data: any): TransactionBatchRequestModelV2 {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionBatchRequestModelV2();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.requests)) {
            data["Requests"] = [];
            for (let item of this.requests)
                data["Requests"].push(item.toJSON());
        }
        super.toJSON(data);
        return data; 
    }
}

export interface ITransactionBatchRequestModelV2 extends ITransactionBatchRequestModel {
    /** A list of the assets/items to perform the transaction on and any relevant information */
    requests?: QuantifiedRequestModelV2[] | undefined;
}

export class QuantifiedRequestModelV2 extends QuantifiedRequestModel implements IQuantifiedRequestModelV2 {
    /** The Site/Location information related to the transaction */
    spacialLocation?: SpacialLocationV2 | undefined;

    constructor(data?: IQuantifiedRequestModelV2) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.spacialLocation = _data["SpacialLocation"] ? SpacialLocationV2.fromJS(_data["SpacialLocation"]) : <any>undefined;
        }
    }

    static fromJS(data: any): QuantifiedRequestModelV2 {
        data = typeof data === 'object' ? data : {};
        let result = new QuantifiedRequestModelV2();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["SpacialLocation"] = this.spacialLocation ? this.spacialLocation.toJSON() : <any>undefined;
        super.toJSON(data);
        return data; 
    }
}

export interface IQuantifiedRequestModelV2 extends IQuantifiedRequestModel {
    /** The Site/Location information related to the transaction */
    spacialLocation?: SpacialLocationV2 | undefined;
}

export class SpacialLocationV2 extends SpacialLocation implements ISpacialLocationV2 {
    /** Instead of the combination of Site and Location, the alternative - Container License Plate Number could be used instead
to describe the position (location) of the item in question.
Note that each value of Container License Plate Number is considered globally unique per tenant.
InventoryCloud Only */
    parentContainerId?: string | undefined;

    constructor(data?: ISpacialLocationV2) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.parentContainerId = _data["ParentContainerId"];
        }
    }

    static fromJS(data: any): SpacialLocationV2 {
        data = typeof data === 'object' ? data : {};
        let result = new SpacialLocationV2();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ParentContainerId"] = this.parentContainerId;
        super.toJSON(data);
        return data; 
    }
}

export interface ISpacialLocationV2 extends ISpacialLocation {
    /** Instead of the combination of Site and Location, the alternative - Container License Plate Number could be used instead
to describe the position (location) of the item in question.
Note that each value of Container License Plate Number is considered globally unique per tenant.
InventoryCloud Only */
    parentContainerId?: string | undefined;
}

export class ItemAddTransactionModel implements IItemAddTransactionModel {
    /** Required: the unique identifier for this item */
    itemNumber?: string | undefined;
    /** Required: the cost of an individual unit cost of the inventory being added */
    cost!: number;
    /** the date the inventory was acquired */
    dateAcquired!: Date;
    /** the customer associated with the transaction */
    customerNumber?: string | undefined;
    /** Required: the site the inventory is being placed at.
If ParentContainerId is specified, 
then this field should be null or empty. */
    siteName?: string | undefined;
    /** Required: the location the inventory is being placed at within the site
If ParentContainerId is specified, 
then this field should be null or empty. */
    locationCode?: string | undefined;
    /** Instead of adding inventory quantity using LocationCode and SiteName,
the Inventory Quantity can be added (or nested) in a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    parentContainerId?: string | undefined;
    /** the vendor associated with the transaction */
    vendorNumber?: string | undefined;
    /** Required: the amount of inventory to add */
    quantity!: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** This value should be specified ONLY if a new container is being added to the system.
When a new container is added, the Quantity specified must be exactly 1.
If NewContainerId already exists, then an error will be returned.
If a new License Plate Number is being added and nested to an existing parent container instead of a site/location,
then the value ParentContainerId must be specified, and ParentContainerId must already exist.
THIS VALUE MUST BE GLOBALLY UNIQUE */
    newContainerId?: string | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory.
This value must be unique for the specified ItemNumber.
When SerialNumber is specified, the Quantity must be exactly 1. */
    serialNumber?: string | undefined;
    /** The reference number associated with the transaction.
This value is used to tag a transaction with a searchable/filterable value. */
    referenceNumber?: string | undefined;
    /** Sometimes during add or receive (when inventory quantity is being added),
we will need to specify an (optional) Purchase Order Number.
If the purchase Order Number does NOT exist, then the error 'Order Not Found' will be returned. */
    orderNumber?: string | undefined;
    /** The name or ip address of the mobile device or computer/workstation that is making the Inventory Add request */
    transactionRecordSource?: string | undefined;
    userNotes?: string | undefined;

    constructor(data?: IItemAddTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.cost = _data["Cost"];
            this.dateAcquired = _data["DateAcquired"] ? new Date(_data["DateAcquired"].toString()) : <any>undefined;
            this.customerNumber = _data["CustomerNumber"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.parentContainerId = _data["ParentContainerId"];
            this.vendorNumber = _data["VendorNumber"];
            this.quantity = _data["Quantity"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.newContainerId = _data["NewContainerId"];
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.referenceNumber = _data["ReferenceNumber"];
            this.orderNumber = _data["OrderNumber"];
            this.transactionRecordSource = _data["TransactionRecordSource"];
            this.userNotes = _data["UserNotes"];
        }
    }

    static fromJS(data: any): ItemAddTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemAddTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["Cost"] = this.cost;
        data["DateAcquired"] = this.dateAcquired ? this.dateAcquired.toISOString() : <any>undefined;
        data["CustomerNumber"] = this.customerNumber;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["ParentContainerId"] = this.parentContainerId;
        data["VendorNumber"] = this.vendorNumber;
        data["Quantity"] = this.quantity;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["NewContainerId"] = this.newContainerId;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["ReferenceNumber"] = this.referenceNumber;
        data["OrderNumber"] = this.orderNumber;
        data["TransactionRecordSource"] = this.transactionRecordSource;
        data["UserNotes"] = this.userNotes;
        return data; 
    }
}

export interface IItemAddTransactionModel {
    /** Required: the unique identifier for this item */
    itemNumber?: string | undefined;
    /** Required: the cost of an individual unit cost of the inventory being added */
    cost: number;
    /** the date the inventory was acquired */
    dateAcquired: Date;
    /** the customer associated with the transaction */
    customerNumber?: string | undefined;
    /** Required: the site the inventory is being placed at.
If ParentContainerId is specified, 
then this field should be null or empty. */
    siteName?: string | undefined;
    /** Required: the location the inventory is being placed at within the site
If ParentContainerId is specified, 
then this field should be null or empty. */
    locationCode?: string | undefined;
    /** Instead of adding inventory quantity using LocationCode and SiteName,
the Inventory Quantity can be added (or nested) in a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    parentContainerId?: string | undefined;
    /** the vendor associated with the transaction */
    vendorNumber?: string | undefined;
    /** Required: the amount of inventory to add */
    quantity: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** This value should be specified ONLY if a new container is being added to the system.
When a new container is added, the Quantity specified must be exactly 1.
If NewContainerId already exists, then an error will be returned.
If a new License Plate Number is being added and nested to an existing parent container instead of a site/location,
then the value ParentContainerId must be specified, and ParentContainerId must already exist.
THIS VALUE MUST BE GLOBALLY UNIQUE */
    newContainerId?: string | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory.
This value must be unique for the specified ItemNumber.
When SerialNumber is specified, the Quantity must be exactly 1. */
    serialNumber?: string | undefined;
    /** The reference number associated with the transaction.
This value is used to tag a transaction with a searchable/filterable value. */
    referenceNumber?: string | undefined;
    /** Sometimes during add or receive (when inventory quantity is being added),
we will need to specify an (optional) Purchase Order Number.
If the purchase Order Number does NOT exist, then the error 'Order Not Found' will be returned. */
    orderNumber?: string | undefined;
    /** The name or ip address of the mobile device or computer/workstation that is making the Inventory Add request */
    transactionRecordSource?: string | undefined;
    userNotes?: string | undefined;
}

export class ItemRemoveTransactionModel implements IItemRemoveTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the date the inventory was removed */
    dateRemoved!: Date;
    /** the customer associated with the transaction */
    customerNumber?: string | undefined;
    /** the site the inventory was removed from */
    siteName?: string | undefined;
    /** the location in the site the inventory was removed from */
    locationCode?: string | undefined;
    /** Instead of removing inventory quantity using LocationCode and SiteName,
the Inventory Quantity can be remvoe from a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    parentContainerId?: string | undefined;
    containerId?: string | undefined;
    /** the amount of inventory to remove */
    quantity!: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;

    constructor(data?: IItemRemoveTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.dateRemoved = _data["DateRemoved"] ? new Date(_data["DateRemoved"].toString()) : <any>undefined;
            this.customerNumber = _data["CustomerNumber"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.parentContainerId = _data["ParentContainerId"];
            this.containerId = _data["ContainerId"];
            this.quantity = _data["Quantity"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
        }
    }

    static fromJS(data: any): ItemRemoveTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemRemoveTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["DateRemoved"] = this.dateRemoved ? this.dateRemoved.toISOString() : <any>undefined;
        data["CustomerNumber"] = this.customerNumber;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["ParentContainerId"] = this.parentContainerId;
        data["ContainerId"] = this.containerId;
        data["Quantity"] = this.quantity;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        return data; 
    }
}

export interface IItemRemoveTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the date the inventory was removed */
    dateRemoved: Date;
    /** the customer associated with the transaction */
    customerNumber?: string | undefined;
    /** the site the inventory was removed from */
    siteName?: string | undefined;
    /** the location in the site the inventory was removed from */
    locationCode?: string | undefined;
    /** Instead of removing inventory quantity using LocationCode and SiteName,
the Inventory Quantity can be remvoe from a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    parentContainerId?: string | undefined;
    containerId?: string | undefined;
    /** the amount of inventory to remove */
    quantity: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
}

export class ItemAdjustTransactionModel implements IItemAdjustTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the type of adjustment to be performed */
    adjustType!: AdjustTypeFlags;
    /** the reason for the adjustment */
    adjustReason?: string | undefined;
    /** the date the adjust takes place */
    dateRemoved!: Date;
    /** the customer associated with the transaction */
    customerNumber?: string | undefined;
    /** the site the inventory was adjusted at */
    siteName?: string | undefined;
    /** the location in the site where the inventory was adjusted */
    locationCode?: string | undefined;
    /** the amount to adjust */
    quantity!: number;
    /** the transaction code for the transaction */
    transactionCode?: string | undefined;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;

    constructor(data?: IItemAdjustTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.adjustType = _data["AdjustType"];
            this.adjustReason = _data["AdjustReason"];
            this.dateRemoved = _data["DateRemoved"] ? new Date(_data["DateRemoved"].toString()) : <any>undefined;
            this.customerNumber = _data["CustomerNumber"];
            this.siteName = _data["SiteName"];
            this.locationCode = _data["LocationCode"];
            this.quantity = _data["Quantity"];
            this.transactionCode = _data["TransactionCode"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
        }
    }

    static fromJS(data: any): ItemAdjustTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemAdjustTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["AdjustType"] = this.adjustType;
        data["AdjustReason"] = this.adjustReason;
        data["DateRemoved"] = this.dateRemoved ? this.dateRemoved.toISOString() : <any>undefined;
        data["CustomerNumber"] = this.customerNumber;
        data["SiteName"] = this.siteName;
        data["LocationCode"] = this.locationCode;
        data["Quantity"] = this.quantity;
        data["TransactionCode"] = this.transactionCode;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        return data; 
    }
}

export interface IItemAdjustTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the type of adjustment to be performed */
    adjustType: AdjustTypeFlags;
    /** the reason for the adjustment */
    adjustReason?: string | undefined;
    /** the date the adjust takes place */
    dateRemoved: Date;
    /** the customer associated with the transaction */
    customerNumber?: string | undefined;
    /** the site the inventory was adjusted at */
    siteName?: string | undefined;
    /** the location in the site where the inventory was adjusted */
    locationCode?: string | undefined;
    /** the amount to adjust */
    quantity: number;
    /** the transaction code for the transaction */
    transactionCode?: string | undefined;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
}

/** Absolute, */
export enum AdjustTypeFlags {
    AdjustAbsolute = 0,
    Count = 0,
    RelativeDown = 1,
    Down = 1,
    RelativeUp = 2,
    Up = 2,
    AutoCancelReservedQuantities = 16,
    AutoCheckInReservedQuantities = 32,
}

export class ItemMoveTransactionModel implements IItemMoveTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the old site of the inventory */
    fromSiteName?: string | undefined;
    /** the old location within the site where the inventory was */
    fromLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved out of a container (such as a carton, box, tote, tub, pallet, cage, etc).
The From Parent Container Id (From Parent ContainerLicense Plate Number) must already exist in the system prior to use. */
    fromParentContainerId?: string | undefined;
    /** the new site of the inventory */
    toSiteName?: string | undefined;
    /** the new location of the inventory */
    toLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved into a container (such as a carton, box, tote, tub, pallet, cage, etc).
The value of move To Parent Container Id (Move To Parent Container License Plate Number_ must already exist in the system prior to use. */
    toParentContainerId?: string | undefined;
    /** the amount to adjust */
    quantity!: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
    /** <![CDATA[
when moving an entire container this is the license plate number of that container.
For example, there are 3 containers:
        CON-LPN-SOURCE1, CON-LPN-DEST2, and CON-LPN-CHILD1
AND ''CON-LPN-CHILD1'' is currently nested within ''CON-LPN-SOURCE1''
AND we want to move ''CON-LPN-SOURCE1'' into a different container: ''CON-LPN-DEST2''
In this case, the value of FromParentContainerId should be set to the OLD-parent: ''CON-LPN-SOURCE1''
The value of ToParentContainerId should be set to the NEW-parent: ''CON-LPN-DEST2''
The child container that is being moved should have the field (Trackby) ChildContainerId set to ''CON-LPN-CHILD1''
        
]]> */
    childContainerId?: string | undefined;

    constructor(data?: IItemMoveTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.fromSiteName = _data["FromSiteName"];
            this.fromLocationCode = _data["FromLocationCode"];
            this.fromParentContainerId = _data["FromParentContainerId"];
            this.toSiteName = _data["ToSiteName"];
            this.toLocationCode = _data["ToLocationCode"];
            this.toParentContainerId = _data["ToParentContainerId"];
            this.quantity = _data["Quantity"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.childContainerId = _data["ChildContainerId"];
        }
    }

    static fromJS(data: any): ItemMoveTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemMoveTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["FromSiteName"] = this.fromSiteName;
        data["FromLocationCode"] = this.fromLocationCode;
        data["FromParentContainerId"] = this.fromParentContainerId;
        data["ToSiteName"] = this.toSiteName;
        data["ToLocationCode"] = this.toLocationCode;
        data["ToParentContainerId"] = this.toParentContainerId;
        data["Quantity"] = this.quantity;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["ChildContainerId"] = this.childContainerId;
        return data; 
    }
}

export interface IItemMoveTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the old site of the inventory */
    fromSiteName?: string | undefined;
    /** the old location within the site where the inventory was */
    fromLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved out of a container (such as a carton, box, tote, tub, pallet, cage, etc).
The From Parent Container Id (From Parent ContainerLicense Plate Number) must already exist in the system prior to use. */
    fromParentContainerId?: string | undefined;
    /** the new site of the inventory */
    toSiteName?: string | undefined;
    /** the new location of the inventory */
    toLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved into a container (such as a carton, box, tote, tub, pallet, cage, etc).
The value of move To Parent Container Id (Move To Parent Container License Plate Number_ must already exist in the system prior to use. */
    toParentContainerId?: string | undefined;
    /** the amount to adjust */
    quantity: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
    /** <![CDATA[
when moving an entire container this is the license plate number of that container.
For example, there are 3 containers:
        CON-LPN-SOURCE1, CON-LPN-DEST2, and CON-LPN-CHILD1
AND ''CON-LPN-CHILD1'' is currently nested within ''CON-LPN-SOURCE1''
AND we want to move ''CON-LPN-SOURCE1'' into a different container: ''CON-LPN-DEST2''
In this case, the value of FromParentContainerId should be set to the OLD-parent: ''CON-LPN-SOURCE1''
The value of ToParentContainerId should be set to the NEW-parent: ''CON-LPN-DEST2''
The child container that is being moved should have the field (Trackby) ChildContainerId set to ''CON-LPN-CHILD1''
        
]]> */
    childContainerId?: string | undefined;
}

export class ItemCheckInTransactionModel implements IItemCheckInTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the old site of the inventory */
    fromSiteName?: string | undefined;
    /** the old location within the site where the inventory was */
    fromLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved out of a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    fromParentContainerId?: string | undefined;
    /** the new site of the inventory */
    toSiteName?: string | undefined;
    /** the new location of the inventory */
    toLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved into a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    toParentContainerId?: string | undefined;
    /** the customer checking in the items */
    customerNumber?: string | undefined;
    /** the vendor checking in the items */
    vendorNumber?: string | undefined;
    /** the amount to adjust */
    quantity!: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
    /** when moving an entire container this is the license plate number of that container */
    containerId?: string | undefined;
    notes?: string | undefined;
    geoLocation?: GeoLocation | undefined;

    constructor(data?: IItemCheckInTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.fromSiteName = _data["FromSiteName"];
            this.fromLocationCode = _data["FromLocationCode"];
            this.fromParentContainerId = _data["FromParentContainerId"];
            this.toSiteName = _data["ToSiteName"];
            this.toLocationCode = _data["ToLocationCode"];
            this.toParentContainerId = _data["ToParentContainerId"];
            this.customerNumber = _data["CustomerNumber"];
            this.vendorNumber = _data["VendorNumber"];
            this.quantity = _data["Quantity"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.containerId = _data["ContainerId"];
            this.notes = _data["Notes"];
            this.geoLocation = _data["GeoLocation"] ? GeoLocation.fromJS(_data["GeoLocation"]) : <any>undefined;
        }
    }

    static fromJS(data: any): ItemCheckInTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemCheckInTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["FromSiteName"] = this.fromSiteName;
        data["FromLocationCode"] = this.fromLocationCode;
        data["FromParentContainerId"] = this.fromParentContainerId;
        data["ToSiteName"] = this.toSiteName;
        data["ToLocationCode"] = this.toLocationCode;
        data["ToParentContainerId"] = this.toParentContainerId;
        data["CustomerNumber"] = this.customerNumber;
        data["VendorNumber"] = this.vendorNumber;
        data["Quantity"] = this.quantity;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["ContainerId"] = this.containerId;
        data["Notes"] = this.notes;
        data["GeoLocation"] = this.geoLocation ? this.geoLocation.toJSON() : <any>undefined;
        return data; 
    }
}

export interface IItemCheckInTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the old site of the inventory */
    fromSiteName?: string | undefined;
    /** the old location within the site where the inventory was */
    fromLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved out of a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    fromParentContainerId?: string | undefined;
    /** the new site of the inventory */
    toSiteName?: string | undefined;
    /** the new location of the inventory */
    toLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved into a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    toParentContainerId?: string | undefined;
    /** the customer checking in the items */
    customerNumber?: string | undefined;
    /** the vendor checking in the items */
    vendorNumber?: string | undefined;
    /** the amount to adjust */
    quantity: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
    /** when moving an entire container this is the license plate number of that container */
    containerId?: string | undefined;
    notes?: string | undefined;
    geoLocation?: GeoLocation | undefined;
}

export class ItemCheckOutTransactionModel implements IItemCheckOutTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the old site of the inventory */
    fromSiteName?: string | undefined;
    /** the old location within the site where the inventory was */
    fromLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved out of a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    fromParentContainerId?: string | undefined;
    /** the new site of the inventory */
    toSiteName?: string | undefined;
    /** the new location of the inventory */
    toLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved into a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    toParentContainerId?: string | undefined;
    /** the date the items are due back */
    dueDate?: Date | undefined;
    /** the customer the items are checked out to */
    customerNumber?: string | undefined;
    /** the vendor the items are checked out */
    vendorNumber?: string | undefined;
    /** the amount to adjust */
    quantity!: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
    /** when moving an entire container this is the license plate number of that container */
    containerId?: string | undefined;
    /** user notes */
    notes?: string | undefined;
    geoLocation?: GeoLocation | undefined;

    constructor(data?: IItemCheckOutTransactionModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.fromSiteName = _data["FromSiteName"];
            this.fromLocationCode = _data["FromLocationCode"];
            this.fromParentContainerId = _data["FromParentContainerId"];
            this.toSiteName = _data["ToSiteName"];
            this.toLocationCode = _data["ToLocationCode"];
            this.toParentContainerId = _data["ToParentContainerId"];
            this.dueDate = _data["DueDate"] ? new Date(_data["DueDate"].toString()) : <any>undefined;
            this.customerNumber = _data["CustomerNumber"];
            this.vendorNumber = _data["VendorNumber"];
            this.quantity = _data["Quantity"];
            this.dateCode = _data["DateCode"] ? new Date(_data["DateCode"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.serialNumber = _data["SerialNumber"];
            this.containerId = _data["ContainerId"];
            this.notes = _data["Notes"];
            this.geoLocation = _data["GeoLocation"] ? GeoLocation.fromJS(_data["GeoLocation"]) : <any>undefined;
        }
    }

    static fromJS(data: any): ItemCheckOutTransactionModel {
        data = typeof data === 'object' ? data : {};
        let result = new ItemCheckOutTransactionModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["FromSiteName"] = this.fromSiteName;
        data["FromLocationCode"] = this.fromLocationCode;
        data["FromParentContainerId"] = this.fromParentContainerId;
        data["ToSiteName"] = this.toSiteName;
        data["ToLocationCode"] = this.toLocationCode;
        data["ToParentContainerId"] = this.toParentContainerId;
        data["DueDate"] = this.dueDate ? this.dueDate.toISOString() : <any>undefined;
        data["CustomerNumber"] = this.customerNumber;
        data["VendorNumber"] = this.vendorNumber;
        data["Quantity"] = this.quantity;
        data["DateCode"] = this.dateCode ? this.dateCode.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["SerialNumber"] = this.serialNumber;
        data["ContainerId"] = this.containerId;
        data["Notes"] = this.notes;
        data["GeoLocation"] = this.geoLocation ? this.geoLocation.toJSON() : <any>undefined;
        return data; 
    }
}

export interface IItemCheckOutTransactionModel {
    /** the unique identifier for this item */
    itemNumber?: string | undefined;
    /** the old site of the inventory */
    fromSiteName?: string | undefined;
    /** the old location within the site where the inventory was */
    fromLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved out of a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    fromParentContainerId?: string | undefined;
    /** the new site of the inventory */
    toSiteName?: string | undefined;
    /** the new location of the inventory */
    toLocationCode?: string | undefined;
    /** the Inventory Quantity can be moved into a container (such as a carton, box, tote, tub, pallet, cage, etc).
The License Plate Number must already exist in the system prior to use. */
    toParentContainerId?: string | undefined;
    /** the date the items are due back */
    dueDate?: Date | undefined;
    /** the customer the items are checked out to */
    customerNumber?: string | undefined;
    /** the vendor the items are checked out */
    vendorNumber?: string | undefined;
    /** the amount to adjust */
    quantity: number;
    /** the date code of the inventory */
    dateCode?: Date | undefined;
    /** the lot of the inventory */
    lot?: string | undefined;
    /** the unique serial number of the inventory */
    serialNumber?: string | undefined;
    /** when moving an entire container this is the license plate number of that container */
    containerId?: string | undefined;
    /** user notes */
    notes?: string | undefined;
    geoLocation?: GeoLocation | undefined;
}

export class WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel implements IWaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20NestedContainerHierarchyCreationResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(Container20NestedContainerHierarchyCreationResponseModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfContainer20NestedContainerHierarchyCreationResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20NestedContainerHierarchyCreationResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class Container20NestedContainerHierarchyCreationRequestModel implements IContainer20NestedContainerHierarchyCreationRequestModel {
    userNotes?: string | undefined;
    /** some unique or random value that allows the backend server(s) to communicate
a informational or validation error messages back to the api consumer.
For requests with only one model, this field is irrelevant. */
    uniqueRecordIdentitifer?: string | undefined;
    transactionUnitCost!: number;
    /** the item number to create an instance of a license plate number.
All license plate number that comes into existence must come from an existing item that is of type container */
    itemNumberContainerClassType?: string | undefined;
    /** default is null, empty value, which means to use to global license plate number generator */
    autoSequenceGeneratorItemNumber?: string | undefined;
    /** set to null/empty to use automatic license plate number generator sequence */
    newContainerId?: string | undefined;
    /** this should be a pair of values and should be:
Name of the Site */
    initialInventorySiteName?: string | undefined;
    /** the location code specified here must belong to the site name */
    initialInventoryLocationCode?: string | undefined;
    /** If this value is specified, then the values in the element InitialInventorySiteName and LocationCode
will be ignored and the new container with be created as a child of this EXISTING container: */
    intialInventoryParentContainerId?: string | undefined;

    constructor(data?: IContainer20NestedContainerHierarchyCreationRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.userNotes = _data["UserNotes"];
            this.uniqueRecordIdentitifer = _data["UniqueRecordIdentitifer"];
            this.transactionUnitCost = _data["TransactionUnitCost"];
            this.itemNumberContainerClassType = _data["ItemNumberContainerClassType"];
            this.autoSequenceGeneratorItemNumber = _data["AutoSequenceGeneratorItemNumber"];
            this.newContainerId = _data["NewContainerId"];
            this.initialInventorySiteName = _data["InitialInventorySiteName"];
            this.initialInventoryLocationCode = _data["InitialInventoryLocationCode"];
            this.intialInventoryParentContainerId = _data["IntialInventoryParentContainerId"];
        }
    }

    static fromJS(data: any): Container20NestedContainerHierarchyCreationRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20NestedContainerHierarchyCreationRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["UserNotes"] = this.userNotes;
        data["UniqueRecordIdentitifer"] = this.uniqueRecordIdentitifer;
        data["TransactionUnitCost"] = this.transactionUnitCost;
        data["ItemNumberContainerClassType"] = this.itemNumberContainerClassType;
        data["AutoSequenceGeneratorItemNumber"] = this.autoSequenceGeneratorItemNumber;
        data["NewContainerId"] = this.newContainerId;
        data["InitialInventorySiteName"] = this.initialInventorySiteName;
        data["InitialInventoryLocationCode"] = this.initialInventoryLocationCode;
        data["IntialInventoryParentContainerId"] = this.intialInventoryParentContainerId;
        return data; 
    }
}

export interface IContainer20NestedContainerHierarchyCreationRequestModel {
    userNotes?: string | undefined;
    /** some unique or random value that allows the backend server(s) to communicate
a informational or validation error messages back to the api consumer.
For requests with only one model, this field is irrelevant. */
    uniqueRecordIdentitifer?: string | undefined;
    transactionUnitCost: number;
    /** the item number to create an instance of a license plate number.
All license plate number that comes into existence must come from an existing item that is of type container */
    itemNumberContainerClassType?: string | undefined;
    /** default is null, empty value, which means to use to global license plate number generator */
    autoSequenceGeneratorItemNumber?: string | undefined;
    /** set to null/empty to use automatic license plate number generator sequence */
    newContainerId?: string | undefined;
    /** this should be a pair of values and should be:
Name of the Site */
    initialInventorySiteName?: string | undefined;
    /** the location code specified here must belong to the site name */
    initialInventoryLocationCode?: string | undefined;
    /** If this value is specified, then the values in the element InitialInventorySiteName and LocationCode
will be ignored and the new container with be created as a child of this EXISTING container: */
    intialInventoryParentContainerId?: string | undefined;
}

export class Container20NestedContainerHierarchyCreationResponseModel extends Container20NestedContainerHierarchyCreationRequestModel implements IContainer20NestedContainerHierarchyCreationResponseModel {
    resultKeyNumber?: string | undefined;

    constructor(data?: IContainer20NestedContainerHierarchyCreationResponseModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.resultKeyNumber = _data["ResultKeyNumber"];
        }
    }

    static fromJS(data: any): Container20NestedContainerHierarchyCreationResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20NestedContainerHierarchyCreationResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ResultKeyNumber"] = this.resultKeyNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface IContainer20NestedContainerHierarchyCreationResponseModel extends IContainer20NestedContainerHierarchyCreationRequestModel {
    resultKeyNumber?: string | undefined;
}

export class WaspResultOfListOfContainer20MoveResponseModel implements IWaspResultOfListOfContainer20MoveResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20MoveResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfContainer20MoveResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(Container20MoveResponseModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfContainer20MoveResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfContainer20MoveResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfContainer20MoveResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: Container20MoveResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class Container20MoveRequestModel implements IContainer20MoveRequestModel {
    itemNumber?: string | undefined;
    trackbyContainerId?: string | undefined;
    trackbySerialNumber?: string | undefined;
    trackbyDateCode?: string | undefined;
    trackbyLot?: string | undefined;
    trackbyCustomValue1?: string | undefined;
    trackbyCustomValue2?: string | undefined;
    trackbyCustomValue3?: string | undefined;
    trackbyCustomValue4?: string | undefined;
    trackbyCustomValue5?: string | undefined;
    quantity!: number;
    fromSiteName?: string | undefined;
    fromLocationCode?: string | undefined;
    fromContainerId?: string | undefined;
    moveToSiteName?: string | undefined;
    moveToLocationCode?: string | undefined;
    moveToContainerId?: string | undefined;
    userNotes?: string | undefined;
    transactionUTC!: Date;
    transactionRecordSource?: string | undefined;
    geoLocationLatitude?: number | undefined;
    geoLocationLongitude?: number | undefined;
    geoLocationAltitude?: number | undefined;
    geoLocationAccuracy?: number | undefined;
    geoLocationTimestampUTC?: Date | undefined;
    uniqueRecordIdentitifer?: string | undefined;

    constructor(data?: IContainer20MoveRequestModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.itemNumber = _data["ItemNumber"];
            this.trackbyContainerId = _data["TrackbyContainerId"];
            this.trackbySerialNumber = _data["TrackbySerialNumber"];
            this.trackbyDateCode = _data["TrackbyDateCode"];
            this.trackbyLot = _data["TrackbyLot"];
            this.trackbyCustomValue1 = _data["TrackbyCustomValue1"];
            this.trackbyCustomValue2 = _data["TrackbyCustomValue2"];
            this.trackbyCustomValue3 = _data["TrackbyCustomValue3"];
            this.trackbyCustomValue4 = _data["TrackbyCustomValue4"];
            this.trackbyCustomValue5 = _data["TrackbyCustomValue5"];
            this.quantity = _data["Quantity"];
            this.fromSiteName = _data["FromSiteName"];
            this.fromLocationCode = _data["FromLocationCode"];
            this.fromContainerId = _data["FromContainerId"];
            this.moveToSiteName = _data["MoveToSiteName"];
            this.moveToLocationCode = _data["MoveToLocationCode"];
            this.moveToContainerId = _data["MoveToContainerId"];
            this.userNotes = _data["UserNotes"];
            this.transactionUTC = _data["TransactionUTC"] ? new Date(_data["TransactionUTC"].toString()) : <any>undefined;
            this.transactionRecordSource = _data["TransactionRecordSource"];
            this.geoLocationLatitude = _data["GeoLocationLatitude"];
            this.geoLocationLongitude = _data["GeoLocationLongitude"];
            this.geoLocationAltitude = _data["GeoLocationAltitude"];
            this.geoLocationAccuracy = _data["GeoLocationAccuracy"];
            this.geoLocationTimestampUTC = _data["GeoLocationTimestampUTC"] ? new Date(_data["GeoLocationTimestampUTC"].toString()) : <any>undefined;
            this.uniqueRecordIdentitifer = _data["UniqueRecordIdentitifer"];
        }
    }

    static fromJS(data: any): Container20MoveRequestModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20MoveRequestModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ItemNumber"] = this.itemNumber;
        data["TrackbyContainerId"] = this.trackbyContainerId;
        data["TrackbySerialNumber"] = this.trackbySerialNumber;
        data["TrackbyDateCode"] = this.trackbyDateCode;
        data["TrackbyLot"] = this.trackbyLot;
        data["TrackbyCustomValue1"] = this.trackbyCustomValue1;
        data["TrackbyCustomValue2"] = this.trackbyCustomValue2;
        data["TrackbyCustomValue3"] = this.trackbyCustomValue3;
        data["TrackbyCustomValue4"] = this.trackbyCustomValue4;
        data["TrackbyCustomValue5"] = this.trackbyCustomValue5;
        data["Quantity"] = this.quantity;
        data["FromSiteName"] = this.fromSiteName;
        data["FromLocationCode"] = this.fromLocationCode;
        data["FromContainerId"] = this.fromContainerId;
        data["MoveToSiteName"] = this.moveToSiteName;
        data["MoveToLocationCode"] = this.moveToLocationCode;
        data["MoveToContainerId"] = this.moveToContainerId;
        data["UserNotes"] = this.userNotes;
        data["TransactionUTC"] = this.transactionUTC ? this.transactionUTC.toISOString() : <any>undefined;
        data["TransactionRecordSource"] = this.transactionRecordSource;
        data["GeoLocationLatitude"] = this.geoLocationLatitude;
        data["GeoLocationLongitude"] = this.geoLocationLongitude;
        data["GeoLocationAltitude"] = this.geoLocationAltitude;
        data["GeoLocationAccuracy"] = this.geoLocationAccuracy;
        data["GeoLocationTimestampUTC"] = this.geoLocationTimestampUTC ? this.geoLocationTimestampUTC.toISOString() : <any>undefined;
        data["UniqueRecordIdentitifer"] = this.uniqueRecordIdentitifer;
        return data; 
    }
}

export interface IContainer20MoveRequestModel {
    itemNumber?: string | undefined;
    trackbyContainerId?: string | undefined;
    trackbySerialNumber?: string | undefined;
    trackbyDateCode?: string | undefined;
    trackbyLot?: string | undefined;
    trackbyCustomValue1?: string | undefined;
    trackbyCustomValue2?: string | undefined;
    trackbyCustomValue3?: string | undefined;
    trackbyCustomValue4?: string | undefined;
    trackbyCustomValue5?: string | undefined;
    quantity: number;
    fromSiteName?: string | undefined;
    fromLocationCode?: string | undefined;
    fromContainerId?: string | undefined;
    moveToSiteName?: string | undefined;
    moveToLocationCode?: string | undefined;
    moveToContainerId?: string | undefined;
    userNotes?: string | undefined;
    transactionUTC: Date;
    transactionRecordSource?: string | undefined;
    geoLocationLatitude?: number | undefined;
    geoLocationLongitude?: number | undefined;
    geoLocationAltitude?: number | undefined;
    geoLocationAccuracy?: number | undefined;
    geoLocationTimestampUTC?: Date | undefined;
    uniqueRecordIdentitifer?: string | undefined;
}

export class Container20MoveResponseModel extends Container20MoveRequestModel implements IContainer20MoveResponseModel {
    resultKeyNumber?: string | undefined;
    batchNumber?: number | undefined;

    constructor(data?: IContainer20MoveResponseModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.resultKeyNumber = _data["ResultKeyNumber"];
            this.batchNumber = _data["BatchNumber"];
        }
    }

    static fromJS(data: any): Container20MoveResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new Container20MoveResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ResultKeyNumber"] = this.resultKeyNumber;
        data["BatchNumber"] = this.batchNumber;
        super.toJSON(data);
        return data; 
    }
}

export interface IContainer20MoveResponseModel extends IContainer20MoveRequestModel {
    resultKeyNumber?: string | undefined;
    batchNumber?: number | undefined;
}

export class WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase implements IWaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase {
    /** Type specific result that always depends on the function called. */
    data?: ACEVTransactionHistoryNonIdentityResponseBase[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(ACEVTransactionHistoryNonIdentityResponseBase.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfACEVTransactionHistoryNonIdentityResponseBase {
    /** Type specific result that always depends on the function called. */
    data?: ACEVTransactionHistoryNonIdentityResponseBase[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class ACEVTransactionHistoryNonIdentityResponseBase implements IACEVTransactionHistoryNonIdentityResponseBase {
    transactionUniqueIdentitifer?: string | undefined;
    isSystemGenerated?: boolean | undefined;
    assetTransCheckoutQtyCurrentQty?: number | undefined;
    assetTransCost?: number | undefined;
    assetTransCurrentQty?: number | undefined;
    assetTransQtyCurrentQty?: number | undefined;
    assetTransQuantity?: number | undefined;
    currentQtyInstantaneouslyAtLocationKeyId?: number | undefined;
    assetDefaultCost?: number | undefined;
    orderNumber?: string | undefined;
    assetTransBatchNo?: string | undefined;
    assetDescription?: string | undefined;
    assetModel?: string | undefined;
    assetSerialNumber?: string | undefined;
    assetTag?: string | undefined;
    assetTransReceiptNum?: string | undefined;
    assetTransRecordSource?: string | undefined;
    assetTypeDescription?: string | undefined;
    assetTypeModelNumber?: string | undefined;
    assetTypeNumber?: string | undefined;
    customerCompanyName?: string | undefined;
    customerContactEmail?: string | undefined;
    customerContactFirstName?: string | undefined;
    customerContactLastName?: string | undefined;
    customerNumber?: string | undefined;
    employeeEmail?: string | undefined;
    employeeFirstName?: string | undefined;
    employeeLastName?: string | undefined;
    employeeNumber?: string | undefined;
    /** from dbo.location.location_code this is the original value without the calculated value of the location_prefix  */
    locationCodeOrigValue?: string | undefined;
    /** example, if location_code = ''Room 101', location_prefix is 'Parent 1', then LocationFullPath would be 'Parent 1\Room 1' */
    locationCode?: string | undefined;
    /** example, if location_code = ''Room 101', location_prefix is 'Parent 1', then LocationFullPath would be 'Parent 1\Room 1' */
    locationFullPath?: string | undefined;
    /** example, if location_code = ''Room 101', location_prefix is 'Parent 1', then LocationFullPath would be 'Parent 1\Room 1' */
    locationPrefix?: string | undefined;
    parentContainerId?: string | undefined;
    /** Wasp-Remove-Obsolete-Field */
    containerTag?: string | undefined;
    locationDescription?: string | undefined;
    reasonCode?: string | undefined;
    reasonLangLabel?: string | undefined;
    siteDescription?: string | undefined;
    siteName?: string | undefined;
    supplierContactEmail?: string | undefined;
    supplierContactName?: string | undefined;
    supplierEmail?: string | undefined;
    supplierName?: string | undefined;
    supplierNumber?: string | undefined;
    supplierWebsite?: string | undefined;
    transExtCustom1?: string | undefined;
    transExtCustom10?: string | undefined;
    transExtCustom2?: string | undefined;
    transExtCustom3?: string | undefined;
    transExtCustom4?: string | undefined;
    transExtCustom5?: string | undefined;
    transExtCustom6?: string | undefined;
    transExtCustom7?: string | undefined;
    transExtCustom8?: string | undefined;
    transExtCustom9?: string | undefined;
    transExtCustomer?: string | undefined;
    transExtReferenceNumber?: string | undefined;
    transExtSupplier?: string | undefined;
    transExtSalesPrice?: number | undefined;
    transTypeDescription?: string | undefined;
    transTypeLangLabel?: string | undefined;
    userEmail?: string | undefined;
    userFirstName?: string | undefined;
    userLastName?: string | undefined;
    userTitle?: string | undefined;
    userId!: string;
    assetTransDate!: Date;
    sortingIndex!: number;
    userLogon?: string | undefined;
    reasonId?: number | undefined;
    assetTransEntryDate!: Date;
    customerFirstName?: string | undefined;
    customerLastName?: string | undefined;
    serialNumber?: string | undefined;
    userTransactionDate?: Date | undefined;
    transactionCost?: number | undefined;
    category?: string | undefined;
    actionItem?: string | undefined;
    manufacturerName?: string | undefined;
    assignee?: string | undefined;
    customerNameCalculated?: string | undefined;
    vendorSupplierNameCalculated?: string | undefined;
    /** <![CDATA[UPDATE[WaspTrack].[dbo].[form_field_meta] SET ffm_visible_on_grid = 1  where ffm_field like '%due%date%' and form_id = 250
]]> */
    transactionDueDate?: Date | undefined;
    /** Lot, Date Code, Trackby Serial Number, along with possible user-defined field values
help to identify the object/widget. */
    lot?: string | undefined;
    dateCode?: string | undefined;
    /** A reference number that the user may have entered during the capture of a transaction.
Not all transactions require a reference number. */
    refNumber?: string | undefined;
    /** This value, along with the ItemNumber, helps to uniquely identify a container being transacted.
If this field has a value, its transaction quantities are 1 and cannot exceed 1 since the TrackbyContainerId is globally unique.
For example, if TrackbyContainerId-A is being created or moved into TrackbyContainerId-B,
then this field will have the value of TrackbyContainerId; however, the field ParentContainerId would have value of TrackbyContainerId-B.         */
    trackbyContainerId?: string | undefined;
    /** Wasp-Remove-Obsolete-Field */
    licensePlateNumber?: string | undefined;
    baseUomToAlternateUomDivisor?: number | undefined;
    nameOfAlternateUomId?: string | undefined;
    latitude?: number | undefined;
    longitude?: number | undefined;
    altitude?: number | undefined;
    accuracy?: number | undefined;

    constructor(data?: IACEVTransactionHistoryNonIdentityResponseBase) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.transactionUniqueIdentitifer = _data["TransactionUniqueIdentitifer"];
            this.isSystemGenerated = _data["IsSystemGenerated"];
            this.assetTransCheckoutQtyCurrentQty = _data["AssetTransCheckoutQtyCurrentQty"];
            this.assetTransCost = _data["AssetTransCost"];
            this.assetTransCurrentQty = _data["AssetTransCurrentQty"];
            this.assetTransQtyCurrentQty = _data["AssetTransQtyCurrentQty"];
            this.assetTransQuantity = _data["AssetTransQuantity"];
            this.currentQtyInstantaneouslyAtLocationKeyId = _data["CurrentQtyInstantaneouslyAtLocationKeyId"];
            this.assetDefaultCost = _data["AssetDefaultCost"];
            this.orderNumber = _data["OrderNumber"];
            this.assetTransBatchNo = _data["AssetTransBatchNo"];
            this.assetDescription = _data["AssetDescription"];
            this.assetModel = _data["AssetModel"];
            this.assetSerialNumber = _data["AssetSerialNumber"];
            this.assetTag = _data["AssetTag"];
            this.assetTransReceiptNum = _data["AssetTransReceiptNum"];
            this.assetTransRecordSource = _data["AssetTransRecordSource"];
            this.assetTypeDescription = _data["AssetTypeDescription"];
            this.assetTypeModelNumber = _data["AssetTypeModelNumber"];
            this.assetTypeNumber = _data["AssetTypeNumber"];
            this.customerCompanyName = _data["CustomerCompanyName"];
            this.customerContactEmail = _data["CustomerContactEmail"];
            this.customerContactFirstName = _data["CustomerContactFirstName"];
            this.customerContactLastName = _data["CustomerContactLastName"];
            this.customerNumber = _data["CustomerNumber"];
            this.employeeEmail = _data["EmployeeEmail"];
            this.employeeFirstName = _data["EmployeeFirstName"];
            this.employeeLastName = _data["EmployeeLastName"];
            this.employeeNumber = _data["EmployeeNumber"];
            this.locationCodeOrigValue = _data["LocationCodeOrigValue"];
            this.locationCode = _data["LocationCode"];
            this.locationFullPath = _data["LocationFullPath"];
            this.locationPrefix = _data["LocationPrefix"];
            this.parentContainerId = _data["ParentContainerId"];
            this.containerTag = _data["ContainerTag"];
            this.locationDescription = _data["LocationDescription"];
            this.reasonCode = _data["ReasonCode"];
            this.reasonLangLabel = _data["ReasonLangLabel"];
            this.siteDescription = _data["SiteDescription"];
            this.siteName = _data["SiteName"];
            this.supplierContactEmail = _data["SupplierContactEmail"];
            this.supplierContactName = _data["SupplierContactName"];
            this.supplierEmail = _data["SupplierEmail"];
            this.supplierName = _data["SupplierName"];
            this.supplierNumber = _data["SupplierNumber"];
            this.supplierWebsite = _data["SupplierWebsite"];
            this.transExtCustom1 = _data["TransExtCustom1"];
            this.transExtCustom10 = _data["TransExtCustom10"];
            this.transExtCustom2 = _data["TransExtCustom2"];
            this.transExtCustom3 = _data["TransExtCustom3"];
            this.transExtCustom4 = _data["TransExtCustom4"];
            this.transExtCustom5 = _data["TransExtCustom5"];
            this.transExtCustom6 = _data["TransExtCustom6"];
            this.transExtCustom7 = _data["TransExtCustom7"];
            this.transExtCustom8 = _data["TransExtCustom8"];
            this.transExtCustom9 = _data["TransExtCustom9"];
            this.transExtCustomer = _data["TransExtCustomer"];
            this.transExtReferenceNumber = _data["TransExtReferenceNumber"];
            this.transExtSupplier = _data["TransExtSupplier"];
            this.transExtSalesPrice = _data["TransExtSalesPrice"];
            this.transTypeDescription = _data["TransTypeDescription"];
            this.transTypeLangLabel = _data["TransTypeLangLabel"];
            this.userEmail = _data["UserEmail"];
            this.userFirstName = _data["UserFirstName"];
            this.userLastName = _data["UserLastName"];
            this.userTitle = _data["UserTitle"];
            this.userId = _data["UserId"];
            this.assetTransDate = _data["AssetTransDate"] ? new Date(_data["AssetTransDate"].toString()) : <any>undefined;
            this.sortingIndex = _data["SortingIndex"];
            this.userLogon = _data["UserLogon"];
            this.reasonId = _data["ReasonId"];
            this.assetTransEntryDate = _data["AssetTransEntryDate"] ? new Date(_data["AssetTransEntryDate"].toString()) : <any>undefined;
            this.customerFirstName = _data["CustomerFirstName"];
            this.customerLastName = _data["CustomerLastName"];
            this.serialNumber = _data["SerialNumber"];
            this.userTransactionDate = _data["UserTransactionDate"] ? new Date(_data["UserTransactionDate"].toString()) : <any>undefined;
            this.transactionCost = _data["TransactionCost"];
            this.category = _data["Category"];
            this.actionItem = _data["ActionItem"];
            this.manufacturerName = _data["ManufacturerName"];
            this.assignee = _data["Assignee"];
            this.customerNameCalculated = _data["CustomerNameCalculated"];
            this.vendorSupplierNameCalculated = _data["VendorSupplierNameCalculated"];
            this.transactionDueDate = _data["TransactionDueDate"] ? new Date(_data["TransactionDueDate"].toString()) : <any>undefined;
            this.lot = _data["Lot"];
            this.dateCode = _data["DateCode"];
            this.refNumber = _data["RefNumber"];
            this.trackbyContainerId = _data["TrackbyContainerId"];
            this.licensePlateNumber = _data["LicensePlateNumber"];
            this.baseUomToAlternateUomDivisor = _data["BaseUomToAlternateUomDivisor"];
            this.nameOfAlternateUomId = _data["NameOfAlternateUomId"];
            this.latitude = _data["Latitude"];
            this.longitude = _data["Longitude"];
            this.altitude = _data["Altitude"];
            this.accuracy = _data["Accuracy"];
        }
    }

    static fromJS(data: any): ACEVTransactionHistoryNonIdentityResponseBase {
        data = typeof data === 'object' ? data : {};
        let result = new ACEVTransactionHistoryNonIdentityResponseBase();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TransactionUniqueIdentitifer"] = this.transactionUniqueIdentitifer;
        data["IsSystemGenerated"] = this.isSystemGenerated;
        data["AssetTransCheckoutQtyCurrentQty"] = this.assetTransCheckoutQtyCurrentQty;
        data["AssetTransCost"] = this.assetTransCost;
        data["AssetTransCurrentQty"] = this.assetTransCurrentQty;
        data["AssetTransQtyCurrentQty"] = this.assetTransQtyCurrentQty;
        data["AssetTransQuantity"] = this.assetTransQuantity;
        data["CurrentQtyInstantaneouslyAtLocationKeyId"] = this.currentQtyInstantaneouslyAtLocationKeyId;
        data["AssetDefaultCost"] = this.assetDefaultCost;
        data["OrderNumber"] = this.orderNumber;
        data["AssetTransBatchNo"] = this.assetTransBatchNo;
        data["AssetDescription"] = this.assetDescription;
        data["AssetModel"] = this.assetModel;
        data["AssetSerialNumber"] = this.assetSerialNumber;
        data["AssetTag"] = this.assetTag;
        data["AssetTransReceiptNum"] = this.assetTransReceiptNum;
        data["AssetTransRecordSource"] = this.assetTransRecordSource;
        data["AssetTypeDescription"] = this.assetTypeDescription;
        data["AssetTypeModelNumber"] = this.assetTypeModelNumber;
        data["AssetTypeNumber"] = this.assetTypeNumber;
        data["CustomerCompanyName"] = this.customerCompanyName;
        data["CustomerContactEmail"] = this.customerContactEmail;
        data["CustomerContactFirstName"] = this.customerContactFirstName;
        data["CustomerContactLastName"] = this.customerContactLastName;
        data["CustomerNumber"] = this.customerNumber;
        data["EmployeeEmail"] = this.employeeEmail;
        data["EmployeeFirstName"] = this.employeeFirstName;
        data["EmployeeLastName"] = this.employeeLastName;
        data["EmployeeNumber"] = this.employeeNumber;
        data["LocationCodeOrigValue"] = this.locationCodeOrigValue;
        data["LocationCode"] = this.locationCode;
        data["LocationFullPath"] = this.locationFullPath;
        data["LocationPrefix"] = this.locationPrefix;
        data["ParentContainerId"] = this.parentContainerId;
        data["ContainerTag"] = this.containerTag;
        data["LocationDescription"] = this.locationDescription;
        data["ReasonCode"] = this.reasonCode;
        data["ReasonLangLabel"] = this.reasonLangLabel;
        data["SiteDescription"] = this.siteDescription;
        data["SiteName"] = this.siteName;
        data["SupplierContactEmail"] = this.supplierContactEmail;
        data["SupplierContactName"] = this.supplierContactName;
        data["SupplierEmail"] = this.supplierEmail;
        data["SupplierName"] = this.supplierName;
        data["SupplierNumber"] = this.supplierNumber;
        data["SupplierWebsite"] = this.supplierWebsite;
        data["TransExtCustom1"] = this.transExtCustom1;
        data["TransExtCustom10"] = this.transExtCustom10;
        data["TransExtCustom2"] = this.transExtCustom2;
        data["TransExtCustom3"] = this.transExtCustom3;
        data["TransExtCustom4"] = this.transExtCustom4;
        data["TransExtCustom5"] = this.transExtCustom5;
        data["TransExtCustom6"] = this.transExtCustom6;
        data["TransExtCustom7"] = this.transExtCustom7;
        data["TransExtCustom8"] = this.transExtCustom8;
        data["TransExtCustom9"] = this.transExtCustom9;
        data["TransExtCustomer"] = this.transExtCustomer;
        data["TransExtReferenceNumber"] = this.transExtReferenceNumber;
        data["TransExtSupplier"] = this.transExtSupplier;
        data["TransExtSalesPrice"] = this.transExtSalesPrice;
        data["TransTypeDescription"] = this.transTypeDescription;
        data["TransTypeLangLabel"] = this.transTypeLangLabel;
        data["UserEmail"] = this.userEmail;
        data["UserFirstName"] = this.userFirstName;
        data["UserLastName"] = this.userLastName;
        data["UserTitle"] = this.userTitle;
        data["UserId"] = this.userId;
        data["AssetTransDate"] = this.assetTransDate ? this.assetTransDate.toISOString() : <any>undefined;
        data["SortingIndex"] = this.sortingIndex;
        data["UserLogon"] = this.userLogon;
        data["ReasonId"] = this.reasonId;
        data["AssetTransEntryDate"] = this.assetTransEntryDate ? this.assetTransEntryDate.toISOString() : <any>undefined;
        data["CustomerFirstName"] = this.customerFirstName;
        data["CustomerLastName"] = this.customerLastName;
        data["SerialNumber"] = this.serialNumber;
        data["UserTransactionDate"] = this.userTransactionDate ? this.userTransactionDate.toISOString() : <any>undefined;
        data["TransactionCost"] = this.transactionCost;
        data["Category"] = this.category;
        data["ActionItem"] = this.actionItem;
        data["ManufacturerName"] = this.manufacturerName;
        data["Assignee"] = this.assignee;
        data["CustomerNameCalculated"] = this.customerNameCalculated;
        data["VendorSupplierNameCalculated"] = this.vendorSupplierNameCalculated;
        data["TransactionDueDate"] = this.transactionDueDate ? this.transactionDueDate.toISOString() : <any>undefined;
        data["Lot"] = this.lot;
        data["DateCode"] = this.dateCode;
        data["RefNumber"] = this.refNumber;
        data["TrackbyContainerId"] = this.trackbyContainerId;
        data["LicensePlateNumber"] = this.licensePlateNumber;
        data["BaseUomToAlternateUomDivisor"] = this.baseUomToAlternateUomDivisor;
        data["NameOfAlternateUomId"] = this.nameOfAlternateUomId;
        data["Latitude"] = this.latitude;
        data["Longitude"] = this.longitude;
        data["Altitude"] = this.altitude;
        data["Accuracy"] = this.accuracy;
        return data; 
    }
}

export interface IACEVTransactionHistoryNonIdentityResponseBase {
    transactionUniqueIdentitifer?: string | undefined;
    isSystemGenerated?: boolean | undefined;
    assetTransCheckoutQtyCurrentQty?: number | undefined;
    assetTransCost?: number | undefined;
    assetTransCurrentQty?: number | undefined;
    assetTransQtyCurrentQty?: number | undefined;
    assetTransQuantity?: number | undefined;
    currentQtyInstantaneouslyAtLocationKeyId?: number | undefined;
    assetDefaultCost?: number | undefined;
    orderNumber?: string | undefined;
    assetTransBatchNo?: string | undefined;
    assetDescription?: string | undefined;
    assetModel?: string | undefined;
    assetSerialNumber?: string | undefined;
    assetTag?: string | undefined;
    assetTransReceiptNum?: string | undefined;
    assetTransRecordSource?: string | undefined;
    assetTypeDescription?: string | undefined;
    assetTypeModelNumber?: string | undefined;
    assetTypeNumber?: string | undefined;
    customerCompanyName?: string | undefined;
    customerContactEmail?: string | undefined;
    customerContactFirstName?: string | undefined;
    customerContactLastName?: string | undefined;
    customerNumber?: string | undefined;
    employeeEmail?: string | undefined;
    employeeFirstName?: string | undefined;
    employeeLastName?: string | undefined;
    employeeNumber?: string | undefined;
    /** from dbo.location.location_code this is the original value without the calculated value of the location_prefix  */
    locationCodeOrigValue?: string | undefined;
    /** example, if location_code = ''Room 101', location_prefix is 'Parent 1', then LocationFullPath would be 'Parent 1\Room 1' */
    locationCode?: string | undefined;
    /** example, if location_code = ''Room 101', location_prefix is 'Parent 1', then LocationFullPath would be 'Parent 1\Room 1' */
    locationFullPath?: string | undefined;
    /** example, if location_code = ''Room 101', location_prefix is 'Parent 1', then LocationFullPath would be 'Parent 1\Room 1' */
    locationPrefix?: string | undefined;
    parentContainerId?: string | undefined;
    /** Wasp-Remove-Obsolete-Field */
    containerTag?: string | undefined;
    locationDescription?: string | undefined;
    reasonCode?: string | undefined;
    reasonLangLabel?: string | undefined;
    siteDescription?: string | undefined;
    siteName?: string | undefined;
    supplierContactEmail?: string | undefined;
    supplierContactName?: string | undefined;
    supplierEmail?: string | undefined;
    supplierName?: string | undefined;
    supplierNumber?: string | undefined;
    supplierWebsite?: string | undefined;
    transExtCustom1?: string | undefined;
    transExtCustom10?: string | undefined;
    transExtCustom2?: string | undefined;
    transExtCustom3?: string | undefined;
    transExtCustom4?: string | undefined;
    transExtCustom5?: string | undefined;
    transExtCustom6?: string | undefined;
    transExtCustom7?: string | undefined;
    transExtCustom8?: string | undefined;
    transExtCustom9?: string | undefined;
    transExtCustomer?: string | undefined;
    transExtReferenceNumber?: string | undefined;
    transExtSupplier?: string | undefined;
    transExtSalesPrice?: number | undefined;
    transTypeDescription?: string | undefined;
    transTypeLangLabel?: string | undefined;
    userEmail?: string | undefined;
    userFirstName?: string | undefined;
    userLastName?: string | undefined;
    userTitle?: string | undefined;
    userId: string;
    assetTransDate: Date;
    sortingIndex: number;
    userLogon?: string | undefined;
    reasonId?: number | undefined;
    assetTransEntryDate: Date;
    customerFirstName?: string | undefined;
    customerLastName?: string | undefined;
    serialNumber?: string | undefined;
    userTransactionDate?: Date | undefined;
    transactionCost?: number | undefined;
    category?: string | undefined;
    actionItem?: string | undefined;
    manufacturerName?: string | undefined;
    assignee?: string | undefined;
    customerNameCalculated?: string | undefined;
    vendorSupplierNameCalculated?: string | undefined;
    /** <![CDATA[UPDATE[WaspTrack].[dbo].[form_field_meta] SET ffm_visible_on_grid = 1  where ffm_field like '%due%date%' and form_id = 250
]]> */
    transactionDueDate?: Date | undefined;
    /** Lot, Date Code, Trackby Serial Number, along with possible user-defined field values
help to identify the object/widget. */
    lot?: string | undefined;
    dateCode?: string | undefined;
    /** A reference number that the user may have entered during the capture of a transaction.
Not all transactions require a reference number. */
    refNumber?: string | undefined;
    /** This value, along with the ItemNumber, helps to uniquely identify a container being transacted.
If this field has a value, its transaction quantities are 1 and cannot exceed 1 since the TrackbyContainerId is globally unique.
For example, if TrackbyContainerId-A is being created or moved into TrackbyContainerId-B,
then this field will have the value of TrackbyContainerId; however, the field ParentContainerId would have value of TrackbyContainerId-B.         */
    trackbyContainerId?: string | undefined;
    /** Wasp-Remove-Obsolete-Field */
    licensePlateNumber?: string | undefined;
    baseUomToAlternateUomDivisor?: number | undefined;
    nameOfAlternateUomId?: string | undefined;
    latitude?: number | undefined;
    longitude?: number | undefined;
    altitude?: number | undefined;
    accuracy?: number | undefined;
}

export class WaspResultOfListOfTransactionHistoryNotesBaseResponseModel implements IWaspResultOfListOfTransactionHistoryNotesBaseResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: TransactionHistoryNotesBaseResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfTransactionHistoryNotesBaseResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(TransactionHistoryNotesBaseResponseModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfTransactionHistoryNotesBaseResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfTransactionHistoryNotesBaseResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfTransactionHistoryNotesBaseResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: TransactionHistoryNotesBaseResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

/** This model is for public api and should NOT contain identity fields. */
export class TransactionHistoryNotesBaseResponseModel implements ITransactionHistoryNotesBaseResponseModel {
    /** for public api, this is the value which uniquely identities the transaction history record. */
    transactionUniqueIdentitifier?: string | undefined;
    noteDate?: Date | undefined;
    noteText?: string | undefined;
    userId?: string | undefined;
    userEmail?: string | undefined;
    userFirstName?: string | undefined;
    userLastName?: string | undefined;
    userLogon?: string | undefined;
    userTitle?: string | undefined;

    constructor(data?: ITransactionHistoryNotesBaseResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.transactionUniqueIdentitifier = _data["TransactionUniqueIdentitifier"];
            this.noteDate = _data["NoteDate"] ? new Date(_data["NoteDate"].toString()) : <any>undefined;
            this.noteText = _data["NoteText"];
            this.userId = _data["UserId"];
            this.userEmail = _data["UserEmail"];
            this.userFirstName = _data["UserFirstName"];
            this.userLastName = _data["UserLastName"];
            this.userLogon = _data["UserLogon"];
            this.userTitle = _data["UserTitle"];
        }
    }

    static fromJS(data: any): TransactionHistoryNotesBaseResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionHistoryNotesBaseResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TransactionUniqueIdentitifier"] = this.transactionUniqueIdentitifier;
        data["NoteDate"] = this.noteDate ? this.noteDate.toISOString() : <any>undefined;
        data["NoteText"] = this.noteText;
        data["UserId"] = this.userId;
        data["UserEmail"] = this.userEmail;
        data["UserFirstName"] = this.userFirstName;
        data["UserLastName"] = this.userLastName;
        data["UserLogon"] = this.userLogon;
        data["UserTitle"] = this.userTitle;
        return data; 
    }
}

/** This model is for public api and should NOT contain identity fields. */
export interface ITransactionHistoryNotesBaseResponseModel {
    /** for public api, this is the value which uniquely identities the transaction history record. */
    transactionUniqueIdentitifier?: string | undefined;
    noteDate?: Date | undefined;
    noteText?: string | undefined;
    userId?: string | undefined;
    userEmail?: string | undefined;
    userFirstName?: string | undefined;
    userLastName?: string | undefined;
    userLogon?: string | undefined;
    userTitle?: string | undefined;
}

export class WaspResultOfListOfTransactionHistoryResponseModel implements IWaspResultOfListOfTransactionHistoryResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: TransactionHistoryResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfTransactionHistoryResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(TransactionHistoryResponseModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfTransactionHistoryResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfTransactionHistoryResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfTransactionHistoryResponseModel {
    /** Type specific result that always depends on the function called. */
    data?: TransactionHistoryResponseModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class ACEVTransactionHistoryResponseBase extends ACEVTransactionHistoryNonIdentityResponseBase implements IACEVTransactionHistoryResponseBase {
    transTypeNo!: number;
    alternateCaptureUomId?: number | undefined;
    assetClassId!: number;
    assetId!: number;
    assetTransactionId!: number;
    assetTypeCategoryId!: number;
    assetTypeId!: number;
    assetTypeManufacturerId!: number;
    assetTypeSupplierId!: number;
    conditionId!: number;
    manufacturerId!: number;
    rowNumber!: number;
    siteId!: number;
    trackbyId!: number;
    transUserRoleId!: number;
    assetTransactionCostKeyId?: number | undefined;
    assetTransactionIdRank?: number | undefined;
    assetTransactionLocationKeyId?: number | undefined;
    assetTransOtherAssetId?: number | undefined;
    assetTransOtherTransId?: number | undefined;
    customerId?: number | undefined;
    departmentId?: number | undefined;
    disposeReasonId?: number | undefined;
    employeeId?: number | undefined;
    employeeManagerId?: number | undefined;
    locationId?: number | undefined;
    containerId?: number | undefined;
    atlkContainerLocationId!: number;
    organizationId?: number | undefined;
    poId?: number | undefined;
    orderLineId?: number | undefined;
    supplierId?: number | undefined;
    transUserDepartmentId?: number | undefined;
    userManagerId?: number | undefined;
    userType?: number | undefined;
    employeeUserId?: string | undefined;
    assetApplicationId!: number;
    transactionApplicationId!: number;
    transQtyUsingAlternateUomId?: number | undefined;

    constructor(data?: IACEVTransactionHistoryResponseBase) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.transTypeNo = _data["TransTypeNo"];
            this.alternateCaptureUomId = _data["AlternateCaptureUomId"];
            this.assetClassId = _data["AssetClassId"];
            this.assetId = _data["AssetId"];
            this.assetTransactionId = _data["AssetTransactionId"];
            this.assetTypeCategoryId = _data["AssetTypeCategoryId"];
            this.assetTypeId = _data["AssetTypeId"];
            this.assetTypeManufacturerId = _data["AssetTypeManufacturerId"];
            this.assetTypeSupplierId = _data["AssetTypeSupplierId"];
            this.conditionId = _data["ConditionId"];
            this.manufacturerId = _data["ManufacturerId"];
            this.rowNumber = _data["RowNumber"];
            this.siteId = _data["SiteId"];
            this.trackbyId = _data["TrackbyId"];
            this.transUserRoleId = _data["TransUserRoleId"];
            this.assetTransactionCostKeyId = _data["AssetTransactionCostKeyId"];
            this.assetTransactionIdRank = _data["AssetTransactionIdRank"];
            this.assetTransactionLocationKeyId = _data["AssetTransactionLocationKeyId"];
            this.assetTransOtherAssetId = _data["AssetTransOtherAssetId"];
            this.assetTransOtherTransId = _data["AssetTransOtherTransId"];
            this.customerId = _data["CustomerId"];
            this.departmentId = _data["DepartmentId"];
            this.disposeReasonId = _data["DisposeReasonId"];
            this.employeeId = _data["EmployeeId"];
            this.employeeManagerId = _data["EmployeeManagerId"];
            this.locationId = _data["LocationId"];
            this.containerId = _data["ContainerId"];
            this.atlkContainerLocationId = _data["AtlkContainerLocationId"];
            this.organizationId = _data["OrganizationId"];
            this.poId = _data["PoId"];
            this.orderLineId = _data["OrderLineId"];
            this.supplierId = _data["SupplierId"];
            this.transUserDepartmentId = _data["TransUserDepartmentId"];
            this.userManagerId = _data["UserManagerId"];
            this.userType = _data["UserType"];
            this.employeeUserId = _data["EmployeeUserId"];
            this.assetApplicationId = _data["AssetApplicationId"];
            this.transactionApplicationId = _data["TransactionApplicationId"];
            this.transQtyUsingAlternateUomId = _data["TransQtyUsingAlternateUomId"];
        }
    }

    static fromJS(data: any): ACEVTransactionHistoryResponseBase {
        data = typeof data === 'object' ? data : {};
        let result = new ACEVTransactionHistoryResponseBase();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TransTypeNo"] = this.transTypeNo;
        data["AlternateCaptureUomId"] = this.alternateCaptureUomId;
        data["AssetClassId"] = this.assetClassId;
        data["AssetId"] = this.assetId;
        data["AssetTransactionId"] = this.assetTransactionId;
        data["AssetTypeCategoryId"] = this.assetTypeCategoryId;
        data["AssetTypeId"] = this.assetTypeId;
        data["AssetTypeManufacturerId"] = this.assetTypeManufacturerId;
        data["AssetTypeSupplierId"] = this.assetTypeSupplierId;
        data["ConditionId"] = this.conditionId;
        data["ManufacturerId"] = this.manufacturerId;
        data["RowNumber"] = this.rowNumber;
        data["SiteId"] = this.siteId;
        data["TrackbyId"] = this.trackbyId;
        data["TransUserRoleId"] = this.transUserRoleId;
        data["AssetTransactionCostKeyId"] = this.assetTransactionCostKeyId;
        data["AssetTransactionIdRank"] = this.assetTransactionIdRank;
        data["AssetTransactionLocationKeyId"] = this.assetTransactionLocationKeyId;
        data["AssetTransOtherAssetId"] = this.assetTransOtherAssetId;
        data["AssetTransOtherTransId"] = this.assetTransOtherTransId;
        data["CustomerId"] = this.customerId;
        data["DepartmentId"] = this.departmentId;
        data["DisposeReasonId"] = this.disposeReasonId;
        data["EmployeeId"] = this.employeeId;
        data["EmployeeManagerId"] = this.employeeManagerId;
        data["LocationId"] = this.locationId;
        data["ContainerId"] = this.containerId;
        data["AtlkContainerLocationId"] = this.atlkContainerLocationId;
        data["OrganizationId"] = this.organizationId;
        data["PoId"] = this.poId;
        data["OrderLineId"] = this.orderLineId;
        data["SupplierId"] = this.supplierId;
        data["TransUserDepartmentId"] = this.transUserDepartmentId;
        data["UserManagerId"] = this.userManagerId;
        data["UserType"] = this.userType;
        data["EmployeeUserId"] = this.employeeUserId;
        data["AssetApplicationId"] = this.assetApplicationId;
        data["TransactionApplicationId"] = this.transactionApplicationId;
        data["TransQtyUsingAlternateUomId"] = this.transQtyUsingAlternateUomId;
        super.toJSON(data);
        return data; 
    }
}

export interface IACEVTransactionHistoryResponseBase extends IACEVTransactionHistoryNonIdentityResponseBase {
    transTypeNo: number;
    alternateCaptureUomId?: number | undefined;
    assetClassId: number;
    assetId: number;
    assetTransactionId: number;
    assetTypeCategoryId: number;
    assetTypeId: number;
    assetTypeManufacturerId: number;
    assetTypeSupplierId: number;
    conditionId: number;
    manufacturerId: number;
    rowNumber: number;
    siteId: number;
    trackbyId: number;
    transUserRoleId: number;
    assetTransactionCostKeyId?: number | undefined;
    assetTransactionIdRank?: number | undefined;
    assetTransactionLocationKeyId?: number | undefined;
    assetTransOtherAssetId?: number | undefined;
    assetTransOtherTransId?: number | undefined;
    customerId?: number | undefined;
    departmentId?: number | undefined;
    disposeReasonId?: number | undefined;
    employeeId?: number | undefined;
    employeeManagerId?: number | undefined;
    locationId?: number | undefined;
    containerId?: number | undefined;
    atlkContainerLocationId: number;
    organizationId?: number | undefined;
    poId?: number | undefined;
    orderLineId?: number | undefined;
    supplierId?: number | undefined;
    transUserDepartmentId?: number | undefined;
    userManagerId?: number | undefined;
    userType?: number | undefined;
    employeeUserId?: string | undefined;
    assetApplicationId: number;
    transactionApplicationId: number;
    transQtyUsingAlternateUomId?: number | undefined;
}

export class ACEVTransactionHistoryResponseModel extends ACEVTransactionHistoryResponseBase implements IACEVTransactionHistoryResponseModel {

    constructor(data?: IACEVTransactionHistoryResponseModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): ACEVTransactionHistoryResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new ACEVTransactionHistoryResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface IACEVTransactionHistoryResponseModel extends IACEVTransactionHistoryResponseBase {
}

export class TransactionHistoryResponseModel extends ACEVTransactionHistoryResponseModel implements ITransactionHistoryResponseModel {
    otherSiteName?: string | undefined;
    waspInternalArchiveDate?: Date | undefined;
    otherLocationCode?: string | undefined;
    departmentCode?: string | undefined;
    /** if the user attaches one or more binary data buffer (or file) to a transaction, 
then the attached binary data will be returned here */
    transactionAttachments?: TransactionHistoryAttachmentResponseModel[] | undefined;
    /** if the user attaches one or more notes (comments/text) to a transaction,
then the user text/comments will be returned in this field */
    transactionNotes?: TransactionHistoryNotesResponseModel[] | undefined;
    hasNotes?: string | undefined;
    hasSignature?: string | undefined;
    salesPrice?: number | undefined;

    constructor(data?: ITransactionHistoryResponseModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.otherSiteName = _data["OtherSiteName"];
            this.waspInternalArchiveDate = _data["WaspInternalArchiveDate"] ? new Date(_data["WaspInternalArchiveDate"].toString()) : <any>undefined;
            this.otherLocationCode = _data["OtherLocationCode"];
            this.departmentCode = _data["DepartmentCode"];
            if (Array.isArray(_data["TransactionAttachments"])) {
                this.transactionAttachments = [] as any;
                for (let item of _data["TransactionAttachments"])
                    this.transactionAttachments!.push(TransactionHistoryAttachmentResponseModel.fromJS(item));
            }
            if (Array.isArray(_data["TransactionNotes"])) {
                this.transactionNotes = [] as any;
                for (let item of _data["TransactionNotes"])
                    this.transactionNotes!.push(TransactionHistoryNotesResponseModel.fromJS(item));
            }
            this.hasNotes = _data["HasNotes"];
            this.hasSignature = _data["HasSignature"];
            this.salesPrice = _data["SalesPrice"];
        }
    }

    static fromJS(data: any): TransactionHistoryResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionHistoryResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["OtherSiteName"] = this.otherSiteName;
        data["WaspInternalArchiveDate"] = this.waspInternalArchiveDate ? this.waspInternalArchiveDate.toISOString() : <any>undefined;
        data["OtherLocationCode"] = this.otherLocationCode;
        data["DepartmentCode"] = this.departmentCode;
        if (Array.isArray(this.transactionAttachments)) {
            data["TransactionAttachments"] = [];
            for (let item of this.transactionAttachments)
                data["TransactionAttachments"].push(item.toJSON());
        }
        if (Array.isArray(this.transactionNotes)) {
            data["TransactionNotes"] = [];
            for (let item of this.transactionNotes)
                data["TransactionNotes"].push(item.toJSON());
        }
        data["HasNotes"] = this.hasNotes;
        data["HasSignature"] = this.hasSignature;
        data["SalesPrice"] = this.salesPrice;
        super.toJSON(data);
        return data; 
    }
}

export interface ITransactionHistoryResponseModel extends IACEVTransactionHistoryResponseModel {
    otherSiteName?: string | undefined;
    waspInternalArchiveDate?: Date | undefined;
    otherLocationCode?: string | undefined;
    departmentCode?: string | undefined;
    /** if the user attaches one or more binary data buffer (or file) to a transaction, 
then the attached binary data will be returned here */
    transactionAttachments?: TransactionHistoryAttachmentResponseModel[] | undefined;
    /** if the user attaches one or more notes (comments/text) to a transaction,
then the user text/comments will be returned in this field */
    transactionNotes?: TransactionHistoryNotesResponseModel[] | undefined;
    hasNotes?: string | undefined;
    hasSignature?: string | undefined;
    salesPrice?: number | undefined;
}

export class TransactionHistoryAttachmentResponseModel implements ITransactionHistoryAttachmentResponseModel {
    transactionId!: number;
    attachmentId!: number;
    attachmentIsDefault?: boolean | undefined;
    attachmentRecordStatus!: number;
    attachmentGuid?: string | undefined;
    attachmentDataType?: string | undefined;
    attachmentDataSize?: number | undefined;
    attachmentData?: string | undefined;
    attachmentUriPath?: string | undefined;
    attachmentFileName?: string | undefined;

    constructor(data?: ITransactionHistoryAttachmentResponseModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.transactionId = _data["TransactionId"];
            this.attachmentId = _data["AttachmentId"];
            this.attachmentIsDefault = _data["AttachmentIsDefault"];
            this.attachmentRecordStatus = _data["AttachmentRecordStatus"];
            this.attachmentGuid = _data["AttachmentGuid"];
            this.attachmentDataType = _data["AttachmentDataType"];
            this.attachmentDataSize = _data["AttachmentDataSize"];
            this.attachmentData = _data["AttachmentData"];
            this.attachmentUriPath = _data["AttachmentUriPath"];
            this.attachmentFileName = _data["AttachmentFileName"];
        }
    }

    static fromJS(data: any): TransactionHistoryAttachmentResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionHistoryAttachmentResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TransactionId"] = this.transactionId;
        data["AttachmentId"] = this.attachmentId;
        data["AttachmentIsDefault"] = this.attachmentIsDefault;
        data["AttachmentRecordStatus"] = this.attachmentRecordStatus;
        data["AttachmentGuid"] = this.attachmentGuid;
        data["AttachmentDataType"] = this.attachmentDataType;
        data["AttachmentDataSize"] = this.attachmentDataSize;
        data["AttachmentData"] = this.attachmentData;
        data["AttachmentUriPath"] = this.attachmentUriPath;
        data["AttachmentFileName"] = this.attachmentFileName;
        return data; 
    }
}

export interface ITransactionHistoryAttachmentResponseModel {
    transactionId: number;
    attachmentId: number;
    attachmentIsDefault?: boolean | undefined;
    attachmentRecordStatus: number;
    attachmentGuid?: string | undefined;
    attachmentDataType?: string | undefined;
    attachmentDataSize?: number | undefined;
    attachmentData?: string | undefined;
    attachmentUriPath?: string | undefined;
    attachmentFileName?: string | undefined;
}

export class TransactionHistoryNotesResponseModel extends TransactionHistoryNotesBaseResponseModel implements ITransactionHistoryNotesResponseModel {
    transactionId!: number;
    noteId!: number;

    constructor(data?: ITransactionHistoryNotesResponseModel) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
        if (_data) {
            this.transactionId = _data["TransactionId"];
            this.noteId = _data["NoteId"];
        }
    }

    static fromJS(data: any): TransactionHistoryNotesResponseModel {
        data = typeof data === 'object' ? data : {};
        let result = new TransactionHistoryNotesResponseModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["TransactionId"] = this.transactionId;
        data["NoteId"] = this.noteId;
        super.toJSON(data);
        return data; 
    }
}

export interface ITransactionHistoryNotesResponseModel extends ITransactionHistoryNotesBaseResponseModel {
    transactionId: number;
    noteId: number;
}

export class WaspResultOfListOfAssetTransactionHistoryModel implements IWaspResultOfListOfAssetTransactionHistoryModel {
    /** Type specific result that always depends on the function called. */
    data?: AssetTransactionHistoryModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfAssetTransactionHistoryModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(AssetTransactionHistoryModel.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfAssetTransactionHistoryModel {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfAssetTransactionHistoryModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfAssetTransactionHistoryModel {
    /** Type specific result that always depends on the function called. */
    data?: AssetTransactionHistoryModel[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class AssetTransactionHistoryModel implements IAssetTransactionHistoryModel {
    /** The default cost of the asset, not to be confused with the transaction cost */
    assetDefaultCost?: number | undefined;
    /** The description of the asset */
    assetDescription?: string | undefined;
    /** The asset's model */
    assetModel?: string | undefined;
    /** The serial number of the asset */
    assetSerialNumber?: string | undefined;
    /** The unique identifier of the asset */
    assetTag?: string | undefined;
    /** The cost of the asset during the transaction */
    assetTransCost?: number | undefined;
    /** The quantity of the asset involved in the transaction, one for fixed assets */
    transactionQuantity?: number | undefined;
    /** Optional, the device that performed the transaction (i.e. name of kiosk, mobile device, or PC) */
    recordSource?: string | undefined;
    /** a description of the asset type */
    assetTypeDescription?: string | undefined;
    /** the asset types model */
    assetTypeModelNumber?: string | undefined;
    /** the identifier for the type of asset */
    assetTypeNumber?: string | undefined;
    /** who the asset is checked out to */
    assignee?: string | undefined;
    /** the category of the asset */
    category?: string | undefined;
    /** the group the asset was associated with at the time of the transaction */
    groupTag?: string | undefined;
    /** The customer's company */
    customerCompanyName?: string | undefined;
    /** The customer's contact email */
    customerContactEmail?: string | undefined;
    /** The customer's contact first name */
    customerContactFirstName?: string | undefined;
    /** The customer's contact last name */
    customerContactLastName?: string | undefined;
    /** The customer's first name */
    customerFirstName?: string | undefined;
    /** The customer's last name */
    customerLastName?: string | undefined;
    /** The customer's unique identifier */
    customerNumber?: string | undefined;
    /** The department the asset belongs to */
    departmentCode?: string | undefined;
    /** the employee's email */
    employeeEmail?: string | undefined;
    /** the employee's first name */
    employeeFirstName?: string | undefined;
    /** the employee's last name */
    employeeLastName?: string | undefined;
    /** the employee's unique identifier */
    employeeNumber?: string | undefined;
    /** the geographical latitude of the asset */
    latitude?: number | undefined;
    /** the location of the asset when the transaction took place */
    locationCode?: string | undefined;
    /** the description of the location */
    locationDescription?: string | undefined;
    /** the geographical longitude of the asset */
    longitude?: number | undefined;
    /** the geographical altitude of the asset */
    altitude?: number | undefined;
    /** The accuracy of the geolocation (Latitude, longitude), in meters. */
    accuracy?: number | undefined;
    /** the asset's manufacturer */
    manufacturerName?: string | undefined;
    /** the location of the asset before this transaction occurred */
    otherLocationCode?: string | undefined;
    /** the site of the asset before this transaction occurred */
    otherSiteName?: string | undefined;
    /** the reason for the transaction occurring, typically only on recover or dispose transactions */
    reasonCode?: string | undefined;
    /** the description of the site the asset was at when this transaction occurred */
    siteDescription?: string | undefined;
    /** the name of the site the asset was at when the transaction occurred */
    siteName?: string | undefined;
    /** the vendor's contact email */
    vendorContactEmail?: string | undefined;
    /** the vendor's contact name */
    vendorContactName?: string | undefined;
    /** the vendor's email */
    vendorEmail?: string | undefined;
    /** the vendor's name */
    vendorName?: string | undefined;
    /** the vendor's number */
    vendorNumber?: string | undefined;
    /** the vendor's website */
    vendorWebsite?: string | undefined;
    /** The cost of the asset during the transaction */
    transactionCost?: number | undefined;
    /** the date the asset was due back when this check out transaction occurred */
    dueDate?: Date | undefined;
    /** the date this transaction occurred */
    transactionDate!: Date;
    /** the type of transaction */
    transactionType?: string | undefined;
    /** the email address for the user who performed this transaction */
    userEmail?: string | undefined;
    /** the first name of the user who performed this transaction */
    userFirstName?: string | undefined;
    /** the last name of the user who performed this transaction */
    userLastName?: string | undefined;
    /** the first name of the user who performed this transaction */
    userLogon?: string | undefined;
    /** the first name of the user who performed this transaction */
    userTitle?: string | undefined;
    /** InventoryCloud ONLY - the Lot associated with this inventory record */
    lot?: string | undefined;
    /** InventoryCloud ONLY - the Date Code associated with this inventory record */
    dateCode?: string | undefined;
    /** InventoryCloud ONLY - the Serial Number associated with this inventory record */
    serialNumber?: string | undefined;
    /** InventoryCloud ONLY - the Order Number associated with this transaction record */
    orderNumber?: string | undefined;
    parentContainerId?: string | undefined;
    trackbyContainerId?: string | undefined;

    constructor(data?: IAssetTransactionHistoryModel) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.assetDefaultCost = _data["AssetDefaultCost"];
            this.assetDescription = _data["AssetDescription"];
            this.assetModel = _data["AssetModel"];
            this.assetSerialNumber = _data["AssetSerialNumber"];
            this.assetTag = _data["AssetTag"];
            this.assetTransCost = _data["AssetTransCost"];
            this.transactionQuantity = _data["TransactionQuantity"];
            this.recordSource = _data["RecordSource"];
            this.assetTypeDescription = _data["AssetTypeDescription"];
            this.assetTypeModelNumber = _data["AssetTypeModelNumber"];
            this.assetTypeNumber = _data["AssetTypeNumber"];
            this.assignee = _data["Assignee"];
            this.category = _data["Category"];
            this.groupTag = _data["GroupTag"];
            this.customerCompanyName = _data["CustomerCompanyName"];
            this.customerContactEmail = _data["CustomerContactEmail"];
            this.customerContactFirstName = _data["CustomerContactFirstName"];
            this.customerContactLastName = _data["CustomerContactLastName"];
            this.customerFirstName = _data["CustomerFirstName"];
            this.customerLastName = _data["CustomerLastName"];
            this.customerNumber = _data["CustomerNumber"];
            this.departmentCode = _data["DepartmentCode"];
            this.employeeEmail = _data["EmployeeEmail"];
            this.employeeFirstName = _data["EmployeeFirstName"];
            this.employeeLastName = _data["EmployeeLastName"];
            this.employeeNumber = _data["EmployeeNumber"];
            this.latitude = _data["Latitude"];
            this.locationCode = _data["LocationCode"];
            this.locationDescription = _data["LocationDescription"];
            this.longitude = _data["Longitude"];
            this.altitude = _data["Altitude"];
            this.accuracy = _data["Accuracy"];
            this.manufacturerName = _data["ManufacturerName"];
            this.otherLocationCode = _data["OtherLocationCode"];
            this.otherSiteName = _data["OtherSiteName"];
            this.reasonCode = _data["ReasonCode"];
            this.siteDescription = _data["SiteDescription"];
            this.siteName = _data["SiteName"];
            this.vendorContactEmail = _data["VendorContactEmail"];
            this.vendorContactName = _data["VendorContactName"];
            this.vendorEmail = _data["VendorEmail"];
            this.vendorName = _data["VendorName"];
            this.vendorNumber = _data["VendorNumber"];
            this.vendorWebsite = _data["VendorWebsite"];
            this.transactionCost = _data["TransactionCost"];
            this.dueDate = _data["DueDate"] ? new Date(_data["DueDate"].toString()) : <any>undefined;
            this.transactionDate = _data["TransactionDate"] ? new Date(_data["TransactionDate"].toString()) : <any>undefined;
            this.transactionType = _data["TransactionType"];
            this.userEmail = _data["UserEmail"];
            this.userFirstName = _data["UserFirstName"];
            this.userLastName = _data["UserLastName"];
            this.userLogon = _data["UserLogon"];
            this.userTitle = _data["UserTitle"];
            this.lot = _data["Lot"];
            this.dateCode = _data["DateCode"];
            this.serialNumber = _data["SerialNumber"];
            this.orderNumber = _data["OrderNumber"];
            this.parentContainerId = _data["ParentContainerId"];
            this.trackbyContainerId = _data["TrackbyContainerId"];
        }
    }

    static fromJS(data: any): AssetTransactionHistoryModel {
        data = typeof data === 'object' ? data : {};
        let result = new AssetTransactionHistoryModel();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["AssetDefaultCost"] = this.assetDefaultCost;
        data["AssetDescription"] = this.assetDescription;
        data["AssetModel"] = this.assetModel;
        data["AssetSerialNumber"] = this.assetSerialNumber;
        data["AssetTag"] = this.assetTag;
        data["AssetTransCost"] = this.assetTransCost;
        data["TransactionQuantity"] = this.transactionQuantity;
        data["RecordSource"] = this.recordSource;
        data["AssetTypeDescription"] = this.assetTypeDescription;
        data["AssetTypeModelNumber"] = this.assetTypeModelNumber;
        data["AssetTypeNumber"] = this.assetTypeNumber;
        data["Assignee"] = this.assignee;
        data["Category"] = this.category;
        data["GroupTag"] = this.groupTag;
        data["CustomerCompanyName"] = this.customerCompanyName;
        data["CustomerContactEmail"] = this.customerContactEmail;
        data["CustomerContactFirstName"] = this.customerContactFirstName;
        data["CustomerContactLastName"] = this.customerContactLastName;
        data["CustomerFirstName"] = this.customerFirstName;
        data["CustomerLastName"] = this.customerLastName;
        data["CustomerNumber"] = this.customerNumber;
        data["DepartmentCode"] = this.departmentCode;
        data["EmployeeEmail"] = this.employeeEmail;
        data["EmployeeFirstName"] = this.employeeFirstName;
        data["EmployeeLastName"] = this.employeeLastName;
        data["EmployeeNumber"] = this.employeeNumber;
        data["Latitude"] = this.latitude;
        data["LocationCode"] = this.locationCode;
        data["LocationDescription"] = this.locationDescription;
        data["Longitude"] = this.longitude;
        data["Altitude"] = this.altitude;
        data["Accuracy"] = this.accuracy;
        data["ManufacturerName"] = this.manufacturerName;
        data["OtherLocationCode"] = this.otherLocationCode;
        data["OtherSiteName"] = this.otherSiteName;
        data["ReasonCode"] = this.reasonCode;
        data["SiteDescription"] = this.siteDescription;
        data["SiteName"] = this.siteName;
        data["VendorContactEmail"] = this.vendorContactEmail;
        data["VendorContactName"] = this.vendorContactName;
        data["VendorEmail"] = this.vendorEmail;
        data["VendorName"] = this.vendorName;
        data["VendorNumber"] = this.vendorNumber;
        data["VendorWebsite"] = this.vendorWebsite;
        data["TransactionCost"] = this.transactionCost;
        data["DueDate"] = this.dueDate ? this.dueDate.toISOString() : <any>undefined;
        data["TransactionDate"] = this.transactionDate ? this.transactionDate.toISOString() : <any>undefined;
        data["TransactionType"] = this.transactionType;
        data["UserEmail"] = this.userEmail;
        data["UserFirstName"] = this.userFirstName;
        data["UserLastName"] = this.userLastName;
        data["UserLogon"] = this.userLogon;
        data["UserTitle"] = this.userTitle;
        data["Lot"] = this.lot;
        data["DateCode"] = this.dateCode;
        data["SerialNumber"] = this.serialNumber;
        data["OrderNumber"] = this.orderNumber;
        data["ParentContainerId"] = this.parentContainerId;
        data["TrackbyContainerId"] = this.trackbyContainerId;
        return data; 
    }
}

export interface IAssetTransactionHistoryModel {
    /** The default cost of the asset, not to be confused with the transaction cost */
    assetDefaultCost?: number | undefined;
    /** The description of the asset */
    assetDescription?: string | undefined;
    /** The asset's model */
    assetModel?: string | undefined;
    /** The serial number of the asset */
    assetSerialNumber?: string | undefined;
    /** The unique identifier of the asset */
    assetTag?: string | undefined;
    /** The cost of the asset during the transaction */
    assetTransCost?: number | undefined;
    /** The quantity of the asset involved in the transaction, one for fixed assets */
    transactionQuantity?: number | undefined;
    /** Optional, the device that performed the transaction (i.e. name of kiosk, mobile device, or PC) */
    recordSource?: string | undefined;
    /** a description of the asset type */
    assetTypeDescription?: string | undefined;
    /** the asset types model */
    assetTypeModelNumber?: string | undefined;
    /** the identifier for the type of asset */
    assetTypeNumber?: string | undefined;
    /** who the asset is checked out to */
    assignee?: string | undefined;
    /** the category of the asset */
    category?: string | undefined;
    /** the group the asset was associated with at the time of the transaction */
    groupTag?: string | undefined;
    /** The customer's company */
    customerCompanyName?: string | undefined;
    /** The customer's contact email */
    customerContactEmail?: string | undefined;
    /** The customer's contact first name */
    customerContactFirstName?: string | undefined;
    /** The customer's contact last name */
    customerContactLastName?: string | undefined;
    /** The customer's first name */
    customerFirstName?: string | undefined;
    /** The customer's last name */
    customerLastName?: string | undefined;
    /** The customer's unique identifier */
    customerNumber?: string | undefined;
    /** The department the asset belongs to */
    departmentCode?: string | undefined;
    /** the employee's email */
    employeeEmail?: string | undefined;
    /** the employee's first name */
    employeeFirstName?: string | undefined;
    /** the employee's last name */
    employeeLastName?: string | undefined;
    /** the employee's unique identifier */
    employeeNumber?: string | undefined;
    /** the geographical latitude of the asset */
    latitude?: number | undefined;
    /** the location of the asset when the transaction took place */
    locationCode?: string | undefined;
    /** the description of the location */
    locationDescription?: string | undefined;
    /** the geographical longitude of the asset */
    longitude?: number | undefined;
    /** the geographical altitude of the asset */
    altitude?: number | undefined;
    /** The accuracy of the geolocation (Latitude, longitude), in meters. */
    accuracy?: number | undefined;
    /** the asset's manufacturer */
    manufacturerName?: string | undefined;
    /** the location of the asset before this transaction occurred */
    otherLocationCode?: string | undefined;
    /** the site of the asset before this transaction occurred */
    otherSiteName?: string | undefined;
    /** the reason for the transaction occurring, typically only on recover or dispose transactions */
    reasonCode?: string | undefined;
    /** the description of the site the asset was at when this transaction occurred */
    siteDescription?: string | undefined;
    /** the name of the site the asset was at when the transaction occurred */
    siteName?: string | undefined;
    /** the vendor's contact email */
    vendorContactEmail?: string | undefined;
    /** the vendor's contact name */
    vendorContactName?: string | undefined;
    /** the vendor's email */
    vendorEmail?: string | undefined;
    /** the vendor's name */
    vendorName?: string | undefined;
    /** the vendor's number */
    vendorNumber?: string | undefined;
    /** the vendor's website */
    vendorWebsite?: string | undefined;
    /** The cost of the asset during the transaction */
    transactionCost?: number | undefined;
    /** the date the asset was due back when this check out transaction occurred */
    dueDate?: Date | undefined;
    /** the date this transaction occurred */
    transactionDate: Date;
    /** the type of transaction */
    transactionType?: string | undefined;
    /** the email address for the user who performed this transaction */
    userEmail?: string | undefined;
    /** the first name of the user who performed this transaction */
    userFirstName?: string | undefined;
    /** the last name of the user who performed this transaction */
    userLastName?: string | undefined;
    /** the first name of the user who performed this transaction */
    userLogon?: string | undefined;
    /** the first name of the user who performed this transaction */
    userTitle?: string | undefined;
    /** InventoryCloud ONLY - the Lot associated with this inventory record */
    lot?: string | undefined;
    /** InventoryCloud ONLY - the Date Code associated with this inventory record */
    dateCode?: string | undefined;
    /** InventoryCloud ONLY - the Serial Number associated with this inventory record */
    serialNumber?: string | undefined;
    /** InventoryCloud ONLY - the Order Number associated with this transaction record */
    orderNumber?: string | undefined;
    parentContainerId?: string | undefined;
    trackbyContainerId?: string | undefined;
}

export class BulkSaveRequestOfVendorModelInfo implements IBulkSaveRequestOfVendorModelInfo {
    /** By default this is a null or empty string array.
However, if (during an update operation) it is sometimes desirable to update only certain properties/columns
in the set ''Data''. */
    applicableFields?: string[] | undefined;
    /** The payload member containing the actual values supplied by the consumer.
This is a list that should contain at least one instance of data to be inserted or updated. */
    data?: VendorModelInfo[] | undefined;

    constructor(data?: IBulkSaveRequestOfVendorModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["ApplicableFields"])) {
                this.applicableFields = [] as any;
                for (let item of _data["ApplicableFields"])
                    this.applicableFields!.push(item);
            }
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(VendorModelInfo.fromJS(item));
            }
        }
    }

    static fromJS(data: any): BulkSaveRequestOfVendorModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new BulkSaveRequestOfVendorModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.applicableFields)) {
            data["ApplicableFields"] = [];
            for (let item of this.applicableFields)
                data["ApplicableFields"].push(item);
        }
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        return data; 
    }
}

export interface IBulkSaveRequestOfVendorModelInfo {
    /** By default this is a null or empty string array.
However, if (during an update operation) it is sometimes desirable to update only certain properties/columns
in the set ''Data''. */
    applicableFields?: string[] | undefined;
    /** The payload member containing the actual values supplied by the consumer.
This is a list that should contain at least one instance of data to be inserted or updated. */
    data?: VendorModelInfo[] | undefined;
}

export class VendorSaveRequest extends BulkSaveRequestOfVendorModelInfo implements IVendorSaveRequest {

    constructor(data?: IVendorSaveRequest) {
        super(data);
    }

    init(_data?: any) {
        super.init(_data);
    }

    static fromJS(data: any): VendorSaveRequest {
        data = typeof data === 'object' ? data : {};
        let result = new VendorSaveRequest();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        super.toJSON(data);
        return data; 
    }
}

export interface IVendorSaveRequest extends IBulkSaveRequestOfVendorModelInfo {
}

export class VendorModelInfo implements IVendorModelInfo {
    /** This indicates that the import record is associated with this supplier. It is only used when importing suppliers. */
    importRowNumber!: number;
    /** The unique string identifier of the supplier. */
    vendorNumber?: string | undefined;
    /** The vendor's name. */
    vendorName?: string | undefined;
    /** The vendor's email */
    vendorEmail?: string | undefined;
    /** The vendor's website */
    vendorWebsite?: string | undefined;
    /** The first name of the vendor's contact */
    vendorContactName?: string | undefined;
    /** The last name of the vendor's contact */
    vendorContactEmail?: string | undefined;
    /** The phone number of the vendor's contact. */
    vendorContactPhoneNumber?: string | undefined;
    /** The cell phone number of the vendor's contact. */
    vendorContactCellNumber?: string | undefined;
    /** The fax number of the vendor's contact. */
    vendorContactFaxNumber?: string | undefined;
    /** The vendor's business phone number. */
    vendorPhoneNumber?: string | undefined;
    /** The vendor's business fax number. */
    vendorFaxNumber?: string | undefined;
    /** Read Only. The addresses associated with the vendor. Please use the address public api to create and edit addresses. */
    addresses?: AddressInfo[] | undefined;
    /** Read Only. */
    contactCell?: PhoneInfo | undefined;
    /** Read Only. */
    contactFax?: PhoneInfo | undefined;
    /** Read Only. */
    contactPhone?: PhoneInfo | undefined;
    /** Read Only. */
    phone?: PhoneInfo | undefined;
    /** Read Only. */
    fax?: PhoneInfo | undefined;
    /** Indicates new vendor notes. */
    vendorNote?: string | undefined;
    /** Read Only. Indicates existing notes for the vendor. */
    vendorNotes?: NoteInfo[] | undefined;
    /** This is the custom fields associated with the vendor. */
    customFields?: DcfValueInfo[] | undefined;
    /** Not Used. This is used to add attachments (or attach files). */
    attachmentsToAdd?: string[] | undefined;
    /** Not Used. This is used to delete attachments. */
    attachmentsToDelete?: string[] | undefined;
    /** Not Used. This is the list of attachments. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;
    /** This will be true if there is an attachment. */
    hasAttachment!: boolean;
    /** Date Time the entity was last updated. */
    lastUpdated?: Date | undefined;

    constructor(data?: IVendorModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.importRowNumber = _data["ImportRowNumber"];
            this.vendorNumber = _data["VendorNumber"];
            this.vendorName = _data["VendorName"];
            this.vendorEmail = _data["VendorEmail"];
            this.vendorWebsite = _data["VendorWebsite"];
            this.vendorContactName = _data["VendorContactName"];
            this.vendorContactEmail = _data["VendorContactEmail"];
            this.vendorContactPhoneNumber = _data["VendorContactPhoneNumber"];
            this.vendorContactCellNumber = _data["VendorContactCellNumber"];
            this.vendorContactFaxNumber = _data["VendorContactFaxNumber"];
            this.vendorPhoneNumber = _data["VendorPhoneNumber"];
            this.vendorFaxNumber = _data["VendorFaxNumber"];
            if (Array.isArray(_data["Addresses"])) {
                this.addresses = [] as any;
                for (let item of _data["Addresses"])
                    this.addresses!.push(AddressInfo.fromJS(item));
            }
            this.contactCell = _data["ContactCell"] ? PhoneInfo.fromJS(_data["ContactCell"]) : <any>undefined;
            this.contactFax = _data["ContactFax"] ? PhoneInfo.fromJS(_data["ContactFax"]) : <any>undefined;
            this.contactPhone = _data["ContactPhone"] ? PhoneInfo.fromJS(_data["ContactPhone"]) : <any>undefined;
            this.phone = _data["Phone"] ? PhoneInfo.fromJS(_data["Phone"]) : <any>undefined;
            this.fax = _data["Fax"] ? PhoneInfo.fromJS(_data["Fax"]) : <any>undefined;
            this.vendorNote = _data["VendorNote"];
            if (Array.isArray(_data["VendorNotes"])) {
                this.vendorNotes = [] as any;
                for (let item of _data["VendorNotes"])
                    this.vendorNotes!.push(NoteInfo.fromJS(item));
            }
            if (Array.isArray(_data["CustomFields"])) {
                this.customFields = [] as any;
                for (let item of _data["CustomFields"])
                    this.customFields!.push(DcfValueInfo.fromJS(item));
            }
            if (Array.isArray(_data["AttachmentsToAdd"])) {
                this.attachmentsToAdd = [] as any;
                for (let item of _data["AttachmentsToAdd"])
                    this.attachmentsToAdd!.push(item);
            }
            if (Array.isArray(_data["AttachmentsToDelete"])) {
                this.attachmentsToDelete = [] as any;
                for (let item of _data["AttachmentsToDelete"])
                    this.attachmentsToDelete!.push(item);
            }
            if (Array.isArray(_data["AttachmentNames"])) {
                this.attachmentNames = [] as any;
                for (let item of _data["AttachmentNames"])
                    this.attachmentNames!.push(KeyValuePairOfStringAndString.fromJS(item));
            }
            this.hasAttachment = _data["HasAttachment"];
            this.lastUpdated = _data["LastUpdated"] ? new Date(_data["LastUpdated"].toString()) : <any>undefined;
        }
    }

    static fromJS(data: any): VendorModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new VendorModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["ImportRowNumber"] = this.importRowNumber;
        data["VendorNumber"] = this.vendorNumber;
        data["VendorName"] = this.vendorName;
        data["VendorEmail"] = this.vendorEmail;
        data["VendorWebsite"] = this.vendorWebsite;
        data["VendorContactName"] = this.vendorContactName;
        data["VendorContactEmail"] = this.vendorContactEmail;
        data["VendorContactPhoneNumber"] = this.vendorContactPhoneNumber;
        data["VendorContactCellNumber"] = this.vendorContactCellNumber;
        data["VendorContactFaxNumber"] = this.vendorContactFaxNumber;
        data["VendorPhoneNumber"] = this.vendorPhoneNumber;
        data["VendorFaxNumber"] = this.vendorFaxNumber;
        if (Array.isArray(this.addresses)) {
            data["Addresses"] = [];
            for (let item of this.addresses)
                data["Addresses"].push(item.toJSON());
        }
        data["ContactCell"] = this.contactCell ? this.contactCell.toJSON() : <any>undefined;
        data["ContactFax"] = this.contactFax ? this.contactFax.toJSON() : <any>undefined;
        data["ContactPhone"] = this.contactPhone ? this.contactPhone.toJSON() : <any>undefined;
        data["Phone"] = this.phone ? this.phone.toJSON() : <any>undefined;
        data["Fax"] = this.fax ? this.fax.toJSON() : <any>undefined;
        data["VendorNote"] = this.vendorNote;
        if (Array.isArray(this.vendorNotes)) {
            data["VendorNotes"] = [];
            for (let item of this.vendorNotes)
                data["VendorNotes"].push(item.toJSON());
        }
        if (Array.isArray(this.customFields)) {
            data["CustomFields"] = [];
            for (let item of this.customFields)
                data["CustomFields"].push(item.toJSON());
        }
        if (Array.isArray(this.attachmentsToAdd)) {
            data["AttachmentsToAdd"] = [];
            for (let item of this.attachmentsToAdd)
                data["AttachmentsToAdd"].push(item);
        }
        if (Array.isArray(this.attachmentsToDelete)) {
            data["AttachmentsToDelete"] = [];
            for (let item of this.attachmentsToDelete)
                data["AttachmentsToDelete"].push(item);
        }
        if (Array.isArray(this.attachmentNames)) {
            data["AttachmentNames"] = [];
            for (let item of this.attachmentNames)
                data["AttachmentNames"].push(item.toJSON());
        }
        data["HasAttachment"] = this.hasAttachment;
        data["LastUpdated"] = this.lastUpdated ? this.lastUpdated.toISOString() : <any>undefined;
        return data; 
    }
}

export interface IVendorModelInfo {
    /** This indicates that the import record is associated with this supplier. It is only used when importing suppliers. */
    importRowNumber: number;
    /** The unique string identifier of the supplier. */
    vendorNumber?: string | undefined;
    /** The vendor's name. */
    vendorName?: string | undefined;
    /** The vendor's email */
    vendorEmail?: string | undefined;
    /** The vendor's website */
    vendorWebsite?: string | undefined;
    /** The first name of the vendor's contact */
    vendorContactName?: string | undefined;
    /** The last name of the vendor's contact */
    vendorContactEmail?: string | undefined;
    /** The phone number of the vendor's contact. */
    vendorContactPhoneNumber?: string | undefined;
    /** The cell phone number of the vendor's contact. */
    vendorContactCellNumber?: string | undefined;
    /** The fax number of the vendor's contact. */
    vendorContactFaxNumber?: string | undefined;
    /** The vendor's business phone number. */
    vendorPhoneNumber?: string | undefined;
    /** The vendor's business fax number. */
    vendorFaxNumber?: string | undefined;
    /** Read Only. The addresses associated with the vendor. Please use the address public api to create and edit addresses. */
    addresses?: AddressInfo[] | undefined;
    /** Read Only. */
    contactCell?: PhoneInfo | undefined;
    /** Read Only. */
    contactFax?: PhoneInfo | undefined;
    /** Read Only. */
    contactPhone?: PhoneInfo | undefined;
    /** Read Only. */
    phone?: PhoneInfo | undefined;
    /** Read Only. */
    fax?: PhoneInfo | undefined;
    /** Indicates new vendor notes. */
    vendorNote?: string | undefined;
    /** Read Only. Indicates existing notes for the vendor. */
    vendorNotes?: NoteInfo[] | undefined;
    /** This is the custom fields associated with the vendor. */
    customFields?: DcfValueInfo[] | undefined;
    /** Not Used. This is used to add attachments (or attach files). */
    attachmentsToAdd?: string[] | undefined;
    /** Not Used. This is used to delete attachments. */
    attachmentsToDelete?: string[] | undefined;
    /** Not Used. This is the list of attachments. */
    attachmentNames?: KeyValuePairOfStringAndString[] | undefined;
    /** This will be true if there is an attachment. */
    hasAttachment: boolean;
    /** Date Time the entity was last updated. */
    lastUpdated?: Date | undefined;
}

export class WaspResultOfListOfVendorModelInfo implements IWaspResultOfListOfVendorModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: VendorModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfVendorModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(VendorModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfVendorModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfVendorModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfVendorModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: VendorModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfListOfWaspResultOfVendorModelInfo implements IWaspResultOfListOfWaspResultOfVendorModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfVendorModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfListOfWaspResultOfVendorModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (Array.isArray(_data["Data"])) {
                this.data = [] as any;
                for (let item of _data["Data"])
                    this.data!.push(WaspResultOfVendorModelInfo.fromJS(item));
            }
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfListOfWaspResultOfVendorModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfListOfWaspResultOfVendorModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (Array.isArray(this.data)) {
            data["Data"] = [];
            for (let item of this.data)
                data["Data"].push(item.toJSON());
        }
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfListOfWaspResultOfVendorModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: WaspResultOfVendorModelInfo[] | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export class WaspResultOfVendorModelInfo implements IWaspResultOfVendorModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: VendorModelInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError!: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError!: boolean;
    /** True if any message is available. */
    hasMessage!: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining!: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;

    constructor(data?: IWaspResultOfVendorModelInfo) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (<any>this)[property] = (<any>data)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            this.data = _data["Data"] ? VendorModelInfo.fromJS(_data["Data"]) : <any>undefined;
            if (Array.isArray(_data["Messages"])) {
                this.messages = [] as any;
                for (let item of _data["Messages"])
                    this.messages!.push(WtResult.fromJS(item));
            }
            this.batchNumber = _data["BatchNumber"];
            this.hasError = _data["HasError"];
            this.hasHttpError = _data["HasHttpError"];
            this.hasMessage = _data["HasMessage"];
            this.hasSuccessWithMoreDataRemaining = _data["HasSuccessWithMoreDataRemaining"];
            this.totalRecordsLongCount = _data["TotalRecordsLongCount"];
        }
    }

    static fromJS(data: any): WaspResultOfVendorModelInfo {
        data = typeof data === 'object' ? data : {};
        let result = new WaspResultOfVendorModelInfo();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Data"] = this.data ? this.data.toJSON() : <any>undefined;
        if (Array.isArray(this.messages)) {
            data["Messages"] = [];
            for (let item of this.messages)
                data["Messages"].push(item.toJSON());
        }
        data["BatchNumber"] = this.batchNumber;
        data["HasError"] = this.hasError;
        data["HasHttpError"] = this.hasHttpError;
        data["HasMessage"] = this.hasMessage;
        data["HasSuccessWithMoreDataRemaining"] = this.hasSuccessWithMoreDataRemaining;
        data["TotalRecordsLongCount"] = this.totalRecordsLongCount;
        return data; 
    }
}

export interface IWaspResultOfVendorModelInfo {
    /** Type specific result that always depends on the function called. */
    data?: VendorModelInfo | undefined;
    /** List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. */
    messages?: WtResult[] | undefined;
    /** This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. 
This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null 
and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. */
    batchNumber?: number | undefined;
    /** True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. */
    hasError: boolean;
    /** True if an API function call could not be fully posted to the server or the results could not be fully returned.  */
    hasHttpError: boolean;
    /** True if any message is available. */
    hasMessage: boolean;
    /** True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. */
    hasSuccessWithMoreDataRemaining: boolean;
    /** This is the total number of records available in the database based on the query and filer conditions provided. 
It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. 
This is used, for example, to set relative scroll bar sizes.
When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation.
To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.         */
    totalRecordsLongCount?: number | undefined;
}

export interface FileResponse {
    data: Blob;
    status: number;
    fileName?: string;
    headers?: { [name: string]: any };
}

export class ApiException extends Error {
    message: string;
    status: number;
    response: string;
    headers: { [key: string]: any; };
    result: any;

    constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {
        super();

        this.message = message;
        this.status = status;
        this.response = response;
        this.headers = headers;
        this.result = result;
    }

    protected isApiException = true;

    static isApiException(obj: any): obj is ApiException {
        return obj.isApiException === true;
    }
}

function throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {
    if (result !== null && result !== undefined)
        throw result;
    else
        throw new ApiException(message, status, response, headers, null);
}

