Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit b51902e

Browse files
feat: add list_entry_groups, list_entries, update_entry_group methods to v1beta1 (via synth) (#6)
1 parent 22374c9 commit b51902e

15 files changed

+1651
-300
lines changed

google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py

Lines changed: 332 additions & 50 deletions
Large diffs are not rendered by default.

google/cloud/datacatalog_v1beta1/gapic/data_catalog_client_config.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,21 @@
6262
"retry_codes_name": "idempotent",
6363
"retry_params_name": "default",
6464
},
65+
"ListEntryGroups": {
66+
"timeout_millis": 60000,
67+
"retry_codes_name": "idempotent",
68+
"retry_params_name": "default",
69+
},
70+
"ListEntries": {
71+
"timeout_millis": 60000,
72+
"retry_codes_name": "idempotent",
73+
"retry_params_name": "default",
74+
},
75+
"UpdateEntryGroup": {
76+
"timeout_millis": 60000,
77+
"retry_codes_name": "non_idempotent",
78+
"retry_params_name": "default",
79+
},
6580
"CreateTagTemplate": {
6681
"timeout_millis": 60000,
6782
"retry_codes_name": "non_idempotent",

google/cloud/datacatalog_v1beta1/gapic/enums.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,36 @@ class EntryType(enum.IntEnum):
2929
ENTRY_TYPE_UNSPECIFIED (int): Default unknown type
3030
TABLE (int): Output only. The type of entry that has a GoogleSQL schema, including
3131
logical views.
32+
MODEL (int): Output only. The type of models.
3233
DATA_STREAM (int): Output only. An entry type which is used for streaming entries. Example:
3334
Cloud Pub/Sub topic.
34-
FILESET (int): Alpha feature. An entry type which is a set of files or objects. Example:
35+
FILESET (int): An entry type which is a set of files or objects. Example:
3536
Cloud Storage fileset.
3637
"""
3738

3839
ENTRY_TYPE_UNSPECIFIED = 0
3940
TABLE = 2
41+
MODEL = 5
4042
DATA_STREAM = 3
4143
FILESET = 4
4244

4345

46+
class IntegratedSystem(enum.IntEnum):
47+
"""
48+
This enum describes all the possible systems that Data Catalog integrates
49+
with.
50+
51+
Attributes:
52+
INTEGRATED_SYSTEM_UNSPECIFIED (int): Default unknown system.
53+
BIGQUERY (int): BigQuery.
54+
CLOUD_PUBSUB (int): Cloud Pub/Sub.
55+
"""
56+
57+
INTEGRATED_SYSTEM_UNSPECIFIED = 0
58+
BIGQUERY = 1
59+
CLOUD_PUBSUB = 2
60+
61+
4462
class SearchResultType(enum.IntEnum):
4563
"""
4664
The different types of resources that can be returned in search.

google/cloud/datacatalog_v1beta1/gapic/transports/data_catalog_grpc_transport.py

Lines changed: 88 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ def search_catalog(self):
119119
return the complete resource, only the resource identifier and high
120120
level fields. Clients can subsequentally call ``Get`` methods.
121121
122-
Note that searches do not have full recall. There may be results that
123-
match your query but are not returned, even in subsequent pages of
124-
results. These missing results may vary across repeated calls to search.
125-
Do not rely on this method if you need to guarantee full recall.
122+
Note that Data Catalog search queries do not guarantee full recall.
123+
Query results that match your query may not be returned, even in
124+
subsequent result pages. Also note that results returned (and not
125+
returned) can vary across repeated search queries.
126126
127127
See `Data Catalog Search
128128
Syntax <https://cloud.google.com/data-catalog/docs/how-to/search-reference>`__
@@ -139,9 +139,23 @@ def search_catalog(self):
139139
def create_entry_group(self):
140140
"""Return the gRPC stub for :meth:`DataCatalogClient.create_entry_group`.
141141
142-
Alpha feature. Creates an EntryGroup. The user should enable the Data
143-
Catalog API in the project identified by the ``parent`` parameter (see
144-
[Data Catalog Resource Project]
142+
Creates an EntryGroup.
143+
144+
An entry group contains logically related entries together with Cloud
145+
Identity and Access Management policies that specify the users who can
146+
create, edit, and view entries within the entry group.
147+
148+
Data Catalog automatically creates an entry group for BigQuery entries
149+
("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own
150+
entry group to contain Cloud Storage fileset entries or custom type
151+
entries, and the IAM policies associated with those entries. Entry
152+
groups, like entries, can be searched.
153+
154+
A maximum of 10,000 entry groups may be created per organization across
155+
all locations.
156+
157+
Users should enable the Data Catalog API in the project identified by
158+
the ``parent`` parameter (see [Data Catalog Resource Project]
145159
(/data-catalog/docs/concepts/resource-project) for more information).
146160
147161
Returns:
@@ -155,7 +169,6 @@ def create_entry_group(self):
155169
def get_entry_group(self):
156170
"""Return the gRPC stub for :meth:`DataCatalogClient.get_entry_group`.
157171
158-
Alpha feature.
159172
Gets an EntryGroup.
160173
161174
Returns:
@@ -169,11 +182,11 @@ def get_entry_group(self):
169182
def delete_entry_group(self):
170183
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_entry_group`.
171184
172-
Alpha feature. Deletes an EntryGroup. Only entry groups that do not
173-
contain entries can be deleted. The user should enable the Data Catalog
174-
API in the project identified by the ``name`` parameter (see [Data
175-
Catalog Resource Project] (/data-catalog/docs/concepts/resource-project)
176-
for more information).
185+
Deletes an EntryGroup. Only entry groups that do not contain entries can
186+
be deleted. Users should enable the Data Catalog API in the project
187+
identified by the ``name`` parameter (see [Data Catalog Resource
188+
Project] (/data-catalog/docs/concepts/resource-project) for more
189+
information).
177190
178191
Returns:
179192
Callable: A callable which accepts the appropriate
@@ -186,11 +199,14 @@ def delete_entry_group(self):
186199
def create_entry(self):
187200
"""Return the gRPC stub for :meth:`DataCatalogClient.create_entry`.
188201
189-
Alpha feature. Creates an entry. Currently only entries of 'FILESET'
190-
type can be created. The user should enable the Data Catalog API in the
191-
project identified by the ``parent`` parameter (see [Data Catalog
192-
Resource Project] (/data-catalog/docs/concepts/resource-project) for
193-
more information).
202+
Creates an entry. Only entries of 'FILESET' type or user-specified type
203+
can be created.
204+
205+
Users should enable the Data Catalog API in the project identified by
206+
the ``parent`` parameter (see [Data Catalog Resource Project]
207+
(/data-catalog/docs/concepts/resource-project) for more information).
208+
209+
A maximum of 100,000 entries may be created per entry group.
194210
195211
Returns:
196212
Callable: A callable which accepts the appropriate
@@ -203,8 +219,8 @@ def create_entry(self):
203219
def update_entry(self):
204220
"""Return the gRPC stub for :meth:`DataCatalogClient.update_entry`.
205221
206-
Updates an existing entry. The user should enable the Data Catalog API
207-
in the project identified by the ``entry.name`` parameter (see [Data
222+
Updates an existing entry. Users should enable the Data Catalog API in
223+
the project identified by the ``entry.name`` parameter (see [Data
208224
Catalog Resource Project] (/data-catalog/docs/concepts/resource-project)
209225
for more information).
210226
@@ -219,11 +235,11 @@ def update_entry(self):
219235
def delete_entry(self):
220236
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_entry`.
221237
222-
Alpha feature. Deletes an existing entry. Only entries created through
223-
``CreateEntry`` method can be deleted. The user should enable the Data
224-
Catalog API in the project identified by the ``name`` parameter (see
225-
[Data Catalog Resource Project]
226-
(/data-catalog/docs/concepts/resource-project) for more information).
238+
Deletes an existing entry. Only entries created through ``CreateEntry``
239+
method can be deleted. Users should enable the Data Catalog API in the
240+
project identified by the ``name`` parameter (see [Data Catalog Resource
241+
Project] (/data-catalog/docs/concepts/resource-project) for more
242+
information).
227243
228244
Returns:
229245
Callable: A callable which accepts the appropriate
@@ -260,6 +276,48 @@ def lookup_entry(self):
260276
"""
261277
return self._stubs["data_catalog_stub"].LookupEntry
262278

279+
@property
280+
def list_entry_groups(self):
281+
"""Return the gRPC stub for :meth:`DataCatalogClient.list_entry_groups`.
282+
283+
Lists entry groups.
284+
285+
Returns:
286+
Callable: A callable which accepts the appropriate
287+
deserialized request object and returns a
288+
deserialized response object.
289+
"""
290+
return self._stubs["data_catalog_stub"].ListEntryGroups
291+
292+
@property
293+
def list_entries(self):
294+
"""Return the gRPC stub for :meth:`DataCatalogClient.list_entries`.
295+
296+
Lists entries.
297+
298+
Returns:
299+
Callable: A callable which accepts the appropriate
300+
deserialized request object and returns a
301+
deserialized response object.
302+
"""
303+
return self._stubs["data_catalog_stub"].ListEntries
304+
305+
@property
306+
def update_entry_group(self):
307+
"""Return the gRPC stub for :meth:`DataCatalogClient.update_entry_group`.
308+
309+
Updates an EntryGroup. The user should enable the Data Catalog API in
310+
the project identified by the ``entry_group.name`` parameter (see [Data
311+
Catalog Resource Project] (/data-catalog/docs/concepts/resource-project)
312+
for more information).
313+
314+
Returns:
315+
Callable: A callable which accepts the appropriate
316+
deserialized request object and returns a
317+
deserialized response object.
318+
"""
319+
return self._stubs["data_catalog_stub"].UpdateEntryGroup
320+
263321
@property
264322
def create_tag_template(self):
265323
"""Return the gRPC stub for :meth:`DataCatalogClient.create_tag_template`.
@@ -297,7 +355,7 @@ def update_tag_template(self):
297355
Updates a tag template. This method cannot be used to update the fields
298356
of a template. The tag template fields are represented as separate
299357
resources and should be updated using their own create/update/delete
300-
methods. The user should enable the Data Catalog API in the project
358+
methods. Users should enable the Data Catalog API in the project
301359
identified by the ``tag_template.name`` parameter (see [Data Catalog
302360
Resource Project] (/data-catalog/docs/concepts/resource-project) for
303361
more information).
@@ -313,7 +371,7 @@ def update_tag_template(self):
313371
def delete_tag_template(self):
314372
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_tag_template`.
315373
316-
Deletes a tag template and all tags using the template. The user should
374+
Deletes a tag template and all tags using the template. Users should
317375
enable the Data Catalog API in the project identified by the ``name``
318376
parameter (see [Data Catalog Resource Project]
319377
(/data-catalog/docs/concepts/resource-project) for more information).
@@ -347,8 +405,8 @@ def update_tag_template_field(self):
347405
"""Return the gRPC stub for :meth:`DataCatalogClient.update_tag_template_field`.
348406
349407
Updates a field in a tag template. This method cannot be used to update
350-
the field type. The user should enable the Data Catalog API in the
351-
project identified by the ``name`` parameter (see [Data Catalog Resource
408+
the field type. Users should enable the Data Catalog API in the project
409+
identified by the ``name`` parameter (see [Data Catalog Resource
352410
Project] (/data-catalog/docs/concepts/resource-project) for more
353411
information).
354412
@@ -380,7 +438,7 @@ def rename_tag_template_field(self):
380438
def delete_tag_template_field(self):
381439
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_tag_template_field`.
382440
383-
Deletes a field in a tag template and all uses of that field. The user
441+
Deletes a field in a tag template and all uses of that field. Users
384442
should enable the Data Catalog API in the project identified by the
385443
``name`` parameter (see [Data Catalog Resource Project]
386444
(/data-catalog/docs/concepts/resource-project) for more information).

google/cloud/datacatalog_v1beta1/proto/common_pb2.py

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2+
import grpc

0 commit comments

Comments
 (0)