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

Commit

Permalink
docs: Add documentation for enums (#456)
Browse files Browse the repository at this point in the history
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 20, 2023
1 parent c6d800b commit f9d47e0
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4547,7 +4547,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "DataCatalogClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1952,7 +1952,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "PolicyTagManagerClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def sample_export_taxonomies():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "PolicyTagManagerSerializationClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
20 changes: 18 additions & 2 deletions google/cloud/datacatalog_v1/types/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ class BigQueryConnectionSpec(proto.Message):
"""

class ConnectionType(proto.Enum):
r"""The type of the BigQuery connection."""
r"""The type of the BigQuery connection.
Values:
CONNECTION_TYPE_UNSPECIFIED (0):
Unspecified type.
CLOUD_SQL (1):
Cloud SQL connection.
"""
CONNECTION_TYPE_UNSPECIFIED = 0
CLOUD_SQL = 1

Expand Down Expand Up @@ -82,7 +89,16 @@ class CloudSqlBigQueryConnectionSpec(proto.Message):
"""

class DatabaseType(proto.Enum):
r"""Supported Cloud SQL database types."""
r"""Supported Cloud SQL database types.
Values:
DATABASE_TYPE_UNSPECIFIED (0):
Unspecified database type.
POSTGRES (1):
Cloud SQL for PostgreSQL.
MYSQL (2):
Cloud SQL for MySQL.
"""
DATABASE_TYPE_UNSPECIFIED = 0
POSTGRES = 1
MYSQL = 2
Expand Down
12 changes: 12 additions & 0 deletions google/cloud/datacatalog_v1/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
class IntegratedSystem(proto.Enum):
r"""This enum lists all the systems that Data Catalog integrates
with.
Values:
INTEGRATED_SYSTEM_UNSPECIFIED (0):
Default unknown system.
BIGQUERY (1):
BigQuery.
CLOUD_PUBSUB (2):
Cloud Pub/Sub.
DATAPROC_METASTORE (3):
Dataproc Metastore.
DATAPLEX (4):
Dataplex.
"""
INTEGRATED_SYSTEM_UNSPECIFIED = 0
BIGQUERY = 1
Expand Down
11 changes: 10 additions & 1 deletion google/cloud/datacatalog_v1/types/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ class DataSource(proto.Message):
"""

class Service(proto.Enum):
r"""Name of a service that stores the data."""
r"""Name of a service that stores the data.
Values:
SERVICE_UNSPECIFIED (0):
Default unknown service.
CLOUD_STORAGE (1):
Google Cloud Storage service.
BIGQUERY (2):
BigQuery service.
"""
SERVICE_UNSPECIFIED = 0
CLOUD_STORAGE = 1
BIGQUERY = 2
Expand Down
71 changes: 68 additions & 3 deletions google/cloud/datacatalog_v1/types/datacatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,42 @@
class EntryType(proto.Enum):
r"""The enum field that lists all the types of entry resources in Data
Catalog. For example, a BigQuery table entry has the ``TABLE`` type.
Values:
ENTRY_TYPE_UNSPECIFIED (0):
Default unknown type.
TABLE (2):
The entry type that has a GoogleSQL schema,
including logical views.
MODEL (5):
Output only. The type of models.
For more information, see [Supported models in BigQuery ML]
(https://cloud.google.com/bigquery-ml/docs/introduction#supported_models_in).
DATA_STREAM (3):
An entry type for streaming entries. For
example, a Pub/Sub topic.
FILESET (4):
An entry type for a set of files or objects.
For example, a Cloud Storage fileset.
CLUSTER (6):
A group of servers that work together. For
example, a Kafka cluster.
DATABASE (7):
A database.
DATA_SOURCE_CONNECTION (8):
Output only. Connection to a data source. For
example, a BigQuery connection.
ROUTINE (9):
Output only. Routine, for example, a BigQuery
routine.
LAKE (10):
A Dataplex lake.
ZONE (11):
A Dataplex zone.
SERVICE (14):
A service, for example, a Dataproc Metastore
service.
"""
ENTRY_TYPE_UNSPECIFIED = 0
TABLE = 2
Expand Down Expand Up @@ -990,7 +1026,16 @@ class DatabaseTableSpec(proto.Message):
"""

class TableType(proto.Enum):
r"""Type of the table."""
r"""Type of the table.
Values:
TABLE_TYPE_UNSPECIFIED (0):
Default unknown table type.
NATIVE (1):
Native table.
EXTERNAL (2):
External table.
"""
TABLE_TYPE_UNSPECIFIED = 0
NATIVE = 1
EXTERNAL = 2
Expand Down Expand Up @@ -1073,7 +1118,16 @@ class RoutineSpec(proto.Message):
"""

class RoutineType(proto.Enum):
r"""The fine-grained type of the routine."""
r"""The fine-grained type of the routine.
Values:
ROUTINE_TYPE_UNSPECIFIED (0):
Unspecified type.
SCALAR_FUNCTION (1):
Non-builtin permanent scalar function.
PROCEDURE (2):
Stored procedure.
"""
ROUTINE_TYPE_UNSPECIFIED = 0
SCALAR_FUNCTION = 1
PROCEDURE = 2
Expand All @@ -1094,7 +1148,18 @@ class Argument(proto.Message):
"""

class Mode(proto.Enum):
r"""The input or output mode of the argument."""
r"""The input or output mode of the argument.
Values:
MODE_UNSPECIFIED (0):
Unspecified mode.
IN (1):
The argument is input-only.
OUT (2):
The argument is output-only.
INOUT (3):
The argument is both an input and an output.
"""
MODE_UNSPECIFIED = 0
IN = 1
OUT = 2
Expand Down
10 changes: 9 additions & 1 deletion google/cloud/datacatalog_v1/types/policytagmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,15 @@ class Taxonomy(proto.Message):
"""

class PolicyType(proto.Enum):
r"""Defines policy types where the policy tags can be used for."""
r"""Defines policy types where the policy tags can be used for.
Values:
POLICY_TYPE_UNSPECIFIED (0):
Unspecified policy type.
FINE_GRAINED_ACCESS_CONTROL (1):
Fine-grained access control policy that
enables access control on tagged sub-resources.
"""
POLICY_TYPE_UNSPECIFIED = 0
FINE_GRAINED_ACCESS_CONTROL = 1

Expand Down
13 changes: 12 additions & 1 deletion google/cloud/datacatalog_v1/types/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@


class SearchResultType(proto.Enum):
r"""The resource types that can be returned in search results."""
r"""The resource types that can be returned in search results.
Values:
SEARCH_RESULT_TYPE_UNSPECIFIED (0):
Default unknown type.
ENTRY (1):
An [Entry][google.cloud.datacatalog.v1.Entry].
TAG_TEMPLATE (2):
A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate].
ENTRY_GROUP (3):
An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
"""
SEARCH_RESULT_TYPE_UNSPECIFIED = 0
ENTRY = 1
TAG_TEMPLATE = 2
Expand Down
13 changes: 12 additions & 1 deletion google/cloud/datacatalog_v1/types/table_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@


class TableSourceType(proto.Enum):
r"""Table source type."""
r"""Table source type.
Values:
TABLE_SOURCE_TYPE_UNSPECIFIED (0):
Default unknown type.
BIGQUERY_VIEW (2):
Table view.
BIGQUERY_TABLE (5):
BigQuery native table.
BIGQUERY_MATERIALIZED_VIEW (7):
BigQuery materialized view.
"""
TABLE_SOURCE_TYPE_UNSPECIFIED = 0
BIGQUERY_VIEW = 2
BIGQUERY_TABLE = 5
Expand Down
17 changes: 16 additions & 1 deletion google/cloud/datacatalog_v1/types/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,22 @@ class FieldType(proto.Message):
"""

class PrimitiveType(proto.Enum):
r""""""
r"""
Values:
PRIMITIVE_TYPE_UNSPECIFIED (0):
The default invalid value for a type.
DOUBLE (1):
A double precision number.
STRING (2):
An UTF-8 string.
BOOL (3):
A boolean value.
TIMESTAMP (4):
A timestamp.
RICHTEXT (5):
A Richtext description.
"""
PRIMITIVE_TYPE_UNSPECIFIED = 0
DOUBLE = 1
STRING = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3960,7 +3960,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "DataCatalogClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "PolicyTagManagerClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def sample_export_taxonomies():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "PolicyTagManagerSerializationClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
8 changes: 8 additions & 0 deletions google/cloud/datacatalog_v1beta1/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
class IntegratedSystem(proto.Enum):
r"""This enum describes all the possible systems that Data
Catalog integrates with.
Values:
INTEGRATED_SYSTEM_UNSPECIFIED (0):
Default unknown system.
BIGQUERY (1):
BigQuery.
CLOUD_PUBSUB (2):
Cloud Pub/Sub.
"""
INTEGRATED_SYSTEM_UNSPECIFIED = 0
BIGQUERY = 1
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/datacatalog_v1beta1/types/datacatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ class EntryType(proto.Enum):
r"""Entry resources in Data Catalog can be of different types e.g. a
BigQuery Table entry is of type ``TABLE``. This enum describes all
the possible types Data Catalog contains.
Values:
ENTRY_TYPE_UNSPECIFIED (0):
Default unknown type.
TABLE (2):
Output only. The type of entry that has a
GoogleSQL schema, including logical views.
MODEL (5):
Output only. The type of models.
https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro
DATA_STREAM (3):
Output only. An entry type which is used for
streaming entries. Example: Pub/Sub topic.
FILESET (4):
An entry type which is a set of files or
objects. Example: Cloud Storage fileset.
"""
ENTRY_TYPE_UNSPECIFIED = 0
TABLE = 2
Expand Down
10 changes: 9 additions & 1 deletion google/cloud/datacatalog_v1beta1/types/policytagmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ class Taxonomy(proto.Message):
"""

class PolicyType(proto.Enum):
r"""Defines policy types where policy tag can be used for."""
r"""Defines policy types where policy tag can be used for.
Values:
POLICY_TYPE_UNSPECIFIED (0):
Unspecified policy type.
FINE_GRAINED_ACCESS_CONTROL (1):
Fine grained access control policy, which
enables access control on tagged resources.
"""
POLICY_TYPE_UNSPECIFIED = 0
FINE_GRAINED_ACCESS_CONTROL = 1

Expand Down
12 changes: 12 additions & 0 deletions google/cloud/datacatalog_v1beta1/types/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@
class SearchResultType(proto.Enum):
r"""The different types of resources that can be returned in
search.
Values:
SEARCH_RESULT_TYPE_UNSPECIFIED (0):
Default unknown type.
ENTRY (1):
An [Entry][google.cloud.datacatalog.v1beta1.Entry].
TAG_TEMPLATE (2):
A
[TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate].
ENTRY_GROUP (3):
An
[EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup].
"""
SEARCH_RESULT_TYPE_UNSPECIFIED = 0
ENTRY = 1
Expand Down
11 changes: 10 additions & 1 deletion google/cloud/datacatalog_v1beta1/types/table_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@


class TableSourceType(proto.Enum):
r"""Table source type."""
r"""Table source type.
Values:
TABLE_SOURCE_TYPE_UNSPECIFIED (0):
Default unknown type.
BIGQUERY_VIEW (2):
Table view.
BIGQUERY_TABLE (5):
BigQuery native table.
"""
TABLE_SOURCE_TYPE_UNSPECIFIED = 0
BIGQUERY_VIEW = 2
BIGQUERY_TABLE = 5
Expand Down
Loading

0 comments on commit f9d47e0

Please sign in to comment.