source: vendor/google/apiclient-services/src/DataLabeling/Resource/ProjectsDatasets.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 6.1 KB
Line 
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\GoogleCloudDatalabelingV1beta1CreateDatasetRequest;
21use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1Dataset;
22use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ExportDataRequest;
23use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ImportDataRequest;
24use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ListDatasetsResponse;
25use Google\Service\DataLabeling\GoogleLongrunningOperation;
26use Google\Service\DataLabeling\GoogleProtobufEmpty;
27
28/**
29 * The "datasets" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $datalabelingService = new Google\Service\DataLabeling(...);
33 * $datasets = $datalabelingService->projects_datasets;
34 * </code>
35 */
36class ProjectsDatasets extends \Google\Service\Resource
37{
38 /**
39 * Creates dataset. If success return a Dataset resource. (datasets.create)
40 *
41 * @param string $parent Required. Dataset resource parent, format:
42 * projects/{project_id}
43 * @param GoogleCloudDatalabelingV1beta1CreateDatasetRequest $postBody
44 * @param array $optParams Optional parameters.
45 * @return GoogleCloudDatalabelingV1beta1Dataset
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, GoogleCloudDatalabelingV1beta1CreateDatasetRequest $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], GoogleCloudDatalabelingV1beta1Dataset::class);
53 }
54 /**
55 * Deletes a dataset by resource name. (datasets.delete)
56 *
57 * @param string $name Required. Dataset resource name, format:
58 * projects/{project_id}/datasets/{dataset_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 * Exports data and annotations from dataset. (datasets.exportData)
71 *
72 * @param string $name Required. Dataset resource name, format:
73 * projects/{project_id}/datasets/{dataset_id}
74 * @param GoogleCloudDatalabelingV1beta1ExportDataRequest $postBody
75 * @param array $optParams Optional parameters.
76 * @return GoogleLongrunningOperation
77 * @throws \Google\Service\Exception
78 */
79 public function exportData($name, GoogleCloudDatalabelingV1beta1ExportDataRequest $postBody, $optParams = [])
80 {
81 $params = ['name' => $name, 'postBody' => $postBody];
82 $params = array_merge($params, $optParams);
83 return $this->call('exportData', [$params], GoogleLongrunningOperation::class);
84 }
85 /**
86 * Gets dataset by resource name. (datasets.get)
87 *
88 * @param string $name Required. Dataset resource name, format:
89 * projects/{project_id}/datasets/{dataset_id}
90 * @param array $optParams Optional parameters.
91 * @return GoogleCloudDatalabelingV1beta1Dataset
92 * @throws \Google\Service\Exception
93 */
94 public function get($name, $optParams = [])
95 {
96 $params = ['name' => $name];
97 $params = array_merge($params, $optParams);
98 return $this->call('get', [$params], GoogleCloudDatalabelingV1beta1Dataset::class);
99 }
100 /**
101 * Imports data into dataset based on source locations defined in request. It
102 * can be called multiple times for the same dataset. Each dataset can only have
103 * one long running operation running on it. For example, no labeling task (also
104 * long running operation) can be started while importing is still ongoing. Vice
105 * versa. (datasets.importData)
106 *
107 * @param string $name Required. Dataset resource name, format:
108 * projects/{project_id}/datasets/{dataset_id}
109 * @param GoogleCloudDatalabelingV1beta1ImportDataRequest $postBody
110 * @param array $optParams Optional parameters.
111 * @return GoogleLongrunningOperation
112 * @throws \Google\Service\Exception
113 */
114 public function importData($name, GoogleCloudDatalabelingV1beta1ImportDataRequest $postBody, $optParams = [])
115 {
116 $params = ['name' => $name, 'postBody' => $postBody];
117 $params = array_merge($params, $optParams);
118 return $this->call('importData', [$params], GoogleLongrunningOperation::class);
119 }
120 /**
121 * Lists datasets under a project. Pagination is supported.
122 * (datasets.listProjectsDatasets)
123 *
124 * @param string $parent Required. Dataset resource parent, format:
125 * projects/{project_id}
126 * @param array $optParams Optional parameters.
127 *
128 * @opt_param string filter Optional. Filter on dataset is not supported at this
129 * moment.
130 * @opt_param int pageSize Optional. Requested page size. Server may return
131 * fewer results than requested. Default value is 100.
132 * @opt_param string pageToken Optional. A token identifying a page of results
133 * for the server to return. Typically obtained by
134 * ListDatasetsResponse.next_page_token of the previous
135 * [DataLabelingService.ListDatasets] call. Returns the first page if empty.
136 * @return GoogleCloudDatalabelingV1beta1ListDatasetsResponse
137 * @throws \Google\Service\Exception
138 */
139 public function listProjectsDatasets($parent, $optParams = [])
140 {
141 $params = ['parent' => $parent];
142 $params = array_merge($params, $optParams);
143 return $this->call('list', [$params], GoogleCloudDatalabelingV1beta1ListDatasetsResponse::class);
144 }
145}
146
147// Adding a class alias for backwards compatibility with the previous class name.
148class_alias(ProjectsDatasets::class, 'Google_Service_DataLabeling_Resource_ProjectsDatasets');
Note: See TracBrowser for help on using the repository browser.