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

Commit

Permalink
feat: add list_entry_groups, list_entries, update_entry_group m…
Browse files Browse the repository at this point in the history
…ethods to v1beta1 (via synth) (#6)
  • Loading branch information
yoshi-automation authored Feb 19, 2020
1 parent 22374c9 commit b51902e
Show file tree
Hide file tree
Showing 15 changed files with 1,651 additions and 300 deletions.
382 changes: 332 additions & 50 deletions google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListEntryGroups": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListEntries": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"UpdateEntryGroup": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"CreateTagTemplate": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
Expand Down
20 changes: 19 additions & 1 deletion google/cloud/datacatalog_v1beta1/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,36 @@ class EntryType(enum.IntEnum):
ENTRY_TYPE_UNSPECIFIED (int): Default unknown type
TABLE (int): Output only. The type of entry that has a GoogleSQL schema, including
logical views.
MODEL (int): Output only. The type of models.
DATA_STREAM (int): Output only. An entry type which is used for streaming entries. Example:
Cloud Pub/Sub topic.
FILESET (int): Alpha feature. An entry type which is a set of files or objects. Example:
FILESET (int): An entry type which is a set of files or objects. Example:
Cloud Storage fileset.
"""

ENTRY_TYPE_UNSPECIFIED = 0
TABLE = 2
MODEL = 5
DATA_STREAM = 3
FILESET = 4


class IntegratedSystem(enum.IntEnum):
"""
This enum describes all the possible systems that Data Catalog integrates
with.
Attributes:
INTEGRATED_SYSTEM_UNSPECIFIED (int): Default unknown system.
BIGQUERY (int): BigQuery.
CLOUD_PUBSUB (int): Cloud Pub/Sub.
"""

INTEGRATED_SYSTEM_UNSPECIFIED = 0
BIGQUERY = 1
CLOUD_PUBSUB = 2


class SearchResultType(enum.IntEnum):
"""
The different types of resources that can be returned in search.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ def search_catalog(self):
return the complete resource, only the resource identifier and high
level fields. Clients can subsequentally call ``Get`` methods.
Note that searches do not have full recall. There may be results that
match your query but are not returned, even in subsequent pages of
results. These missing results may vary across repeated calls to search.
Do not rely on this method if you need to guarantee full recall.
Note that Data Catalog search queries do not guarantee full recall.
Query results that match your query may not be returned, even in
subsequent result pages. Also note that results returned (and not
returned) can vary across repeated search queries.
See `Data Catalog Search
Syntax <https://cloud.google.com/data-catalog/docs/how-to/search-reference>`__
Expand All @@ -139,9 +139,23 @@ def search_catalog(self):
def create_entry_group(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.create_entry_group`.
Alpha feature. Creates an EntryGroup. The user should enable the Data
Catalog API in the project identified by the ``parent`` parameter (see
[Data Catalog Resource Project]
Creates an EntryGroup.
An entry group contains logically related entries together with Cloud
Identity and Access Management policies that specify the users who can
create, edit, and view entries within the entry group.
Data Catalog automatically creates an entry group for BigQuery entries
("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own
entry group to contain Cloud Storage fileset entries or custom type
entries, and the IAM policies associated with those entries. Entry
groups, like entries, can be searched.
A maximum of 10,000 entry groups may be created per organization across
all locations.
Users should enable the Data Catalog API in the project identified by
the ``parent`` parameter (see [Data Catalog Resource Project]
(/data-catalog/docs/concepts/resource-project) for more information).
Returns:
Expand All @@ -155,7 +169,6 @@ def create_entry_group(self):
def get_entry_group(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.get_entry_group`.
Alpha feature.
Gets an EntryGroup.
Returns:
Expand All @@ -169,11 +182,11 @@ def get_entry_group(self):
def delete_entry_group(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_entry_group`.
Alpha feature. Deletes an EntryGroup. Only entry groups that do not
contain entries can be deleted. The user should enable the Data Catalog
API in the project identified by the ``name`` parameter (see [Data
Catalog Resource Project] (/data-catalog/docs/concepts/resource-project)
for more information).
Deletes an EntryGroup. Only entry groups that do not contain entries can
be deleted. Users should enable the Data Catalog API in the project
identified by the ``name`` parameter (see [Data Catalog Resource
Project] (/data-catalog/docs/concepts/resource-project) for more
information).
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -186,11 +199,14 @@ def delete_entry_group(self):
def create_entry(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.create_entry`.
Alpha feature. Creates an entry. Currently only entries of 'FILESET'
type can be created. The user should enable the Data Catalog API in the
project identified by the ``parent`` parameter (see [Data Catalog
Resource Project] (/data-catalog/docs/concepts/resource-project) for
more information).
Creates an entry. Only entries of 'FILESET' type or user-specified type
can be created.
Users should enable the Data Catalog API in the project identified by
the ``parent`` parameter (see [Data Catalog Resource Project]
(/data-catalog/docs/concepts/resource-project) for more information).
A maximum of 100,000 entries may be created per entry group.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -203,8 +219,8 @@ def create_entry(self):
def update_entry(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.update_entry`.
Updates an existing entry. The user should enable the Data Catalog API
in the project identified by the ``entry.name`` parameter (see [Data
Updates an existing entry. Users should enable the Data Catalog API in
the project identified by the ``entry.name`` parameter (see [Data
Catalog Resource Project] (/data-catalog/docs/concepts/resource-project)
for more information).
Expand All @@ -219,11 +235,11 @@ def update_entry(self):
def delete_entry(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_entry`.
Alpha feature. Deletes an existing entry. Only entries created through
``CreateEntry`` method can be deleted. The user should enable the Data
Catalog API in the project identified by the ``name`` parameter (see
[Data Catalog Resource Project]
(/data-catalog/docs/concepts/resource-project) for more information).
Deletes an existing entry. Only entries created through ``CreateEntry``
method can be deleted. Users should enable the Data Catalog API in the
project identified by the ``name`` parameter (see [Data Catalog Resource
Project] (/data-catalog/docs/concepts/resource-project) for more
information).
Returns:
Callable: A callable which accepts the appropriate
Expand Down Expand Up @@ -260,6 +276,48 @@ def lookup_entry(self):
"""
return self._stubs["data_catalog_stub"].LookupEntry

@property
def list_entry_groups(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.list_entry_groups`.
Lists entry groups.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_catalog_stub"].ListEntryGroups

@property
def list_entries(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.list_entries`.
Lists entries.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_catalog_stub"].ListEntries

@property
def update_entry_group(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.update_entry_group`.
Updates an EntryGroup. The user should enable the Data Catalog API in
the project identified by the ``entry_group.name`` parameter (see [Data
Catalog Resource Project] (/data-catalog/docs/concepts/resource-project)
for more information).
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_catalog_stub"].UpdateEntryGroup

@property
def create_tag_template(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.create_tag_template`.
Expand Down Expand Up @@ -297,7 +355,7 @@ def update_tag_template(self):
Updates a tag template. This method cannot be used to update the fields
of a template. The tag template fields are represented as separate
resources and should be updated using their own create/update/delete
methods. The user should enable the Data Catalog API in the project
methods. Users should enable the Data Catalog API in the project
identified by the ``tag_template.name`` parameter (see [Data Catalog
Resource Project] (/data-catalog/docs/concepts/resource-project) for
more information).
Expand All @@ -313,7 +371,7 @@ def update_tag_template(self):
def delete_tag_template(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_tag_template`.
Deletes a tag template and all tags using the template. The user should
Deletes a tag template and all tags using the template. Users should
enable the Data Catalog API in the project identified by the ``name``
parameter (see [Data Catalog Resource Project]
(/data-catalog/docs/concepts/resource-project) for more information).
Expand Down Expand Up @@ -347,8 +405,8 @@ def update_tag_template_field(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.update_tag_template_field`.
Updates a field in a tag template. This method cannot be used to update
the field type. The user should enable the Data Catalog API in the
project identified by the ``name`` parameter (see [Data Catalog Resource
the field type. Users should enable the Data Catalog API in the project
identified by the ``name`` parameter (see [Data Catalog Resource
Project] (/data-catalog/docs/concepts/resource-project) for more
information).
Expand Down Expand Up @@ -380,7 +438,7 @@ def rename_tag_template_field(self):
def delete_tag_template_field(self):
"""Return the gRPC stub for :meth:`DataCatalogClient.delete_tag_template_field`.
Deletes a field in a tag template and all uses of that field. The user
Deletes a field in a tag template and all uses of that field. Users
should enable the Data Catalog API in the project identified by the
``name`` parameter (see [Data Catalog Resource Project]
(/data-catalog/docs/concepts/resource-project) for more information).
Expand Down
69 changes: 69 additions & 0 deletions google/cloud/datacatalog_v1beta1/proto/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions google/cloud/datacatalog_v1beta1/proto/common_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
Loading

0 comments on commit b51902e

Please sign in to comment.