Update LDAP mapping for a team

@link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team

@param int $teamId

@return array
@throws Exception
160392
public function updateMappingTeam(int $teamId): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/mapping', (string)$teamId),
            Request::METHOD_PATCH);
    }
490378
final public void setTeamId(int newId) {
	if (teamId != -1) {
	    throw new IllegalStateException("Team Id cannot be modified");
	}
	SecurityManager sm = System.getSecurityManager();
	if (sm != null) {
	    sm.checkPermission(new GamePermission("setTeamId"));
	}
	
	teamId = newId;
    }
68525
public function serialize(Team $team)
    {
        $users = $team->getRole() ? $team->getRole()->getUsers()->toArray() : $team->getUsers()->toArray();

        return [
            'id' => $team->getUuid(),
            'name' => $team->getName(),
            'description' => $team->getDescription(),
            'workspace' => $this->workspaceSerializer->serialize($team->getWorkspace(), [Options::SERIALIZE_MINIMAL]),
            'maxUsers' => $team->getMaxUsers(),
            'countUsers' => count($users),
            'selfRegistration' => $team->isSelfRegistration(),
            'selfUnregistration' => $team->isSelfUnregistration(),
            'directory' => $team->getDirectory() ?
                $this->resourceNodeSerializer->serialize($team->getDirectory()->getResourceNode(), [Options::SERIALIZE_MINIMAL]) :
                null,
            'publicDirectory' => $team->isPublic(),
            'deletableDirectory' => $team->isDirDeletable(),
            'role' => $team->getRole() ?
                $this->roleSerializer->serialize($team->getRole(), [Options::SERIALIZE_MINIMAL]) :
                null,
            'teamManagerRole' => $team->getTeamManagerRole() ?
                $this->roleSerializer->serialize($team->getTeamManagerRole(), [Options::SERIALIZE_MINIMAL]) :
                null,
        ];
    }
104190
public function update(?string $id)
    {
        $url = self::$base_url.'/'.($id ?? $this->container_id).'/update';

        $request = json_encode($request = $this->hostConfig);

        return self::$curl->post($url, $request, self::$header);
    }
362313
public function updateMappingUser(string $username): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:username/mapping', $username),
            Request::METHOD_PATCH);
    }
121676
public function getById($teamId, array $queryParams = [])
    {
        $response = $this->api->teams()->getById($teamId, $queryParams);

        return new TeamResponse($response);
    }
1001855
public function userTeamIndexAction(Team $team, User $currentUser)
    {
        $workspace = $team->getWorkspace();
        $this->checkToolAccess($workspace);
        $isTeamMember = $this->isTeamMember($team, $currentUser);
        $isTeamManager = $this->isTeamManager($team, $currentUser);

        if (!$isTeamMember && !$isTeamManager) {

            throw new AccessDeniedException();
        }
        $users = $team->getUsers();
        $params = $this->teamManager->getParametersByWorkspace($workspace);

        return array(
            'workspace' => $workspace,
            'currentUser' => $currentUser,
            'users' => $users,
            'team' => $team,
            'params' => $params,
            'isTeamMember' => $isTeamMember,
            'isTeamManager' => $isTeamManager
        );
    }
1051208
public function edit($id)
    {
        $team = $this->service->find($id);
        return view('team.edit')->with('team', $team);
    }
220915
public function insert(array $data)
    {
        $project_id = empty($data['project_id']) ? 0: (int) $data['project_id'];
        if ($project_id <= 0) {
            throw new \TeamWorkPm\Exception('Required field project_id');
        }
        return $this->rest->post("projects/$project_id/$this->action", $data);
    }
1365492
public function setTeamIdVersion($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->team_id_version !== $v) {
            $this->team_id_version = $v;
            $this->modifiedColumns[PersonTeamLinkVersionTableMap::TEAM_ID_VERSION] = true;
        }


        return $this;
    }
220721
public function clientGetByUid($uid)
  {
    foreach($this->clientList() as $client)
    {
      if($client["client_unique_identifier"] == $uid) return $client;
    }

    throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid clientID", 0x200);
  }
1136476
protected function update_submission(stdClass $submission, $userid, $updatetime, $teamsubmission) {
        global $DB;

        if ($teamsubmission) {
            return $this->update_team_submission($submission, $userid, $updatetime);
        }

        if ($updatetime) {
            $submission->timemodified = time();
        }
        $result= $DB->update_record('assign_submission', $submission);
        if ($result) {
            $this->gradebook_item_update($submission);
        }
        return $result;
    }
622849
public function setPersonTeamLinkIds($v)
    {
        if ($this->person_team_link_ids_unserialized !== $v) {
            $this->person_team_link_ids_unserialized = $v;
            $this->person_team_link_ids = '| ' . implode(' | ', $v) . ' |';
            $this->modifiedColumns[PersonVersionTableMap::PERSON_TEAM_LINK_IDS] = true;
        }


        return $this;
    }
143506
public function transform(Team $team)
    {
        return [
            'captainName' => "{$team->user->name}",
            'captainId' => $team->user_id,
            'country' => $team->country,
            'createdAt' => $team->created_at->toW3cString(),
            'id' => $team->id,
            'name' => $team->name,
            'timezone' => $team->timezone,
            'updatedAt' => $team->updated_at->toW3cString(),
        ];
    }
244364
public function setTeamId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->team_id !== $v) {
            $this->team_id = $v;
            $this->modifiedColumns[PersonTeamLinkTableMap::TEAM_ID] = true;
        }

        if ($this->aTeam !== null && $this->aTeam->getId() !== $v) {
            $this->aTeam = null;
        }


        return $this;
    }
1244253
public function renameTeam($teamUuid, $name)
    {
        $options = [
            'form_params' => [
                'name' => $name,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('put', "/teams/${teamUuid}", $options)
        );
    }
634251
public function updateGroup(GroupUpdateStruct $group)
    {
        try {
            return $this->innerGateway->updateGroup($group);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }