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