[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\GoogleCloudAiplatformV1CancelNasJobRequest;
|
---|
| 21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListNasJobsResponse;
|
---|
| 22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1NasJob;
|
---|
| 23 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
| 24 | use Google\Service\Aiplatform\GoogleProtobufEmpty;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "nasJobs" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
| 31 | * $nasJobs = $aiplatformService->projects_locations_nasJobs;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsLocationsNasJobs extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server
|
---|
| 38 | * makes a best effort to cancel the job, but success is not guaranteed. Clients
|
---|
| 39 | * can use JobService.GetNasJob or other methods to check whether the
|
---|
| 40 | * cancellation succeeded or whether the job completed despite cancellation. On
|
---|
| 41 | * successful cancellation, the NasJob is not deleted; instead it becomes a job
|
---|
| 42 | * with a NasJob.error value with a google.rpc.Status.code of 1, corresponding
|
---|
| 43 | * to `Code.CANCELLED`, and NasJob.state is set to `CANCELLED`. (nasJobs.cancel)
|
---|
| 44 | *
|
---|
| 45 | * @param string $name Required. The name of the NasJob to cancel. Format:
|
---|
| 46 | * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
|
---|
| 47 | * @param GoogleCloudAiplatformV1CancelNasJobRequest $postBody
|
---|
| 48 | * @param array $optParams Optional parameters.
|
---|
| 49 | * @return GoogleProtobufEmpty
|
---|
| 50 | * @throws \Google\Service\Exception
|
---|
| 51 | */
|
---|
| 52 | public function cancel($name, GoogleCloudAiplatformV1CancelNasJobRequest $postBody, $optParams = [])
|
---|
| 53 | {
|
---|
| 54 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 55 | $params = array_merge($params, $optParams);
|
---|
| 56 | return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
|
---|
| 57 | }
|
---|
| 58 | /**
|
---|
| 59 | * Creates a NasJob (nasJobs.create)
|
---|
| 60 | *
|
---|
| 61 | * @param string $parent Required. The resource name of the Location to create
|
---|
| 62 | * the NasJob in. Format: `projects/{project}/locations/{location}`
|
---|
| 63 | * @param GoogleCloudAiplatformV1NasJob $postBody
|
---|
| 64 | * @param array $optParams Optional parameters.
|
---|
| 65 | * @return GoogleCloudAiplatformV1NasJob
|
---|
| 66 | * @throws \Google\Service\Exception
|
---|
| 67 | */
|
---|
| 68 | public function create($parent, GoogleCloudAiplatformV1NasJob $postBody, $optParams = [])
|
---|
| 69 | {
|
---|
| 70 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 71 | $params = array_merge($params, $optParams);
|
---|
| 72 | return $this->call('create', [$params], GoogleCloudAiplatformV1NasJob::class);
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * Deletes a NasJob. (nasJobs.delete)
|
---|
| 76 | *
|
---|
| 77 | * @param string $name Required. The name of the NasJob resource to be deleted.
|
---|
| 78 | * Format: `projects/{project}/locations/{location}/nasJobs/{nas_job}`
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | * @return GoogleLongrunningOperation
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function delete($name, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['name' => $name];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Gets a NasJob (nasJobs.get)
|
---|
| 91 | *
|
---|
| 92 | * @param string $name Required. The name of the NasJob resource. Format:
|
---|
| 93 | * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
|
---|
| 94 | * @param array $optParams Optional parameters.
|
---|
| 95 | * @return GoogleCloudAiplatformV1NasJob
|
---|
| 96 | * @throws \Google\Service\Exception
|
---|
| 97 | */
|
---|
| 98 | public function get($name, $optParams = [])
|
---|
| 99 | {
|
---|
| 100 | $params = ['name' => $name];
|
---|
| 101 | $params = array_merge($params, $optParams);
|
---|
| 102 | return $this->call('get', [$params], GoogleCloudAiplatformV1NasJob::class);
|
---|
| 103 | }
|
---|
| 104 | /**
|
---|
| 105 | * Lists NasJobs in a Location. (nasJobs.listProjectsLocationsNasJobs)
|
---|
| 106 | *
|
---|
| 107 | * @param string $parent Required. The resource name of the Location to list the
|
---|
| 108 | * NasJobs from. Format: `projects/{project}/locations/{location}`
|
---|
| 109 | * @param array $optParams Optional parameters.
|
---|
| 110 | *
|
---|
| 111 | * @opt_param string filter The standard list filter. Supported fields: *
|
---|
| 112 | * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. * `state`
|
---|
| 113 | * supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`,
|
---|
| 114 | * `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. *
|
---|
| 115 | * `labels` supports general map functions that is: `labels.key=value` -
|
---|
| 116 | * key:value equality `labels.key:* - key existence Some examples of using the
|
---|
| 117 | * filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` *
|
---|
| 118 | * `state!="JOB_STATE_FAILED" OR display_name="my_job"` * `NOT
|
---|
| 119 | * display_name="my_job"` * `create_time>"2021-05-18T00:00:00Z"` *
|
---|
| 120 | * `labels.keyA=valueA` * `labels.keyB:*`
|
---|
| 121 | * @opt_param int pageSize The standard list page size.
|
---|
| 122 | * @opt_param string pageToken The standard list page token. Typically obtained
|
---|
| 123 | * via ListNasJobsResponse.next_page_token of the previous
|
---|
| 124 | * JobService.ListNasJobs call.
|
---|
| 125 | * @opt_param string readMask Mask specifying which fields to read.
|
---|
| 126 | * @return GoogleCloudAiplatformV1ListNasJobsResponse
|
---|
| 127 | * @throws \Google\Service\Exception
|
---|
| 128 | */
|
---|
| 129 | public function listProjectsLocationsNasJobs($parent, $optParams = [])
|
---|
| 130 | {
|
---|
| 131 | $params = ['parent' => $parent];
|
---|
| 132 | $params = array_merge($params, $optParams);
|
---|
| 133 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListNasJobsResponse::class);
|
---|
| 134 | }
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 138 | class_alias(ProjectsLocationsNasJobs::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsNasJobs');
|
---|