/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __values } from "tslib";
import { Base, toNullable, Boolean_$type, Number_$type, fromEnum, markType } from "igniteui-angular-core";
import { ST_OnOff } from "./ST_OnOff";
import { CultureInfo } from "igniteui-angular-core";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_PivotCacheDefinition_SML2009 = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_PivotCacheDefinition_SML2009, _super);
    function CT_PivotCacheDefinition_SML2009() {
        var _this = _super.call(this) || this;
        _this.h = toNullable(Boolean_$type, null);
        _this.f = toNullable(Number_$type, null);
        _this.n = toNullable(Boolean_$type, null);
        _this.l = toNullable(Boolean_$type, null);
        _this.j = toNullable(Boolean_$type, null);
        return _this;
    }
    Object.defineProperty(CT_PivotCacheDefinition_SML2009.prototype, "g", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            this.h = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_PivotCacheDefinition_SML2009.prototype, "e", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_PivotCacheDefinition_SML2009.prototype, "m", {
        get: function () {
            return this.n;
        },
        set: function (a) {
            this.n = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_PivotCacheDefinition_SML2009.prototype, "k", {
        get: function () {
            return this.l;
        },
        set: function (a) {
            this.l = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_PivotCacheDefinition_SML2009.prototype, "i", {
        get: function () {
            return this.j;
        },
        set: function (a) {
            this.j = a;
        },
        enumerable: false,
        configurable: true
    });
    CT_PivotCacheDefinition_SML2009.o = function (a, b, c, d, e, f) {
        var e_1, _a;
        b = toNullable(Boolean_$type, null);
        c = toNullable(Number_$type, null);
        d = toNullable(Boolean_$type, null);
        e = toNullable(Boolean_$type, null);
        f = toNullable(Boolean_$type, null);
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var g = _c.value;
                switch (g.a.e(a.d)) {
                    case "slicerData":
                        b = toNullable(Boolean_$type, ST_OnOff.e(g.d));
                        break;
                    case "pivotCacheId":
                        c = toNullable(Number_$type, parseUInt32_1(g.d, CultureInfo.invariantCulture));
                        break;
                    case "supportSubqueryNonVisual":
                        d = toNullable(Boolean_$type, ST_OnOff.e(g.d));
                        break;
                    case "supportSubqueryCalcMem":
                        e = toNullable(Boolean_$type, ST_OnOff.e(g.d));
                        break;
                    case "supportAddCalcMems":
                        f = toNullable(Boolean_$type, ST_OnOff.e(g.d));
                        break;
                    default: break;
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        ;
        return {
            p1: b,
            p2: c,
            p3: d,
            p4: e,
            p5: f
        };
    };
    CT_PivotCacheDefinition_SML2009.p = function (a, b, c, d, e, f, g) {
        if (c === void 0) {
            c = toNullable(Number_$type, null);
        }
        if (d === void 0) {
            d = toNullable(Boolean_$type, null);
        }
        if (e === void 0) {
            e = toNullable(Boolean_$type, null);
        }
        if (f === void 0) {
            f = toNullable(Boolean_$type, null);
        }
        if (g === void 0) {
            g = toNullable(Boolean_$type, null);
        }
        a.ad.p(b, null);
        var h = null;
        var i = null;
        if (c.hasValue) {
            i = "pivotCacheId";
            h = c.value.toString();
            a.ad.h(i, h);
        }
        if (d.hasValue) {
            i = "slicerData";
            h = ST_OnOff.g(d.value);
            a.ad.h(i, h);
        }
        if (e.hasValue) {
            i = "supportAddCalcMems";
            h = ST_OnOff.g(e.value);
            a.ad.h(i, h);
        }
        if (f.hasValue) {
            i = "supportSubqueryCalcMem";
            h = ST_OnOff.g(f.value);
            a.ad.h(i, h);
        }
        if (g.hasValue) {
            i = "supportSubqueryNonVisual";
            h = ST_OnOff.g(g.value);
            a.ad.h(i, h);
        }
        ;
    };
    CT_PivotCacheDefinition_SML2009.$t = markType(CT_PivotCacheDefinition_SML2009, 'CT_PivotCacheDefinition_SML2009');
    return CT_PivotCacheDefinition_SML2009;
}(Base));
export { CT_PivotCacheDefinition_SML2009 };
