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