source: vendor/google/apiclient-services/src/MyBusinessAccountManagement/Resource/AccountsAdmins.php

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

Upload project files

  • Property mode set to 100644
File size: 4.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\MyBusinessAccountManagement\Resource;
19
20use Google\Service\MyBusinessAccountManagement\Admin;
21use Google\Service\MyBusinessAccountManagement\ListAccountAdminsResponse;
22use Google\Service\MyBusinessAccountManagement\MybusinessaccountmanagementEmpty;
23
24/**
25 * The "admins" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $mybusinessaccountmanagementService = new Google\Service\MyBusinessAccountManagement(...);
29 * $admins = $mybusinessaccountmanagementService->accounts_admins;
30 * </code>
31 */
32class AccountsAdmins extends \Google\Service\Resource
33{
34 /**
35 * Invites the specified user to become an administrator for the specified
36 * account. The invitee must accept the invitation in order to be granted access
37 * to the account. See AcceptInvitation to programmatically accept an
38 * invitation. (admins.create)
39 *
40 * @param string $parent Required. The resource name of the account this admin
41 * is created for. `accounts/{account_id}`.
42 * @param Admin $postBody
43 * @param array $optParams Optional parameters.
44 * @return Admin
45 * @throws \Google\Service\Exception
46 */
47 public function create($parent, Admin $postBody, $optParams = [])
48 {
49 $params = ['parent' => $parent, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('create', [$params], Admin::class);
52 }
53 /**
54 * Removes the specified admin from the specified account. (admins.delete)
55 *
56 * @param string $name Required. The resource name of the admin to remove from
57 * the account. `accounts/{account_id}/admins/{admin_id}`.
58 * @param array $optParams Optional parameters.
59 * @return MybusinessaccountmanagementEmpty
60 * @throws \Google\Service\Exception
61 */
62 public function delete($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params], MybusinessaccountmanagementEmpty::class);
67 }
68 /**
69 * Lists the admins for the specified account. (admins.listAccountsAdmins)
70 *
71 * @param string $parent Required. The name of the account from which to
72 * retrieve a list of admins. `accounts/{account_id}/admins`.
73 * @param array $optParams Optional parameters.
74 * @return ListAccountAdminsResponse
75 * @throws \Google\Service\Exception
76 */
77 public function listAccountsAdmins($parent, $optParams = [])
78 {
79 $params = ['parent' => $parent];
80 $params = array_merge($params, $optParams);
81 return $this->call('list', [$params], ListAccountAdminsResponse::class);
82 }
83 /**
84 * Updates the Admin for the specified Account Admin. (admins.patch)
85 *
86 * @param string $name Immutable. The resource name. For account admins, this is
87 * in the form: `accounts/{account_id}/admins/{admin_id}` For location admins,
88 * this is in the form: `locations/{location_id}/admins/{admin_id}` This field
89 * will be ignored if set during admin creation.
90 * @param Admin $postBody
91 * @param array $optParams Optional parameters.
92 *
93 * @opt_param string updateMask Required. The specific fields that should be
94 * updated. The only editable field is role.
95 * @return Admin
96 * @throws \Google\Service\Exception
97 */
98 public function patch($name, Admin $postBody, $optParams = [])
99 {
100 $params = ['name' => $name, 'postBody' => $postBody];
101 $params = array_merge($params, $optParams);
102 return $this->call('patch', [$params], Admin::class);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(AccountsAdmins::class, 'Google_Service_MyBusinessAccountManagement_Resource_AccountsAdmins');
Note: See TracBrowser for help on using the repository browser.