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