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\Annotationsdata;
21use Google\Service\Books\DictionaryAnnotationdata;
22
23/**
24 * The "annotationData" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $booksService = new Google\Service\Books(...);
28 *   $annotationData = $booksService->annotationData;
29 *  </code>
30 */
31class LayersAnnotationData extends \Google\Service\Resource
32{
33  /**
34   * Gets the annotation data. (annotationData.get)
35   *
36   * @param string $volumeId The volume to retrieve annotations for.
37   * @param string $layerId The ID for the layer to get the annotations.
38   * @param string $annotationDataId The ID of the annotation data to retrieve.
39   * @param string $contentVersion The content version for the volume you are
40   * trying to retrieve.
41   * @param array $optParams Optional parameters.
42   *
43   * @opt_param bool allowWebDefinitions For the dictionary layer. Whether or not
44   * to allow web definitions.
45   * @opt_param int h The requested pixel height for any images. If height is
46   * provided width must also be provided.
47   * @opt_param string locale The locale information for the data. ISO-639-1
48   * language and ISO-3166-1 country code. Ex: 'en_US'.
49   * @opt_param int scale The requested scale for the image.
50   * @opt_param string source String to identify the originator of this request.
51   * @opt_param int w The requested pixel width for any images. If width is
52   * provided height must also be provided.
53   * @return DictionaryAnnotationdata
54   */
55  public function get($volumeId, $layerId, $annotationDataId, $contentVersion, $optParams = [])
56  {
57    $params = ['volumeId' => $volumeId, 'layerId' => $layerId, 'annotationDataId' => $annotationDataId, 'contentVersion' => $contentVersion];
58    $params = array_merge($params, $optParams);
59    return $this->call('get', [$params], DictionaryAnnotationdata::class);
60  }
61  /**
62   * Gets the annotation data for a volume and layer.
63   * (annotationData.listLayersAnnotationData)
64   *
65   * @param string $volumeId The volume to retrieve annotation data for.
66   * @param string $layerId The ID for the layer to get the annotation data.
67   * @param string $contentVersion The content version for the requested volume.
68   * @param array $optParams Optional parameters.
69   *
70   * @opt_param string annotationDataId The list of Annotation Data Ids to
71   * retrieve. Pagination is ignored if this is set.
72   * @opt_param int h The requested pixel height for any images. If height is
73   * provided width must also be provided.
74   * @opt_param string locale The locale information for the data. ISO-639-1
75   * language and ISO-3166-1 country code. Ex: 'en_US'.
76   * @opt_param string maxResults Maximum number of results to return
77   * @opt_param string pageToken The value of the nextToken from the previous
78   * page.
79   * @opt_param int scale The requested scale for the image.
80   * @opt_param string source String to identify the originator of this request.
81   * @opt_param string updatedMax RFC 3339 timestamp to restrict to items updated
82   * prior to this timestamp (exclusive).
83   * @opt_param string updatedMin RFC 3339 timestamp to restrict to items updated
84   * since this timestamp (inclusive).
85   * @opt_param int w The requested pixel width for any images. If width is
86   * provided height must also be provided.
87   * @return Annotationsdata
88   */
89  public function listLayersAnnotationData($volumeId, $layerId, $contentVersion, $optParams = [])
90  {
91    $params = ['volumeId' => $volumeId, 'layerId' => $layerId, 'contentVersion' => $contentVersion];
92    $params = array_merge($params, $optParams);
93    return $this->call('list', [$params], Annotationsdata::class);
94  }
95}
96
97// Adding a class alias for backwards compatibility with the previous class name.
98class_alias(LayersAnnotationData::class, 'Google_Service_Books_Resource_LayersAnnotationData');
99