Google_ManagementAccountUserLinksServiceResource
The "accountUserLinks" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_AnalyticsService.php
- class Google_ManagementAccountUserLinksServiceResource extends Google_ServiceResource {
- /**
- * 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 = array()) {
- $params = array('accountId' => $accountId, 'linkId' => $linkId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Adds a new user to the given account. (accountUserLinks.insert)
- *
- * @param string $accountId Account ID to create the user link for.
- * @param Google_EntityUserLink $postBody
- * @param array $optParams Optional parameters.
- * @return Google_EntityUserLink
- */
- public function insert($accountId, Google_EntityUserLink $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_EntityUserLink($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists account-user links for a given account. (accountUserLinks.list)
- *
- * @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 Google_EntityUserLinks
- */
- public function listManagementAccountUserLinks($accountId, $optParams = array()) {
- $params = array('accountId' => $accountId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_EntityUserLinks($data);
- } else {
- return $data;
- }
- }
- /**
- * 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 Google_EntityUserLink $postBody
- * @param array $optParams Optional parameters.
- * @return Google_EntityUserLink
- */
- public function update($accountId, $linkId, Google_EntityUserLink $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'linkId' => $linkId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_EntityUserLink($data);
- } else {
- return $data;
- }
- }
- }