Skip to content

Commit a246d59

Browse files
docs: Add documentation for enums (#456)
* 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: googleapis/googleapis-gen@0080f83 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>
1 parent de09b4f commit a246d59

File tree

22 files changed

+234
-21
lines changed

22 files changed

+234
-21
lines changed

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/services/data_catalog/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4547,7 +4547,7 @@ def sample_test_iam_permissions():
45474547
# Done; return the response.
45484548
return response
45494549

4550-
def __enter__(self):
4550+
def __enter__(self) -> "DataCatalogClient":
45514551
return self
45524552

45534553
def __exit__(self, type, value, traceback):

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/services/policy_tag_manager/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ def sample_test_iam_permissions():
19521952
# Done; return the response.
19531953
return response
19541954

1955-
def __enter__(self):
1955+
def __enter__(self) -> "PolicyTagManagerClient":
19561956
return self
19571957

19581958
def __exit__(self, type, value, traceback):

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/services/policy_tag_manager_serialization/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def sample_export_taxonomies():
752752
# Done; return the response.
753753
return response
754754

755-
def __enter__(self):
755+
def __enter__(self) -> "PolicyTagManagerSerializationClient":
756756
return self
757757

758758
def __exit__(self, type, value, traceback):

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/bigquery.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ class BigQueryConnectionSpec(proto.Message):
4646
"""
4747

4848
class ConnectionType(proto.Enum):
49-
r"""The type of the BigQuery connection."""
49+
r"""The type of the BigQuery connection.
50+
51+
Values:
52+
CONNECTION_TYPE_UNSPECIFIED (0):
53+
Unspecified type.
54+
CLOUD_SQL (1):
55+
Cloud SQL connection.
56+
"""
5057
CONNECTION_TYPE_UNSPECIFIED = 0
5158
CLOUD_SQL = 1
5259

@@ -82,7 +89,16 @@ class CloudSqlBigQueryConnectionSpec(proto.Message):
8289
"""
8390

8491
class DatabaseType(proto.Enum):
85-
r"""Supported Cloud SQL database types."""
92+
r"""Supported Cloud SQL database types.
93+
94+
Values:
95+
DATABASE_TYPE_UNSPECIFIED (0):
96+
Unspecified database type.
97+
POSTGRES (1):
98+
Cloud SQL for PostgreSQL.
99+
MYSQL (2):
100+
Cloud SQL for MySQL.
101+
"""
86102
DATABASE_TYPE_UNSPECIFIED = 0
87103
POSTGRES = 1
88104
MYSQL = 2

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/common.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
class IntegratedSystem(proto.Enum):
3131
r"""This enum lists all the systems that Data Catalog integrates
3232
with.
33+
34+
Values:
35+
INTEGRATED_SYSTEM_UNSPECIFIED (0):
36+
Default unknown system.
37+
BIGQUERY (1):
38+
BigQuery.
39+
CLOUD_PUBSUB (2):
40+
Cloud Pub/Sub.
41+
DATAPROC_METASTORE (3):
42+
Dataproc Metastore.
43+
DATAPLEX (4):
44+
Dataplex.
3345
"""
3446
INTEGRATED_SYSTEM_UNSPECIFIED = 0
3547
BIGQUERY = 1

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/data_source.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ class DataSource(proto.Message):
5050
"""
5151

5252
class Service(proto.Enum):
53-
r"""Name of a service that stores the data."""
53+
r"""Name of a service that stores the data.
54+
55+
Values:
56+
SERVICE_UNSPECIFIED (0):
57+
Default unknown service.
58+
CLOUD_STORAGE (1):
59+
Google Cloud Storage service.
60+
BIGQUERY (2):
61+
BigQuery service.
62+
"""
5463
SERVICE_UNSPECIFIED = 0
5564
CLOUD_STORAGE = 1
5665
BIGQUERY = 2

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/datacatalog.py

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,42 @@
8282
class EntryType(proto.Enum):
8383
r"""The enum field that lists all the types of entry resources in Data
8484
Catalog. For example, a BigQuery table entry has the ``TABLE`` type.
85+
86+
Values:
87+
ENTRY_TYPE_UNSPECIFIED (0):
88+
Default unknown type.
89+
TABLE (2):
90+
The entry type that has a GoogleSQL schema,
91+
including logical views.
92+
MODEL (5):
93+
Output only. The type of models.
94+
95+
For more information, see [Supported models in BigQuery ML]
96+
(https://cloud.google.com/bigquery-ml/docs/introduction#supported_models_in).
97+
DATA_STREAM (3):
98+
An entry type for streaming entries. For
99+
example, a Pub/Sub topic.
100+
FILESET (4):
101+
An entry type for a set of files or objects.
102+
For example, a Cloud Storage fileset.
103+
CLUSTER (6):
104+
A group of servers that work together. For
105+
example, a Kafka cluster.
106+
DATABASE (7):
107+
A database.
108+
DATA_SOURCE_CONNECTION (8):
109+
Output only. Connection to a data source. For
110+
example, a BigQuery connection.
111+
ROUTINE (9):
112+
Output only. Routine, for example, a BigQuery
113+
routine.
114+
LAKE (10):
115+
A Dataplex lake.
116+
ZONE (11):
117+
A Dataplex zone.
118+
SERVICE (14):
119+
A service, for example, a Dataproc Metastore
120+
service.
85121
"""
86122
ENTRY_TYPE_UNSPECIFIED = 0
87123
TABLE = 2
@@ -990,7 +1026,16 @@ class DatabaseTableSpec(proto.Message):
9901026
"""
9911027

9921028
class TableType(proto.Enum):
993-
r"""Type of the table."""
1029+
r"""Type of the table.
1030+
1031+
Values:
1032+
TABLE_TYPE_UNSPECIFIED (0):
1033+
Default unknown table type.
1034+
NATIVE (1):
1035+
Native table.
1036+
EXTERNAL (2):
1037+
External table.
1038+
"""
9941039
TABLE_TYPE_UNSPECIFIED = 0
9951040
NATIVE = 1
9961041
EXTERNAL = 2
@@ -1073,7 +1118,16 @@ class RoutineSpec(proto.Message):
10731118
"""
10741119

10751120
class RoutineType(proto.Enum):
1076-
r"""The fine-grained type of the routine."""
1121+
r"""The fine-grained type of the routine.
1122+
1123+
Values:
1124+
ROUTINE_TYPE_UNSPECIFIED (0):
1125+
Unspecified type.
1126+
SCALAR_FUNCTION (1):
1127+
Non-builtin permanent scalar function.
1128+
PROCEDURE (2):
1129+
Stored procedure.
1130+
"""
10771131
ROUTINE_TYPE_UNSPECIFIED = 0
10781132
SCALAR_FUNCTION = 1
10791133
PROCEDURE = 2
@@ -1094,7 +1148,18 @@ class Argument(proto.Message):
10941148
"""
10951149

10961150
class Mode(proto.Enum):
1097-
r"""The input or output mode of the argument."""
1151+
r"""The input or output mode of the argument.
1152+
1153+
Values:
1154+
MODE_UNSPECIFIED (0):
1155+
Unspecified mode.
1156+
IN (1):
1157+
The argument is input-only.
1158+
OUT (2):
1159+
The argument is output-only.
1160+
INOUT (3):
1161+
The argument is both an input and an output.
1162+
"""
10981163
MODE_UNSPECIFIED = 0
10991164
IN = 1
11001165
OUT = 2

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/policytagmanager.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,15 @@ class Taxonomy(proto.Message):
102102
"""
103103

104104
class PolicyType(proto.Enum):
105-
r"""Defines policy types where the policy tags can be used for."""
105+
r"""Defines policy types where the policy tags can be used for.
106+
107+
Values:
108+
POLICY_TYPE_UNSPECIFIED (0):
109+
Unspecified policy type.
110+
FINE_GRAINED_ACCESS_CONTROL (1):
111+
Fine-grained access control policy that
112+
enables access control on tagged sub-resources.
113+
"""
106114
POLICY_TYPE_UNSPECIFIED = 0
107115
FINE_GRAINED_ACCESS_CONTROL = 1
108116

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/search.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,18 @@
3030

3131

3232
class SearchResultType(proto.Enum):
33-
r"""The resource types that can be returned in search results."""
33+
r"""The resource types that can be returned in search results.
34+
35+
Values:
36+
SEARCH_RESULT_TYPE_UNSPECIFIED (0):
37+
Default unknown type.
38+
ENTRY (1):
39+
An [Entry][google.cloud.datacatalog.v1.Entry].
40+
TAG_TEMPLATE (2):
41+
A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate].
42+
ENTRY_GROUP (3):
43+
An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
44+
"""
3445
SEARCH_RESULT_TYPE_UNSPECIFIED = 0
3546
ENTRY = 1
3647
TAG_TEMPLATE = 2

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/table_spec.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,18 @@
3030

3131

3232
class TableSourceType(proto.Enum):
33-
r"""Table source type."""
33+
r"""Table source type.
34+
35+
Values:
36+
TABLE_SOURCE_TYPE_UNSPECIFIED (0):
37+
Default unknown type.
38+
BIGQUERY_VIEW (2):
39+
Table view.
40+
BIGQUERY_TABLE (5):
41+
BigQuery native table.
42+
BIGQUERY_MATERIALIZED_VIEW (7):
43+
BigQuery materialized view.
44+
"""
3445
TABLE_SOURCE_TYPE_UNSPECIFIED = 0
3546
BIGQUERY_VIEW = 2
3647
BIGQUERY_TABLE = 5

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1/types/tags.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,22 @@ class FieldType(proto.Message):
377377
"""
378378

379379
class PrimitiveType(proto.Enum):
380-
r""""""
380+
r"""
381+
382+
Values:
383+
PRIMITIVE_TYPE_UNSPECIFIED (0):
384+
The default invalid value for a type.
385+
DOUBLE (1):
386+
A double precision number.
387+
STRING (2):
388+
An UTF-8 string.
389+
BOOL (3):
390+
A boolean value.
391+
TIMESTAMP (4):
392+
A timestamp.
393+
RICHTEXT (5):
394+
A Richtext description.
395+
"""
381396
PRIMITIVE_TYPE_UNSPECIFIED = 0
382397
DOUBLE = 1
383398
STRING = 2

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3960,7 +3960,7 @@ def sample_test_iam_permissions():
39603960
# Done; return the response.
39613961
return response
39623962

3963-
def __enter__(self):
3963+
def __enter__(self) -> "DataCatalogClient":
39643964
return self
39653965

39663966
def __exit__(self, type, value, traceback):

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ def sample_test_iam_permissions():
19161916
# Done; return the response.
19171917
return response
19181918

1919-
def __enter__(self):
1919+
def __enter__(self) -> "PolicyTagManagerClient":
19201920
return self
19211921

19221922
def __exit__(self, type, value, traceback):

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def sample_export_taxonomies():
634634
# Done; return the response.
635635
return response
636636

637-
def __enter__(self):
637+
def __enter__(self) -> "PolicyTagManagerSerializationClient":
638638
return self
639639

640640
def __exit__(self, type, value, traceback):

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/types/common.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
class IntegratedSystem(proto.Enum):
2929
r"""This enum describes all the possible systems that Data
3030
Catalog integrates with.
31+
32+
Values:
33+
INTEGRATED_SYSTEM_UNSPECIFIED (0):
34+
Default unknown system.
35+
BIGQUERY (1):
36+
BigQuery.
37+
CLOUD_PUBSUB (2):
38+
Cloud Pub/Sub.
3139
"""
3240
INTEGRATED_SYSTEM_UNSPECIFIED = 0
3341
BIGQUERY = 1

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/types/datacatalog.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@ class EntryType(proto.Enum):
6969
r"""Entry resources in Data Catalog can be of different types e.g. a
7070
BigQuery Table entry is of type ``TABLE``. This enum describes all
7171
the possible types Data Catalog contains.
72+
73+
Values:
74+
ENTRY_TYPE_UNSPECIFIED (0):
75+
Default unknown type.
76+
TABLE (2):
77+
Output only. The type of entry that has a
78+
GoogleSQL schema, including logical views.
79+
MODEL (5):
80+
Output only. The type of models.
81+
https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro
82+
DATA_STREAM (3):
83+
Output only. An entry type which is used for
84+
streaming entries. Example: Pub/Sub topic.
85+
FILESET (4):
86+
An entry type which is a set of files or
87+
objects. Example: Cloud Storage fileset.
7288
"""
7389
ENTRY_TYPE_UNSPECIFIED = 0
7490
TABLE = 2

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/types/policytagmanager.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@ class Taxonomy(proto.Message):
7171
"""
7272

7373
class PolicyType(proto.Enum):
74-
r"""Defines policy types where policy tag can be used for."""
74+
r"""Defines policy types where policy tag can be used for.
75+
76+
Values:
77+
POLICY_TYPE_UNSPECIFIED (0):
78+
Unspecified policy type.
79+
FINE_GRAINED_ACCESS_CONTROL (1):
80+
Fine grained access control policy, which
81+
enables access control on tagged resources.
82+
"""
7583
POLICY_TYPE_UNSPECIFIED = 0
7684
FINE_GRAINED_ACCESS_CONTROL = 1
7785

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/types/search.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
class SearchResultType(proto.Enum):
3030
r"""The different types of resources that can be returned in
3131
search.
32+
33+
Values:
34+
SEARCH_RESULT_TYPE_UNSPECIFIED (0):
35+
Default unknown type.
36+
ENTRY (1):
37+
An [Entry][google.cloud.datacatalog.v1beta1.Entry].
38+
TAG_TEMPLATE (2):
39+
A
40+
[TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate].
41+
ENTRY_GROUP (3):
42+
An
43+
[EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup].
3244
"""
3345
SEARCH_RESULT_TYPE_UNSPECIFIED = 0
3446
ENTRY = 1

packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/types/table_spec.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@
3030

3131

3232
class TableSourceType(proto.Enum):
33-
r"""Table source type."""
33+
r"""Table source type.
34+
35+
Values:
36+
TABLE_SOURCE_TYPE_UNSPECIFIED (0):
37+
Default unknown type.
38+
BIGQUERY_VIEW (2):
39+
Table view.
40+
BIGQUERY_TABLE (5):
41+
BigQuery native table.
42+
"""
3443
TABLE_SOURCE_TYPE_UNSPECIFIED = 0
3544
BIGQUERY_VIEW = 2
3645
BIGQUERY_TABLE = 5

0 commit comments

Comments
 (0)