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\Export;
21use Google\Service\Vault\ListExportsResponse;
22use Google\Service\Vault\VaultEmpty;
23
24/**
25 * The "exports" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $vaultService = new Google\Service\Vault(...);
29 *   $exports = $vaultService->exports;
30 *  </code>
31 */
32class MattersExports extends \Google\Service\Resource
33{
34  /**
35   * Creates an export. (exports.create)
36   *
37   * @param string $matterId The matter ID.
38   * @param Export $postBody
39   * @param array $optParams Optional parameters.
40   * @return Export
41   */
42  public function create($matterId, Export $postBody, $optParams = [])
43  {
44    $params = ['matterId' => $matterId, 'postBody' => $postBody];
45    $params = array_merge($params, $optParams);
46    return $this->call('create', [$params], Export::class);
47  }
48  /**
49   * Deletes an export. (exports.delete)
50   *
51   * @param string $matterId The matter ID.
52   * @param string $exportId The export ID.
53   * @param array $optParams Optional parameters.
54   * @return VaultEmpty
55   */
56  public function delete($matterId, $exportId, $optParams = [])
57  {
58    $params = ['matterId' => $matterId, 'exportId' => $exportId];
59    $params = array_merge($params, $optParams);
60    return $this->call('delete', [$params], VaultEmpty::class);
61  }
62  /**
63   * Gets an export. (exports.get)
64   *
65   * @param string $matterId The matter ID.
66   * @param string $exportId The export ID.
67   * @param array $optParams Optional parameters.
68   * @return Export
69   */
70  public function get($matterId, $exportId, $optParams = [])
71  {
72    $params = ['matterId' => $matterId, 'exportId' => $exportId];
73    $params = array_merge($params, $optParams);
74    return $this->call('get', [$params], Export::class);
75  }
76  /**
77   * Lists details about the exports in the specified matter.
78   * (exports.listMattersExports)
79   *
80   * @param string $matterId The matter ID.
81   * @param array $optParams Optional parameters.
82   *
83   * @opt_param int pageSize The number of exports to return in the response.
84   * @opt_param string pageToken The pagination token as returned in the response.
85   * @return ListExportsResponse
86   */
87  public function listMattersExports($matterId, $optParams = [])
88  {
89    $params = ['matterId' => $matterId];
90    $params = array_merge($params, $optParams);
91    return $this->call('list', [$params], ListExportsResponse::class);
92  }
93}
94
95// Adding a class alias for backwards compatibility with the previous class name.
96class_alias(MattersExports::class, 'Google_Service_Vault_Resource_MattersExports');
97