Add a member

@param {_GpfClassDefMember} member Member to add
@gpf:chainable
546786
function (member) {
        _gpfAsserts({
            "Expected a _GpfClassDefMember": member instanceof _GpfClassDefMember,
            "Member is already assigned to a class": null === member._classDef
        });
        this._checkMemberBeforeAdd(member);
        this._members[member.getName()] = member;
        member._classDef = this;
        return this;
    }
1102287
def add_member(self, legislator, role='member', **kwargs):
        
        self['members'].append(dict(name=legislator, role=role,
                                    **kwargs))
1007159
public Membership add(Address new_member) {
        synchronized(members) {
            if(new_member != null && !members.contains(new_member)) {
                members.add(new_member);
            }
        }
        return this;
    }
776356
def add_member(user, group)
      relation = group.group_member_relations.find_or_initialize_by(user: user, accepted_at: nil)
      relation.accepted_at = Time.now
      relation.accepter = self
      relation.save
    end
759171
function extendClass(parent, members) {
        var object = function () { return UNDEFINED; };
        object.prototype = new parent();
        extend(object.prototype, members);
        return object;
    }
563599
public GitlabGroupMember addGroupMember(GitlabGroup group, GitlabUser user, GitlabAccessLevel accessLevel) throws IOException {
        return addGroupMember(group.getId(), user.getId(), accessLevel);
    }
569752
def _add_enum_members(meta, clsdict):
        
        enum_members = clsdict['__members__']
        for member in enum_members:
            member.add_to_enum(clsdict)
103394
function addMembers(list, obj) {
		var keys = Object.keys(obj || {});

		for (var i = 0; i < keys.length; i++) {
			list.push({
				owner: obj,
				key: keys[i],
				value: obj[keys[i]]
			});
		}
	}
1100488
def add_member(user, room_roles=['room_member'])
      response = self.class.put(@api.member_config[:url]+"/#{user}",
        :query => { :auth_token => @token },
        :body => {
          :room_roles => room_roles
        }.to_json,
        :headers => @api.headers)

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      true
    end
184970
def add_members(self, members):
        
        if not isinstance(members, list):
            members = [members]

        if not getattr(self, 'members', None):
            self.members = members
        else:
            self.members.extend(members)
32182
void addMember(AsteriskQueueMemberImpl member)
    {
        synchronized (members)
        {
            // Check if member already exists
            if (members.containsValue(member))
            {
                return;
            }
            // If not, add the new member.
            logger.info("Adding new member to the queue " + getName() + ": " + member.toString());
            members.put(member.getLocation(), member);
        }

        fireMemberAdded(member);
    }
1220398
def member_add(self, member_id=None, params=None):
        """"""
        member_id = member_id or str(uuid4())
        if self.enable_ipv6:
            common.enable_ipv6_repl(params)
        if 'members' in params:
            # is replica set
            for member in params['members']:
                if not member.get('rsParams', {}).get('arbiterOnly', False):
                    member.setdefault('procParams', {})['shardsvr'] = True
            rs_params = params.copy()
            # Turn 'rs_id' -> 'id', to be consistent with 'server_id' below.
            rs_params['id'] = rs_params.pop('rs_id', None)
            rs_params.update({'sslParams': self.sslParams})

            rs_params['version'] = params.pop('version', self._version)
            rs_params['members'] = [
                self._strip_auth(params) for params in rs_params['members']]
            rs_id = ReplicaSets().create(rs_params)
            members = ReplicaSets().members(rs_id)
            cfgs = rs_id + r"/" + ','.join([item['host'] for item in members])
            result = self._add(cfgs, member_id)
            if result.get('ok', 0) == 1:
                self._shards[result['shardAdded']] = {'isReplicaSet': True, '_id': rs_id}
                # return self._shards[result['shardAdded']].copy()
                return self.member_info(member_id)

        else:
            # is single server
            params.setdefault('procParams', {})['shardsvr'] = True
            params.update({'autostart': True, 'sslParams': self.sslParams})
            params = params.copy()
            params['procParams'] = self._strip_auth(
                params.get('procParams', {}))
            params.setdefault('version', self._version)
            logger.debug("servers create params: {params}".format(**locals()))
            server_id = Servers().create('mongod', **params)
            result = self._add(Servers().hostname(server_id), member_id)
            if result.get('ok', 0) == 1:
                self._shards[result['shardAdded']] = {'isServer': True, '_id': server_id}
                return self.member_info(member_id)
990917
def insertSyntheticMemberAtBegin(self, synthesizedMember):
        
        memberName = synthesizedMember.memberName()
        if memberName in [m.memberName() for m in self._syntheticMemberList]:
            raise DuplicateMemberNameError(memberName, self._class.__name__)
        
        self._syntheticMemberList.insert(0, synthesizedMember)
944514
def update_member(self, member, body=None):
        """"""
        return self.put(self.member_path % (member), body=body)
383850
def add(self, member):
        
        return self._client.sadd(self.key_prefix, self._dumps(member))
917269
public function add($member)
    {
        if (is_array($member)) {
            foreach ($member as $item) {
                $this->add($item);
            }

            return $this;
        }

        if (!is_callable($member)) {
            throw new InvalidChainMember();
        }

        $this->members[] = $member;

        return $this;
    }
783938
def AddMemberDefinition(self, member_definition):
    
    self._byte_size = None
    self.members.append(member_definition)

    if self.sections:
      section_definition = self.sections[-1]
      section_definition.members.append(member_definition)