source: vendor/google/apiclient-services/src/Analytics/Resource/ManagementProfileUserLinks.php

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

Upload project files

  • Property mode set to 100644
File size: 5.1 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 "profileUserLinks" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $analyticsService = new Google\Service\Analytics(...);
28 * $profileUserLinks = $analyticsService->management_profileUserLinks;
29 * </code>
30 */
31class ManagementProfileUserLinks extends \Google\Service\Resource
32{
33 /**
34 * Removes a user from the given view (profile). (profileUserLinks.delete)
35 *
36 * @param string $accountId Account ID to delete the user link for.
37 * @param string $webPropertyId Web Property ID to delete the user link for.
38 * @param string $profileId View (Profile) ID to delete the user link for.
39 * @param string $linkId Link ID to delete the user link for.
40 * @param array $optParams Optional parameters.
41 * @throws \Google\Service\Exception
42 */
43 public function delete($accountId, $webPropertyId, $profileId, $linkId, $optParams = [])
44 {
45 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId];
46 $params = array_merge($params, $optParams);
47 return $this->call('delete', [$params]);
48 }
49 /**
50 * Adds a new user to the given view (profile). (profileUserLinks.insert)
51 *
52 * @param string $accountId Account ID to create the user link for.
53 * @param string $webPropertyId Web Property ID to create the user link for.
54 * @param string $profileId View (Profile) ID to create the user link for.
55 * @param EntityUserLink $postBody
56 * @param array $optParams Optional parameters.
57 * @return EntityUserLink
58 * @throws \Google\Service\Exception
59 */
60 public function insert($accountId, $webPropertyId, $profileId, EntityUserLink $postBody, $optParams = [])
61 {
62 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody];
63 $params = array_merge($params, $optParams);
64 return $this->call('insert', [$params], EntityUserLink::class);
65 }
66 /**
67 * Lists profile-user links for a given view (profile).
68 * (profileUserLinks.listManagementProfileUserLinks)
69 *
70 * @param string $accountId Account ID which the given view (profile) belongs
71 * to.
72 * @param string $webPropertyId Web Property ID which the given view (profile)
73 * belongs to. Can either be a specific web property ID or '~all', which refers
74 * to all the web properties that user has access to.
75 * @param string $profileId View (Profile) ID to retrieve the profile-user links
76 * for. Can either be a specific profile ID or '~all', which refers to all the
77 * profiles that user has access to.
78 * @param array $optParams Optional parameters.
79 *
80 * @opt_param int max-results The maximum number of profile-user links to
81 * include in this response.
82 * @opt_param int start-index An index of the first profile-user link to
83 * retrieve. Use this parameter as a pagination mechanism along with the max-
84 * results parameter.
85 * @return EntityUserLinks
86 * @throws \Google\Service\Exception
87 */
88 public function listManagementProfileUserLinks($accountId, $webPropertyId, $profileId, $optParams = [])
89 {
90 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId];
91 $params = array_merge($params, $optParams);
92 return $this->call('list', [$params], EntityUserLinks::class);
93 }
94 /**
95 * Updates permissions for an existing user on the given view (profile).
96 * (profileUserLinks.update)
97 *
98 * @param string $accountId Account ID to update the user link for.
99 * @param string $webPropertyId Web Property ID to update the user link for.
100 * @param string $profileId View (Profile ID) to update the user link for.
101 * @param string $linkId Link ID to update the user link for.
102 * @param EntityUserLink $postBody
103 * @param array $optParams Optional parameters.
104 * @return EntityUserLink
105 * @throws \Google\Service\Exception
106 */
107 public function update($accountId, $webPropertyId, $profileId, $linkId, EntityUserLink $postBody, $optParams = [])
108 {
109 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId, 'postBody' => $postBody];
110 $params = array_merge($params, $optParams);
111 return $this->call('update', [$params], EntityUserLink::class);
112 }
113}
114
115// Adding a class alias for backwards compatibility with the previous class name.
116class_alias(ManagementProfileUserLinks::class, 'Google_Service_Analytics_Resource_ManagementProfileUserLinks');
Note: See TracBrowser for help on using the repository browser.