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\Vault\Resource; 19 20use Google\Service\Vault\AddMatterPermissionsRequest; 21use Google\Service\Vault\CloseMatterRequest; 22use Google\Service\Vault\CloseMatterResponse; 23use Google\Service\Vault\CountArtifactsRequest; 24use Google\Service\Vault\ListMattersResponse; 25use Google\Service\Vault\Matter; 26use Google\Service\Vault\MatterPermission; 27use Google\Service\Vault\Operation; 28use Google\Service\Vault\RemoveMatterPermissionsRequest; 29use Google\Service\Vault\ReopenMatterRequest; 30use Google\Service\Vault\ReopenMatterResponse; 31use Google\Service\Vault\UndeleteMatterRequest; 32use Google\Service\Vault\VaultEmpty; 33 34/** 35 * The "matters" collection of methods. 36 * Typical usage is: 37 * <code> 38 * $vaultService = new Google\Service\Vault(...); 39 * $matters = $vaultService->matters; 40 * </code> 41 */ 42class Matters extends \Google\Service\Resource 43{ 44 /** 45 * Adds an account as a matter collaborator. (matters.addPermissions) 46 * 47 * @param string $matterId The matter ID. 48 * @param AddMatterPermissionsRequest $postBody 49 * @param array $optParams Optional parameters. 50 * @return MatterPermission 51 */ 52 public function addPermissions($matterId, AddMatterPermissionsRequest $postBody, $optParams = []) 53 { 54 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 55 $params = array_merge($params, $optParams); 56 return $this->call('addPermissions', [$params], MatterPermission::class); 57 } 58 /** 59 * Closes the specified matter. Returns the matter with updated state. 60 * (matters.close) 61 * 62 * @param string $matterId The matter ID. 63 * @param CloseMatterRequest $postBody 64 * @param array $optParams Optional parameters. 65 * @return CloseMatterResponse 66 */ 67 public function close($matterId, CloseMatterRequest $postBody, $optParams = []) 68 { 69 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 70 $params = array_merge($params, $optParams); 71 return $this->call('close', [$params], CloseMatterResponse::class); 72 } 73 /** 74 * Counts the accounts processed by the specified query. (matters.count) 75 * 76 * @param string $matterId The matter ID. 77 * @param CountArtifactsRequest $postBody 78 * @param array $optParams Optional parameters. 79 * @return Operation 80 */ 81 public function count($matterId, CountArtifactsRequest $postBody, $optParams = []) 82 { 83 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 84 $params = array_merge($params, $optParams); 85 return $this->call('count', [$params], Operation::class); 86 } 87 /** 88 * Creates a matter with the given name and description. The initial state is 89 * open, and the owner is the method caller. Returns the created matter with 90 * default view. (matters.create) 91 * 92 * @param Matter $postBody 93 * @param array $optParams Optional parameters. 94 * @return Matter 95 */ 96 public function create(Matter $postBody, $optParams = []) 97 { 98 $params = ['postBody' => $postBody]; 99 $params = array_merge($params, $optParams); 100 return $this->call('create', [$params], Matter::class); 101 } 102 /** 103 * Deletes the specified matter. Returns the matter with updated state. 104 * (matters.delete) 105 * 106 * @param string $matterId The matter ID 107 * @param array $optParams Optional parameters. 108 * @return Matter 109 */ 110 public function delete($matterId, $optParams = []) 111 { 112 $params = ['matterId' => $matterId]; 113 $params = array_merge($params, $optParams); 114 return $this->call('delete', [$params], Matter::class); 115 } 116 /** 117 * Gets the specified matter. (matters.get) 118 * 119 * @param string $matterId The matter ID. 120 * @param array $optParams Optional parameters. 121 * 122 * @opt_param string view Specifies how much information about the matter to 123 * return in the response. 124 * @return Matter 125 */ 126 public function get($matterId, $optParams = []) 127 { 128 $params = ['matterId' => $matterId]; 129 $params = array_merge($params, $optParams); 130 return $this->call('get', [$params], Matter::class); 131 } 132 /** 133 * Lists matters the requestor has access to. (matters.listMatters) 134 * 135 * @param array $optParams Optional parameters. 136 * 137 * @opt_param int pageSize The number of matters to return in the response. 138 * Default and maximum are 100. 139 * @opt_param string pageToken The pagination token as returned in the response. 140 * @opt_param string state If set, lists only matters with the specified state. 141 * The default lists matters of all states. 142 * @opt_param string view Specifies how much information about the matter to 143 * return in response. 144 * @return ListMattersResponse 145 */ 146 public function listMatters($optParams = []) 147 { 148 $params = []; 149 $params = array_merge($params, $optParams); 150 return $this->call('list', [$params], ListMattersResponse::class); 151 } 152 /** 153 * Removes an account as a matter collaborator. (matters.removePermissions) 154 * 155 * @param string $matterId The matter ID. 156 * @param RemoveMatterPermissionsRequest $postBody 157 * @param array $optParams Optional parameters. 158 * @return VaultEmpty 159 */ 160 public function removePermissions($matterId, RemoveMatterPermissionsRequest $postBody, $optParams = []) 161 { 162 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 163 $params = array_merge($params, $optParams); 164 return $this->call('removePermissions', [$params], VaultEmpty::class); 165 } 166 /** 167 * Reopens the specified matter. Returns the matter with updated state. 168 * (matters.reopen) 169 * 170 * @param string $matterId The matter ID. 171 * @param ReopenMatterRequest $postBody 172 * @param array $optParams Optional parameters. 173 * @return ReopenMatterResponse 174 */ 175 public function reopen($matterId, ReopenMatterRequest $postBody, $optParams = []) 176 { 177 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 178 $params = array_merge($params, $optParams); 179 return $this->call('reopen', [$params], ReopenMatterResponse::class); 180 } 181 /** 182 * Undeletes the specified matter. Returns the matter with updated state. 183 * (matters.undelete) 184 * 185 * @param string $matterId The matter ID. 186 * @param UndeleteMatterRequest $postBody 187 * @param array $optParams Optional parameters. 188 * @return Matter 189 */ 190 public function undelete($matterId, UndeleteMatterRequest $postBody, $optParams = []) 191 { 192 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 193 $params = array_merge($params, $optParams); 194 return $this->call('undelete', [$params], Matter::class); 195 } 196 /** 197 * Updates the specified matter. This updates only the name and description of 198 * the matter, identified by matter ID. Changes to any other fields are ignored. 199 * Returns the default view of the matter. (matters.update) 200 * 201 * @param string $matterId The matter ID. 202 * @param Matter $postBody 203 * @param array $optParams Optional parameters. 204 * @return Matter 205 */ 206 public function update($matterId, Matter $postBody, $optParams = []) 207 { 208 $params = ['matterId' => $matterId, 'postBody' => $postBody]; 209 $params = array_merge($params, $optParams); 210 return $this->call('update', [$params], Matter::class); 211 } 212} 213 214// Adding a class alias for backwards compatibility with the previous class name. 215class_alias(Matters::class, 'Google_Service_Vault_Resource_Matters'); 216