Source: models/OrderSearchRequest.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * Shop API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 20.4
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 */


import ApiClient from '../ApiClient'
import Query from './Query'
import Sort from './Sort'





/**
* The OrderSearchRequest model module.
* @module models/OrderSearchRequest
* @version 20.4
*/
export default class OrderSearchRequest {
    /**
    * Constructs a new <code>OrderSearchRequest</code>.
    * Document representing an order search request.
    * @alias module:models/OrderSearchRequest
    * @class
    * @param query {module:models/Query} The query to apply
    */

    constructor(query) {





        this.query = query


    }

    /**
    * Constructs a <code>OrderSearchRequest</code> from a plain JavaScript object, optionally creating a new instance.
    * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
    * @param {Object} data The plain JavaScript object bearing properties of interest.
    * @param {module:models/OrderSearchRequest} obj Optional instance to populate.
    * @return {module:models/OrderSearchRequest} The populated <code>OrderSearchRequest</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new OrderSearchRequest()





            if (data.hasOwnProperty('count')) {
                obj.count = ApiClient.convertToType(data.count, 'Number')
            }
            if (data.hasOwnProperty('db_start_record_')) {
                obj.db_start_record_ = ApiClient.convertToType(data.db_start_record_, 'Number')
            }
            if (data.hasOwnProperty('expand')) {
                obj.expand = ApiClient.convertToType(data.expand, ['String'])
            }
            if (data.hasOwnProperty('query')) {
                obj.query = Query.constructFromObject(data.query)
            }
            if (data.hasOwnProperty('select')) {
                obj.select = ApiClient.convertToType(data.select, 'String')
            }
            if (data.hasOwnProperty('sorts')) {
                obj.sorts = ApiClient.convertToType(data.sorts, [Sort])
            }
            if (data.hasOwnProperty('start')) {
                obj.start = ApiClient.convertToType(data.start, 'Number')
            }
        }
        return obj
    }

    /**
    * The number of returned documents
    * @member {Number} count
    */
    count = undefined;
    /**
    * The zero-based index of the record that we want to start with, used to optimize special handling
    * @member {Number} db_start_record_
    */
    db_start_record_ = undefined;
    /**
    * List of expansions to be applied to each search results. Expands are optional
    * @member {Array.<String>} expand
    */
    expand = undefined;
    /**
    * The query to apply
    * @member {module:models/Query} query
    */
    query = undefined;
    /**
    * The field to be selected.
    * @member {String} select
    */
    select = undefined;
    /**
    * The list of sort clauses configured for the search request. Sort clauses are optional.
    * @member {Array.<module:models/Sort>} sorts
    */
    sorts = undefined;
    /**
    * The zero-based index of the first search hit to include in the result.
    * @member {Number} start
    */
    start = undefined;








}