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\DataprocMetastore\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\DataprocMetastore\ListMetadataImportsResponse;
|
---|
21 | use Google\Service\DataprocMetastore\MetadataImport;
|
---|
22 | use Google\Service\DataprocMetastore\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "metadataImports" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $metastoreService = new Google\Service\DataprocMetastore(...);
|
---|
29 | * $metadataImports = $metastoreService->projects_locations_services_metadataImports;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsServicesMetadataImports extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new MetadataImport in a given project and location.
|
---|
36 | * (metadataImports.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The relative resource name of the service in
|
---|
39 | * which to create a metastore import, in the following
|
---|
40 | * form:projects/{project_number}/locations/{location_id}/services/{service_id}.
|
---|
41 | * @param MetadataImport $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | *
|
---|
44 | * @opt_param string metadataImportId Required. The ID of the metadata import,
|
---|
45 | * which is used as the final component of the metadata import's name.This value
|
---|
46 | * must be between 1 and 64 characters long, begin with a letter, end with a
|
---|
47 | * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
|
---|
48 | * @opt_param string requestId Optional. A request ID. Specify a unique request
|
---|
49 | * ID to allow the server to ignore the request if it has completed. The server
|
---|
50 | * will ignore subsequent requests that provide a duplicate request ID for at
|
---|
51 | * least 60 minutes after the first request.For example, if an initial request
|
---|
52 | * times out, followed by another request with the same request ID, the server
|
---|
53 | * ignores the second request to prevent the creation of duplicate
|
---|
54 | * commitments.The request ID must be a valid UUID
|
---|
55 | * (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
|
---|
56 | * UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
---|
57 | * @return Operation
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function create($parent, MetadataImport $postBody, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('create', [$params], Operation::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * Gets details of a single import. (metadataImports.get)
|
---|
68 | *
|
---|
69 | * @param string $name Required. The relative resource name of the metadata
|
---|
70 | * import to retrieve, in the following form:projects/{project_number}/locations
|
---|
71 | * /{location_id}/services/{service_id}/metadataImports/{import_id}.
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return MetadataImport
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], MetadataImport::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * Lists imports in a service.
|
---|
84 | * (metadataImports.listProjectsLocationsServicesMetadataImports)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. The relative resource name of the service
|
---|
87 | * whose metadata imports to list, in the following form:projects/{project_numbe
|
---|
88 | * r}/locations/{location_id}/services/{service_id}/metadataImports.
|
---|
89 | * @param array $optParams Optional parameters.
|
---|
90 | *
|
---|
91 | * @opt_param string filter Optional. The filter to apply to list results.
|
---|
92 | * @opt_param string orderBy Optional. Specify the ordering of results as
|
---|
93 | * described in Sorting Order
|
---|
94 | * (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
|
---|
95 | * specified, the results will be sorted in the default order.
|
---|
96 | * @opt_param int pageSize Optional. The maximum number of imports to return.
|
---|
97 | * The response may contain less than the maximum number. If unspecified, no
|
---|
98 | * more than 500 imports are returned. The maximum value is 1000; values above
|
---|
99 | * 1000 are changed to 1000.
|
---|
100 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
101 | * DataprocMetastore.ListServices call. Provide this token to retrieve the
|
---|
102 | * subsequent page.To retrieve the first page, supply an empty page token.When
|
---|
103 | * paginating, other parameters provided to DataprocMetastore.ListServices must
|
---|
104 | * match the call that provided the page token.
|
---|
105 | * @return ListMetadataImportsResponse
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function listProjectsLocationsServicesMetadataImports($parent, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['parent' => $parent];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('list', [$params], ListMetadataImportsResponse::class);
|
---|
113 | }
|
---|
114 | /**
|
---|
115 | * Updates a single import. Only the description field of MetadataImport is
|
---|
116 | * supported to be updated. (metadataImports.patch)
|
---|
117 | *
|
---|
118 | * @param string $name Immutable. The relative resource name of the metadata
|
---|
119 | * import, of the form:projects/{project_number}/locations/{location_id}/service
|
---|
120 | * s/{service_id}/metadataImports/{metadata_import_id}.
|
---|
121 | * @param MetadataImport $postBody
|
---|
122 | * @param array $optParams Optional parameters.
|
---|
123 | *
|
---|
124 | * @opt_param string requestId Optional. A request ID. Specify a unique request
|
---|
125 | * ID to allow the server to ignore the request if it has completed. The server
|
---|
126 | * will ignore subsequent requests that provide a duplicate request ID for at
|
---|
127 | * least 60 minutes after the first request.For example, if an initial request
|
---|
128 | * times out, followed by another request with the same request ID, the server
|
---|
129 | * ignores the second request to prevent the creation of duplicate
|
---|
130 | * commitments.The request ID must be a valid UUID
|
---|
131 | * (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
|
---|
132 | * UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
---|
133 | * @opt_param string updateMask Required. A field mask used to specify the
|
---|
134 | * fields to be overwritten in the metadata import resource by the update.
|
---|
135 | * Fields specified in the update_mask are relative to the resource (not to the
|
---|
136 | * full request). A field is overwritten if it is in the mask.
|
---|
137 | * @return Operation
|
---|
138 | * @throws \Google\Service\Exception
|
---|
139 | */
|
---|
140 | public function patch($name, MetadataImport $postBody, $optParams = [])
|
---|
141 | {
|
---|
142 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
143 | $params = array_merge($params, $optParams);
|
---|
144 | return $this->call('patch', [$params], Operation::class);
|
---|
145 | }
|
---|
146 | }
|
---|
147 |
|
---|
148 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
149 | class_alias(ProjectsLocationsServicesMetadataImports::class, 'Google_Service_DataprocMetastore_Resource_ProjectsLocationsServicesMetadataImports');
|
---|