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\Vault\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Vault\HeldAccount;
|
---|
21 | use Google\Service\Vault\ListHeldAccountsResponse;
|
---|
22 | use Google\Service\Vault\VaultEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "accounts" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $vaultService = new Google\Service\Vault(...);
|
---|
29 | * $accounts = $vaultService->matters_holds_accounts;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class MattersHoldsAccounts extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Adds an account to a hold. Accounts can be added only to a hold that does not
|
---|
36 | * have an organizational unit set. If you try to add an account to an
|
---|
37 | * organizational unit-based hold, an error is returned. (accounts.create)
|
---|
38 | *
|
---|
39 | * @param string $matterId The matter ID.
|
---|
40 | * @param string $holdId The hold ID.
|
---|
41 | * @param HeldAccount $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return HeldAccount
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($matterId, $holdId, HeldAccount $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['matterId' => $matterId, 'holdId' => $holdId, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], HeldAccount::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Removes an account from a hold. (accounts.delete)
|
---|
54 | *
|
---|
55 | * @param string $matterId The matter ID.
|
---|
56 | * @param string $holdId The hold ID.
|
---|
57 | * @param string $accountId The ID of the account to remove from the hold.
|
---|
58 | * @param array $optParams Optional parameters.
|
---|
59 | * @return VaultEmpty
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function delete($matterId, $holdId, $accountId, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['matterId' => $matterId, 'holdId' => $holdId, 'accountId' => $accountId];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('delete', [$params], VaultEmpty::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Lists the accounts covered by a hold. This can list only individually-
|
---|
70 | * specified accounts covered by the hold. If the hold covers an organizational
|
---|
71 | * unit, use the [Admin SDK](https://developers.google.com/admin-sdk/). to list
|
---|
72 | * the members of the organizational unit on hold.
|
---|
73 | * (accounts.listMattersHoldsAccounts)
|
---|
74 | *
|
---|
75 | * @param string $matterId The matter ID.
|
---|
76 | * @param string $holdId The hold ID.
|
---|
77 | * @param array $optParams Optional parameters.
|
---|
78 | * @return ListHeldAccountsResponse
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function listMattersHoldsAccounts($matterId, $holdId, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['matterId' => $matterId, 'holdId' => $holdId];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('list', [$params], ListHeldAccountsResponse::class);
|
---|
86 | }
|
---|
87 | }
|
---|
88 |
|
---|
89 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
90 | class_alias(MattersHoldsAccounts::class, 'Google_Service_Vault_Resource_MattersHoldsAccounts');
|
---|