/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Hashtable = require("./../../../unisharp/Hashtable");

// Flags indicate which values are included in this instance.
class ExtendedUnixDataFlags {

    constructor(val, str) {
        this.m_val = val;
        this.m_str = str;
    }
    toString() {
        return this.m_str;
    }
    value() {
        return this.m_val;
    }
    static of(val) {
        if(val instanceof ExtendedUnixDataFlags) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(ExtendedUnixDataFlags.mapStringToEnum.containsKey(val))
                return ExtendedUnixDataFlags.mapStringToEnum.get(val);
            return null;
        }
        if(ExtendedUnixDataFlags.mapIntToEnum.containsKey(val))
            return ExtendedUnixDataFlags.mapIntToEnum.get(val);
        let it = new ExtendedUnixDataFlags(val, val.toString());
        ExtendedUnixDataFlags.mapIntToEnum.put(val, it);
        ExtendedUnixDataFlags.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return ExtendedUnixDataFlags.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return ExtendedUnixDataFlags.m_Values;
    }
    static static_constructor() {
        ExtendedUnixDataFlags.mapIntToEnum = new Hashtable();
        ExtendedUnixDataFlags.mapStringToEnum = new Hashtable();
        ExtendedUnixDataFlags.MODIFICATIONTIME = new ExtendedUnixDataFlags(0x01, "MODIFICATIONTIME");
        ExtendedUnixDataFlags.mapIntToEnum.put(ExtendedUnixDataFlags.MODIFICATIONTIME.value(), ExtendedUnixDataFlags.MODIFICATIONTIME); 
        ExtendedUnixDataFlags.mapStringToEnum.put(ExtendedUnixDataFlags.MODIFICATIONTIME.m_str.toUpperCase(), ExtendedUnixDataFlags.MODIFICATIONTIME); 
        ExtendedUnixDataFlags.ACCESSTIME = new ExtendedUnixDataFlags(0x02, "ACCESSTIME");
        ExtendedUnixDataFlags.mapIntToEnum.put(ExtendedUnixDataFlags.ACCESSTIME.value(), ExtendedUnixDataFlags.ACCESSTIME); 
        ExtendedUnixDataFlags.mapStringToEnum.put(ExtendedUnixDataFlags.ACCESSTIME.m_str.toUpperCase(), ExtendedUnixDataFlags.ACCESSTIME); 
        ExtendedUnixDataFlags.CREATETIME = new ExtendedUnixDataFlags(0x04, "CREATETIME");
        ExtendedUnixDataFlags.mapIntToEnum.put(ExtendedUnixDataFlags.CREATETIME.value(), ExtendedUnixDataFlags.CREATETIME); 
        ExtendedUnixDataFlags.mapStringToEnum.put(ExtendedUnixDataFlags.CREATETIME.m_str.toUpperCase(), ExtendedUnixDataFlags.CREATETIME); 
        ExtendedUnixDataFlags.m_Values = Array.from(ExtendedUnixDataFlags.mapIntToEnum.values);
        ExtendedUnixDataFlags.m_Keys = Array.from(ExtendedUnixDataFlags.mapIntToEnum.keys);
    }
}


ExtendedUnixDataFlags.static_constructor();

module.exports = ExtendedUnixDataFlags