source: vendor/google/apiclient-services/src/Analytics/Resource/ManagementAccountUserLinks.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 3.8 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Analytics\Resource;
19
20use Google\Service\Analytics\EntityUserLink;
21use Google\Service\Analytics\EntityUserLinks;
22
23/**
24 * The "accountUserLinks" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $analyticsService = new Google\Service\Analytics(...);
28 * $accountUserLinks = $analyticsService->management_accountUserLinks;
29 * </code>
30 */
31class ManagementAccountUserLinks extends \Google\Service\Resource
32{
33 /**
34 * Removes a user from the given account. (accountUserLinks.delete)
35 *
36 * @param string $accountId Account ID to delete the user link for.
37 * @param string $linkId Link ID to delete the user link for.
38 * @param array $optParams Optional parameters.
39 * @throws \Google\Service\Exception
40 */
41 public function delete($accountId, $linkId, $optParams = [])
42 {
43 $params = ['accountId' => $accountId, 'linkId' => $linkId];
44 $params = array_merge($params, $optParams);
45 return $this->call('delete', [$params]);
46 }
47 /**
48 * Adds a new user to the given account. (accountUserLinks.insert)
49 *
50 * @param string $accountId Account ID to create the user link for.
51 * @param EntityUserLink $postBody
52 * @param array $optParams Optional parameters.
53 * @return EntityUserLink
54 * @throws \Google\Service\Exception
55 */
56 public function insert($accountId, EntityUserLink $postBody, $optParams = [])
57 {
58 $params = ['accountId' => $accountId, 'postBody' => $postBody];
59 $params = array_merge($params, $optParams);
60 return $this->call('insert', [$params], EntityUserLink::class);
61 }
62 /**
63 * Lists account-user links for a given account.
64 * (accountUserLinks.listManagementAccountUserLinks)
65 *
66 * @param string $accountId Account ID to retrieve the user links for.
67 * @param array $optParams Optional parameters.
68 *
69 * @opt_param int max-results The maximum number of account-user links to
70 * include in this response.
71 * @opt_param int start-index An index of the first account-user link to
72 * retrieve. Use this parameter as a pagination mechanism along with the max-
73 * results parameter.
74 * @return EntityUserLinks
75 * @throws \Google\Service\Exception
76 */
77 public function listManagementAccountUserLinks($accountId, $optParams = [])
78 {
79 $params = ['accountId' => $accountId];
80 $params = array_merge($params, $optParams);
81 return $this->call('list', [$params], EntityUserLinks::class);
82 }
83 /**
84 * Updates permissions for an existing user on the given account.
85 * (accountUserLinks.update)
86 *
87 * @param string $accountId Account ID to update the account-user link for.
88 * @param string $linkId Link ID to update the account-user link for.
89 * @param EntityUserLink $postBody
90 * @param array $optParams Optional parameters.
91 * @return EntityUserLink
92 * @throws \Google\Service\Exception
93 */
94 public function update($accountId, $linkId, EntityUserLink $postBody, $optParams = [])
95 {
96 $params = ['accountId' => $accountId, 'linkId' => $linkId, 'postBody' => $postBody];
97 $params = array_merge($params, $optParams);
98 return $this->call('update', [$params], EntityUserLink::class);
99 }
100}
101
102// Adding a class alias for backwards compatibility with the previous class name.
103class_alias(ManagementAccountUserLinks::class, 'Google_Service_Analytics_Resource_ManagementAccountUserLinks');
Note: See TracBrowser for help on using the repository browser.