/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* eslint-disable dot-notation */
/**
* 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'
/**
* The Filter model module.
* @module models/Filter
* @version 20.4
*/
export default class Filter {
/**
* Constructs a new <code>Filter</code>.
* Document representing a boolean filter.
* @alias module:models/Filter
* @class
* @param operator {module:models/Filter.OperatorEnum} The logical operator the filters are combined with.
*/
constructor(operator) {
/**
* The logical operator the filters are combined with.
* @member {module:models/Filter.OperatorEnum} operator
*/
this.operator = operator
}
/**
* Constructs a <code>Filter</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/Filter} obj Optional instance to populate.
* @return {module:models/Filter} The populated <code>Filter</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Filter()
if (data.hasOwnProperty('operator')) {
obj['operator'] = ApiClient.convertToType(data['operator'], 'String')
}
}
return obj
}
}
/**
* Allowed values for the <code>operator</code> property.
* @enum {String}
* @readonly
*/
Filter.OperatorEnum = {
/**
* value: "and"
* @const
*/
and: 'and',
/**
* value: "or"
* @const
*/
or: 'or',
/**
* value: "not"
* @const
*/
not: 'not'
}