source: vendor/google/apiclient-services/src/DataCatalog/Resource/ProjectsLocationsEntryGroupsEntries.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 14.7 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\DataCatalog\Resource;
19
20use Google\Service\DataCatalog\DatacatalogEmpty;
21use Google\Service\DataCatalog\GetIamPolicyRequest;
22use Google\Service\DataCatalog\GoogleCloudDatacatalogV1Contacts;
23use Google\Service\DataCatalog\GoogleCloudDatacatalogV1Entry;
24use Google\Service\DataCatalog\GoogleCloudDatacatalogV1EntryOverview;
25use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ImportEntriesRequest;
26use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ListEntriesResponse;
27use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ModifyEntryContactsRequest;
28use Google\Service\DataCatalog\GoogleCloudDatacatalogV1ModifyEntryOverviewRequest;
29use Google\Service\DataCatalog\GoogleCloudDatacatalogV1StarEntryRequest;
30use Google\Service\DataCatalog\GoogleCloudDatacatalogV1StarEntryResponse;
31use Google\Service\DataCatalog\GoogleCloudDatacatalogV1UnstarEntryRequest;
32use Google\Service\DataCatalog\GoogleCloudDatacatalogV1UnstarEntryResponse;
33use Google\Service\DataCatalog\Operation;
34use Google\Service\DataCatalog\Policy;
35use Google\Service\DataCatalog\TestIamPermissionsRequest;
36use Google\Service\DataCatalog\TestIamPermissionsResponse;
37
38/**
39 * The "entries" collection of methods.
40 * Typical usage is:
41 * <code>
42 * $datacatalogService = new Google\Service\DataCatalog(...);
43 * $entries = $datacatalogService->projects_locations_entryGroups_entries;
44 * </code>
45 */
46class ProjectsLocationsEntryGroupsEntries extends \Google\Service\Resource
47{
48 /**
49 * Creates an entry. You can create entries only with 'FILESET', 'CLUSTER',
50 * 'DATA_STREAM', or custom types. Data Catalog automatically creates entries
51 * with other types during metadata ingestion from integrated systems. You must
52 * enable the Data Catalog API in the project identified by the `parent`
53 * parameter. For more information, see [Data Catalog resource
54 * project](https://cloud.google.com/data-catalog/docs/concepts/resource-
55 * project). An entry group can have a maximum of 100,000 entries.
56 * (entries.create)
57 *
58 * @param string $parent Required. The name of the entry group this entry
59 * belongs to. Note: The entry itself and its child resources might not be
60 * stored in the location specified in its name.
61 * @param GoogleCloudDatacatalogV1Entry $postBody
62 * @param array $optParams Optional parameters.
63 *
64 * @opt_param string entryId Required. The ID of the entry to create. The ID
65 * must contain only letters (a-z, A-Z), numbers (0-9), and underscores (_). The
66 * maximum size is 64 bytes when encoded in UTF-8.
67 * @return GoogleCloudDatacatalogV1Entry
68 * @throws \Google\Service\Exception
69 */
70 public function create($parent, GoogleCloudDatacatalogV1Entry $postBody, $optParams = [])
71 {
72 $params = ['parent' => $parent, 'postBody' => $postBody];
73 $params = array_merge($params, $optParams);
74 return $this->call('create', [$params], GoogleCloudDatacatalogV1Entry::class);
75 }
76 /**
77 * Deletes an existing entry. You can delete only the entries created by the
78 * CreateEntry method. You must enable the Data Catalog API in the project
79 * identified by the `name` parameter. For more information, see [Data Catalog
80 * resource project](https://cloud.google.com/data-
81 * catalog/docs/concepts/resource-project). (entries.delete)
82 *
83 * @param string $name Required. The name of the entry to delete.
84 * @param array $optParams Optional parameters.
85 * @return DatacatalogEmpty
86 * @throws \Google\Service\Exception
87 */
88 public function delete($name, $optParams = [])
89 {
90 $params = ['name' => $name];
91 $params = array_merge($params, $optParams);
92 return $this->call('delete', [$params], DatacatalogEmpty::class);
93 }
94 /**
95 * Gets an entry. (entries.get)
96 *
97 * @param string $name Required. The name of the entry to get.
98 * @param array $optParams Optional parameters.
99 * @return GoogleCloudDatacatalogV1Entry
100 * @throws \Google\Service\Exception
101 */
102 public function get($name, $optParams = [])
103 {
104 $params = ['name' => $name];
105 $params = array_merge($params, $optParams);
106 return $this->call('get', [$params], GoogleCloudDatacatalogV1Entry::class);
107 }
108 /**
109 * Gets the access control policy for a resource. May return: * A`NOT_FOUND`
110 * error if the resource doesn't exist or you don't have the permission to view
111 * it. * An empty policy if the resource exists but doesn't have a set policy.
112 * Supported resources are: - Tag templates - Entry groups Note: This method
113 * doesn't get policies from Google Cloud Platform resources ingested into Data
114 * Catalog. To call this method, you must have the following Google IAM
115 * permissions: - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
116 * templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry
117 * groups. (entries.getIamPolicy)
118 *
119 * @param string $resource REQUIRED: The resource for which the policy is being
120 * requested. See [Resource
121 * names](https://cloud.google.com/apis/design/resource_names) for the
122 * appropriate value for this field.
123 * @param GetIamPolicyRequest $postBody
124 * @param array $optParams Optional parameters.
125 * @return Policy
126 * @throws \Google\Service\Exception
127 */
128 public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
129 {
130 $params = ['resource' => $resource, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('getIamPolicy', [$params], Policy::class);
133 }
134 /**
135 * Imports entries from a source, such as data previously dumped into a Cloud
136 * Storage bucket, into Data Catalog. Import of entries is a sync operation that
137 * reconciles the state of the third-party system with the Data Catalog.
138 * `ImportEntries` accepts source data snapshots of a third-party system.
139 * Snapshot should be delivered as a .wire or base65-encoded .txt file
140 * containing a sequence of Protocol Buffer messages of DumpItem type.
141 * `ImportEntries` returns a long-running operation resource that can be queried
142 * with Operations.GetOperation to return ImportEntriesMetadata and an
143 * ImportEntriesResponse message. (entries.import)
144 *
145 * @param string $parent Required. Target entry group for ingested entries.
146 * @param GoogleCloudDatacatalogV1ImportEntriesRequest $postBody
147 * @param array $optParams Optional parameters.
148 * @return Operation
149 * @throws \Google\Service\Exception
150 */
151 public function import($parent, GoogleCloudDatacatalogV1ImportEntriesRequest $postBody, $optParams = [])
152 {
153 $params = ['parent' => $parent, 'postBody' => $postBody];
154 $params = array_merge($params, $optParams);
155 return $this->call('import', [$params], Operation::class);
156 }
157 /**
158 * Lists entries. Note: Currently, this method can list only custom entries. To
159 * get a list of both custom and automatically created entries, use
160 * SearchCatalog. (entries.listProjectsLocationsEntryGroupsEntries)
161 *
162 * @param string $parent Required. The name of the entry group that contains the
163 * entries to list. Can be provided in URL format.
164 * @param array $optParams Optional parameters.
165 *
166 * @opt_param int pageSize The maximum number of items to return. Default is 10.
167 * Maximum limit is 1000. Throws an invalid argument if `page_size` is more than
168 * 1000.
169 * @opt_param string pageToken Pagination token that specifies the next page to
170 * return. If empty, the first page is returned.
171 * @opt_param string readMask The fields to return for each entry. If empty or
172 * omitted, all fields are returned. For example, to return a list of entries
173 * with only the `name` field, set `read_mask` to only one path with the `name`
174 * value.
175 * @return GoogleCloudDatacatalogV1ListEntriesResponse
176 * @throws \Google\Service\Exception
177 */
178 public function listProjectsLocationsEntryGroupsEntries($parent, $optParams = [])
179 {
180 $params = ['parent' => $parent];
181 $params = array_merge($params, $optParams);
182 return $this->call('list', [$params], GoogleCloudDatacatalogV1ListEntriesResponse::class);
183 }
184 /**
185 * Modifies contacts, part of the business context of an Entry. To call this
186 * method, you must have the `datacatalog.entries.updateContacts` IAM permission
187 * on the corresponding project. (entries.modifyEntryContacts)
188 *
189 * @param string $name Required. The full resource name of the entry.
190 * @param GoogleCloudDatacatalogV1ModifyEntryContactsRequest $postBody
191 * @param array $optParams Optional parameters.
192 * @return GoogleCloudDatacatalogV1Contacts
193 * @throws \Google\Service\Exception
194 */
195 public function modifyEntryContacts($name, GoogleCloudDatacatalogV1ModifyEntryContactsRequest $postBody, $optParams = [])
196 {
197 $params = ['name' => $name, 'postBody' => $postBody];
198 $params = array_merge($params, $optParams);
199 return $this->call('modifyEntryContacts', [$params], GoogleCloudDatacatalogV1Contacts::class);
200 }
201 /**
202 * Modifies entry overview, part of the business context of an Entry. To call
203 * this method, you must have the `datacatalog.entries.updateOverview` IAM
204 * permission on the corresponding project. (entries.modifyEntryOverview)
205 *
206 * @param string $name Required. The full resource name of the entry.
207 * @param GoogleCloudDatacatalogV1ModifyEntryOverviewRequest $postBody
208 * @param array $optParams Optional parameters.
209 * @return GoogleCloudDatacatalogV1EntryOverview
210 * @throws \Google\Service\Exception
211 */
212 public function modifyEntryOverview($name, GoogleCloudDatacatalogV1ModifyEntryOverviewRequest $postBody, $optParams = [])
213 {
214 $params = ['name' => $name, 'postBody' => $postBody];
215 $params = array_merge($params, $optParams);
216 return $this->call('modifyEntryOverview', [$params], GoogleCloudDatacatalogV1EntryOverview::class);
217 }
218 /**
219 * Updates an existing entry. You must enable the Data Catalog API in the
220 * project identified by the `entry.name` parameter. For more information, see
221 * [Data Catalog resource project](https://cloud.google.com/data-
222 * catalog/docs/concepts/resource-project). (entries.patch)
223 *
224 * @param string $name Output only. Identifier. The resource name of an entry in
225 * URL format. Note: The entry itself and its child resources might not be
226 * stored in the location specified in its name.
227 * @param GoogleCloudDatacatalogV1Entry $postBody
228 * @param array $optParams Optional parameters.
229 *
230 * @opt_param string updateMask Names of fields whose values to overwrite on an
231 * entry. If this parameter is absent or empty, all modifiable fields are
232 * overwritten. If such fields are non-required and omitted in the request body,
233 * their values are emptied. You can modify only the fields listed below. For
234 * entries with type `DATA_STREAM`: * `schema` For entries with type `FILESET`:
235 * * `schema` * `display_name` * `description` * `gcs_fileset_spec` *
236 * `gcs_fileset_spec.file_patterns` For entries with `user_specified_type`: *
237 * `schema` * `display_name` * `description` * `user_specified_type` *
238 * `user_specified_system` * `linked_resource` * `source_system_timestamps`
239 * @return GoogleCloudDatacatalogV1Entry
240 * @throws \Google\Service\Exception
241 */
242 public function patch($name, GoogleCloudDatacatalogV1Entry $postBody, $optParams = [])
243 {
244 $params = ['name' => $name, 'postBody' => $postBody];
245 $params = array_merge($params, $optParams);
246 return $this->call('patch', [$params], GoogleCloudDatacatalogV1Entry::class);
247 }
248 /**
249 * Marks an Entry as starred by the current user. Starring information is
250 * private to each user. (entries.star)
251 *
252 * @param string $name Required. The name of the entry to mark as starred.
253 * @param GoogleCloudDatacatalogV1StarEntryRequest $postBody
254 * @param array $optParams Optional parameters.
255 * @return GoogleCloudDatacatalogV1StarEntryResponse
256 * @throws \Google\Service\Exception
257 */
258 public function star($name, GoogleCloudDatacatalogV1StarEntryRequest $postBody, $optParams = [])
259 {
260 $params = ['name' => $name, 'postBody' => $postBody];
261 $params = array_merge($params, $optParams);
262 return $this->call('star', [$params], GoogleCloudDatacatalogV1StarEntryResponse::class);
263 }
264 /**
265 * Gets your permissions on a resource. Returns an empty set of permissions if
266 * the resource doesn't exist. Supported resources are: - Tag templates - Entry
267 * groups Note: This method gets policies only within Data Catalog and can't be
268 * used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any
269 * external Google Cloud Platform resources ingested into Data Catalog. No
270 * Google IAM permissions are required to call this method.
271 * (entries.testIamPermissions)
272 *
273 * @param string $resource REQUIRED: The resource for which the policy detail is
274 * being requested. See [Resource
275 * names](https://cloud.google.com/apis/design/resource_names) for the
276 * appropriate value for this field.
277 * @param TestIamPermissionsRequest $postBody
278 * @param array $optParams Optional parameters.
279 * @return TestIamPermissionsResponse
280 * @throws \Google\Service\Exception
281 */
282 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
283 {
284 $params = ['resource' => $resource, 'postBody' => $postBody];
285 $params = array_merge($params, $optParams);
286 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
287 }
288 /**
289 * Marks an Entry as NOT starred by the current user. Starring information is
290 * private to each user. (entries.unstar)
291 *
292 * @param string $name Required. The name of the entry to mark as **not**
293 * starred.
294 * @param GoogleCloudDatacatalogV1UnstarEntryRequest $postBody
295 * @param array $optParams Optional parameters.
296 * @return GoogleCloudDatacatalogV1UnstarEntryResponse
297 * @throws \Google\Service\Exception
298 */
299 public function unstar($name, GoogleCloudDatacatalogV1UnstarEntryRequest $postBody, $optParams = [])
300 {
301 $params = ['name' => $name, 'postBody' => $postBody];
302 $params = array_merge($params, $optParams);
303 return $this->call('unstar', [$params], GoogleCloudDatacatalogV1UnstarEntryResponse::class);
304 }
305}
306
307// Adding a class alias for backwards compatibility with the previous class name.
308class_alias(ProjectsLocationsEntryGroupsEntries::class, 'Google_Service_DataCatalog_Resource_ProjectsLocationsEntryGroupsEntries');
Note: See TracBrowser for help on using the repository browser.