models/communities/GroupContent.js

import MediaAttachment from './../MediaAttachment.js';

export default class GroupContent {
    /**
     * Creates a GroupContent.
     *
     * @constructor GroupContent
     * @param {Object} params - GroupContent parameters.
     * @param {string} params.id - ID.
     * @param {string} params.title - Title.
     * @param {string} [params.description] - Description.
     * @param {Object<string, string>} params.properties - Properties.
     * @param {boolean} [params.isPrivate=false] - True if group is private.
     * @param {boolean} [params.isDiscoverable=false] - True if group is discoverable.
     * @param {MediaAttachment} params.avatar - Avatar.
     * @param {Object<number, number>} params.permissions - Permissions.
     * @param {string[]} [params.labels=[]] - Labels.
     */
    constructor(params) {
        this.id = params.id || null;
        this.title = params.title || null;
        this.description = params.description || null;
        this.properties = params.properties || null;
        this.isPrivate = params.isPrivate || false;
        this.isDiscoverable = params.isDiscoverable || false;
        this.avatar = params.avatar || null;
        this.permissions = params.permissions || {};
        this.labels = params.labels || [];
    }
}