import BadDataException from "../Exception/BadDataException";
import { ObjectType } from "../JSON";
import JSONFunctions from "../JSONFunctions";
import QueryOperator from "./QueryOperator";
export default class IncludesAll 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.IncludesAll,
            value: this._values,
        };
    }
    static fromJSON(json) {
        if (json["_type"] === ObjectType.IncludesAll) {
            const valuesArray = [];
            for (const value of json["value"] || []) {
                valuesArray.push(JSONFunctions.deserializeValue(value));
            }
            return new IncludesAll(valuesArray);
        }
        throw new BadDataException("Invalid JSON: " + JSON.stringify(json));
    }
}
//# sourceMappingURL=IncludesAll.js.map