* $analyticsService = new Google\Service\Analytics(...); * $accountUserLinks = $analyticsService->accountUserLinks; * */ class ManagementAccountUserLinks extends \Google\Service\Resource { /** * Removes a user from the given account. (accountUserLinks.delete) * * @param string $accountId Account ID to delete the user link for. * @param string $linkId Link ID to delete the user link for. * @param array $optParams Optional parameters. */ public function delete($accountId, $linkId, $optParams = []) { $params = ['accountId' => $accountId, 'linkId' => $linkId]; $params = array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Adds a new user to the given account. (accountUserLinks.insert) * * @param string $accountId Account ID to create the user link for. * @param EntityUserLink $postBody * @param array $optParams Optional parameters. * @return EntityUserLink */ public function insert($accountId, EntityUserLink $postBody, $optParams = []) { $params = ['accountId' => $accountId, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('insert', [$params], EntityUserLink::class); } /** * Lists account-user links for a given account. * (accountUserLinks.listManagementAccountUserLinks) * * @param string $accountId Account ID to retrieve the user links for. * @param array $optParams Optional parameters. * * @opt_param int max-results The maximum number of account-user links to * include in this response. * @opt_param int start-index An index of the first account-user link to * retrieve. Use this parameter as a pagination mechanism along with the max- * results parameter. * @return EntityUserLinks */ public function listManagementAccountUserLinks($accountId, $optParams = []) { $params = ['accountId' => $accountId]; $params = array_merge($params, $optParams); return $this->call('list', [$params], EntityUserLinks::class); } /** * Updates permissions for an existing user on the given account. * (accountUserLinks.update) * * @param string $accountId Account ID to update the account-user link for. * @param string $linkId Link ID to update the account-user link for. * @param EntityUserLink $postBody * @param array $optParams Optional parameters. * @return EntityUserLink */ public function update($accountId, $linkId, EntityUserLink $postBody, $optParams = []) { $params = ['accountId' => $accountId, 'linkId' => $linkId, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('update', [$params], EntityUserLink::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ManagementAccountUserLinks::class, 'Google_Service_Analytics_Resource_ManagementAccountUserLinks');