Umi.Channel = function(name, pass, temp, pm) {
    name = (name || {}).toString();
    pm = !!pm;
    pass = !pm && !!pass;
    temp = pm || !!temp;

    return {
        getName: function() { return name; },
        setName: function(value) { name = (value || {}).toString(); },

        hasPassword: function() { return pass; },
        setHasPassword: function(value) { pass = !!value; },

        isTemporary: function() { return temp; },
        setTemporary: function(value) { temp = !!value; },

        isUserChannel: function() { return pm; },
    };
};
