[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\CloudDataplex\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudDataplex\DataplexEmpty;
|
---|
| 21 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1CancelMetadataJobRequest;
|
---|
| 22 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1ListMetadataJobsResponse;
|
---|
| 23 | use Google\Service\CloudDataplex\GoogleCloudDataplexV1MetadataJob;
|
---|
| 24 | use Google\Service\CloudDataplex\GoogleLongrunningOperation;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "metadataJobs" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $dataplexService = new Google\Service\CloudDataplex(...);
|
---|
| 31 | * $metadataJobs = $dataplexService->projects_locations_metadataJobs;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsLocationsMetadataJobs extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Cancels a metadata job.If you cancel a metadata import job that is in
|
---|
| 38 | * progress, the changes in the job might be partially applied. We recommend
|
---|
| 39 | * that you reset the state of the entry groups in your project by running
|
---|
| 40 | * another metadata job that reverts the changes from the canceled job.
|
---|
| 41 | * (metadataJobs.cancel)
|
---|
| 42 | *
|
---|
| 43 | * @param string $name Required. The resource name of the job, in the format pro
|
---|
| 44 | * jects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_j
|
---|
| 45 | * ob_id}
|
---|
| 46 | * @param GoogleCloudDataplexV1CancelMetadataJobRequest $postBody
|
---|
| 47 | * @param array $optParams Optional parameters.
|
---|
| 48 | * @return DataplexEmpty
|
---|
| 49 | * @throws \Google\Service\Exception
|
---|
| 50 | */
|
---|
| 51 | public function cancel($name, GoogleCloudDataplexV1CancelMetadataJobRequest $postBody, $optParams = [])
|
---|
| 52 | {
|
---|
| 53 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 54 | $params = array_merge($params, $optParams);
|
---|
| 55 | return $this->call('cancel', [$params], DataplexEmpty::class);
|
---|
| 56 | }
|
---|
| 57 | /**
|
---|
| 58 | * Creates a metadata job. For example, use a metadata job to import Dataplex
|
---|
| 59 | * Catalog entries and aspects from a third-party system into Dataplex.
|
---|
| 60 | * (metadataJobs.create)
|
---|
| 61 | *
|
---|
| 62 | * @param string $parent Required. The resource name of the parent location, in
|
---|
| 63 | * the format projects/{project_id_or_number}/locations/{location_id}
|
---|
| 64 | * @param GoogleCloudDataplexV1MetadataJob $postBody
|
---|
| 65 | * @param array $optParams Optional parameters.
|
---|
| 66 | *
|
---|
| 67 | * @opt_param string metadataJobId Optional. The metadata job ID. If not
|
---|
| 68 | * provided, a unique ID is generated with the prefix metadata-job-.
|
---|
| 69 | * @opt_param bool validateOnly Optional. The service validates the request
|
---|
| 70 | * without performing any mutations. The default is false.
|
---|
| 71 | * @return GoogleLongrunningOperation
|
---|
| 72 | * @throws \Google\Service\Exception
|
---|
| 73 | */
|
---|
| 74 | public function create($parent, GoogleCloudDataplexV1MetadataJob $postBody, $optParams = [])
|
---|
| 75 | {
|
---|
| 76 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 77 | $params = array_merge($params, $optParams);
|
---|
| 78 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 79 | }
|
---|
| 80 | /**
|
---|
| 81 | * Gets a metadata job. (metadataJobs.get)
|
---|
| 82 | *
|
---|
| 83 | * @param string $name Required. The resource name of the metadata job, in the
|
---|
| 84 | * format projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{
|
---|
| 85 | * metadata_job_id}.
|
---|
| 86 | * @param array $optParams Optional parameters.
|
---|
| 87 | * @return GoogleCloudDataplexV1MetadataJob
|
---|
| 88 | * @throws \Google\Service\Exception
|
---|
| 89 | */
|
---|
| 90 | public function get($name, $optParams = [])
|
---|
| 91 | {
|
---|
| 92 | $params = ['name' => $name];
|
---|
| 93 | $params = array_merge($params, $optParams);
|
---|
| 94 | return $this->call('get', [$params], GoogleCloudDataplexV1MetadataJob::class);
|
---|
| 95 | }
|
---|
| 96 | /**
|
---|
| 97 | * Lists metadata jobs. (metadataJobs.listProjectsLocationsMetadataJobs)
|
---|
| 98 | *
|
---|
| 99 | * @param string $parent Required. The resource name of the parent location, in
|
---|
| 100 | * the format projects/{project_id_or_number}/locations/{location_id}
|
---|
| 101 | * @param array $optParams Optional parameters.
|
---|
| 102 | *
|
---|
| 103 | * @opt_param string filter Optional. Filter request. Filters are case-
|
---|
| 104 | * sensitive. The service supports the following formats: labels.key1 = "value1"
|
---|
| 105 | * labels:key1 name = "value"You can combine filters with AND, OR, and NOT
|
---|
| 106 | * operators.
|
---|
| 107 | * @opt_param string orderBy Optional. The field to sort the results by, either
|
---|
| 108 | * name or create_time. If not specified, the ordering is undefined.
|
---|
| 109 | * @opt_param int pageSize Optional. The maximum number of metadata jobs to
|
---|
| 110 | * return. The service might return fewer jobs than this value. If unspecified,
|
---|
| 111 | * at most 10 jobs are returned. The maximum value is 1,000.
|
---|
| 112 | * @opt_param string pageToken Optional. The page token received from a previous
|
---|
| 113 | * ListMetadataJobs call. Provide this token to retrieve the subsequent page of
|
---|
| 114 | * results. When paginating, all other parameters that are provided to the
|
---|
| 115 | * ListMetadataJobs request must match the call that provided the page token.
|
---|
| 116 | * @return GoogleCloudDataplexV1ListMetadataJobsResponse
|
---|
| 117 | * @throws \Google\Service\Exception
|
---|
| 118 | */
|
---|
| 119 | public function listProjectsLocationsMetadataJobs($parent, $optParams = [])
|
---|
| 120 | {
|
---|
| 121 | $params = ['parent' => $parent];
|
---|
| 122 | $params = array_merge($params, $optParams);
|
---|
| 123 | return $this->call('list', [$params], GoogleCloudDataplexV1ListMetadataJobsResponse::class);
|
---|
| 124 | }
|
---|
| 125 | }
|
---|
| 126 |
|
---|
| 127 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 128 | class_alias(ProjectsLocationsMetadataJobs::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsMetadataJobs');
|
---|