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\GoogleCloudDatalabelingV1beta1FeedbackThread; 21use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ListFeedbackThreadsResponse; 22use Google\Service\DataLabeling\GoogleProtobufEmpty; 23 24/** 25 * The "feedbackThreads" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $datalabelingService = new Google\Service\DataLabeling(...); 29 * $feedbackThreads = $datalabelingService->feedbackThreads; 30 * </code> 31 */ 32class ProjectsDatasetsAnnotatedDatasetsFeedbackThreads extends \Google\Service\Resource 33{ 34 /** 35 * Delete a FeedbackThread. (feedbackThreads.delete) 36 * 37 * @param string $name Required. Name of the FeedbackThread that is going to be 38 * deleted. Format: 'projects/{project_id}/datasets/{dataset_id}/annotatedDatase 39 * ts/{annotated_dataset_id}/feedbackThreads/{feedback_thread_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 * Get a FeedbackThread object. (feedbackThreads.get) 51 * 52 * @param string $name Required. Name of the feedback. Format: 'projects/{projec 53 * t_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset_id}/feedback 54 * Threads/{feedback_thread_id}'. 55 * @param array $optParams Optional parameters. 56 * @return GoogleCloudDatalabelingV1beta1FeedbackThread 57 */ 58 public function get($name, $optParams = []) 59 { 60 $params = ['name' => $name]; 61 $params = array_merge($params, $optParams); 62 return $this->call('get', [$params], GoogleCloudDatalabelingV1beta1FeedbackThread::class); 63 } 64 /** 65 * List FeedbackThreads with pagination. 66 * (feedbackThreads.listProjectsDatasetsAnnotatedDatasetsFeedbackThreads) 67 * 68 * @param string $parent Required. FeedbackThread resource parent. Format: "proj 69 * ects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset_ 70 * id}" 71 * @param array $optParams Optional parameters. 72 * 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 * ListFeedbackThreads.next_page_token of the previous 78 * [DataLabelingService.ListFeedbackThreads] call. Return first page if empty. 79 * @return GoogleCloudDatalabelingV1beta1ListFeedbackThreadsResponse 80 */ 81 public function listProjectsDatasetsAnnotatedDatasetsFeedbackThreads($parent, $optParams = []) 82 { 83 $params = ['parent' => $parent]; 84 $params = array_merge($params, $optParams); 85 return $this->call('list', [$params], GoogleCloudDatalabelingV1beta1ListFeedbackThreadsResponse::class); 86 } 87} 88 89// Adding a class alias for backwards compatibility with the previous class name. 90class_alias(ProjectsDatasetsAnnotatedDatasetsFeedbackThreads::class, 'Google_Service_DataLabeling_Resource_ProjectsDatasetsAnnotatedDatasetsFeedbackThreads'); 91