[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\Aiplatform\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1CancelDataLabelingJobRequest;
|
---|
| 21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1DataLabelingJob;
|
---|
| 22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListDataLabelingJobsResponse;
|
---|
| 23 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
| 24 | use Google\Service\Aiplatform\GoogleProtobufEmpty;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "dataLabelingJobs" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
| 31 | * $dataLabelingJobs = $aiplatformService->projects_locations_dataLabelingJobs;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsLocationsDataLabelingJobs extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
|
---|
| 38 | * (dataLabelingJobs.cancel)
|
---|
| 39 | *
|
---|
| 40 | * @param string $name Required. The name of the DataLabelingJob. Format: `proje
|
---|
| 41 | * cts/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
|
---|
| 42 | * @param GoogleCloudAiplatformV1CancelDataLabelingJobRequest $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return GoogleProtobufEmpty
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function cancel($name, GoogleCloudAiplatformV1CancelDataLabelingJobRequest $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Creates a DataLabelingJob. (dataLabelingJobs.create)
|
---|
| 55 | *
|
---|
| 56 | * @param string $parent Required. The parent of the DataLabelingJob. Format:
|
---|
| 57 | * `projects/{project}/locations/{location}`
|
---|
| 58 | * @param GoogleCloudAiplatformV1DataLabelingJob $postBody
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | * @return GoogleCloudAiplatformV1DataLabelingJob
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function create($parent, GoogleCloudAiplatformV1DataLabelingJob $postBody, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('create', [$params], GoogleCloudAiplatformV1DataLabelingJob::class);
|
---|
| 68 | }
|
---|
| 69 | /**
|
---|
| 70 | * Deletes a DataLabelingJob. (dataLabelingJobs.delete)
|
---|
| 71 | *
|
---|
| 72 | * @param string $name Required. The name of the DataLabelingJob to be deleted.
|
---|
| 73 | * Format: `projects/{project}/locations/{location}/dataLabelingJobs/{data_label
|
---|
| 74 | * ing_job}`
|
---|
| 75 | * @param array $optParams Optional parameters.
|
---|
| 76 | * @return GoogleLongrunningOperation
|
---|
| 77 | * @throws \Google\Service\Exception
|
---|
| 78 | */
|
---|
| 79 | public function delete($name, $optParams = [])
|
---|
| 80 | {
|
---|
| 81 | $params = ['name' => $name];
|
---|
| 82 | $params = array_merge($params, $optParams);
|
---|
| 83 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 84 | }
|
---|
| 85 | /**
|
---|
| 86 | * Gets a DataLabelingJob. (dataLabelingJobs.get)
|
---|
| 87 | *
|
---|
| 88 | * @param string $name Required. The name of the DataLabelingJob. Format: `proje
|
---|
| 89 | * cts/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | * @return GoogleCloudAiplatformV1DataLabelingJob
|
---|
| 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], GoogleCloudAiplatformV1DataLabelingJob::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Lists DataLabelingJobs in a Location.
|
---|
| 102 | * (dataLabelingJobs.listProjectsLocationsDataLabelingJobs)
|
---|
| 103 | *
|
---|
| 104 | * @param string $parent Required. The parent of the DataLabelingJob. Format:
|
---|
| 105 | * `projects/{project}/locations/{location}`
|
---|
| 106 | * @param array $optParams Optional parameters.
|
---|
| 107 | *
|
---|
| 108 | * @opt_param string filter The standard list filter. Supported fields: *
|
---|
| 109 | * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. * `state`
|
---|
| 110 | * supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`,
|
---|
| 111 | * `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. *
|
---|
| 112 | * `labels` supports general map functions that is: `labels.key=value` -
|
---|
| 113 | * key:value equality `labels.key:* - key existence Some examples of using the
|
---|
| 114 | * filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` *
|
---|
| 115 | * `state!="JOB_STATE_FAILED" OR display_name="my_job"` * `NOT
|
---|
| 116 | * display_name="my_job"` * `create_time>"2021-05-18T00:00:00Z"` *
|
---|
| 117 | * `labels.keyA=valueA` * `labels.keyB:*`
|
---|
| 118 | * @opt_param string orderBy A comma-separated list of fields to order by,
|
---|
| 119 | * sorted in ascending order by default. Use `desc` after a field name for
|
---|
| 120 | * descending.
|
---|
| 121 | * @opt_param int pageSize The standard list page size.
|
---|
| 122 | * @opt_param string pageToken The standard list page token.
|
---|
| 123 | * @opt_param string readMask Mask specifying which fields to read. FieldMask
|
---|
| 124 | * represents a set of symbolic field paths. For example, the mask can be
|
---|
| 125 | * `paths: "name"`. The "name" here is a field in DataLabelingJob. If this field
|
---|
| 126 | * is not set, all fields of the DataLabelingJob are returned.
|
---|
| 127 | * @return GoogleCloudAiplatformV1ListDataLabelingJobsResponse
|
---|
| 128 | * @throws \Google\Service\Exception
|
---|
| 129 | */
|
---|
| 130 | public function listProjectsLocationsDataLabelingJobs($parent, $optParams = [])
|
---|
| 131 | {
|
---|
| 132 | $params = ['parent' => $parent];
|
---|
| 133 | $params = array_merge($params, $optParams);
|
---|
| 134 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListDataLabelingJobsResponse::class);
|
---|
| 135 | }
|
---|
| 136 | }
|
---|
| 137 |
|
---|
| 138 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 139 | class_alias(ProjectsLocationsDataLabelingJobs::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsDataLabelingJobs');
|
---|