/*
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 } from "tslib";
import { Base, typeCast, EnumUtil, markType } from "./type";
import { CodeGenerationLibraryItemPlatform_$type } from "./CodeGenerationLibraryItemPlatform";
import { JsonDictionaryObject } from "./JsonDictionaryObject";
import { JsonDictionaryValue } from "./JsonDictionaryValue";
/**
 * @hidden
 */
var CodeGenerationLibraryItemContent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CodeGenerationLibraryItemContent, _super);
    function CodeGenerationLibraryItemContent() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._platform = 0;
        _this._content = null;
        _this._isJson = false;
        return _this;
    }
    Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "platform", {
        get: function () {
            return this._platform;
        },
        set: function (a) {
            this._platform = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "content", {
        get: function () {
            return this._content;
        },
        set: function (a) {
            this._content = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "isJson", {
        get: function () {
            return this._isJson;
        },
        set: function (a) {
            this._isJson = a;
        },
        enumerable: false,
        configurable: true
    });
    CodeGenerationLibraryItemContent.a = function (a) {
        var b = new CodeGenerationLibraryItemContent();
        if (typeCast(JsonDictionaryObject.$, a) !== null) {
            var c = a;
            if (c.g("platform")) {
                var d = c.item("platform");
                b.platform = CodeGenerationLibraryItemContent.b(d);
            }
            if (c.g("content")) {
                var e = c.item("content");
                b.content = e.value;
            }
            if (c.g("isJson")) {
                var f = c.item("isJson");
                b.isJson = f.value;
            }
        }
        return b;
    };
    CodeGenerationLibraryItemContent.prototype.d = function () {
        var _this = this;
        var a = new JsonDictionaryObject();
        a.item("platform", ((function () {
            var $ret = new JsonDictionaryValue();
            $ret.e = 2;
            $ret.value = EnumUtil.getName(CodeGenerationLibraryItemPlatform_$type, _this.platform);
            return $ret;
        })()));
        a.item("content", ((function () {
            var $ret = new JsonDictionaryValue();
            $ret.e = 2;
            $ret.value = _this.content;
            return $ret;
        })()));
        a.item("isJson", ((function () {
            var $ret = new JsonDictionaryValue();
            $ret.e = 1;
            $ret.value = _this.isJson;
            return $ret;
        })()));
        return a;
    };
    CodeGenerationLibraryItemContent.b = function (a) {
        var b = a.value;
        var c;
        if (((function () { var d = EnumUtil.tryParse$1(CodeGenerationLibraryItemPlatform_$type, b, true, c); c = d.p2; return d.ret; })())) {
            return c;
        }
        return 12;
    };
    CodeGenerationLibraryItemContent.$t = markType(CodeGenerationLibraryItemContent, 'CodeGenerationLibraryItemContent');
    return CodeGenerationLibraryItemContent;
}(Base));
export { CodeGenerationLibraryItemContent };
