source: vendor/google/apiclient-services/src/DataLabeling/Resource/ProjectsEvaluationJobs.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: 8.0 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\GoogleCloudDatalabelingV1beta1CreateEvaluationJobRequest;
21use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1EvaluationJob;
22use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ListEvaluationJobsResponse;
23use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1PauseEvaluationJobRequest;
24use Google\Service\DataLabeling\GoogleCloudDatalabelingV1beta1ResumeEvaluationJobRequest;
25use Google\Service\DataLabeling\GoogleProtobufEmpty;
26
27/**
28 * The "evaluationJobs" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $datalabelingService = new Google\Service\DataLabeling(...);
32 * $evaluationJobs = $datalabelingService->projects_evaluationJobs;
33 * </code>
34 */
35class ProjectsEvaluationJobs extends \Google\Service\Resource
36{
37 /**
38 * Creates an evaluation job. (evaluationJobs.create)
39 *
40 * @param string $parent Required. Evaluation job resource parent. Format:
41 * "projects/{project_id}"
42 * @param GoogleCloudDatalabelingV1beta1CreateEvaluationJobRequest $postBody
43 * @param array $optParams Optional parameters.
44 * @return GoogleCloudDatalabelingV1beta1EvaluationJob
45 * @throws \Google\Service\Exception
46 */
47 public function create($parent, GoogleCloudDatalabelingV1beta1CreateEvaluationJobRequest $postBody, $optParams = [])
48 {
49 $params = ['parent' => $parent, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('create', [$params], GoogleCloudDatalabelingV1beta1EvaluationJob::class);
52 }
53 /**
54 * Stops and deletes an evaluation job. (evaluationJobs.delete)
55 *
56 * @param string $name Required. Name of the evaluation job that is going to be
57 * deleted. Format: "projects/{project_id}/evaluationJobs/{evaluation_job_id}"
58 * @param array $optParams Optional parameters.
59 * @return GoogleProtobufEmpty
60 * @throws \Google\Service\Exception
61 */
62 public function delete($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
67 }
68 /**
69 * Gets an evaluation job by resource name. (evaluationJobs.get)
70 *
71 * @param string $name Required. Name of the evaluation job. Format:
72 * "projects/{project_id} /evaluationJobs/{evaluation_job_id}"
73 * @param array $optParams Optional parameters.
74 * @return GoogleCloudDatalabelingV1beta1EvaluationJob
75 * @throws \Google\Service\Exception
76 */
77 public function get($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('get', [$params], GoogleCloudDatalabelingV1beta1EvaluationJob::class);
82 }
83 /**
84 * Lists all evaluation jobs within a project with possible filters. Pagination
85 * is supported. (evaluationJobs.listProjectsEvaluationJobs)
86 *
87 * @param string $parent Required. Evaluation job resource parent. Format:
88 * "projects/{project_id}"
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param string filter Optional. You can filter the jobs to list by
92 * model_id (also known as model_name, as described in
93 * EvaluationJob.modelVersion) or by evaluation job state (as described in
94 * EvaluationJob.state). To filter by both criteria, use the `AND` operator or
95 * the `OR` operator. For example, you can use the following string for your
96 * filter: "evaluation_job.model_id = {model_name} AND evaluation_job.state =
97 * {evaluation_job_state}"
98 * @opt_param int pageSize Optional. Requested page size. Server may return
99 * fewer results than requested. Default value is 100.
100 * @opt_param string pageToken Optional. A token identifying a page of results
101 * for the server to return. Typically obtained by the nextPageToken in the
102 * response to the previous request. The request returns the first page if this
103 * is empty.
104 * @return GoogleCloudDatalabelingV1beta1ListEvaluationJobsResponse
105 * @throws \Google\Service\Exception
106 */
107 public function listProjectsEvaluationJobs($parent, $optParams = [])
108 {
109 $params = ['parent' => $parent];
110 $params = array_merge($params, $optParams);
111 return $this->call('list', [$params], GoogleCloudDatalabelingV1beta1ListEvaluationJobsResponse::class);
112 }
113 /**
114 * Updates an evaluation job. You can only update certain fields of the job's
115 * EvaluationJobConfig: `humanAnnotationConfig.instruction`, `exampleCount`, and
116 * `exampleSamplePercentage`. If you want to change any other aspect of the
117 * evaluation job, you must delete the job and create a new one.
118 * (evaluationJobs.patch)
119 *
120 * @param string $name Output only. After you create a job, Data Labeling
121 * Service assigns a name to the job with the following format:
122 * "projects/{project_id}/evaluationJobs/ {evaluation_job_id}"
123 * @param GoogleCloudDatalabelingV1beta1EvaluationJob $postBody
124 * @param array $optParams Optional parameters.
125 *
126 * @opt_param string updateMask Optional. Mask for which fields to update. You
127 * can only provide the following fields: *
128 * `evaluationJobConfig.humanAnnotationConfig.instruction` *
129 * `evaluationJobConfig.exampleCount` *
130 * `evaluationJobConfig.exampleSamplePercentage` You can provide more than one
131 * of these fields by separating them with commas.
132 * @return GoogleCloudDatalabelingV1beta1EvaluationJob
133 * @throws \Google\Service\Exception
134 */
135 public function patch($name, GoogleCloudDatalabelingV1beta1EvaluationJob $postBody, $optParams = [])
136 {
137 $params = ['name' => $name, 'postBody' => $postBody];
138 $params = array_merge($params, $optParams);
139 return $this->call('patch', [$params], GoogleCloudDatalabelingV1beta1EvaluationJob::class);
140 }
141 /**
142 * Pauses an evaluation job. Pausing an evaluation job that is already in a
143 * `PAUSED` state is a no-op. (evaluationJobs.pause)
144 *
145 * @param string $name Required. Name of the evaluation job that is going to be
146 * paused. Format: "projects/{project_id}/evaluationJobs/{evaluation_job_id}"
147 * @param GoogleCloudDatalabelingV1beta1PauseEvaluationJobRequest $postBody
148 * @param array $optParams Optional parameters.
149 * @return GoogleProtobufEmpty
150 * @throws \Google\Service\Exception
151 */
152 public function pause($name, GoogleCloudDatalabelingV1beta1PauseEvaluationJobRequest $postBody, $optParams = [])
153 {
154 $params = ['name' => $name, 'postBody' => $postBody];
155 $params = array_merge($params, $optParams);
156 return $this->call('pause', [$params], GoogleProtobufEmpty::class);
157 }
158 /**
159 * Resumes a paused evaluation job. A deleted evaluation job can't be resumed.
160 * Resuming a running or scheduled evaluation job is a no-op.
161 * (evaluationJobs.resume)
162 *
163 * @param string $name Required. Name of the evaluation job that is going to be
164 * resumed. Format: "projects/{project_id}/evaluationJobs/{evaluation_job_id}"
165 * @param GoogleCloudDatalabelingV1beta1ResumeEvaluationJobRequest $postBody
166 * @param array $optParams Optional parameters.
167 * @return GoogleProtobufEmpty
168 * @throws \Google\Service\Exception
169 */
170 public function resume($name, GoogleCloudDatalabelingV1beta1ResumeEvaluationJobRequest $postBody, $optParams = [])
171 {
172 $params = ['name' => $name, 'postBody' => $postBody];
173 $params = array_merge($params, $optParams);
174 return $this->call('resume', [$params], GoogleProtobufEmpty::class);
175 }
176}
177
178// Adding a class alias for backwards compatibility with the previous class name.
179class_alias(ProjectsEvaluationJobs::class, 'Google_Service_DataLabeling_Resource_ProjectsEvaluationJobs');
Note: See TracBrowser for help on using the repository browser.