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\Books\Resource;
19
20use Google\Service\Books\Layersummaries;
21use Google\Service\Books\Layersummary;
22
23/**
24 * The "layers" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $booksService = new Google\Service\Books(...);
28 *   $layers = $booksService->layers;
29 *  </code>
30 */
31class Layers extends \Google\Service\Resource
32{
33  /**
34   * Gets the layer summary for a volume. (layers.get)
35   *
36   * @param string $volumeId The volume to retrieve layers for.
37   * @param string $summaryId The ID for the layer to get the summary for.
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param string contentVersion The content version for the requested
41   * volume.
42   * @opt_param string source String to identify the originator of this request.
43   * @return Layersummary
44   */
45  public function get($volumeId, $summaryId, $optParams = [])
46  {
47    $params = ['volumeId' => $volumeId, 'summaryId' => $summaryId];
48    $params = array_merge($params, $optParams);
49    return $this->call('get', [$params], Layersummary::class);
50  }
51  /**
52   * List the layer summaries for a volume. (layers.listLayers)
53   *
54   * @param string $volumeId The volume to retrieve layers for.
55   * @param array $optParams Optional parameters.
56   *
57   * @opt_param string contentVersion The content version for the requested
58   * volume.
59   * @opt_param string maxResults Maximum number of results to return
60   * @opt_param string pageToken The value of the nextToken from the previous
61   * page.
62   * @opt_param string source String to identify the originator of this request.
63   * @return Layersummaries
64   */
65  public function listLayers($volumeId, $optParams = [])
66  {
67    $params = ['volumeId' => $volumeId];
68    $params = array_merge($params, $optParams);
69    return $this->call('list', [$params], Layersummaries::class);
70  }
71}
72
73// Adding a class alias for backwards compatibility with the previous class name.
74class_alias(Layers::class, 'Google_Service_Books_Resource_Layers');
75