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\GoogleCloudDatalabelingV1beta1AnnotatedDataset; 21use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ListAnnotatedDatasetsResponse; 22use Google\Service\DataLabeling\GoogleProtobufEmpty; 23 24/** 25 * The "annotatedDatasets" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $datalabelingService = new Google\Service\DataLabeling(...); 29 * $annotatedDatasets = $datalabelingService->annotatedDatasets; 30 * </code> 31 */ 32class ProjectsDatasetsAnnotatedDatasets extends \Google\Service\Resource 33{ 34 /** 35 * Deletes an annotated dataset by resource name. (annotatedDatasets.delete) 36 * 37 * @param string $name Required. Name of the annotated dataset to delete, 38 * format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ 39 * {annotated_dataset_id} 40 * @param array $optParams Optional parameters. 41 * @return GoogleProtobufEmpty 42 */ 43 public function delete($name, $optParams = []) 44 { 45 $params = ['name' => $name]; 46 $params = array_merge($params, $optParams); 47 return $this->call('delete', [$params], GoogleProtobufEmpty::class); 48 } 49 /** 50 * Gets an annotated dataset by resource name. (annotatedDatasets.get) 51 * 52 * @param string $name Required. Name of the annotated dataset to get, format: 53 * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ 54 * {annotated_dataset_id} 55 * @param array $optParams Optional parameters. 56 * @return GoogleCloudDatalabelingV1beta1AnnotatedDataset 57 */ 58 public function get($name, $optParams = []) 59 { 60 $params = ['name' => $name]; 61 $params = array_merge($params, $optParams); 62 return $this->call('get', [$params], GoogleCloudDatalabelingV1beta1AnnotatedDataset::class); 63 } 64 /** 65 * Lists annotated datasets for a dataset. Pagination is supported. 66 * (annotatedDatasets.listProjectsDatasetsAnnotatedDatasets) 67 * 68 * @param string $parent Required. Name of the dataset to list annotated 69 * datasets, format: projects/{project_id}/datasets/{dataset_id} 70 * @param array $optParams Optional parameters. 71 * 72 * @opt_param string filter Optional. Filter is not supported at this moment. 73 * @opt_param int pageSize Optional. Requested page size. Server may return 74 * fewer results than requested. Default value is 100. 75 * @opt_param string pageToken Optional. A token identifying a page of results 76 * for the server to return. Typically obtained by 77 * ListAnnotatedDatasetsResponse.next_page_token of the previous 78 * [DataLabelingService.ListAnnotatedDatasets] call. Return first page if empty. 79 * @return GoogleCloudDatalabelingV1beta1ListAnnotatedDatasetsResponse 80 */ 81 public function listProjectsDatasetsAnnotatedDatasets($parent, $optParams = []) 82 { 83 $params = ['parent' => $parent]; 84 $params = array_merge($params, $optParams); 85 return $this->call('list', [$params], GoogleCloudDatalabelingV1beta1ListAnnotatedDatasetsResponse::class); 86 } 87} 88 89// Adding a class alias for backwards compatibility with the previous class name. 90class_alias(ProjectsDatasetsAnnotatedDatasets::class, 'Google_Service_DataLabeling_Resource_ProjectsDatasetsAnnotatedDatasets'); 91