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\DataLabeling\Resource;
19
20use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1DataItem;
21use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ListDataItemsResponse;
22
23/**
24 * The "dataItems" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $datalabelingService = new Google\Service\DataLabeling(...);
28 *   $dataItems = $datalabelingService->dataItems;
29 *  </code>
30 */
31class ProjectsDatasetsAnnotatedDatasetsDataItems extends \Google\Service\Resource
32{
33  /**
34   * Gets a data item in a dataset by resource name. This API can be called after
35   * data are imported into dataset. (dataItems.get)
36   *
37   * @param string $name Required. The name of the data item to get, format:
38   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
39   * @param array $optParams Optional parameters.
40   * @return GoogleCloudDatalabelingV1beta1DataItem
41   */
42  public function get($name, $optParams = [])
43  {
44    $params = ['name' => $name];
45    $params = array_merge($params, $optParams);
46    return $this->call('get', [$params], GoogleCloudDatalabelingV1beta1DataItem::class);
47  }
48  /**
49   * Lists data items in a dataset. This API can be called after data are imported
50   * into dataset. Pagination is supported.
51   * (dataItems.listProjectsDatasetsAnnotatedDatasetsDataItems)
52   *
53   * @param string $parent Required. Name of the dataset to list data items,
54   * format: projects/{project_id}/datasets/{dataset_id}
55   * @param array $optParams Optional parameters.
56   *
57   * @opt_param string filter Optional. Filter is not supported at this moment.
58   * @opt_param int pageSize Optional. Requested page size. Server may return
59   * fewer results than requested. Default value is 100.
60   * @opt_param string pageToken Optional. A token identifying a page of results
61   * for the server to return. Typically obtained by
62   * ListDataItemsResponse.next_page_token of the previous
63   * [DataLabelingService.ListDataItems] call. Return first page if empty.
64   * @return GoogleCloudDatalabelingV1beta1ListDataItemsResponse
65   */
66  public function listProjectsDatasetsAnnotatedDatasetsDataItems($parent, $optParams = [])
67  {
68    $params = ['parent' => $parent];
69    $params = array_merge($params, $optParams);
70    return $this->call('list', [$params], GoogleCloudDatalabelingV1beta1ListDataItemsResponse::class);
71  }
72}
73
74// Adding a class alias for backwards compatibility with the previous class name.
75class_alias(ProjectsDatasetsAnnotatedDatasetsDataItems::class, 'Google_Service_DataLabeling_Resource_ProjectsDatasetsAnnotatedDatasetsDataItems');
76