source: vendor/google/apiclient-services/src/Analytics/Resource/ManagementProfiles.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: 6.0 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\Profile;
21use Google\Service\Analytics\Profiles;
22
23/**
24 * The "profiles" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $analyticsService = new Google\Service\Analytics(...);
28 * $profiles = $analyticsService->management_profiles;
29 * </code>
30 */
31class ManagementProfiles extends \Google\Service\Resource
32{
33 /**
34 * Deletes a view (profile). (profiles.delete)
35 *
36 * @param string $accountId Account ID to delete the view (profile) for.
37 * @param string $webPropertyId Web property ID to delete the view (profile)
38 * for.
39 * @param string $profileId ID of the view (profile) to be deleted.
40 * @param array $optParams Optional parameters.
41 * @throws \Google\Service\Exception
42 */
43 public function delete($accountId, $webPropertyId, $profileId, $optParams = [])
44 {
45 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId];
46 $params = array_merge($params, $optParams);
47 return $this->call('delete', [$params]);
48 }
49 /**
50 * Gets a view (profile) to which the user has access. (profiles.get)
51 *
52 * @param string $accountId Account ID to retrieve the view (profile) for.
53 * @param string $webPropertyId Web property ID to retrieve the view (profile)
54 * for.
55 * @param string $profileId View (Profile) ID to retrieve the view (profile)
56 * for.
57 * @param array $optParams Optional parameters.
58 * @return Profile
59 * @throws \Google\Service\Exception
60 */
61 public function get($accountId, $webPropertyId, $profileId, $optParams = [])
62 {
63 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId];
64 $params = array_merge($params, $optParams);
65 return $this->call('get', [$params], Profile::class);
66 }
67 /**
68 * Create a new view (profile). (profiles.insert)
69 *
70 * @param string $accountId Account ID to create the view (profile) for.
71 * @param string $webPropertyId Web property ID to create the view (profile)
72 * for.
73 * @param Profile $postBody
74 * @param array $optParams Optional parameters.
75 * @return Profile
76 * @throws \Google\Service\Exception
77 */
78 public function insert($accountId, $webPropertyId, Profile $postBody, $optParams = [])
79 {
80 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody];
81 $params = array_merge($params, $optParams);
82 return $this->call('insert', [$params], Profile::class);
83 }
84 /**
85 * Lists views (profiles) to which the user has access.
86 * (profiles.listManagementProfiles)
87 *
88 * @param string $accountId Account ID for the view (profiles) to retrieve. Can
89 * either be a specific account ID or '~all', which refers to all the accounts
90 * to which the user has access.
91 * @param string $webPropertyId Web property ID for the views (profiles) to
92 * retrieve. Can either be a specific web property ID or '~all', which refers to
93 * all the web properties to which the user has access.
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param int max-results The maximum number of views (profiles) to include
97 * in this response.
98 * @opt_param int start-index An index of the first entity to retrieve. Use this
99 * parameter as a pagination mechanism along with the max-results parameter.
100 * @return Profiles
101 * @throws \Google\Service\Exception
102 */
103 public function listManagementProfiles($accountId, $webPropertyId, $optParams = [])
104 {
105 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId];
106 $params = array_merge($params, $optParams);
107 return $this->call('list', [$params], Profiles::class);
108 }
109 /**
110 * Updates an existing view (profile). This method supports patch semantics.
111 * (profiles.patch)
112 *
113 * @param string $accountId Account ID to which the view (profile) belongs
114 * @param string $webPropertyId Web property ID to which the view (profile)
115 * belongs
116 * @param string $profileId ID of the view (profile) to be updated.
117 * @param Profile $postBody
118 * @param array $optParams Optional parameters.
119 * @return Profile
120 * @throws \Google\Service\Exception
121 */
122 public function patch($accountId, $webPropertyId, $profileId, Profile $postBody, $optParams = [])
123 {
124 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody];
125 $params = array_merge($params, $optParams);
126 return $this->call('patch', [$params], Profile::class);
127 }
128 /**
129 * Updates an existing view (profile). (profiles.update)
130 *
131 * @param string $accountId Account ID to which the view (profile) belongs
132 * @param string $webPropertyId Web property ID to which the view (profile)
133 * belongs
134 * @param string $profileId ID of the view (profile) to be updated.
135 * @param Profile $postBody
136 * @param array $optParams Optional parameters.
137 * @return Profile
138 * @throws \Google\Service\Exception
139 */
140 public function update($accountId, $webPropertyId, $profileId, Profile $postBody, $optParams = [])
141 {
142 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody];
143 $params = array_merge($params, $optParams);
144 return $this->call('update', [$params], Profile::class);
145 }
146}
147
148// Adding a class alias for backwards compatibility with the previous class name.
149class_alias(ManagementProfiles::class, 'Google_Service_Analytics_Resource_ManagementProfiles');
Note: See TracBrowser for help on using the repository browser.