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\GoogleCloudDatalabelingV1beta1FeedbackMessage;
21use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ListFeedbackMessagesResponse;
22use Google\Service\DataLabeling\GoogleLongrunningOperation;
23use Google\Service\DataLabeling\GoogleProtobufEmpty;
24
25/**
26 * The "feedbackMessages" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $datalabelingService = new Google\Service\DataLabeling(...);
30 *   $feedbackMessages = $datalabelingService->feedbackMessages;
31 *  </code>
32 */
33class ProjectsDatasetsAnnotatedDatasetsFeedbackThreadsFeedbackMessages extends \Google\Service\Resource
34{
35  /**
36   * Create a FeedbackMessage object. (feedbackMessages.create)
37   *
38   * @param string $parent Required. FeedbackMessage resource parent, format: proj
39   * ects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset_
40   * id}/feedbackThreads/{feedback_thread_id}.
41   * @param GoogleCloudDatalabelingV1beta1FeedbackMessage $postBody
42   * @param array $optParams Optional parameters.
43   * @return GoogleLongrunningOperation
44   */
45  public function create($parent, GoogleCloudDatalabelingV1beta1FeedbackMessage $postBody, $optParams = [])
46  {
47    $params = ['parent' => $parent, 'postBody' => $postBody];
48    $params = array_merge($params, $optParams);
49    return $this->call('create', [$params], GoogleLongrunningOperation::class);
50  }
51  /**
52   * Delete a FeedbackMessage. (feedbackMessages.delete)
53   *
54   * @param string $name Required. Name of the FeedbackMessage that is going to be
55   * deleted. Format: 'projects/{project_id}/datasets/{dataset_id}/annotatedDatase
56   * ts/{annotated_dataset_id}/feedbackThreads/{feedback_thread_id}/feedbackMessag
57   * es/{feedback_message_id}'.
58   * @param array $optParams Optional parameters.
59   * @return GoogleProtobufEmpty
60   */
61  public function delete($name, $optParams = [])
62  {
63    $params = ['name' => $name];
64    $params = array_merge($params, $optParams);
65    return $this->call('delete', [$params], GoogleProtobufEmpty::class);
66  }
67  /**
68   * Get a FeedbackMessage object. (feedbackMessages.get)
69   *
70   * @param string $name Required. Name of the feedback. Format: 'projects/{projec
71   * t_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset_id}/feedback
72   * Threads/{feedback_thread_id}/feedbackMessages/{feedback_message_id}'.
73   * @param array $optParams Optional parameters.
74   * @return GoogleCloudDatalabelingV1beta1FeedbackMessage
75   */
76  public function get($name, $optParams = [])
77  {
78    $params = ['name' => $name];
79    $params = array_merge($params, $optParams);
80    return $this->call('get', [$params], GoogleCloudDatalabelingV1beta1FeedbackMessage::class);
81  }
82  /**
83   * List FeedbackMessages with pagination. (feedbackMessages.listProjectsDatasets
84   * AnnotatedDatasetsFeedbackThreadsFeedbackMessages)
85   *
86   * @param string $parent Required. FeedbackMessage resource parent. Format: "pro
87   * jects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset
88   * _id}/feedbackThreads/{feedback_thread_id}"
89   * @param array $optParams Optional parameters.
90   *
91   * @opt_param int pageSize Optional. Requested page size. Server may return
92   * fewer results than requested. Default value is 100.
93   * @opt_param string pageToken Optional. A token identifying a page of results
94   * for the server to return. Typically obtained by
95   * ListFeedbackMessages.next_page_token of the previous
96   * [DataLabelingService.ListFeedbackMessages] call. Return first page if empty.
97   * @return GoogleCloudDatalabelingV1beta1ListFeedbackMessagesResponse
98   */
99  public function listProjectsDatasetsAnnotatedDatasetsFeedbackThreadsFeedbackMessages($parent, $optParams = [])
100  {
101    $params = ['parent' => $parent];
102    $params = array_merge($params, $optParams);
103    return $this->call('list', [$params], GoogleCloudDatalabelingV1beta1ListFeedbackMessagesResponse::class);
104  }
105}
106
107// Adding a class alias for backwards compatibility with the previous class name.
108class_alias(ProjectsDatasetsAnnotatedDatasetsFeedbackThreadsFeedbackMessages::class, 'Google_Service_DataLabeling_Resource_ProjectsDatasetsAnnotatedDatasetsFeedbackThreadsFeedbackMessages');
109