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 |
|
---|
18 | namespace Google\Service\Dfareporting\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Dfareporting\AccountUserProfile;
|
---|
21 | use Google\Service\Dfareporting\AccountUserProfilesListResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "accountUserProfiles" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $dfareportingService = new Google\Service\Dfareporting(...);
|
---|
28 | * $accountUserProfiles = $dfareportingService->accountUserProfiles;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class AccountUserProfiles extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Gets one account user profile by ID. (accountUserProfiles.get)
|
---|
35 | *
|
---|
36 | * @param string $profileId User profile ID associated with this request.
|
---|
37 | * @param string $id User profile ID.
|
---|
38 | * @param array $optParams Optional parameters.
|
---|
39 | * @return AccountUserProfile
|
---|
40 | * @throws \Google\Service\Exception
|
---|
41 | */
|
---|
42 | public function get($profileId, $id, $optParams = [])
|
---|
43 | {
|
---|
44 | $params = ['profileId' => $profileId, 'id' => $id];
|
---|
45 | $params = array_merge($params, $optParams);
|
---|
46 | return $this->call('get', [$params], AccountUserProfile::class);
|
---|
47 | }
|
---|
48 | /**
|
---|
49 | * Inserts a new account user profile. (accountUserProfiles.insert)
|
---|
50 | *
|
---|
51 | * @param string $profileId User profile ID associated with this request.
|
---|
52 | * @param AccountUserProfile $postBody
|
---|
53 | * @param array $optParams Optional parameters.
|
---|
54 | * @return AccountUserProfile
|
---|
55 | * @throws \Google\Service\Exception
|
---|
56 | */
|
---|
57 | public function insert($profileId, AccountUserProfile $postBody, $optParams = [])
|
---|
58 | {
|
---|
59 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
60 | $params = array_merge($params, $optParams);
|
---|
61 | return $this->call('insert', [$params], AccountUserProfile::class);
|
---|
62 | }
|
---|
63 | /**
|
---|
64 | * Retrieves a list of account user profiles, possibly filtered. This method
|
---|
65 | * supports paging. (accountUserProfiles.listAccountUserProfiles)
|
---|
66 | *
|
---|
67 | * @param string $profileId User profile ID associated with this request.
|
---|
68 | * @param array $optParams Optional parameters.
|
---|
69 | *
|
---|
70 | * @opt_param bool active Select only active user profiles.
|
---|
71 | * @opt_param string ids Select only user profiles with these IDs.
|
---|
72 | * @opt_param int maxResults Maximum number of results to return.
|
---|
73 | * @opt_param string pageToken Value of the nextPageToken from the previous
|
---|
74 | * result page.
|
---|
75 | * @opt_param string searchString Allows searching for objects by name, ID or
|
---|
76 | * email. Wildcards (*) are allowed. For example, "user profile*2015" will
|
---|
77 | * return objects with names like "user profile June 2015", "user profile April
|
---|
78 | * 2015", or simply "user profile 2015". Most of the searches also add wildcards
|
---|
79 | * implicitly at the start and the end of the search string. For example, a
|
---|
80 | * search string of "user profile" will match objects with name "my user
|
---|
81 | * profile", "user profile 2015", or simply "user profile".
|
---|
82 | * @opt_param string sortField Field by which to sort the list.
|
---|
83 | * @opt_param string sortOrder Order of sorted results.
|
---|
84 | * @opt_param string subaccountId Select only user profiles with the specified
|
---|
85 | * subaccount ID.
|
---|
86 | * @opt_param string userRoleId Select only user profiles with the specified
|
---|
87 | * user role ID.
|
---|
88 | * @return AccountUserProfilesListResponse
|
---|
89 | * @throws \Google\Service\Exception
|
---|
90 | */
|
---|
91 | public function listAccountUserProfiles($profileId, $optParams = [])
|
---|
92 | {
|
---|
93 | $params = ['profileId' => $profileId];
|
---|
94 | $params = array_merge($params, $optParams);
|
---|
95 | return $this->call('list', [$params], AccountUserProfilesListResponse::class);
|
---|
96 | }
|
---|
97 | /**
|
---|
98 | * Updates an existing account user profile. This method supports patch
|
---|
99 | * semantics. (accountUserProfiles.patch)
|
---|
100 | *
|
---|
101 | * @param string $profileId User profile ID associated with this request.
|
---|
102 | * @param string $id Required. AccountUserProfile ID.
|
---|
103 | * @param AccountUserProfile $postBody
|
---|
104 | * @param array $optParams Optional parameters.
|
---|
105 | * @return AccountUserProfile
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function patch($profileId, $id, AccountUserProfile $postBody, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('patch', [$params], AccountUserProfile::class);
|
---|
113 | }
|
---|
114 | /**
|
---|
115 | * Updates an existing account user profile. (accountUserProfiles.update)
|
---|
116 | *
|
---|
117 | * @param string $profileId User profile ID associated with this request.
|
---|
118 | * @param AccountUserProfile $postBody
|
---|
119 | * @param array $optParams Optional parameters.
|
---|
120 | * @return AccountUserProfile
|
---|
121 | * @throws \Google\Service\Exception
|
---|
122 | */
|
---|
123 | public function update($profileId, AccountUserProfile $postBody, $optParams = [])
|
---|
124 | {
|
---|
125 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
126 | $params = array_merge($params, $optParams);
|
---|
127 | return $this->call('update', [$params], AccountUserProfile::class);
|
---|
128 | }
|
---|
129 | }
|
---|
130 |
|
---|
131 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
132 | class_alias(AccountUserProfiles::class, 'Google_Service_Dfareporting_Resource_AccountUserProfiles');
|
---|