import BadDataException from "../Exception/BadDataException";
import { ObjectType } from "../JSON";
import JSONFunctions from "../JSONFunctions";
import QueryOperator from "./QueryOperator";
export default class IncludesNone extends QueryOperator {
    get values() {
        return this._values;
    }
    set values(v) {
        this._values = v;
    }
    constructor(values) {
        super();
        this._values = [];
        this.values = values;
    }
    toJSON() {
        return {
            _type: ObjectType.IncludesNone,
            value: this._values,
        };
    }
    static fromJSON(json) {
        if (json["_type"] === ObjectType.IncludesNone) {
            const valuesArray = [];
            for (const value of json["value"] || []) {
                valuesArray.push(JSONFunctions.deserializeValue(value));
            }
            return new IncludesNone(valuesArray);
        }
        throw new BadDataException("Invalid JSON: " + JSON.stringify(json));
    }
}
//# sourceMappingURL=IncludesNone.js.map