[e3d4e0a] | 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\AddHeldAccountsRequest;
|
---|
| 21 | use Google\Service\Vault\AddHeldAccountsResponse;
|
---|
| 22 | use Google\Service\Vault\Hold;
|
---|
| 23 | use Google\Service\Vault\ListHoldsResponse;
|
---|
| 24 | use Google\Service\Vault\RemoveHeldAccountsRequest;
|
---|
| 25 | use Google\Service\Vault\RemoveHeldAccountsResponse;
|
---|
| 26 | use Google\Service\Vault\VaultEmpty;
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * The "holds" collection of methods.
|
---|
| 30 | * Typical usage is:
|
---|
| 31 | * <code>
|
---|
| 32 | * $vaultService = new Google\Service\Vault(...);
|
---|
| 33 | * $holds = $vaultService->matters_holds;
|
---|
| 34 | * </code>
|
---|
| 35 | */
|
---|
| 36 | class MattersHolds extends \Google\Service\Resource
|
---|
| 37 | {
|
---|
| 38 | /**
|
---|
| 39 | * Adds accounts to a hold. Returns a list of accounts that have been
|
---|
| 40 | * successfully added. Accounts can be added only to an existing account-based
|
---|
| 41 | * hold. (holds.addHeldAccounts)
|
---|
| 42 | *
|
---|
| 43 | * @param string $matterId The matter ID.
|
---|
| 44 | * @param string $holdId The hold ID.
|
---|
| 45 | * @param AddHeldAccountsRequest $postBody
|
---|
| 46 | * @param array $optParams Optional parameters.
|
---|
| 47 | * @return AddHeldAccountsResponse
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function addHeldAccounts($matterId, $holdId, AddHeldAccountsRequest $postBody, $optParams = [])
|
---|
| 51 | {
|
---|
| 52 | $params = ['matterId' => $matterId, 'holdId' => $holdId, 'postBody' => $postBody];
|
---|
| 53 | $params = array_merge($params, $optParams);
|
---|
| 54 | return $this->call('addHeldAccounts', [$params], AddHeldAccountsResponse::class);
|
---|
| 55 | }
|
---|
| 56 | /**
|
---|
| 57 | * Creates a hold in the specified matter. (holds.create)
|
---|
| 58 | *
|
---|
| 59 | * @param string $matterId The matter ID.
|
---|
| 60 | * @param Hold $postBody
|
---|
| 61 | * @param array $optParams Optional parameters.
|
---|
| 62 | * @return Hold
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function create($matterId, Hold $postBody, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['matterId' => $matterId, 'postBody' => $postBody];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('create', [$params], Hold::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Removes the specified hold and releases the accounts or organizational unit
|
---|
| 73 | * covered by the hold. If the data is not preserved by another hold or
|
---|
| 74 | * retention rule, it might be purged. (holds.delete)
|
---|
| 75 | *
|
---|
| 76 | * @param string $matterId The matter ID.
|
---|
| 77 | * @param string $holdId The hold ID.
|
---|
| 78 | * @param array $optParams Optional parameters.
|
---|
| 79 | * @return VaultEmpty
|
---|
| 80 | * @throws \Google\Service\Exception
|
---|
| 81 | */
|
---|
| 82 | public function delete($matterId, $holdId, $optParams = [])
|
---|
| 83 | {
|
---|
| 84 | $params = ['matterId' => $matterId, 'holdId' => $holdId];
|
---|
| 85 | $params = array_merge($params, $optParams);
|
---|
| 86 | return $this->call('delete', [$params], VaultEmpty::class);
|
---|
| 87 | }
|
---|
| 88 | /**
|
---|
| 89 | * Gets the specified hold. (holds.get)
|
---|
| 90 | *
|
---|
| 91 | * @param string $matterId The matter ID.
|
---|
| 92 | * @param string $holdId The hold ID.
|
---|
| 93 | * @param array $optParams Optional parameters.
|
---|
| 94 | *
|
---|
| 95 | * @opt_param string view The amount of detail to return for a hold.
|
---|
| 96 | * @return Hold
|
---|
| 97 | * @throws \Google\Service\Exception
|
---|
| 98 | */
|
---|
| 99 | public function get($matterId, $holdId, $optParams = [])
|
---|
| 100 | {
|
---|
| 101 | $params = ['matterId' => $matterId, 'holdId' => $holdId];
|
---|
| 102 | $params = array_merge($params, $optParams);
|
---|
| 103 | return $this->call('get', [$params], Hold::class);
|
---|
| 104 | }
|
---|
| 105 | /**
|
---|
| 106 | * Lists the holds in a matter. (holds.listMattersHolds)
|
---|
| 107 | *
|
---|
| 108 | * @param string $matterId The matter ID.
|
---|
| 109 | * @param array $optParams Optional parameters.
|
---|
| 110 | *
|
---|
| 111 | * @opt_param int pageSize The number of holds to return in the response,
|
---|
| 112 | * between 0 and 100 inclusive. Leaving this empty, or as 0, is the same as
|
---|
| 113 | * **page_size** = 100.
|
---|
| 114 | * @opt_param string pageToken The pagination token as returned in the response.
|
---|
| 115 | * An empty token means start from the beginning.
|
---|
| 116 | * @opt_param string view The amount of detail to return for a hold.
|
---|
| 117 | * @return ListHoldsResponse
|
---|
| 118 | * @throws \Google\Service\Exception
|
---|
| 119 | */
|
---|
| 120 | public function listMattersHolds($matterId, $optParams = [])
|
---|
| 121 | {
|
---|
| 122 | $params = ['matterId' => $matterId];
|
---|
| 123 | $params = array_merge($params, $optParams);
|
---|
| 124 | return $this->call('list', [$params], ListHoldsResponse::class);
|
---|
| 125 | }
|
---|
| 126 | /**
|
---|
| 127 | * Removes the specified accounts from a hold. Returns a list of statuses in the
|
---|
| 128 | * same order as the request. (holds.removeHeldAccounts)
|
---|
| 129 | *
|
---|
| 130 | * @param string $matterId The matter ID.
|
---|
| 131 | * @param string $holdId The hold ID.
|
---|
| 132 | * @param RemoveHeldAccountsRequest $postBody
|
---|
| 133 | * @param array $optParams Optional parameters.
|
---|
| 134 | * @return RemoveHeldAccountsResponse
|
---|
| 135 | * @throws \Google\Service\Exception
|
---|
| 136 | */
|
---|
| 137 | public function removeHeldAccounts($matterId, $holdId, RemoveHeldAccountsRequest $postBody, $optParams = [])
|
---|
| 138 | {
|
---|
| 139 | $params = ['matterId' => $matterId, 'holdId' => $holdId, 'postBody' => $postBody];
|
---|
| 140 | $params = array_merge($params, $optParams);
|
---|
| 141 | return $this->call('removeHeldAccounts', [$params], RemoveHeldAccountsResponse::class);
|
---|
| 142 | }
|
---|
| 143 | /**
|
---|
| 144 | * Updates the scope (organizational unit or accounts) and query parameters of a
|
---|
| 145 | * hold. You cannot add accounts to a hold that covers an organizational unit,
|
---|
| 146 | * nor can you add organizational units to a hold that covers individual
|
---|
| 147 | * accounts. If you try, the unsupported values are ignored. (holds.update)
|
---|
| 148 | *
|
---|
| 149 | * @param string $matterId The matter ID.
|
---|
| 150 | * @param string $holdId The ID of the hold.
|
---|
| 151 | * @param Hold $postBody
|
---|
| 152 | * @param array $optParams Optional parameters.
|
---|
| 153 | * @return Hold
|
---|
| 154 | * @throws \Google\Service\Exception
|
---|
| 155 | */
|
---|
| 156 | public function update($matterId, $holdId, Hold $postBody, $optParams = [])
|
---|
| 157 | {
|
---|
| 158 | $params = ['matterId' => $matterId, 'holdId' => $holdId, 'postBody' => $postBody];
|
---|
| 159 | $params = array_merge($params, $optParams);
|
---|
| 160 | return $this->call('update', [$params], Hold::class);
|
---|
| 161 | }
|
---|
| 162 | }
|
---|
| 163 |
|
---|
| 164 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 165 | class_alias(MattersHolds::class, 'Google_Service_Vault_Resource_MattersHolds');
|
---|