public function set($key, $value)
    {
        if (!is_string($key)) {
            throw new ClientException('Invalid collection attribute type');
        }

        if ($key === self::ENTRY_ID) {
            $this->setId($value);

            return;
        }

        if ($key === self::ENTRY_NAME) {
            $this->setName($value);

            return;
        }

        if ($key === self::ENTRY_WAIT_SYNC) {
            $this->setWaitForSync($value);

            return;
        }

        if ($key === self::ENTRY_JOURNAL_SIZE) {
            $this->setJournalSize($value);

            return;
        }

        if ($key === self::ENTRY_IS_SYSTEM) {
            $this->setIsSystem($value);

            return;
        }

        if ($key === self::ENTRY_IS_VOLATILE) {
            $this->setIsVolatile($value);

            return;
        }

        if ($key === self::ENTRY_TYPE) {
            $this->setType($value);

            return;
        }

        if ($key === self::ENTRY_STATUS) {
            $this->setStatus($value);

            return;
        }

        if ($key === self::ENTRY_KEY_OPTIONS) {
            $this->setKeyOptions($value);

            return;
        }

        if ($key === self::ENTRY_NUMBER_OF_SHARDS) {
            $this->setNumberOfShards($value);

            return;
        }
        
        if ($key === self::ENTRY_REPLICATION_FACTOR) {
            $this->setReplicationFactor($value);

            return;
        }
        
        if ($key === self::ENTRY_SHARDING_STRATEGY) {
            $this->setShardingStrategy($value);

            return;
        }

        if ($key === self::ENTRY_SHARD_KEYS) {
            $this->setShardKeys($value);

            return;
        }
        // unknown attribute, will be ignored
    }