source: vendor/google/apiclient-services/src/Directory/Resource/RoleAssignments.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 5.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\Directory\Resource;
19
20use Google\Service\Directory\RoleAssignment;
21use Google\Service\Directory\RoleAssignments as RoleAssignmentsModel;
22
23/**
24 * The "roleAssignments" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $adminService = new Google\Service\Directory(...);
28 * $roleAssignments = $adminService->roleAssignments;
29 * </code>
30 */
31class RoleAssignments extends \Google\Service\Resource
32{
33 /**
34 * Deletes a role assignment. (roleAssignments.delete)
35 *
36 * @param string $customer Immutable ID of the Google Workspace account.
37 * @param string $roleAssignmentId Immutable ID of the role assignment.
38 * @param array $optParams Optional parameters.
39 * @throws \Google\Service\Exception
40 */
41 public function delete($customer, $roleAssignmentId, $optParams = [])
42 {
43 $params = ['customer' => $customer, 'roleAssignmentId' => $roleAssignmentId];
44 $params = array_merge($params, $optParams);
45 return $this->call('delete', [$params]);
46 }
47 /**
48 * Retrieves a role assignment. (roleAssignments.get)
49 *
50 * @param string $customer The unique ID for the customer's Google Workspace
51 * account. In case of a multi-domain account, to fetch all groups for a
52 * customer, use this field instead of `domain`. You can also use the
53 * `my_customer` alias to represent your account's `customerId`. The
54 * `customerId` is also returned as part of the [Users](/admin-
55 * sdk/directory/v1/reference/users) resource. You must provide either the
56 * `customer` or the `domain` parameter.
57 * @param string $roleAssignmentId Immutable ID of the role assignment.
58 * @param array $optParams Optional parameters.
59 * @return RoleAssignment
60 * @throws \Google\Service\Exception
61 */
62 public function get($customer, $roleAssignmentId, $optParams = [])
63 {
64 $params = ['customer' => $customer, 'roleAssignmentId' => $roleAssignmentId];
65 $params = array_merge($params, $optParams);
66 return $this->call('get', [$params], RoleAssignment::class);
67 }
68 /**
69 * Creates a role assignment. (roleAssignments.insert)
70 *
71 * @param string $customer Immutable ID of the Google Workspace account.
72 * @param RoleAssignment $postBody
73 * @param array $optParams Optional parameters.
74 * @return RoleAssignment
75 * @throws \Google\Service\Exception
76 */
77 public function insert($customer, RoleAssignment $postBody, $optParams = [])
78 {
79 $params = ['customer' => $customer, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('insert', [$params], RoleAssignment::class);
82 }
83 /**
84 * Retrieves a paginated list of all roleAssignments.
85 * (roleAssignments.listRoleAssignments)
86 *
87 * @param string $customer The unique ID for the customer's Google Workspace
88 * account. In case of a multi-domain account, to fetch all groups for a
89 * customer, use this field instead of `domain`. You can also use the
90 * `my_customer` alias to represent your account's `customerId`. The
91 * `customerId` is also returned as part of the [Users](/admin-
92 * sdk/directory/v1/reference/users) resource. You must provide either the
93 * `customer` or the `domain` parameter.
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param bool includeIndirectRoleAssignments When set to `true`, fetches
97 * indirect role assignments (i.e. role assignment via a group) as well as
98 * direct ones. Defaults to `false`. You must specify `user_key` or the indirect
99 * role assignments will not be included.
100 * @opt_param int maxResults Maximum number of results to return.
101 * @opt_param string pageToken Token to specify the next page in the list.
102 * @opt_param string roleId Immutable ID of a role. If included in the request,
103 * returns only role assignments containing this role ID.
104 * @opt_param string userKey The primary email address, alias email address, or
105 * unique user or group ID. If included in the request, returns role assignments
106 * only for this user or group.
107 * @return RoleAssignmentsModel
108 * @throws \Google\Service\Exception
109 */
110 public function listRoleAssignments($customer, $optParams = [])
111 {
112 $params = ['customer' => $customer];
113 $params = array_merge($params, $optParams);
114 return $this->call('list', [$params], RoleAssignmentsModel::class);
115 }
116}
117
118// Adding a class alias for backwards compatibility with the previous class name.
119class_alias(RoleAssignments::class, 'Google_Service_Directory_Resource_RoleAssignments');
Note: See TracBrowser for help on using the repository browser.