diff --git a/.coveragerc b/.coveragerc index c0c0ad46..8f9f82cd 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,34 +1,16 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Generated by synthtool. DO NOT EDIT! [run] branch = True [report] fail_under = 100 show_missing = True -omit = google/cloud/datacatalog/__init__.py +omit = + google/cloud/datacatalog/__init__.py exclude_lines = # Re-enable the standard pragma pragma: NO COVER # Ignore debug-only repr def __repr__ - # Ignore abstract methods - raise NotImplementedError # Ignore pkg_resources exceptions. # This is added at the module level as a safeguard for if someone # generates the code and tries to run it without pip installing. This diff --git a/docs/datacatalog_v1/data_catalog.rst b/docs/datacatalog_v1/data_catalog.rst new file mode 100644 index 00000000..1f955a11 --- /dev/null +++ b/docs/datacatalog_v1/data_catalog.rst @@ -0,0 +1,11 @@ +DataCatalog +----------------------------- + +.. automodule:: google.cloud.datacatalog_v1.services.data_catalog + :members: + :inherited-members: + + +.. automodule:: google.cloud.datacatalog_v1.services.data_catalog.pagers + :members: + :inherited-members: diff --git a/docs/datacatalog_v1/services.rst b/docs/datacatalog_v1/services.rst index a73ca817..fd21338e 100644 --- a/docs/datacatalog_v1/services.rst +++ b/docs/datacatalog_v1/services.rst @@ -1,6 +1,6 @@ Services for Google Cloud Datacatalog v1 API ============================================ +.. toctree:: + :maxdepth: 2 -.. automodule:: google.cloud.datacatalog_v1.services.data_catalog - :members: - :inherited-members: + data_catalog diff --git a/docs/datacatalog_v1/types.rst b/docs/datacatalog_v1/types.rst index 19f12ef8..a27783ee 100644 --- a/docs/datacatalog_v1/types.rst +++ b/docs/datacatalog_v1/types.rst @@ -3,4 +3,5 @@ Types for Google Cloud Datacatalog v1 API .. automodule:: google.cloud.datacatalog_v1.types :members: + :undoc-members: :show-inheritance: diff --git a/docs/datacatalog_v1beta1/data_catalog.rst b/docs/datacatalog_v1beta1/data_catalog.rst new file mode 100644 index 00000000..e3b0675d --- /dev/null +++ b/docs/datacatalog_v1beta1/data_catalog.rst @@ -0,0 +1,11 @@ +DataCatalog +----------------------------- + +.. automodule:: google.cloud.datacatalog_v1beta1.services.data_catalog + :members: + :inherited-members: + + +.. automodule:: google.cloud.datacatalog_v1beta1.services.data_catalog.pagers + :members: + :inherited-members: diff --git a/docs/datacatalog_v1beta1/policy_tag_manager.rst b/docs/datacatalog_v1beta1/policy_tag_manager.rst new file mode 100644 index 00000000..01a7cf6b --- /dev/null +++ b/docs/datacatalog_v1beta1/policy_tag_manager.rst @@ -0,0 +1,11 @@ +PolicyTagManager +---------------------------------- + +.. automodule:: google.cloud.datacatalog_v1beta1.services.policy_tag_manager + :members: + :inherited-members: + + +.. automodule:: google.cloud.datacatalog_v1beta1.services.policy_tag_manager.pagers + :members: + :inherited-members: diff --git a/docs/datacatalog_v1beta1/policy_tag_manager_serialization.rst b/docs/datacatalog_v1beta1/policy_tag_manager_serialization.rst new file mode 100644 index 00000000..aed4c56c --- /dev/null +++ b/docs/datacatalog_v1beta1/policy_tag_manager_serialization.rst @@ -0,0 +1,6 @@ +PolicyTagManagerSerialization +----------------------------------------------- + +.. automodule:: google.cloud.datacatalog_v1beta1.services.policy_tag_manager_serialization + :members: + :inherited-members: diff --git a/docs/datacatalog_v1beta1/services.rst b/docs/datacatalog_v1beta1/services.rst index 43425e2f..4f762e1c 100644 --- a/docs/datacatalog_v1beta1/services.rst +++ b/docs/datacatalog_v1beta1/services.rst @@ -1,12 +1,8 @@ Services for Google Cloud Datacatalog v1beta1 API ================================================= +.. toctree:: + :maxdepth: 2 -.. automodule:: google.cloud.datacatalog_v1beta1.services.data_catalog - :members: - :inherited-members: -.. automodule:: google.cloud.datacatalog_v1beta1.services.policy_tag_manager - :members: - :inherited-members: -.. automodule:: google.cloud.datacatalog_v1beta1.services.policy_tag_manager_serialization - :members: - :inherited-members: + data_catalog + policy_tag_manager + policy_tag_manager_serialization diff --git a/docs/datacatalog_v1beta1/types.rst b/docs/datacatalog_v1beta1/types.rst index a1baedaf..687d8391 100644 --- a/docs/datacatalog_v1beta1/types.rst +++ b/docs/datacatalog_v1beta1/types.rst @@ -3,4 +3,5 @@ Types for Google Cloud Datacatalog v1beta1 API .. automodule:: google.cloud.datacatalog_v1beta1.types :members: + :undoc-members: :show-inheritance: diff --git a/google/cloud/datacatalog_v1/services/data_catalog/async_client.py b/google/cloud/datacatalog_v1/services/data_catalog/async_client.py index e5cb1dbf..dd7e759f 100644 --- a/google/cloud/datacatalog_v1/services/data_catalog/async_client.py +++ b/google/cloud/datacatalog_v1/services/data_catalog/async_client.py @@ -94,6 +94,7 @@ class DataCatalogAsyncClient: DataCatalogClient.parse_common_location_path ) + from_service_account_info = DataCatalogClient.from_service_account_info from_service_account_file = DataCatalogClient.from_service_account_file from_service_account_json = from_service_account_file @@ -187,15 +188,16 @@ async def search_catalog( for more information. Args: - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (:class:`google.cloud.datacatalog_v1.types.SearchCatalogRequest`): The request object. Request message for [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. - scope (:class:`~.datacatalog.SearchCatalogRequest.Scope`): + scope (:class:`google.cloud.datacatalog_v1.types.SearchCatalogRequest.Scope`): Required. The scope of this search request. A ``scope`` that has empty ``include_org_ids``, ``include_project_ids`` AND false ``include_gcp_public_datasets`` is considered invalid. Data Catalog will return an error in such a case. + This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -214,6 +216,7 @@ async def search_catalog( `Data Catalog Search Syntax `__ for more information. + This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -225,9 +228,9 @@ async def search_catalog( sent along with the request as metadata. Returns: - ~.pagers.SearchCatalogAsyncPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogAsyncPager: Response message for - [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. + [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. Iterating over this object will yield results and resolve additional pages automatically. @@ -313,7 +316,7 @@ async def create_entry_group( for more information). Args: - request (:class:`~.datacatalog.CreateEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1.types.CreateEntryGroupRequest`): The request object. Request message for [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. parent (:class:`str`): @@ -324,6 +327,7 @@ async def create_entry_group( Note that this EntryGroup and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -334,12 +338,14 @@ async def create_entry_group( English letters, numbers and underscores, and be at most 64 characters. + This corresponds to the ``entry_group_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (:class:`google.cloud.datacatalog_v1.types.EntryGroup`): The entry group to create. Defaults to an empty entry group. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -351,10 +357,11 @@ async def create_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1.Entry] resources. + google.cloud.datacatalog_v1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1.Entry] resources. """ # Create or coerce a protobuf request object. @@ -412,18 +419,20 @@ async def get_entry_group( r"""Gets an EntryGroup. Args: - request (:class:`~.datacatalog.GetEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1.types.GetEntryGroupRequest`): The request object. Request message for [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. name (:class:`str`): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - read_mask (:class:`~.field_mask.FieldMask`): + read_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to return. If not set or empty, all fields are returned. + This corresponds to the ``read_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -435,10 +444,11 @@ async def get_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1.Entry] resources. + google.cloud.datacatalog_v1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1.Entry] resources. """ # Create or coerce a protobuf request object. @@ -504,19 +514,21 @@ async def update_entry_group( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1.types.UpdateEntryGroupRequest`): The request object. Request message for [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (:class:`google.cloud.datacatalog_v1.types.EntryGroup`): Required. The updated entry group. "name" field must be set. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to update on the entry group. If absent or empty, all modifiable fields are updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -528,10 +540,11 @@ async def update_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1.Entry] resources. + google.cloud.datacatalog_v1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1.Entry] resources. """ # Create or coerce a protobuf request object. @@ -593,12 +606,13 @@ async def delete_entry_group( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1.types.DeleteEntryGroupRequest`): The request object. Request message for [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. name (:class:`str`): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -658,7 +672,7 @@ async def list_entry_groups( r"""Lists entry groups. Args: - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (:class:`google.cloud.datacatalog_v1.types.ListEntryGroupsRequest`): The request object. Request message for [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. parent (:class:`str`): @@ -667,6 +681,7 @@ async def list_entry_groups( Example: - projects/{project_id}/locations/{location} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -678,9 +693,9 @@ async def list_entry_groups( sent along with the request as metadata. Returns: - ~.pagers.ListEntryGroupsAsyncPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsAsyncPager: Response message for - [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. + [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. Iterating over this object will yield results and resolve additional pages automatically. @@ -759,7 +774,7 @@ async def create_entry( A maximum of 100,000 entries may be created per entry group. Args: - request (:class:`~.datacatalog.CreateEntryRequest`): + request (:class:`google.cloud.datacatalog_v1.types.CreateEntryRequest`): The request object. Request message for [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. parent (:class:`str`): @@ -770,16 +785,18 @@ async def create_entry( Note that this Entry and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. entry_id (:class:`str`): Required. The id of the entry to create. + This corresponds to the ``entry_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry (:class:`~.datacatalog.Entry`): + entry (:class:`google.cloud.datacatalog_v1.types.Entry`): Required. The entry to create. This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this @@ -792,18 +809,19 @@ async def create_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -865,16 +883,17 @@ async def update_entry( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryRequest`): + request (:class:`google.cloud.datacatalog_v1.types.UpdateEntryRequest`): The request object. Request message for [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. - entry (:class:`~.datacatalog.Entry`): + entry (:class:`google.cloud.datacatalog_v1.types.Entry`): Required. The updated entry. The "name" field must be set. + This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to update on the entry. If absent or empty, all modifiable fields are updated. @@ -901,6 +920,7 @@ async def update_entry( - user_specified_system - linked_resource - source_system_timestamps + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -912,18 +932,19 @@ async def update_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -986,13 +1007,14 @@ async def delete_entry( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryRequest`): + request (:class:`google.cloud.datacatalog_v1.types.DeleteEntryRequest`): The request object. Request message for [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. name (:class:`str`): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1052,13 +1074,14 @@ async def get_entry( r"""Gets an entry. Args: - request (:class:`~.datacatalog.GetEntryRequest`): + request (:class:`google.cloud.datacatalog_v1.types.GetEntryRequest`): The request object. Request message for [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. name (:class:`str`): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1070,18 +1093,19 @@ async def get_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -1142,7 +1166,7 @@ async def lookup_entry( Entry. Args: - request (:class:`~.datacatalog.LookupEntryRequest`): + request (:class:`google.cloud.datacatalog_v1.types.LookupEntryRequest`): The request object. Request message for [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. @@ -1153,18 +1177,19 @@ async def lookup_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -1203,7 +1228,7 @@ async def list_entries( r"""Lists entries. Args: - request (:class:`~.datacatalog.ListEntriesRequest`): + request (:class:`google.cloud.datacatalog_v1.types.ListEntriesRequest`): The request object. Request message for [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. parent (:class:`str`): @@ -1211,6 +1236,7 @@ async def list_entries( entries, which can be provided in URL format. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1222,9 +1248,9 @@ async def list_entries( sent along with the request as metadata. Returns: - ~.pagers.ListEntriesAsyncPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesAsyncPager: Response message for - [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. + [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1298,7 +1324,7 @@ async def create_tag_template( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1.types.CreateTagTemplateRequest`): The request object. Request message for [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. parent (:class:`str`): @@ -1309,16 +1335,18 @@ async def create_tag_template( Example: - projects/{project_id}/locations/us-central1 + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. tag_template_id (:class:`str`): Required. The id of the tag template to create. + This corresponds to the ``tag_template_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (:class:`google.cloud.datacatalog_v1.types.TagTemplate`): Required. The tag template to create. This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this @@ -1331,16 +1359,16 @@ async def create_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1397,13 +1425,14 @@ async def get_tag_template( r"""Gets a tag template. Args: - request (:class:`~.datacatalog.GetTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1.types.GetTagTemplateRequest`): The request object. Request message for [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. name (:class:`str`): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1415,16 +1444,16 @@ async def get_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1486,16 +1515,17 @@ async def update_tag_template( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1.types.UpdateTagTemplateRequest`): The request object. Request message for [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (:class:`google.cloud.datacatalog_v1.types.TagTemplate`): Required. The template to update. The "name" field must be set. + This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The field mask specifies the parts of the template to overwrite. @@ -1505,6 +1535,7 @@ async def update_tag_template( If absent or empty, all of the allowed fields above will be updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1516,16 +1547,16 @@ async def update_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1587,7 +1618,7 @@ async def delete_tag_template( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1.types.DeleteTagTemplateRequest`): The request object. Request message for [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. name (:class:`str`): @@ -1595,6 +1626,7 @@ async def delete_tag_template( Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1603,6 +1635,7 @@ async def delete_tag_template( ``true``. This confirms the deletion of any possible tags using this template. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1670,7 +1703,7 @@ async def create_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1.types.CreateTagTemplateFieldRequest`): The request object. Request message for [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. parent (:class:`str`): @@ -1681,6 +1714,7 @@ async def create_tag_template_field( Example: - projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1691,12 +1725,14 @@ async def create_tag_template_field( (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. + This corresponds to the ``tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (:class:`google.cloud.datacatalog_v1.types.TagTemplateField`): Required. The tag template field to create. + This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1708,7 +1744,7 @@ async def create_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1.types.TagTemplateField: The template for an individual field within a tag template. @@ -1774,22 +1810,23 @@ async def update_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1.types.UpdateTagTemplateFieldRequest`): The request object. Request message for [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. name (:class:`str`): Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (:class:`google.cloud.datacatalog_v1.types.TagTemplateField`): Required. The template to update. This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Optional. The field mask specifies the parts of the template to be updated. Allowed fields: @@ -1805,6 +1842,7 @@ async def update_tag_template_field( can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1816,7 +1854,7 @@ async def update_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1.types.TagTemplateField: The template for an individual field within a tag template. @@ -1880,19 +1918,21 @@ async def rename_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.RenameTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1.types.RenameTagTemplateFieldRequest`): The request object. Request message for [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. name (:class:`str`): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. new_tag_template_field_id (:class:`str`): Required. The new ID of this tag template field. For example, ``my_new_field``. + This corresponds to the ``new_tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1904,7 +1944,7 @@ async def rename_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1.types.TagTemplateField: The template for an individual field within a tag template. @@ -1967,7 +2007,7 @@ async def delete_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1.types.DeleteTagTemplateFieldRequest`): The request object. Request message for [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. name (:class:`str`): @@ -1975,6 +2015,7 @@ async def delete_tag_template_field( Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1983,6 +2024,7 @@ async def delete_tag_template_field( ``true``. This confirms the deletion of this field from any tags using this field. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2050,7 +2092,7 @@ async def create_tag( used to create the tag must be from the same organization. Args: - request (:class:`~.datacatalog.CreateTagRequest`): + request (:class:`google.cloud.datacatalog_v1.types.CreateTagRequest`): The request object. Request message for [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. parent (:class:`str`): @@ -2061,10 +2103,11 @@ async def create_tag( Note that this Tag and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag (:class:`~.tags.Tag`): + tag (:class:`google.cloud.datacatalog_v1.types.Tag`): Required. The tag to create. This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this @@ -2077,15 +2120,15 @@ async def create_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2141,19 +2184,21 @@ async def update_tag( r"""Updates an existing tag. Args: - request (:class:`~.datacatalog.UpdateTagRequest`): + request (:class:`google.cloud.datacatalog_v1.types.UpdateTagRequest`): The request object. Request message for [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. - tag (:class:`~.tags.Tag`): + tag (:class:`google.cloud.datacatalog_v1.types.Tag`): Required. The updated tag. The "name" field must be set. + This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field ``fields``. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2165,15 +2210,15 @@ async def update_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2228,13 +2273,14 @@ async def delete_tag( r"""Deletes a tag. Args: - request (:class:`~.datacatalog.DeleteTagRequest`): + request (:class:`google.cloud.datacatalog_v1.types.DeleteTagRequest`): The request object. Request message for [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. name (:class:`str`): Required. The name of the tag to delete. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2294,7 +2340,7 @@ async def list_tags( r"""Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. Args: - request (:class:`~.datacatalog.ListTagsRequest`): + request (:class:`google.cloud.datacatalog_v1.types.ListTagsRequest`): The request object. Request message for [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. parent (:class:`str`): @@ -2307,6 +2353,7 @@ async def list_tags( - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2318,9 +2365,9 @@ async def list_tags( sent along with the request as metadata. Returns: - ~.pagers.ListTagsAsyncPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsAsyncPager: Response message for - [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. + [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. Iterating over this object will yield results and resolve additional pages automatically. @@ -2404,7 +2451,7 @@ async def set_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.SetIamPolicyRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.SetIamPolicyRequest`): The request object. Request message for `SetIamPolicy` method. resource (:class:`str`): @@ -2412,6 +2459,7 @@ async def set_iam_policy( policy is being specified. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2423,72 +2471,62 @@ async def set_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2561,7 +2599,7 @@ async def get_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.GetIamPolicyRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.GetIamPolicyRequest`): The request object. Request message for `GetIamPolicy` method. resource (:class:`str`): @@ -2569,6 +2607,7 @@ async def get_iam_policy( policy is being requested. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2580,72 +2619,62 @@ async def get_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2716,7 +2745,7 @@ async def test_iam_permissions( this request. Args: - request (:class:`~.iam_policy.TestIamPermissionsRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest`): The request object. Request message for `TestIamPermissions` method. @@ -2727,8 +2756,8 @@ async def test_iam_permissions( sent along with the request as metadata. Returns: - ~.iam_policy.TestIamPermissionsResponse: - Response message for ``TestIamPermissions`` method. + google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse: + Response message for TestIamPermissions method. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1/services/data_catalog/client.py b/google/cloud/datacatalog_v1/services/data_catalog/client.py index dae42e6a..a9663871 100644 --- a/google/cloud/datacatalog_v1/services/data_catalog/client.py +++ b/google/cloud/datacatalog_v1/services/data_catalog/client.py @@ -120,6 +120,22 @@ def _get_default_mtls_endpoint(api_endpoint): DEFAULT_ENDPOINT ) + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + DataCatalogClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials @@ -132,7 +148,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): kwargs: Additional arguments to pass to the constructor. Returns: - {@api.name}: The constructed client. + DataCatalogClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials @@ -312,10 +328,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - transport (Union[str, ~.DataCatalogTransport]): The + transport (Union[str, DataCatalogTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (client_options_lib.ClientOptions): Custom options for the + client_options (google.api_core.client_options.ClientOptions): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -442,19 +458,20 @@ def search_catalog( for more information. Args: - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (google.cloud.datacatalog_v1.types.SearchCatalogRequest): The request object. Request message for [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. - scope (:class:`~.datacatalog.SearchCatalogRequest.Scope`): + scope (google.cloud.datacatalog_v1.types.SearchCatalogRequest.Scope): Required. The scope of this search request. A ``scope`` that has empty ``include_org_ids``, ``include_project_ids`` AND false ``include_gcp_public_datasets`` is considered invalid. Data Catalog will return an error in such a case. + This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - query (:class:`str`): + query (str): Required. The query string in search query syntax. The query must be non-empty. @@ -469,6 +486,7 @@ def search_catalog( `Data Catalog Search Syntax `__ for more information. + This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -480,9 +498,9 @@ def search_catalog( sent along with the request as metadata. Returns: - ~.pagers.SearchCatalogPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogPager: Response message for - [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. + [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. Iterating over this object will yield results and resolve additional pages automatically. @@ -563,10 +581,10 @@ def create_entry_group( for more information). Args: - request (:class:`~.datacatalog.CreateEntryGroupRequest`): + request (google.cloud.datacatalog_v1.types.CreateEntryGroupRequest): The request object. Request message for [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. - parent (:class:`str`): + parent (str): Required. The name of the project this entry group is in. Example: @@ -574,22 +592,25 @@ def create_entry_group( Note that this EntryGroup and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_group_id (:class:`str`): + entry_group_id (str): Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters. + This corresponds to the ``entry_group_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (google.cloud.datacatalog_v1.types.EntryGroup): The entry group to create. Defaults to an empty entry group. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -601,10 +622,11 @@ def create_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1.Entry] resources. + google.cloud.datacatalog_v1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1.Entry] resources. """ # Create or coerce a protobuf request object. @@ -663,18 +685,20 @@ def get_entry_group( r"""Gets an EntryGroup. Args: - request (:class:`~.datacatalog.GetEntryGroupRequest`): + request (google.cloud.datacatalog_v1.types.GetEntryGroupRequest): The request object. Request message for [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. - name (:class:`str`): + name (str): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - read_mask (:class:`~.field_mask.FieldMask`): + read_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to return. If not set or empty, all fields are returned. + This corresponds to the ``read_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -686,10 +710,11 @@ def get_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1.Entry] resources. + google.cloud.datacatalog_v1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1.Entry] resources. """ # Create or coerce a protobuf request object. @@ -750,19 +775,21 @@ def update_entry_group( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryGroupRequest`): + request (google.cloud.datacatalog_v1.types.UpdateEntryGroupRequest): The request object. Request message for [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (google.cloud.datacatalog_v1.types.EntryGroup): Required. The updated entry group. "name" field must be set. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry group. If absent or empty, all modifiable fields are updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -774,10 +801,11 @@ def update_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1.Entry] resources. + google.cloud.datacatalog_v1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1.Entry] resources. """ # Create or coerce a protobuf request object. @@ -840,12 +868,13 @@ def delete_entry_group( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryGroupRequest`): + request (google.cloud.datacatalog_v1.types.DeleteEntryGroupRequest): The request object. Request message for [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. - name (:class:`str`): + name (str): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -906,15 +935,16 @@ def list_entry_groups( r"""Lists entry groups. Args: - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (google.cloud.datacatalog_v1.types.ListEntryGroupsRequest): The request object. Request message for [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. - parent (:class:`str`): + parent (str): Required. The name of the location that contains the entry groups, which can be provided in URL format. Example: - projects/{project_id}/locations/{location} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -926,9 +956,9 @@ def list_entry_groups( sent along with the request as metadata. Returns: - ~.pagers.ListEntryGroupsPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsPager: Response message for - [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. + [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1002,10 +1032,10 @@ def create_entry( A maximum of 100,000 entries may be created per entry group. Args: - request (:class:`~.datacatalog.CreateEntryRequest`): + request (google.cloud.datacatalog_v1.types.CreateEntryRequest): The request object. Request message for [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. - parent (:class:`str`): + parent (str): Required. The name of the entry group this entry is in. Example: @@ -1013,16 +1043,18 @@ def create_entry( Note that this Entry and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_id (:class:`str`): + entry_id (str): Required. The id of the entry to create. + This corresponds to the ``entry_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry (:class:`~.datacatalog.Entry`): + entry (google.cloud.datacatalog_v1.types.Entry): Required. The entry to create. This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this @@ -1035,18 +1067,19 @@ def create_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -1109,16 +1142,17 @@ def update_entry( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryRequest`): + request (google.cloud.datacatalog_v1.types.UpdateEntryRequest): The request object. Request message for [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. - entry (:class:`~.datacatalog.Entry`): + entry (google.cloud.datacatalog_v1.types.Entry): Required. The updated entry. The "name" field must be set. + This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry. If absent or empty, all modifiable fields are updated. @@ -1145,6 +1179,7 @@ def update_entry( - user_specified_system - linked_resource - source_system_timestamps + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1156,18 +1191,19 @@ def update_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -1231,13 +1267,14 @@ def delete_entry( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryRequest`): + request (google.cloud.datacatalog_v1.types.DeleteEntryRequest): The request object. Request message for [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. - name (:class:`str`): + name (str): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1298,13 +1335,14 @@ def get_entry( r"""Gets an entry. Args: - request (:class:`~.datacatalog.GetEntryRequest`): + request (google.cloud.datacatalog_v1.types.GetEntryRequest): The request object. Request message for [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. - name (:class:`str`): + name (str): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1316,18 +1354,19 @@ def get_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -1383,7 +1422,7 @@ def lookup_entry( Entry. Args: - request (:class:`~.datacatalog.LookupEntryRequest`): + request (google.cloud.datacatalog_v1.types.LookupEntryRequest): The request object. Request message for [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. @@ -1394,18 +1433,19 @@ def lookup_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic) or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1.Tag]. + google.cloud.datacatalog_v1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic) or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1.Tag]. """ # Create or coerce a protobuf request object. @@ -1439,14 +1479,15 @@ def list_entries( r"""Lists entries. Args: - request (:class:`~.datacatalog.ListEntriesRequest`): + request (google.cloud.datacatalog_v1.types.ListEntriesRequest): The request object. Request message for [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. - parent (:class:`str`): + parent (str): Required. The name of the entry group that contains the entries, which can be provided in URL format. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1458,9 +1499,9 @@ def list_entries( sent along with the request as metadata. Returns: - ~.pagers.ListEntriesPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesPager: Response message for - [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. + [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1529,10 +1570,10 @@ def create_tag_template( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateRequest`): + request (google.cloud.datacatalog_v1.types.CreateTagTemplateRequest): The request object. Request message for [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. - parent (:class:`str`): + parent (str): Required. The name of the project and the template location `region `__. @@ -1540,16 +1581,18 @@ def create_tag_template( Example: - projects/{project_id}/locations/us-central1 + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_id (:class:`str`): + tag_template_id (str): Required. The id of the tag template to create. + This corresponds to the ``tag_template_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (google.cloud.datacatalog_v1.types.TagTemplate): Required. The tag template to create. This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this @@ -1562,16 +1605,16 @@ def create_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1629,13 +1672,14 @@ def get_tag_template( r"""Gets a tag template. Args: - request (:class:`~.datacatalog.GetTagTemplateRequest`): + request (google.cloud.datacatalog_v1.types.GetTagTemplateRequest): The request object. Request message for [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. - name (:class:`str`): + name (str): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1647,16 +1691,16 @@ def get_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1719,16 +1763,17 @@ def update_tag_template( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateRequest`): + request (google.cloud.datacatalog_v1.types.UpdateTagTemplateRequest): The request object. Request message for [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (google.cloud.datacatalog_v1.types.TagTemplate): Required. The template to update. The "name" field must be set. + This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The field mask specifies the parts of the template to overwrite. @@ -1738,6 +1783,7 @@ def update_tag_template( If absent or empty, all of the allowed fields above will be updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1749,16 +1795,16 @@ def update_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1821,22 +1867,24 @@ def delete_tag_template( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateRequest`): + request (google.cloud.datacatalog_v1.types.DeleteTagTemplateRequest): The request object. Request message for [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. - name (:class:`str`): + name (str): Required. The name of the tag template to delete. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - force (:class:`bool`): + force (bool): Required. Currently, this field must always be set to ``true``. This confirms the deletion of any possible tags using this template. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1905,10 +1953,10 @@ def create_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1.types.CreateTagTemplateFieldRequest): The request object. Request message for [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. - parent (:class:`str`): + parent (str): Required. The name of the project and the template location `region `__. @@ -1916,22 +1964,25 @@ def create_tag_template_field( Example: - projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field_id (:class:`str`): + tag_template_field_id (str): Required. The ID of the tag template field to create. Field ids can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. + This corresponds to the ``tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField): Required. The tag template field to create. + This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1943,7 +1994,7 @@ def create_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1.types.TagTemplateField: The template for an individual field within a tag template. @@ -2012,22 +2063,23 @@ def update_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1.types.UpdateTagTemplateFieldRequest): The request object. Request message for [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. - name (:class:`str`): + name (str): Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField): Required. The template to update. This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. The field mask specifies the parts of the template to be updated. Allowed fields: @@ -2043,6 +2095,7 @@ def update_tag_template_field( can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2054,7 +2107,7 @@ def update_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1.types.TagTemplateField: The template for an individual field within a tag template. @@ -2121,19 +2174,21 @@ def rename_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.RenameTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1.types.RenameTagTemplateFieldRequest): The request object. Request message for [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. - name (:class:`str`): + name (str): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - new_tag_template_field_id (:class:`str`): + new_tag_template_field_id (str): Required. The new ID of this tag template field. For example, ``my_new_field``. + This corresponds to the ``new_tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2145,7 +2200,7 @@ def rename_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1.types.TagTemplateField: The template for an individual field within a tag template. @@ -2211,22 +2266,24 @@ def delete_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1.types.DeleteTagTemplateFieldRequest): The request object. Request message for [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. - name (:class:`str`): + name (str): Required. The name of the tag template field to delete. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - force (:class:`bool`): + force (bool): Required. Currently, this field must always be set to ``true``. This confirms the deletion of this field from any tags using this field. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2297,10 +2354,10 @@ def create_tag( used to create the tag must be from the same organization. Args: - request (:class:`~.datacatalog.CreateTagRequest`): + request (google.cloud.datacatalog_v1.types.CreateTagRequest): The request object. Request message for [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. - parent (:class:`str`): + parent (str): Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example: @@ -2308,10 +2365,11 @@ def create_tag( Note that this Tag and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag (:class:`~.tags.Tag`): + tag (google.cloud.datacatalog_v1.types.Tag): Required. The tag to create. This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this @@ -2324,15 +2382,15 @@ def create_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2389,19 +2447,21 @@ def update_tag( r"""Updates an existing tag. Args: - request (:class:`~.datacatalog.UpdateTagRequest`): + request (google.cloud.datacatalog_v1.types.UpdateTagRequest): The request object. Request message for [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. - tag (:class:`~.tags.Tag`): + tag (google.cloud.datacatalog_v1.types.Tag): Required. The updated tag. The "name" field must be set. + This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field ``fields``. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2413,15 +2473,15 @@ def update_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2477,13 +2537,14 @@ def delete_tag( r"""Deletes a tag. Args: - request (:class:`~.datacatalog.DeleteTagRequest`): + request (google.cloud.datacatalog_v1.types.DeleteTagRequest): The request object. Request message for [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. - name (:class:`str`): + name (str): Required. The name of the tag to delete. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2544,10 +2605,10 @@ def list_tags( r"""Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. Args: - request (:class:`~.datacatalog.ListTagsRequest`): + request (google.cloud.datacatalog_v1.types.ListTagsRequest): The request object. Request message for [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. - parent (:class:`str`): + parent (str): Required. The name of the Data Catalog resource to list the tags of. The resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an @@ -2557,6 +2618,7 @@ def list_tags( - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2568,9 +2630,9 @@ def list_tags( sent along with the request as metadata. Returns: - ~.pagers.ListTagsPager: + google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsPager: Response message for - [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. + [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. Iterating over this object will yield results and resolve additional pages automatically. @@ -2649,14 +2711,15 @@ def set_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.SetIamPolicyRequest`): + request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest): The request object. Request message for `SetIamPolicy` method. - resource (:class:`str`): + resource (str): REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2668,72 +2731,62 @@ def set_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2802,14 +2855,15 @@ def get_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.GetIamPolicyRequest`): + request (google.iam.v1.iam_policy_pb2.GetIamPolicyRequest): The request object. Request message for `GetIamPolicy` method. - resource (:class:`str`): + resource (str): REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2821,72 +2875,62 @@ def get_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2947,7 +2991,7 @@ def test_iam_permissions( this request. Args: - request (:class:`~.iam_policy.TestIamPermissionsRequest`): + request (google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest): The request object. Request message for `TestIamPermissions` method. @@ -2958,8 +3002,8 @@ def test_iam_permissions( sent along with the request as metadata. Returns: - ~.iam_policy.TestIamPermissionsResponse: - Response message for ``TestIamPermissions`` method. + google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse: + Response message for TestIamPermissions method. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1/services/data_catalog/pagers.py b/google/cloud/datacatalog_v1/services/data_catalog/pagers.py index 05c81bfd..a5ce7581 100644 --- a/google/cloud/datacatalog_v1/services/data_catalog/pagers.py +++ b/google/cloud/datacatalog_v1/services/data_catalog/pagers.py @@ -26,7 +26,7 @@ class SearchCatalogPager: """A pager for iterating through ``search_catalog`` requests. This class thinly wraps an initial - :class:`~.datacatalog.SearchCatalogResponse` object, and + :class:`google.cloud.datacatalog_v1.types.SearchCatalogResponse` object, and provides an ``__iter__`` method to iterate through its ``results`` field. @@ -35,7 +35,7 @@ class SearchCatalogPager: through the ``results`` field on the corresponding responses. - All the usual :class:`~.datacatalog.SearchCatalogResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.SearchCatalogResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -53,9 +53,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (google.cloud.datacatalog_v1.types.SearchCatalogRequest): The initial request object. - response (:class:`~.datacatalog.SearchCatalogResponse`): + response (google.cloud.datacatalog_v1.types.SearchCatalogResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -88,7 +88,7 @@ class SearchCatalogAsyncPager: """A pager for iterating through ``search_catalog`` requests. This class thinly wraps an initial - :class:`~.datacatalog.SearchCatalogResponse` object, and + :class:`google.cloud.datacatalog_v1.types.SearchCatalogResponse` object, and provides an ``__aiter__`` method to iterate through its ``results`` field. @@ -97,7 +97,7 @@ class SearchCatalogAsyncPager: through the ``results`` field on the corresponding responses. - All the usual :class:`~.datacatalog.SearchCatalogResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.SearchCatalogResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -115,9 +115,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (google.cloud.datacatalog_v1.types.SearchCatalogRequest): The initial request object. - response (:class:`~.datacatalog.SearchCatalogResponse`): + response (google.cloud.datacatalog_v1.types.SearchCatalogResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -154,7 +154,7 @@ class ListEntryGroupsPager: """A pager for iterating through ``list_entry_groups`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntryGroupsResponse` object, and + :class:`google.cloud.datacatalog_v1.types.ListEntryGroupsResponse` object, and provides an ``__iter__`` method to iterate through its ``entry_groups`` field. @@ -163,7 +163,7 @@ class ListEntryGroupsPager: through the ``entry_groups`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntryGroupsResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.ListEntryGroupsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -181,9 +181,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (google.cloud.datacatalog_v1.types.ListEntryGroupsRequest): The initial request object. - response (:class:`~.datacatalog.ListEntryGroupsResponse`): + response (google.cloud.datacatalog_v1.types.ListEntryGroupsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -216,7 +216,7 @@ class ListEntryGroupsAsyncPager: """A pager for iterating through ``list_entry_groups`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntryGroupsResponse` object, and + :class:`google.cloud.datacatalog_v1.types.ListEntryGroupsResponse` object, and provides an ``__aiter__`` method to iterate through its ``entry_groups`` field. @@ -225,7 +225,7 @@ class ListEntryGroupsAsyncPager: through the ``entry_groups`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntryGroupsResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.ListEntryGroupsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -243,9 +243,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (google.cloud.datacatalog_v1.types.ListEntryGroupsRequest): The initial request object. - response (:class:`~.datacatalog.ListEntryGroupsResponse`): + response (google.cloud.datacatalog_v1.types.ListEntryGroupsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -282,7 +282,7 @@ class ListEntriesPager: """A pager for iterating through ``list_entries`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntriesResponse` object, and + :class:`google.cloud.datacatalog_v1.types.ListEntriesResponse` object, and provides an ``__iter__`` method to iterate through its ``entries`` field. @@ -291,7 +291,7 @@ class ListEntriesPager: through the ``entries`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntriesResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.ListEntriesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -309,9 +309,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntriesRequest`): + request (google.cloud.datacatalog_v1.types.ListEntriesRequest): The initial request object. - response (:class:`~.datacatalog.ListEntriesResponse`): + response (google.cloud.datacatalog_v1.types.ListEntriesResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -344,7 +344,7 @@ class ListEntriesAsyncPager: """A pager for iterating through ``list_entries`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntriesResponse` object, and + :class:`google.cloud.datacatalog_v1.types.ListEntriesResponse` object, and provides an ``__aiter__`` method to iterate through its ``entries`` field. @@ -353,7 +353,7 @@ class ListEntriesAsyncPager: through the ``entries`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntriesResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.ListEntriesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -371,9 +371,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntriesRequest`): + request (google.cloud.datacatalog_v1.types.ListEntriesRequest): The initial request object. - response (:class:`~.datacatalog.ListEntriesResponse`): + response (google.cloud.datacatalog_v1.types.ListEntriesResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -410,7 +410,7 @@ class ListTagsPager: """A pager for iterating through ``list_tags`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListTagsResponse` object, and + :class:`google.cloud.datacatalog_v1.types.ListTagsResponse` object, and provides an ``__iter__`` method to iterate through its ``tags`` field. @@ -419,7 +419,7 @@ class ListTagsPager: through the ``tags`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListTagsResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.ListTagsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -437,9 +437,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListTagsRequest`): + request (google.cloud.datacatalog_v1.types.ListTagsRequest): The initial request object. - response (:class:`~.datacatalog.ListTagsResponse`): + response (google.cloud.datacatalog_v1.types.ListTagsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -472,7 +472,7 @@ class ListTagsAsyncPager: """A pager for iterating through ``list_tags`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListTagsResponse` object, and + :class:`google.cloud.datacatalog_v1.types.ListTagsResponse` object, and provides an ``__aiter__`` method to iterate through its ``tags`` field. @@ -481,7 +481,7 @@ class ListTagsAsyncPager: through the ``tags`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListTagsResponse` + All the usual :class:`google.cloud.datacatalog_v1.types.ListTagsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -499,9 +499,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListTagsRequest`): + request (google.cloud.datacatalog_v1.types.ListTagsRequest): The initial request object. - response (:class:`~.datacatalog.ListTagsResponse`): + response (google.cloud.datacatalog_v1.types.ListTagsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. diff --git a/google/cloud/datacatalog_v1/types/datacatalog.py b/google/cloud/datacatalog_v1/types/datacatalog.py index a02ed993..e90fb67a 100644 --- a/google/cloud/datacatalog_v1/types/datacatalog.py +++ b/google/cloud/datacatalog_v1/types/datacatalog.py @@ -83,7 +83,7 @@ class SearchCatalogRequest(proto.Message): [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. Attributes: - scope (~.datacatalog.SearchCatalogRequest.Scope): + scope (google.cloud.datacatalog_v1.types.SearchCatalogRequest.Scope): Required. The scope of this search request. A ``scope`` that has empty ``include_org_ids``, ``include_project_ids`` AND false ``include_gcp_public_datasets`` is considered invalid. @@ -211,7 +211,7 @@ class SearchCatalogResponse(proto.Message): [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. Attributes: - results (Sequence[~.search.SearchCatalogResult]): + results (Sequence[google.cloud.datacatalog_v1.types.SearchCatalogResult]): Search results. next_page_token (str): The token that can be used to retrieve the @@ -256,7 +256,7 @@ class CreateEntryGroupRequest(proto.Message): underscore, contain only English letters, numbers and underscores, and be at most 64 characters. - entry_group (~.datacatalog.EntryGroup): + entry_group (google.cloud.datacatalog_v1.types.EntryGroup): The entry group to create. Defaults to an empty entry group. """ @@ -273,10 +273,10 @@ class UpdateEntryGroupRequest(proto.Message): [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. Attributes: - entry_group (~.datacatalog.EntryGroup): + entry_group (google.cloud.datacatalog_v1.types.EntryGroup): Required. The updated entry group. "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry group. If absent or empty, all modifiable fields are updated. @@ -295,7 +295,7 @@ class GetEntryGroupRequest(proto.Message): name (str): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. - read_mask (~.field_mask.FieldMask): + read_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to return. If not set or empty, all fields are returned. """ @@ -354,7 +354,7 @@ class ListEntryGroupsResponse(proto.Message): [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. Attributes: - entry_groups (Sequence[~.datacatalog.EntryGroup]): + entry_groups (Sequence[google.cloud.datacatalog_v1.types.EntryGroup]): EntryGroup details. next_page_token (str): Token to retrieve the next page of results. @@ -386,7 +386,7 @@ class CreateEntryRequest(proto.Message): actually be stored in the location in this name. entry_id (str): Required. The id of the entry to create. - entry (~.datacatalog.Entry): + entry (google.cloud.datacatalog_v1.types.Entry): Required. The entry to create. """ @@ -402,10 +402,10 @@ class UpdateEntryRequest(proto.Message): [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. Attributes: - entry (~.datacatalog.Entry): + entry (google.cloud.datacatalog_v1.types.Entry): Required. The updated entry. The "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry. If absent or empty, all modifiable fields are updated. @@ -537,7 +537,7 @@ class Entry(proto.Message): Output only when Entry is of type in the EntryType enum. For entries with user_specified_type, this field is optional and defaults to an empty string. - type_ (~.datacatalog.EntryType): + type_ (google.cloud.datacatalog_v1.types.EntryType): The type of the entry. Only used for Entries with types in the EntryType enum. @@ -555,7 +555,7 @@ class Entry(proto.Message): Currently, only FILESET enum value is allowed. All other entries created through Data Catalog must use ``user_specified_type``. - integrated_system (~.common.IntegratedSystem): + integrated_system (google.cloud.datacatalog_v1.types.IntegratedSystem): Output only. This field indicates the entry's source system that Data Catalog integrates with, such as BigQuery or Pub/Sub. @@ -566,14 +566,14 @@ class Entry(proto.Message): contain letters, numbers, and underscores; are case insensitive; must be at least 1 character and at most 64 characters long. - gcs_fileset_spec (~.gcd_gcs_fileset_spec.GcsFilesetSpec): + gcs_fileset_spec (google.cloud.datacatalog_v1.types.GcsFilesetSpec): Specification that applies to a Cloud Storage fileset. This is only valid on entries of type FILESET. - bigquery_table_spec (~.table_spec.BigQueryTableSpec): + bigquery_table_spec (google.cloud.datacatalog_v1.types.BigQueryTableSpec): Specification that applies to a BigQuery table. This is only valid on entries of type ``TABLE``. - bigquery_date_sharded_spec (~.table_spec.BigQueryDateShardedSpec): + bigquery_date_sharded_spec (google.cloud.datacatalog_v1.types.BigQueryDateShardedSpec): Specification for a group of BigQuery tables with name pattern ``[prefix]YYYYMMDD``. Context: https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. @@ -587,10 +587,10 @@ class Entry(proto.Message): several sentences or paragraphs that describe entry contents. Default value is an empty string. - schema (~.gcd_schema.Schema): + schema (google.cloud.datacatalog_v1.types.Schema): Schema of the entry. An entry might not have any schema attached to it. - source_system_timestamps (~.timestamps.SystemTimestamps): + source_system_timestamps (google.cloud.datacatalog_v1.types.SystemTimestamps): Timestamps about the underlying resource, not about this Data Catalog entry. Output only when Entry is of type in the EntryType enum. For entries with user_specified_type, this @@ -665,7 +665,7 @@ class EntryGroup(proto.Message): several sentences or paragraphs that describe entry group contents. Default value is an empty string. - data_catalog_timestamps (~.timestamps.SystemTimestamps): + data_catalog_timestamps (google.cloud.datacatalog_v1.types.SystemTimestamps): Output only. Timestamps about this EntryGroup. Default value is empty timestamps. """ @@ -696,7 +696,7 @@ class CreateTagTemplateRequest(proto.Message): tag_template_id (str): Required. The id of the tag template to create. - tag_template (~.gcd_tags.TagTemplate): + tag_template (google.cloud.datacatalog_v1.types.TagTemplate): Required. The tag template to create. """ @@ -726,10 +726,10 @@ class UpdateTagTemplateRequest(proto.Message): [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. Attributes: - tag_template (~.gcd_tags.TagTemplate): + tag_template (google.cloud.datacatalog_v1.types.TagTemplate): Required. The template to update. The "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The field mask specifies the parts of the template to overwrite. @@ -780,7 +780,7 @@ class CreateTagRequest(proto.Message): Note that this Tag and its child resources may not actually be stored in the location in this name. - tag (~.gcd_tags.Tag): + tag (google.cloud.datacatalog_v1.types.Tag): Required. The tag to create. """ @@ -794,10 +794,10 @@ class UpdateTagRequest(proto.Message): [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. Attributes: - tag (~.gcd_tags.Tag): + tag (google.cloud.datacatalog_v1.types.Tag): Required. The updated tag. The "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field ``fields``. @@ -840,7 +840,7 @@ class CreateTagTemplateFieldRequest(proto.Message): numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. - tag_template_field (~.gcd_tags.TagTemplateField): + tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField): Required. The tag template field to create. """ @@ -862,9 +862,9 @@ class UpdateTagTemplateFieldRequest(proto.Message): Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - tag_template_field (~.gcd_tags.TagTemplateField): + tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField): Required. The template to update. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. The field mask specifies the parts of the template to be updated. Allowed fields: @@ -967,7 +967,7 @@ class ListTagsResponse(proto.Message): [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. Attributes: - tags (Sequence[~.gcd_tags.Tag]): + tags (Sequence[google.cloud.datacatalog_v1.types.Tag]): [Tag][google.cloud.datacatalog.v1.Tag] details. next_page_token (str): Token to retrieve the next page of results. @@ -1001,7 +1001,7 @@ class ListEntriesRequest(proto.Message): page_token (str): Token that specifies which page is requested. If empty, the first page is returned. - read_mask (~.field_mask.FieldMask): + read_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to return for each Entry. If not set or empty, all fields are returned. For example, setting read_mask to contain only one path "name" will cause ListEntries to @@ -1022,7 +1022,7 @@ class ListEntriesResponse(proto.Message): [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. Attributes: - entries (Sequence[~.datacatalog.Entry]): + entries (Sequence[google.cloud.datacatalog_v1.types.Entry]): Entry details. next_page_token (str): Token to retrieve the next page of results. diff --git a/google/cloud/datacatalog_v1/types/gcs_fileset_spec.py b/google/cloud/datacatalog_v1/types/gcs_fileset_spec.py index 64518aff..ce3a5a6e 100644 --- a/google/cloud/datacatalog_v1/types/gcs_fileset_spec.py +++ b/google/cloud/datacatalog_v1/types/gcs_fileset_spec.py @@ -63,7 +63,7 @@ class GcsFilesetSpec(proto.Message): for example: - ``gs://bucket_name/[a-m]??.j*g`` - sample_gcs_file_specs (Sequence[~.gcs_fileset_spec.GcsFileSpec]): + sample_gcs_file_specs (Sequence[google.cloud.datacatalog_v1.types.GcsFileSpec]): Output only. Sample files contained in this fileset, not all files contained in this fileset are represented here. @@ -83,7 +83,7 @@ class GcsFileSpec(proto.Message): file_path (str): Required. The full file path. Example: ``gs://bucket_name/a/b.txt``. - gcs_timestamps (~.timestamps.SystemTimestamps): + gcs_timestamps (google.cloud.datacatalog_v1.types.SystemTimestamps): Output only. Timestamps about the Cloud Storage file. size_bytes (int): diff --git a/google/cloud/datacatalog_v1/types/schema.py b/google/cloud/datacatalog_v1/types/schema.py index 98560462..debec332 100644 --- a/google/cloud/datacatalog_v1/types/schema.py +++ b/google/cloud/datacatalog_v1/types/schema.py @@ -27,7 +27,7 @@ class Schema(proto.Message): r"""Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). Attributes: - columns (Sequence[~.schema.ColumnSchema]): + columns (Sequence[google.cloud.datacatalog_v1.types.ColumnSchema]): Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be specified. """ @@ -52,7 +52,7 @@ class ColumnSchema(proto.Message): this column are required, nullable, etc. Only ``NULLABLE``, ``REQUIRED`` and ``REPEATED`` are supported. Default mode is ``NULLABLE``. - subcolumns (Sequence[~.schema.ColumnSchema]): + subcolumns (Sequence[google.cloud.datacatalog_v1.types.ColumnSchema]): Optional. Schema of sub-columns. A column can have zero or more sub-columns. """ diff --git a/google/cloud/datacatalog_v1/types/search.py b/google/cloud/datacatalog_v1/types/search.py index eb4370da..cdcb129f 100644 --- a/google/cloud/datacatalog_v1/types/search.py +++ b/google/cloud/datacatalog_v1/types/search.py @@ -43,7 +43,7 @@ class SearchCatalogResult(proto.Message): search. Attributes: - search_result_type (~.search.SearchResultType): + search_result_type (google.cloud.datacatalog_v1.types.SearchResultType): Type of the search result. This field can be used to determine which Get method to call to fetch the full resource. @@ -66,7 +66,7 @@ class SearchCatalogResult(proto.Message): Example: - ``//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`` - integrated_system (~.common.IntegratedSystem): + integrated_system (google.cloud.datacatalog_v1.types.IntegratedSystem): Output only. This field indicates the entry's source system that Data Catalog integrates with, such as BigQuery or Cloud Pub/Sub. diff --git a/google/cloud/datacatalog_v1/types/table_spec.py b/google/cloud/datacatalog_v1/types/table_spec.py index 4c86f64f..8404dba2 100644 --- a/google/cloud/datacatalog_v1/types/table_spec.py +++ b/google/cloud/datacatalog_v1/types/table_spec.py @@ -41,12 +41,12 @@ class BigQueryTableSpec(proto.Message): r"""Describes a BigQuery table. Attributes: - table_source_type (~.gcd_table_spec.TableSourceType): + table_source_type (google.cloud.datacatalog_v1.types.TableSourceType): Output only. The table source type. - view_spec (~.gcd_table_spec.ViewSpec): + view_spec (google.cloud.datacatalog_v1.types.ViewSpec): Table view specification. This field should only be populated if ``table_source_type`` is ``BIGQUERY_VIEW``. - table_spec (~.gcd_table_spec.TableSpec): + table_spec (google.cloud.datacatalog_v1.types.TableSpec): Spec of a BigQuery table. This field should only be populated if ``table_source_type`` is ``BIGQUERY_TABLE``. """ diff --git a/google/cloud/datacatalog_v1/types/tags.py b/google/cloud/datacatalog_v1/types/tags.py index 4ef4efa7..e85c5036 100644 --- a/google/cloud/datacatalog_v1/types/tags.py +++ b/google/cloud/datacatalog_v1/types/tags.py @@ -63,7 +63,7 @@ class Tag(proto.Message): separate the column names. Example: - ``outer_column.inner_column`` - fields (Sequence[~.tags.Tag.FieldsEntry]): + fields (Sequence[google.cloud.datacatalog_v1.types.Tag.FieldsEntry]): Required. This maps the ID of a tag field to the value of and additional information about that field. Valid field IDs are defined by the @@ -98,10 +98,10 @@ class TagField(proto.Message): bool_value (bool): Holds the value for a tag field with boolean type. - timestamp_value (~.timestamp.Timestamp): + timestamp_value (google.protobuf.timestamp_pb2.Timestamp): Holds the value for a tag field with timestamp type. - enum_value (~.tags.TagField.EnumValue): + enum_value (google.cloud.datacatalog_v1.types.TagField.EnumValue): Holds the value for a tag field with enum type. This value must be one of the allowed values in the definition of this enum. @@ -165,7 +165,7 @@ class TagTemplate(proto.Message): display_name (str): The display name for this template. Defaults to an empty string. - fields (Sequence[~.tags.TagTemplate.FieldsEntry]): + fields (Sequence[google.cloud.datacatalog_v1.types.TagTemplate.FieldsEntry]): Required. Map of tag template field IDs to the settings for the field. This map is an exhaustive list of the allowed fields. This map must contain at least one field and at most @@ -202,7 +202,7 @@ class TagTemplateField(proto.Message): display_name (str): The display name for this field. Defaults to an empty string. - type_ (~.tags.FieldType): + type_ (google.cloud.datacatalog_v1.types.FieldType): Required. The type of value this tag field can contain. is_required (bool): @@ -232,10 +232,10 @@ class FieldType(proto.Message): r""" Attributes: - primitive_type (~.tags.FieldType.PrimitiveType): + primitive_type (google.cloud.datacatalog_v1.types.FieldType.PrimitiveType): Represents primitive types - string, bool etc. - enum_type (~.tags.FieldType.EnumType): + enum_type (google.cloud.datacatalog_v1.types.FieldType.EnumType): Represents an enum type. """ @@ -251,7 +251,7 @@ class EnumType(proto.Message): r""" Attributes: - allowed_values (Sequence[~.tags.FieldType.EnumType.EnumValue]): + allowed_values (Sequence[google.cloud.datacatalog_v1.types.FieldType.EnumType.EnumValue]): Required on create; optional on update. The set of allowed values for this enum. This set must not be empty, the display names of the diff --git a/google/cloud/datacatalog_v1/types/timestamps.py b/google/cloud/datacatalog_v1/types/timestamps.py index 451b9a43..4d4a834f 100644 --- a/google/cloud/datacatalog_v1/types/timestamps.py +++ b/google/cloud/datacatalog_v1/types/timestamps.py @@ -31,13 +31,13 @@ class SystemTimestamps(proto.Message): system. Attributes: - create_time (~.timestamp.Timestamp): + create_time (google.protobuf.timestamp_pb2.Timestamp): The creation time of the resource within the given system. - update_time (~.timestamp.Timestamp): + update_time (google.protobuf.timestamp_pb2.Timestamp): The last-modified time of the resource within the given system. - expire_time (~.timestamp.Timestamp): + expire_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The expiration time of the resource within the given system. Currently only apllicable to BigQuery resources. diff --git a/google/cloud/datacatalog_v1beta1/services/data_catalog/async_client.py b/google/cloud/datacatalog_v1beta1/services/data_catalog/async_client.py index bec3d14c..3a99aa56 100644 --- a/google/cloud/datacatalog_v1beta1/services/data_catalog/async_client.py +++ b/google/cloud/datacatalog_v1beta1/services/data_catalog/async_client.py @@ -94,6 +94,7 @@ class DataCatalogAsyncClient: DataCatalogClient.parse_common_location_path ) + from_service_account_info = DataCatalogClient.from_service_account_info from_service_account_file = DataCatalogClient.from_service_account_file from_service_account_json = from_service_account_file @@ -187,15 +188,16 @@ async def search_catalog( for more information. Args: - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest`): The request object. Request message for [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. - scope (:class:`~.datacatalog.SearchCatalogRequest.Scope`): + scope (:class:`google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest.Scope`): Required. The scope of this search request. A ``scope`` that has empty ``include_org_ids``, ``include_project_ids`` AND false ``include_gcp_public_datasets`` is considered invalid. Data Catalog will return an error in such a case. + This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -214,6 +216,7 @@ async def search_catalog( `Data Catalog Search Syntax `__ for more information. + This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -225,9 +228,9 @@ async def search_catalog( sent along with the request as metadata. Returns: - ~.pagers.SearchCatalogAsyncPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.SearchCatalogAsyncPager: Response message for - [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. + [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. Iterating over this object will yield results and resolve additional pages automatically. @@ -294,7 +297,7 @@ async def create_entry_group( for more information). Args: - request (:class:`~.datacatalog.CreateEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreateEntryGroupRequest`): The request object. Request message for [CreateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup]. parent (:class:`str`): @@ -305,6 +308,7 @@ async def create_entry_group( Note that this EntryGroup and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -315,12 +319,14 @@ async def create_entry_group( English letters, numbers and underscores, and be at most 64 characters. + This corresponds to the ``entry_group_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (:class:`google.cloud.datacatalog_v1beta1.types.EntryGroup`): The entry group to create. Defaults to an empty entry group. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -332,11 +338,12 @@ async def create_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1beta1.Entry] - resources. + google.cloud.datacatalog_v1beta1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1beta1.Entry] + resources. """ # Create or coerce a protobuf request object. @@ -398,19 +405,21 @@ async def update_entry_group( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdateEntryGroupRequest`): The request object. Request message for [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (:class:`google.cloud.datacatalog_v1beta1.types.EntryGroup`): Required. The updated entry group. "name" field must be set. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to update on the entry group. If absent or empty, all modifiable fields are updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -422,11 +431,12 @@ async def update_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1beta1.Entry] - resources. + google.cloud.datacatalog_v1beta1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1beta1.Entry] + resources. """ # Create or coerce a protobuf request object. @@ -484,18 +494,20 @@ async def get_entry_group( r"""Gets an EntryGroup. Args: - request (:class:`~.datacatalog.GetEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.GetEntryGroupRequest`): The request object. Request message for [GetEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup]. name (:class:`str`): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - read_mask (:class:`~.field_mask.FieldMask`): + read_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to return. If not set or empty, all fields are returned. + This corresponds to the ``read_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -507,11 +519,12 @@ async def get_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1beta1.Entry] - resources. + google.cloud.datacatalog_v1beta1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1beta1.Entry] + resources. """ # Create or coerce a protobuf request object. @@ -579,12 +592,13 @@ async def delete_entry_group( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryGroupRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeleteEntryGroupRequest`): The request object. Request message for [DeleteEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup]. name (:class:`str`): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -652,7 +666,7 @@ async def list_entry_groups( r"""Lists entry groups. Args: - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ListEntryGroupsRequest`): The request object. Request message for [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. parent (:class:`str`): @@ -661,6 +675,7 @@ async def list_entry_groups( Example: - projects/{project_id}/locations/{location} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -672,9 +687,9 @@ async def list_entry_groups( sent along with the request as metadata. Returns: - ~.pagers.ListEntryGroupsAsyncPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntryGroupsAsyncPager: Response message for - [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. + [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. Iterating over this object will yield results and resolve additional pages automatically. @@ -747,7 +762,7 @@ async def create_entry( A maximum of 100,000 entries may be created per entry group. Args: - request (:class:`~.datacatalog.CreateEntryRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreateEntryRequest`): The request object. Request message for [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]. parent (:class:`str`): @@ -758,16 +773,18 @@ async def create_entry( Note that this Entry and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. entry_id (:class:`str`): Required. The id of the entry to create. + This corresponds to the ``entry_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry (:class:`~.datacatalog.Entry`): + entry (:class:`google.cloud.datacatalog_v1beta1.types.Entry`): Required. The entry to create. This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this @@ -780,18 +797,19 @@ async def create_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -853,16 +871,17 @@ async def update_entry( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdateEntryRequest`): The request object. Request message for [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. - entry (:class:`~.datacatalog.Entry`): + entry (:class:`google.cloud.datacatalog_v1beta1.types.Entry`): Required. The updated entry. The "name" field must be set. + This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to update on the entry. If absent or empty, all modifiable fields are updated. @@ -889,6 +908,7 @@ async def update_entry( - user_specified_system - linked_resource - source_system_timestamps + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -900,18 +920,19 @@ async def update_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -974,13 +995,14 @@ async def delete_entry( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeleteEntryRequest`): The request object. Request message for [DeleteEntry][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry]. name (:class:`str`): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1048,13 +1070,14 @@ async def get_entry( r"""Gets an entry. Args: - request (:class:`~.datacatalog.GetEntryRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.GetEntryRequest`): The request object. Request message for [GetEntry][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry]. name (:class:`str`): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1066,18 +1089,19 @@ async def get_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -1140,7 +1164,7 @@ async def lookup_entry( Entry. Args: - request (:class:`~.datacatalog.LookupEntryRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.LookupEntryRequest`): The request object. Request message for [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. @@ -1151,18 +1175,19 @@ async def lookup_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -1203,7 +1228,7 @@ async def list_entries( r"""Lists entries. Args: - request (:class:`~.datacatalog.ListEntriesRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ListEntriesRequest`): The request object. Request message for [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. parent (:class:`str`): @@ -1211,6 +1236,7 @@ async def list_entries( entries, which can be provided in URL format. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1222,9 +1248,9 @@ async def list_entries( sent along with the request as metadata. Returns: - ~.pagers.ListEntriesAsyncPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntriesAsyncPager: Response message for - [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. + [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1292,7 +1318,7 @@ async def create_tag_template( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreateTagTemplateRequest`): The request object. Request message for [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. parent (:class:`str`): @@ -1303,16 +1329,18 @@ async def create_tag_template( Example: - projects/{project_id}/locations/us-central1 + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. tag_template_id (:class:`str`): Required. The id of the tag template to create. + This corresponds to the ``tag_template_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (:class:`google.cloud.datacatalog_v1beta1.types.TagTemplate`): Required. The tag template to create. This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this @@ -1325,16 +1353,16 @@ async def create_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1beta1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1391,13 +1419,14 @@ async def get_tag_template( r"""Gets a tag template. Args: - request (:class:`~.datacatalog.GetTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.GetTagTemplateRequest`): The request object. Request message for [GetTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate]. name (:class:`str`): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1409,16 +1438,16 @@ async def get_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1beta1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1488,16 +1517,17 @@ async def update_tag_template( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdateTagTemplateRequest`): The request object. Request message for [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (:class:`google.cloud.datacatalog_v1beta1.types.TagTemplate`): Required. The template to update. The "name" field must be set. + This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The field mask specifies the parts of the template to overwrite. @@ -1507,6 +1537,7 @@ async def update_tag_template( If absent or empty, all of the allowed fields above will be updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1518,16 +1549,16 @@ async def update_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1beta1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1589,7 +1620,7 @@ async def delete_tag_template( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeleteTagTemplateRequest`): The request object. Request message for [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate]. name (:class:`str`): @@ -1597,6 +1628,7 @@ async def delete_tag_template( Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1605,6 +1637,7 @@ async def delete_tag_template( ``true``. This confirms the deletion of any possible tags using this template. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1680,7 +1713,7 @@ async def create_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreateTagTemplateFieldRequest`): The request object. Request message for [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField]. parent (:class:`str`): @@ -1691,6 +1724,7 @@ async def create_tag_template_field( Example: - projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1701,12 +1735,14 @@ async def create_tag_template_field( (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. + This corresponds to the ``tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (:class:`google.cloud.datacatalog_v1beta1.types.TagTemplateField`): Required. The tag template field to create. + This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1718,7 +1754,7 @@ async def create_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1beta1.types.TagTemplateField: The template for an individual field within a tag template. @@ -1784,22 +1820,23 @@ async def update_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdateTagTemplateFieldRequest`): The request object. Request message for [UpdateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField]. name (:class:`str`): Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (:class:`google.cloud.datacatalog_v1beta1.types.TagTemplateField`): Required. The template to update. This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Optional. The field mask specifies the parts of the template to be updated. Allowed fields: @@ -1815,6 +1852,7 @@ async def update_tag_template_field( can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1826,7 +1864,7 @@ async def update_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1beta1.types.TagTemplateField: The template for an individual field within a tag template. @@ -1890,19 +1928,21 @@ async def rename_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.RenameTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.RenameTagTemplateFieldRequest`): The request object. Request message for [RenameTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField]. name (:class:`str`): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. new_tag_template_field_id (:class:`str`): Required. The new ID of this tag template field. For example, ``my_new_field``. + This corresponds to the ``new_tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1914,7 +1954,7 @@ async def rename_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1beta1.types.TagTemplateField: The template for an individual field within a tag template. @@ -1977,7 +2017,7 @@ async def delete_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateFieldRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeleteTagTemplateFieldRequest`): The request object. Request message for [DeleteTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField]. name (:class:`str`): @@ -1985,6 +2025,7 @@ async def delete_tag_template_field( Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1993,6 +2034,7 @@ async def delete_tag_template_field( ``true``. This confirms the deletion of this field from any tags using this field. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2069,7 +2111,7 @@ async def create_tag( used to create the tag must be from the same organization. Args: - request (:class:`~.datacatalog.CreateTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreateTagRequest`): The request object. Request message for [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. parent (:class:`str`): @@ -2080,10 +2122,11 @@ async def create_tag( Note that this Tag and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag (:class:`~.tags.Tag`): + tag (:class:`google.cloud.datacatalog_v1beta1.types.Tag`): Required. The tag to create. This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this @@ -2096,15 +2139,15 @@ async def create_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1beta1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2160,19 +2203,21 @@ async def update_tag( r"""Updates an existing tag. Args: - request (:class:`~.datacatalog.UpdateTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdateTagRequest`): The request object. Request message for [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. - tag (:class:`~.tags.Tag`): + tag (:class:`google.cloud.datacatalog_v1beta1.types.Tag`): Required. The updated tag. The "name" field must be set. + This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field ``fields``. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2184,15 +2229,15 @@ async def update_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1beta1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2247,13 +2292,14 @@ async def delete_tag( r"""Deletes a tag. Args: - request (:class:`~.datacatalog.DeleteTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeleteTagRequest`): The request object. Request message for [DeleteTag][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag]. name (:class:`str`): Required. The name of the tag to delete. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2322,7 +2368,7 @@ async def list_tags( [Entry][google.cloud.datacatalog.v1beta1.Entry]. Args: - request (:class:`~.datacatalog.ListTagsRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ListTagsRequest`): The request object. Request message for [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. parent (:class:`str`): @@ -2335,6 +2381,7 @@ async def list_tags( - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2346,9 +2393,9 @@ async def list_tags( sent along with the request as metadata. Returns: - ~.pagers.ListTagsAsyncPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListTagsAsyncPager: Response message for - [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. + [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. Iterating over this object will yield results and resolve additional pages automatically. @@ -2434,7 +2481,7 @@ async def set_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.SetIamPolicyRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.SetIamPolicyRequest`): The request object. Request message for `SetIamPolicy` method. resource (:class:`str`): @@ -2442,6 +2489,7 @@ async def set_iam_policy( policy is being specified. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2453,72 +2501,62 @@ async def set_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2591,7 +2629,7 @@ async def get_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.GetIamPolicyRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.GetIamPolicyRequest`): The request object. Request message for `GetIamPolicy` method. resource (:class:`str`): @@ -2599,6 +2637,7 @@ async def get_iam_policy( policy is being requested. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2610,72 +2649,62 @@ async def get_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2740,7 +2769,7 @@ async def test_iam_permissions( this request. Args: - request (:class:`~.iam_policy.TestIamPermissionsRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest`): The request object. Request message for `TestIamPermissions` method. @@ -2751,8 +2780,8 @@ async def test_iam_permissions( sent along with the request as metadata. Returns: - ~.iam_policy.TestIamPermissionsResponse: - Response message for ``TestIamPermissions`` method. + google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse: + Response message for TestIamPermissions method. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py b/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py index da6b34fe..14b95915 100644 --- a/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py +++ b/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py @@ -120,6 +120,22 @@ def _get_default_mtls_endpoint(api_endpoint): DEFAULT_ENDPOINT ) + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + DataCatalogClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials @@ -132,7 +148,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): kwargs: Additional arguments to pass to the constructor. Returns: - {@api.name}: The constructed client. + DataCatalogClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials @@ -312,10 +328,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - transport (Union[str, ~.DataCatalogTransport]): The + transport (Union[str, DataCatalogTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (client_options_lib.ClientOptions): Custom options for the + client_options (google.api_core.client_options.ClientOptions): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -442,19 +458,20 @@ def search_catalog( for more information. Args: - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest): The request object. Request message for [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. - scope (:class:`~.datacatalog.SearchCatalogRequest.Scope`): + scope (google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest.Scope): Required. The scope of this search request. A ``scope`` that has empty ``include_org_ids``, ``include_project_ids`` AND false ``include_gcp_public_datasets`` is considered invalid. Data Catalog will return an error in such a case. + This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - query (:class:`str`): + query (str): Required. The query string in search query syntax. The query must be non-empty. @@ -469,6 +486,7 @@ def search_catalog( `Data Catalog Search Syntax `__ for more information. + This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -480,9 +498,9 @@ def search_catalog( sent along with the request as metadata. Returns: - ~.pagers.SearchCatalogPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.SearchCatalogPager: Response message for - [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. + [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. Iterating over this object will yield results and resolve additional pages automatically. @@ -550,10 +568,10 @@ def create_entry_group( for more information). Args: - request (:class:`~.datacatalog.CreateEntryGroupRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreateEntryGroupRequest): The request object. Request message for [CreateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup]. - parent (:class:`str`): + parent (str): Required. The name of the project this entry group is in. Example: @@ -561,22 +579,25 @@ def create_entry_group( Note that this EntryGroup and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_group_id (:class:`str`): + entry_group_id (str): Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters. + This corresponds to the ``entry_group_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (google.cloud.datacatalog_v1beta1.types.EntryGroup): The entry group to create. Defaults to an empty entry group. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -588,11 +609,12 @@ def create_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1beta1.Entry] - resources. + google.cloud.datacatalog_v1beta1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1beta1.Entry] + resources. """ # Create or coerce a protobuf request object. @@ -655,19 +677,21 @@ def update_entry_group( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryGroupRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdateEntryGroupRequest): The request object. Request message for [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. - entry_group (:class:`~.datacatalog.EntryGroup`): + entry_group (google.cloud.datacatalog_v1beta1.types.EntryGroup): Required. The updated entry group. "name" field must be set. + This corresponds to the ``entry_group`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry group. If absent or empty, all modifiable fields are updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -679,11 +703,12 @@ def update_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1beta1.Entry] - resources. + google.cloud.datacatalog_v1beta1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1beta1.Entry] + resources. """ # Create or coerce a protobuf request object. @@ -742,18 +767,20 @@ def get_entry_group( r"""Gets an EntryGroup. Args: - request (:class:`~.datacatalog.GetEntryGroupRequest`): + request (google.cloud.datacatalog_v1beta1.types.GetEntryGroupRequest): The request object. Request message for [GetEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup]. - name (:class:`str`): + name (str): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - read_mask (:class:`~.field_mask.FieldMask`): + read_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to return. If not set or empty, all fields are returned. + This corresponds to the ``read_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -765,11 +792,12 @@ def get_entry_group( sent along with the request as metadata. Returns: - ~.datacatalog.EntryGroup: - EntryGroup Metadata. An EntryGroup resource represents a - logical grouping of zero or more Data Catalog - [Entry][google.cloud.datacatalog.v1beta1.Entry] - resources. + google.cloud.datacatalog_v1beta1.types.EntryGroup: + EntryGroup Metadata. + An EntryGroup resource represents a logical grouping + of zero or more Data Catalog + [Entry][google.cloud.datacatalog.v1beta1.Entry] + resources. """ # Create or coerce a protobuf request object. @@ -830,12 +858,13 @@ def delete_entry_group( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryGroupRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeleteEntryGroupRequest): The request object. Request message for [DeleteEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup]. - name (:class:`str`): + name (str): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -896,15 +925,16 @@ def list_entry_groups( r"""Lists entry groups. Args: - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListEntryGroupsRequest): The request object. Request message for [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. - parent (:class:`str`): + parent (str): Required. The name of the location that contains the entry groups, which can be provided in URL format. Example: - projects/{project_id}/locations/{location} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -916,9 +946,9 @@ def list_entry_groups( sent along with the request as metadata. Returns: - ~.pagers.ListEntryGroupsPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntryGroupsPager: Response message for - [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. + [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. Iterating over this object will yield results and resolve additional pages automatically. @@ -992,10 +1022,10 @@ def create_entry( A maximum of 100,000 entries may be created per entry group. Args: - request (:class:`~.datacatalog.CreateEntryRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreateEntryRequest): The request object. Request message for [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]. - parent (:class:`str`): + parent (str): Required. The name of the entry group this entry is in. Example: @@ -1003,16 +1033,18 @@ def create_entry( Note that this Entry and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry_id (:class:`str`): + entry_id (str): Required. The id of the entry to create. + This corresponds to the ``entry_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - entry (:class:`~.datacatalog.Entry`): + entry (google.cloud.datacatalog_v1beta1.types.Entry): Required. The entry to create. This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this @@ -1025,18 +1057,19 @@ def create_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -1099,16 +1132,17 @@ def update_entry( for more information). Args: - request (:class:`~.datacatalog.UpdateEntryRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdateEntryRequest): The request object. Request message for [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. - entry (:class:`~.datacatalog.Entry`): + entry (google.cloud.datacatalog_v1beta1.types.Entry): Required. The updated entry. The "name" field must be set. + This corresponds to the ``entry`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry. If absent or empty, all modifiable fields are updated. @@ -1135,6 +1169,7 @@ def update_entry( - user_specified_system - linked_resource - source_system_timestamps + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1146,18 +1181,19 @@ def update_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -1221,13 +1257,14 @@ def delete_entry( for more information). Args: - request (:class:`~.datacatalog.DeleteEntryRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeleteEntryRequest): The request object. Request message for [DeleteEntry][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry]. - name (:class:`str`): + name (str): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1288,13 +1325,14 @@ def get_entry( r"""Gets an entry. Args: - request (:class:`~.datacatalog.GetEntryRequest`): + request (google.cloud.datacatalog_v1beta1.types.GetEntryRequest): The request object. Request message for [GetEntry][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry]. - name (:class:`str`): + name (str): Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1306,18 +1344,19 @@ def get_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -1373,7 +1412,7 @@ def lookup_entry( Entry. Args: - request (:class:`~.datacatalog.LookupEntryRequest`): + request (google.cloud.datacatalog_v1beta1.types.LookupEntryRequest): The request object. Request message for [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. @@ -1384,18 +1423,19 @@ def lookup_entry( sent along with the request as metadata. Returns: - ~.datacatalog.Entry: - Entry Metadata. A Data Catalog Entry resource represents - another resource in Google Cloud Platform (such as a - BigQuery dataset or a Pub/Sub topic), or outside of - Google Cloud Platform. Clients can use the - ``linked_resource`` field in the Entry resource to refer - to the original resource ID of the source system. - - An Entry resource contains resource details, such as its - schema. An Entry can also be used to attach flexible - metadata, such as a - [Tag][google.cloud.datacatalog.v1beta1.Tag]. + google.cloud.datacatalog_v1beta1.types.Entry: + Entry Metadata. + A Data Catalog Entry resource represents another + resource in Google Cloud Platform (such as a BigQuery + dataset or a Pub/Sub topic), or outside of Google + Cloud Platform. Clients can use the linked_resource + field in the Entry resource to refer to the original + resource ID of the source system. + + An Entry resource contains resource details, such as + its schema. An Entry can also be used to attach + flexible metadata, such as a + [Tag][google.cloud.datacatalog.v1beta1.Tag]. """ # Create or coerce a protobuf request object. @@ -1429,14 +1469,15 @@ def list_entries( r"""Lists entries. Args: - request (:class:`~.datacatalog.ListEntriesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListEntriesRequest): The request object. Request message for [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. - parent (:class:`str`): + parent (str): Required. The name of the entry group that contains the entries, which can be provided in URL format. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1448,9 +1489,9 @@ def list_entries( sent along with the request as metadata. Returns: - ~.pagers.ListEntriesPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntriesPager: Response message for - [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. + [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1519,10 +1560,10 @@ def create_tag_template( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreateTagTemplateRequest): The request object. Request message for [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. - parent (:class:`str`): + parent (str): Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions. @@ -1530,16 +1571,18 @@ def create_tag_template( Example: - projects/{project_id}/locations/us-central1 + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_id (:class:`str`): + tag_template_id (str): Required. The id of the tag template to create. + This corresponds to the ``tag_template_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (google.cloud.datacatalog_v1beta1.types.TagTemplate): Required. The tag template to create. This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this @@ -1552,16 +1595,16 @@ def create_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1beta1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1619,13 +1662,14 @@ def get_tag_template( r"""Gets a tag template. Args: - request (:class:`~.datacatalog.GetTagTemplateRequest`): + request (google.cloud.datacatalog_v1beta1.types.GetTagTemplateRequest): The request object. Request message for [GetTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate]. - name (:class:`str`): + name (str): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1637,16 +1681,16 @@ def get_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1beta1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1709,16 +1753,17 @@ def update_tag_template( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdateTagTemplateRequest): The request object. Request message for [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. - tag_template (:class:`~.tags.TagTemplate`): + tag_template (google.cloud.datacatalog_v1beta1.types.TagTemplate): Required. The template to update. The "name" field must be set. + This corresponds to the ``tag_template`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The field mask specifies the parts of the template to overwrite. @@ -1728,6 +1773,7 @@ def update_tag_template( If absent or empty, all of the allowed fields above will be updated. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1739,16 +1785,16 @@ def update_tag_template( sent along with the request as metadata. Returns: - ~.tags.TagTemplate: - A tag template defines a tag, which can have one or more - typed fields. The template is used to create and attach - the tag to GCP resources. `Tag template - roles `__ - provide permissions to create, edit, and use the - template. See, for example, the `TagTemplate - User `__ - role, which includes permission to use the tag template - to tag resources. + google.cloud.datacatalog_v1beta1.types.TagTemplate: + A tag template defines a tag, which can have one or more typed fields. + The template is used to create and attach the tag to + GCP resources. [Tag template + roles](\ https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) + provide permissions to create, edit, and use the + template. See, for example, the [TagTemplate + User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) + role, which includes permission to use the tag + template to tag resources. """ # Create or coerce a protobuf request object. @@ -1811,22 +1857,24 @@ def delete_tag_template( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeleteTagTemplateRequest): The request object. Request message for [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate]. - name (:class:`str`): + name (str): Required. The name of the tag template to delete. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - force (:class:`bool`): + force (bool): Required. Currently, this field must always be set to ``true``. This confirms the deletion of any possible tags using this template. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1895,10 +1943,10 @@ def create_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.CreateTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreateTagTemplateFieldRequest): The request object. Request message for [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField]. - parent (:class:`str`): + parent (str): Required. The name of the project and the template location `region `__. @@ -1906,22 +1954,25 @@ def create_tag_template_field( Example: - projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field_id (:class:`str`): + tag_template_field_id (str): Required. The ID of the tag template field to create. Field ids can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. + This corresponds to the ``tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (google.cloud.datacatalog_v1beta1.types.TagTemplateField): Required. The tag template field to create. + This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1933,7 +1984,7 @@ def create_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1beta1.types.TagTemplateField: The template for an individual field within a tag template. @@ -2002,22 +2053,23 @@ def update_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.UpdateTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdateTagTemplateFieldRequest): The request object. Request message for [UpdateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField]. - name (:class:`str`): + name (str): Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag_template_field (:class:`~.tags.TagTemplateField`): + tag_template_field (google.cloud.datacatalog_v1beta1.types.TagTemplateField): Required. The template to update. This corresponds to the ``tag_template_field`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. The field mask specifies the parts of the template to be updated. Allowed fields: @@ -2033,6 +2085,7 @@ def update_tag_template_field( can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2044,7 +2097,7 @@ def update_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1beta1.types.TagTemplateField: The template for an individual field within a tag template. @@ -2111,19 +2164,21 @@ def rename_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.RenameTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1beta1.types.RenameTagTemplateFieldRequest): The request object. Request message for [RenameTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField]. - name (:class:`str`): + name (str): Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - new_tag_template_field_id (:class:`str`): + new_tag_template_field_id (str): Required. The new ID of this tag template field. For example, ``my_new_field``. + This corresponds to the ``new_tag_template_field_id`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2135,7 +2190,7 @@ def rename_tag_template_field( sent along with the request as metadata. Returns: - ~.tags.TagTemplateField: + google.cloud.datacatalog_v1beta1.types.TagTemplateField: The template for an individual field within a tag template. @@ -2201,22 +2256,24 @@ def delete_tag_template_field( for more information). Args: - request (:class:`~.datacatalog.DeleteTagTemplateFieldRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeleteTagTemplateFieldRequest): The request object. Request message for [DeleteTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField]. - name (:class:`str`): + name (str): Required. The name of the tag template field to delete. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - force (:class:`bool`): + force (bool): Required. Currently, this field must always be set to ``true``. This confirms the deletion of this field from any tags using this field. ``force = false`` will be supported in the future. + This corresponds to the ``force`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2288,10 +2345,10 @@ def create_tag( used to create the tag must be from the same organization. Args: - request (:class:`~.datacatalog.CreateTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreateTagRequest): The request object. Request message for [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. - parent (:class:`str`): + parent (str): Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example: @@ -2299,10 +2356,11 @@ def create_tag( Note that this Tag and its child resources may not actually be stored in the location in this name. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - tag (:class:`~.tags.Tag`): + tag (google.cloud.datacatalog_v1beta1.types.Tag): Required. The tag to create. This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this @@ -2315,15 +2373,15 @@ def create_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1beta1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2380,19 +2438,21 @@ def update_tag( r"""Updates an existing tag. Args: - request (:class:`~.datacatalog.UpdateTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdateTagRequest): The request object. Request message for [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. - tag (:class:`~.tags.Tag`): + tag (google.cloud.datacatalog_v1beta1.types.Tag): Required. The updated tag. The "name" field must be set. + This corresponds to the ``tag`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - update_mask (:class:`~.field_mask.FieldMask`): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field ``fields``. + This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2404,15 +2464,15 @@ def update_tag( sent along with the request as metadata. Returns: - ~.tags.Tag: - Tags are used to attach custom metadata to Data Catalog - resources. Tags conform to the specifications within - their tag template. + google.cloud.datacatalog_v1beta1.types.Tag: + Tags are used to attach custom metadata to Data Catalog resources. Tags + conform to the specifications within their tag + template. - See `Data Catalog - IAM `__ - for information on the permissions needed to create or - view tags. + See [Data Catalog + IAM](\ https://cloud.google.com/data-catalog/docs/concepts/iam) + for information on the permissions needed to create + or view tags. """ # Create or coerce a protobuf request object. @@ -2468,13 +2528,14 @@ def delete_tag( r"""Deletes a tag. Args: - request (:class:`~.datacatalog.DeleteTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeleteTagRequest): The request object. Request message for [DeleteTag][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag]. - name (:class:`str`): + name (str): Required. The name of the tag to delete. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2536,10 +2597,10 @@ def list_tags( [Entry][google.cloud.datacatalog.v1beta1.Entry]. Args: - request (:class:`~.datacatalog.ListTagsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListTagsRequest): The request object. Request message for [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. - parent (:class:`str`): + parent (str): Required. The name of the Data Catalog resource to list the tags of. The resource could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an @@ -2549,6 +2610,7 @@ def list_tags( - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2560,9 +2622,9 @@ def list_tags( sent along with the request as metadata. Returns: - ~.pagers.ListTagsPager: + google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListTagsPager: Response message for - [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. + [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. Iterating over this object will yield results and resolve additional pages automatically. @@ -2641,14 +2703,15 @@ def set_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.SetIamPolicyRequest`): + request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest): The request object. Request message for `SetIamPolicy` method. - resource (:class:`str`): + resource (str): REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2660,72 +2723,62 @@ def set_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2794,14 +2847,15 @@ def get_iam_policy( entry groups. Args: - request (:class:`~.iam_policy.GetIamPolicyRequest`): + request (google.iam.v1.iam_policy_pb2.GetIamPolicyRequest): The request object. Request message for `GetIamPolicy` method. - resource (:class:`str`): + resource (str): REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -2813,72 +2867,62 @@ def get_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -2939,7 +2983,7 @@ def test_iam_permissions( this request. Args: - request (:class:`~.iam_policy.TestIamPermissionsRequest`): + request (google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest): The request object. Request message for `TestIamPermissions` method. @@ -2950,8 +2994,8 @@ def test_iam_permissions( sent along with the request as metadata. Returns: - ~.iam_policy.TestIamPermissionsResponse: - Response message for ``TestIamPermissions`` method. + google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse: + Response message for TestIamPermissions method. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1beta1/services/data_catalog/pagers.py b/google/cloud/datacatalog_v1beta1/services/data_catalog/pagers.py index ae87331f..17b6f5ed 100644 --- a/google/cloud/datacatalog_v1beta1/services/data_catalog/pagers.py +++ b/google/cloud/datacatalog_v1beta1/services/data_catalog/pagers.py @@ -26,7 +26,7 @@ class SearchCatalogPager: """A pager for iterating through ``search_catalog`` requests. This class thinly wraps an initial - :class:`~.datacatalog.SearchCatalogResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.SearchCatalogResponse` object, and provides an ``__iter__`` method to iterate through its ``results`` field. @@ -35,7 +35,7 @@ class SearchCatalogPager: through the ``results`` field on the corresponding responses. - All the usual :class:`~.datacatalog.SearchCatalogResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.SearchCatalogResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -53,9 +53,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest): The initial request object. - response (:class:`~.datacatalog.SearchCatalogResponse`): + response (google.cloud.datacatalog_v1beta1.types.SearchCatalogResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -88,7 +88,7 @@ class SearchCatalogAsyncPager: """A pager for iterating through ``search_catalog`` requests. This class thinly wraps an initial - :class:`~.datacatalog.SearchCatalogResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.SearchCatalogResponse` object, and provides an ``__aiter__`` method to iterate through its ``results`` field. @@ -97,7 +97,7 @@ class SearchCatalogAsyncPager: through the ``results`` field on the corresponding responses. - All the usual :class:`~.datacatalog.SearchCatalogResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.SearchCatalogResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -115,9 +115,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.SearchCatalogRequest`): + request (google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest): The initial request object. - response (:class:`~.datacatalog.SearchCatalogResponse`): + response (google.cloud.datacatalog_v1beta1.types.SearchCatalogResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -154,7 +154,7 @@ class ListEntryGroupsPager: """A pager for iterating through ``list_entry_groups`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntryGroupsResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListEntryGroupsResponse` object, and provides an ``__iter__`` method to iterate through its ``entry_groups`` field. @@ -163,7 +163,7 @@ class ListEntryGroupsPager: through the ``entry_groups`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntryGroupsResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListEntryGroupsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -181,9 +181,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListEntryGroupsRequest): The initial request object. - response (:class:`~.datacatalog.ListEntryGroupsResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListEntryGroupsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -216,7 +216,7 @@ class ListEntryGroupsAsyncPager: """A pager for iterating through ``list_entry_groups`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntryGroupsResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListEntryGroupsResponse` object, and provides an ``__aiter__`` method to iterate through its ``entry_groups`` field. @@ -225,7 +225,7 @@ class ListEntryGroupsAsyncPager: through the ``entry_groups`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntryGroupsResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListEntryGroupsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -243,9 +243,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntryGroupsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListEntryGroupsRequest): The initial request object. - response (:class:`~.datacatalog.ListEntryGroupsResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListEntryGroupsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -282,7 +282,7 @@ class ListEntriesPager: """A pager for iterating through ``list_entries`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntriesResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListEntriesResponse` object, and provides an ``__iter__`` method to iterate through its ``entries`` field. @@ -291,7 +291,7 @@ class ListEntriesPager: through the ``entries`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntriesResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListEntriesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -309,9 +309,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntriesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListEntriesRequest): The initial request object. - response (:class:`~.datacatalog.ListEntriesResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListEntriesResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -344,7 +344,7 @@ class ListEntriesAsyncPager: """A pager for iterating through ``list_entries`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListEntriesResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListEntriesResponse` object, and provides an ``__aiter__`` method to iterate through its ``entries`` field. @@ -353,7 +353,7 @@ class ListEntriesAsyncPager: through the ``entries`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListEntriesResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListEntriesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -371,9 +371,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListEntriesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListEntriesRequest): The initial request object. - response (:class:`~.datacatalog.ListEntriesResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListEntriesResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -410,7 +410,7 @@ class ListTagsPager: """A pager for iterating through ``list_tags`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListTagsResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListTagsResponse` object, and provides an ``__iter__`` method to iterate through its ``tags`` field. @@ -419,7 +419,7 @@ class ListTagsPager: through the ``tags`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListTagsResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListTagsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -437,9 +437,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListTagsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListTagsRequest): The initial request object. - response (:class:`~.datacatalog.ListTagsResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListTagsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -472,7 +472,7 @@ class ListTagsAsyncPager: """A pager for iterating through ``list_tags`` requests. This class thinly wraps an initial - :class:`~.datacatalog.ListTagsResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListTagsResponse` object, and provides an ``__aiter__`` method to iterate through its ``tags`` field. @@ -481,7 +481,7 @@ class ListTagsAsyncPager: through the ``tags`` field on the corresponding responses. - All the usual :class:`~.datacatalog.ListTagsResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListTagsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -499,9 +499,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.datacatalog.ListTagsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListTagsRequest): The initial request object. - response (:class:`~.datacatalog.ListTagsResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListTagsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. diff --git a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/async_client.py b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/async_client.py index 759d80df..61f9daab 100644 --- a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/async_client.py +++ b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/async_client.py @@ -82,6 +82,7 @@ class PolicyTagManagerAsyncClient: PolicyTagManagerClient.parse_common_location_path ) + from_service_account_info = PolicyTagManagerClient.from_service_account_info from_service_account_file = PolicyTagManagerClient.from_service_account_file from_service_account_json = from_service_account_file @@ -159,17 +160,18 @@ async def create_taxonomy( r"""Creates a taxonomy in the specified project. Args: - request (:class:`~.policytagmanager.CreateTaxonomyRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreateTaxonomyRequest`): The request object. Request message for [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. parent (:class:`str`): Required. Resource name of the project that the taxonomy will belong to. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - taxonomy (:class:`~.policytagmanager.Taxonomy`): + taxonomy (:class:`google.cloud.datacatalog_v1beta1.types.Taxonomy`): The taxonomy to be created. This corresponds to the ``taxonomy`` field on the ``request`` instance; if ``request`` is provided, this @@ -182,14 +184,13 @@ async def create_taxonomy( sent along with the request as metadata. Returns: - ~.policytagmanager.Taxonomy: - A taxonomy is a collection of policy tags that classify - data along a common axis. For instance a data - *sensitivity* taxonomy could contain policy tags - denoting PII such as age, zipcode, and SSN. A data - *origin* taxonomy could contain policy tags to - distinguish user data, employee data, partner data, - public data. + google.cloud.datacatalog_v1beta1.types.Taxonomy: + A taxonomy is a collection of policy tags that classify data along a common + axis. For instance a data *sensitivity* taxonomy + could contain policy tags denoting PII such as age, + zipcode, and SSN. A data *origin* taxonomy could + contain policy tags to distinguish user data, + employee data, partner data, public data. """ # Create or coerce a protobuf request object. @@ -246,13 +247,14 @@ async def delete_taxonomy( associated policies. Args: - request (:class:`~.policytagmanager.DeleteTaxonomyRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeleteTaxonomyRequest`): The request object. Request message for [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. name (:class:`str`): Required. Resource name of the taxonomy to be deleted. All policy tags in this taxonomy will also be deleted. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -312,12 +314,13 @@ async def update_taxonomy( r"""Updates a taxonomy. Args: - request (:class:`~.policytagmanager.UpdateTaxonomyRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdateTaxonomyRequest`): The request object. Request message for [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. - taxonomy (:class:`~.policytagmanager.Taxonomy`): + taxonomy (:class:`google.cloud.datacatalog_v1beta1.types.Taxonomy`): The taxonomy to update. Only description, display_name, and activated policy types can be updated. + This corresponds to the ``taxonomy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -329,14 +332,13 @@ async def update_taxonomy( sent along with the request as metadata. Returns: - ~.policytagmanager.Taxonomy: - A taxonomy is a collection of policy tags that classify - data along a common axis. For instance a data - *sensitivity* taxonomy could contain policy tags - denoting PII such as age, zipcode, and SSN. A data - *origin* taxonomy could contain policy tags to - distinguish user data, employee data, partner data, - public data. + google.cloud.datacatalog_v1beta1.types.Taxonomy: + A taxonomy is a collection of policy tags that classify data along a common + axis. For instance a data *sensitivity* taxonomy + could contain policy tags denoting PII such as age, + zipcode, and SSN. A data *origin* taxonomy could + contain policy tags to distinguish user data, + employee data, partner data, public data. """ # Create or coerce a protobuf request object. @@ -392,12 +394,13 @@ async def list_taxonomies( location that the caller has permission to view. Args: - request (:class:`~.policytagmanager.ListTaxonomiesRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ListTaxonomiesRequest`): The request object. Request message for [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. parent (:class:`str`): Required. Resource name of the project to list the taxonomies of. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -409,9 +412,9 @@ async def list_taxonomies( sent along with the request as metadata. Returns: - ~.pagers.ListTaxonomiesAsyncPager: + google.cloud.datacatalog_v1beta1.services.policy_tag_manager.pagers.ListTaxonomiesAsyncPager: Response message for - [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. + [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. Iterating over this object will yield results and resolve additional pages automatically. @@ -473,12 +476,13 @@ async def get_taxonomy( r"""Gets a taxonomy. Args: - request (:class:`~.policytagmanager.GetTaxonomyRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.GetTaxonomyRequest`): The request object. Request message for [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. name (:class:`str`): Required. Resource name of the requested taxonomy. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -490,14 +494,13 @@ async def get_taxonomy( sent along with the request as metadata. Returns: - ~.policytagmanager.Taxonomy: - A taxonomy is a collection of policy tags that classify - data along a common axis. For instance a data - *sensitivity* taxonomy could contain policy tags - denoting PII such as age, zipcode, and SSN. A data - *origin* taxonomy could contain policy tags to - distinguish user data, employee data, partner data, - public data. + google.cloud.datacatalog_v1beta1.types.Taxonomy: + A taxonomy is a collection of policy tags that classify data along a common + axis. For instance a data *sensitivity* taxonomy + could contain policy tags denoting PII such as age, + zipcode, and SSN. A data *origin* taxonomy could + contain policy tags to distinguish user data, + employee data, partner data, public data. """ # Create or coerce a protobuf request object. @@ -551,17 +554,18 @@ async def create_policy_tag( r"""Creates a policy tag in the specified taxonomy. Args: - request (:class:`~.policytagmanager.CreatePolicyTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.CreatePolicyTagRequest`): The request object. Request message for [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. parent (:class:`str`): Required. Resource name of the taxonomy that the policy tag will belong to. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - policy_tag (:class:`~.policytagmanager.PolicyTag`): + policy_tag (:class:`google.cloud.datacatalog_v1beta1.types.PolicyTag`): The policy tag to be created. This corresponds to the ``policy_tag`` field on the ``request`` instance; if ``request`` is provided, this @@ -574,7 +578,7 @@ async def create_policy_tag( sent along with the request as metadata. Returns: - ~.policytagmanager.PolicyTag: + google.cloud.datacatalog_v1beta1.types.PolicyTag: Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider @@ -638,13 +642,14 @@ async def delete_policy_tag( descendant policy tags. Args: - request (:class:`~.policytagmanager.DeletePolicyTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.DeletePolicyTagRequest`): The request object. Request message for [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. name (:class:`str`): Required. Resource name of the policy tag to be deleted. All of its descendant policy tags will also be deleted. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -704,13 +709,14 @@ async def update_policy_tag( r"""Updates a policy tag. Args: - request (:class:`~.policytagmanager.UpdatePolicyTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.UpdatePolicyTagRequest`): The request object. Request message for [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. - policy_tag (:class:`~.policytagmanager.PolicyTag`): + policy_tag (:class:`google.cloud.datacatalog_v1beta1.types.PolicyTag`): The policy tag to update. Only the description, display_name, and parent_policy_tag fields can be updated. + This corresponds to the ``policy_tag`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -722,7 +728,7 @@ async def update_policy_tag( sent along with the request as metadata. Returns: - ~.policytagmanager.PolicyTag: + google.cloud.datacatalog_v1beta1.types.PolicyTag: Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider @@ -785,12 +791,13 @@ async def list_policy_tags( r"""Lists all policy tags in a taxonomy. Args: - request (:class:`~.policytagmanager.ListPolicyTagsRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ListPolicyTagsRequest`): The request object. Request message for [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. parent (:class:`str`): Required. Resource name of the taxonomy to list the policy tags of. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -802,9 +809,9 @@ async def list_policy_tags( sent along with the request as metadata. Returns: - ~.pagers.ListPolicyTagsAsyncPager: + google.cloud.datacatalog_v1beta1.services.policy_tag_manager.pagers.ListPolicyTagsAsyncPager: Response message for - [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. + [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. Iterating over this object will yield results and resolve additional pages automatically. @@ -866,12 +873,13 @@ async def get_policy_tag( r"""Gets a policy tag. Args: - request (:class:`~.policytagmanager.GetPolicyTagRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.GetPolicyTagRequest`): The request object. Request message for [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. name (:class:`str`): Required. Resource name of the requested policy tag. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -883,7 +891,7 @@ async def get_policy_tag( sent along with the request as metadata. Returns: - ~.policytagmanager.PolicyTag: + google.cloud.datacatalog_v1beta1.types.PolicyTag: Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider @@ -943,7 +951,7 @@ async def get_iam_policy( r"""Gets the IAM policy for a taxonomy or a policy tag. Args: - request (:class:`~.iam_policy.GetIamPolicyRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.GetIamPolicyRequest`): The request object. Request message for `GetIamPolicy` method. @@ -954,72 +962,62 @@ async def get_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -1060,7 +1058,7 @@ async def set_iam_policy( r"""Sets the IAM policy for a taxonomy or a policy tag. Args: - request (:class:`~.iam_policy.SetIamPolicyRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.SetIamPolicyRequest`): The request object. Request message for `SetIamPolicy` method. @@ -1071,72 +1069,62 @@ async def set_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -1178,7 +1166,7 @@ async def test_iam_permissions( specified taxonomy or policy tag. Args: - request (:class:`~.iam_policy.TestIamPermissionsRequest`): + request (:class:`google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest`): The request object. Request message for `TestIamPermissions` method. @@ -1189,8 +1177,8 @@ async def test_iam_permissions( sent along with the request as metadata. Returns: - ~.iam_policy.TestIamPermissionsResponse: - Response message for ``TestIamPermissions`` method. + google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse: + Response message for TestIamPermissions method. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/client.py b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/client.py index ffbb1f7f..1b88fc10 100644 --- a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/client.py +++ b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/client.py @@ -114,6 +114,22 @@ def _get_default_mtls_endpoint(api_endpoint): DEFAULT_ENDPOINT ) + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + PolicyTagManagerClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials @@ -126,7 +142,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): kwargs: Additional arguments to pass to the constructor. Returns: - {@api.name}: The constructed client. + PolicyTagManagerClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials @@ -255,10 +271,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - transport (Union[str, ~.PolicyTagManagerTransport]): The + transport (Union[str, PolicyTagManagerTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (client_options_lib.ClientOptions): Custom options for the + client_options (google.api_core.client_options.ClientOptions): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -369,17 +385,18 @@ def create_taxonomy( r"""Creates a taxonomy in the specified project. Args: - request (:class:`~.policytagmanager.CreateTaxonomyRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreateTaxonomyRequest): The request object. Request message for [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. - parent (:class:`str`): + parent (str): Required. Resource name of the project that the taxonomy will belong to. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - taxonomy (:class:`~.policytagmanager.Taxonomy`): + taxonomy (google.cloud.datacatalog_v1beta1.types.Taxonomy): The taxonomy to be created. This corresponds to the ``taxonomy`` field on the ``request`` instance; if ``request`` is provided, this @@ -392,14 +409,13 @@ def create_taxonomy( sent along with the request as metadata. Returns: - ~.policytagmanager.Taxonomy: - A taxonomy is a collection of policy tags that classify - data along a common axis. For instance a data - *sensitivity* taxonomy could contain policy tags - denoting PII such as age, zipcode, and SSN. A data - *origin* taxonomy could contain policy tags to - distinguish user data, employee data, partner data, - public data. + google.cloud.datacatalog_v1beta1.types.Taxonomy: + A taxonomy is a collection of policy tags that classify data along a common + axis. For instance a data *sensitivity* taxonomy + could contain policy tags denoting PII such as age, + zipcode, and SSN. A data *origin* taxonomy could + contain policy tags to distinguish user data, + employee data, partner data, public data. """ # Create or coerce a protobuf request object. @@ -457,13 +473,14 @@ def delete_taxonomy( associated policies. Args: - request (:class:`~.policytagmanager.DeleteTaxonomyRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeleteTaxonomyRequest): The request object. Request message for [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. - name (:class:`str`): + name (str): Required. Resource name of the taxonomy to be deleted. All policy tags in this taxonomy will also be deleted. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -524,12 +541,13 @@ def update_taxonomy( r"""Updates a taxonomy. Args: - request (:class:`~.policytagmanager.UpdateTaxonomyRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdateTaxonomyRequest): The request object. Request message for [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. - taxonomy (:class:`~.policytagmanager.Taxonomy`): + taxonomy (google.cloud.datacatalog_v1beta1.types.Taxonomy): The taxonomy to update. Only description, display_name, and activated policy types can be updated. + This corresponds to the ``taxonomy`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -541,14 +559,13 @@ def update_taxonomy( sent along with the request as metadata. Returns: - ~.policytagmanager.Taxonomy: - A taxonomy is a collection of policy tags that classify - data along a common axis. For instance a data - *sensitivity* taxonomy could contain policy tags - denoting PII such as age, zipcode, and SSN. A data - *origin* taxonomy could contain policy tags to - distinguish user data, employee data, partner data, - public data. + google.cloud.datacatalog_v1beta1.types.Taxonomy: + A taxonomy is a collection of policy tags that classify data along a common + axis. For instance a data *sensitivity* taxonomy + could contain policy tags denoting PII such as age, + zipcode, and SSN. A data *origin* taxonomy could + contain policy tags to distinguish user data, + employee data, partner data, public data. """ # Create or coerce a protobuf request object. @@ -605,12 +622,13 @@ def list_taxonomies( location that the caller has permission to view. Args: - request (:class:`~.policytagmanager.ListTaxonomiesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListTaxonomiesRequest): The request object. Request message for [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. - parent (:class:`str`): + parent (str): Required. Resource name of the project to list the taxonomies of. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -622,9 +640,9 @@ def list_taxonomies( sent along with the request as metadata. Returns: - ~.pagers.ListTaxonomiesPager: + google.cloud.datacatalog_v1beta1.services.policy_tag_manager.pagers.ListTaxonomiesPager: Response message for - [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. + [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. Iterating over this object will yield results and resolve additional pages automatically. @@ -687,12 +705,13 @@ def get_taxonomy( r"""Gets a taxonomy. Args: - request (:class:`~.policytagmanager.GetTaxonomyRequest`): + request (google.cloud.datacatalog_v1beta1.types.GetTaxonomyRequest): The request object. Request message for [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. - name (:class:`str`): + name (str): Required. Resource name of the requested taxonomy. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -704,14 +723,13 @@ def get_taxonomy( sent along with the request as metadata. Returns: - ~.policytagmanager.Taxonomy: - A taxonomy is a collection of policy tags that classify - data along a common axis. For instance a data - *sensitivity* taxonomy could contain policy tags - denoting PII such as age, zipcode, and SSN. A data - *origin* taxonomy could contain policy tags to - distinguish user data, employee data, partner data, - public data. + google.cloud.datacatalog_v1beta1.types.Taxonomy: + A taxonomy is a collection of policy tags that classify data along a common + axis. For instance a data *sensitivity* taxonomy + could contain policy tags denoting PII such as age, + zipcode, and SSN. A data *origin* taxonomy could + contain policy tags to distinguish user data, + employee data, partner data, public data. """ # Create or coerce a protobuf request object. @@ -766,17 +784,18 @@ def create_policy_tag( r"""Creates a policy tag in the specified taxonomy. Args: - request (:class:`~.policytagmanager.CreatePolicyTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.CreatePolicyTagRequest): The request object. Request message for [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. - parent (:class:`str`): + parent (str): Required. Resource name of the taxonomy that the policy tag will belong to. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - policy_tag (:class:`~.policytagmanager.PolicyTag`): + policy_tag (google.cloud.datacatalog_v1beta1.types.PolicyTag): The policy tag to be created. This corresponds to the ``policy_tag`` field on the ``request`` instance; if ``request`` is provided, this @@ -789,7 +808,7 @@ def create_policy_tag( sent along with the request as metadata. Returns: - ~.policytagmanager.PolicyTag: + google.cloud.datacatalog_v1beta1.types.PolicyTag: Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider @@ -854,13 +873,14 @@ def delete_policy_tag( descendant policy tags. Args: - request (:class:`~.policytagmanager.DeletePolicyTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.DeletePolicyTagRequest): The request object. Request message for [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. - name (:class:`str`): + name (str): Required. Resource name of the policy tag to be deleted. All of its descendant policy tags will also be deleted. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -921,13 +941,14 @@ def update_policy_tag( r"""Updates a policy tag. Args: - request (:class:`~.policytagmanager.UpdatePolicyTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.UpdatePolicyTagRequest): The request object. Request message for [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. - policy_tag (:class:`~.policytagmanager.PolicyTag`): + policy_tag (google.cloud.datacatalog_v1beta1.types.PolicyTag): The policy tag to update. Only the description, display_name, and parent_policy_tag fields can be updated. + This corresponds to the ``policy_tag`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -939,7 +960,7 @@ def update_policy_tag( sent along with the request as metadata. Returns: - ~.policytagmanager.PolicyTag: + google.cloud.datacatalog_v1beta1.types.PolicyTag: Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider @@ -1003,12 +1024,13 @@ def list_policy_tags( r"""Lists all policy tags in a taxonomy. Args: - request (:class:`~.policytagmanager.ListPolicyTagsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListPolicyTagsRequest): The request object. Request message for [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. - parent (:class:`str`): + parent (str): Required. Resource name of the taxonomy to list the policy tags of. + This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1020,9 +1042,9 @@ def list_policy_tags( sent along with the request as metadata. Returns: - ~.pagers.ListPolicyTagsPager: + google.cloud.datacatalog_v1beta1.services.policy_tag_manager.pagers.ListPolicyTagsPager: Response message for - [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. + [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1085,12 +1107,13 @@ def get_policy_tag( r"""Gets a policy tag. Args: - request (:class:`~.policytagmanager.GetPolicyTagRequest`): + request (google.cloud.datacatalog_v1beta1.types.GetPolicyTagRequest): The request object. Request message for [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. - name (:class:`str`): + name (str): Required. Resource name of the requested policy tag. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1102,7 +1125,7 @@ def get_policy_tag( sent along with the request as metadata. Returns: - ~.policytagmanager.PolicyTag: + google.cloud.datacatalog_v1beta1.types.PolicyTag: Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider @@ -1163,7 +1186,7 @@ def get_iam_policy( r"""Gets the IAM policy for a taxonomy or a policy tag. Args: - request (:class:`~.iam_policy.GetIamPolicyRequest`): + request (google.iam.v1.iam_policy_pb2.GetIamPolicyRequest): The request object. Request message for `GetIamPolicy` method. @@ -1174,72 +1197,62 @@ def get_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -1276,7 +1289,7 @@ def set_iam_policy( r"""Sets the IAM policy for a taxonomy or a policy tag. Args: - request (:class:`~.iam_policy.SetIamPolicyRequest`): + request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest): The request object. Request message for `SetIamPolicy` method. @@ -1287,72 +1300,62 @@ def set_iam_policy( sent along with the request as metadata. Returns: - ~.policy.Policy: - Defines an Identity and Access Management (IAM) policy. - It is used to specify access control policies for Cloud - Platform resources. - - A ``Policy`` is a collection of ``bindings``. A - ``binding`` binds one or more ``members`` to a single - ``role``. Members can be user accounts, service - accounts, Google groups, and domains (such as G Suite). - A ``role`` is a named list of permissions (defined by - IAM or configured by users). A ``binding`` can - optionally specify a ``condition``, which is a logic - expression that further constrains the role binding - based on attributes about the request and/or target - resource. - - **JSON Example** - - :: - - { - "bindings": [ - { - "role": "roles/resourcemanager.organizationAdmin", - "members": [ - "user:mike@example.com", - "group:admins@example.com", - "domain:google.com", - "serviceAccount:my-project-id@appspot.gserviceaccount.com" - ] - }, - { - "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], - "condition": { - "title": "expirable access", - "description": "Does not grant access after Sep 2020", - "expression": "request.time < - timestamp('2020-10-01T00:00:00.000Z')", - } - } - ] - } - - **YAML Example** - - :: - - bindings: - - members: - - user:mike@example.com - - group:admins@example.com - - domain:google.com - - serviceAccount:my-project-id@appspot.gserviceaccount.com - role: roles/resourcemanager.organizationAdmin - - members: - - user:eve@example.com - role: roles/resourcemanager.organizationViewer - condition: - title: expirable access - description: Does not grant access after Sep 2020 - expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - - For a description of IAM and its features, see the `IAM - developer's - guide `__. + google.iam.v1.policy_pb2.Policy: + Defines an Identity and Access Management (IAM) policy. It is used to + specify access control policies for Cloud Platform + resources. + + A Policy is a collection of bindings. A binding binds + one or more members to a single role. Members can be + user accounts, service accounts, Google groups, and + domains (such as G Suite). A role is a named list of + permissions (defined by IAM or configured by users). + A binding can optionally specify a condition, which + is a logic expression that further constrains the + role binding based on attributes about the request + and/or target resource. + + **JSON Example** + + { + "bindings": [ + { + "role": + "roles/resourcemanager.organizationAdmin", + "members": [ "user:mike@example.com", + "group:admins@example.com", + "domain:google.com", + "serviceAccount:my-project-id@appspot.gserviceaccount.com" + ] + + }, { "role": + "roles/resourcemanager.organizationViewer", + "members": ["user:eve@example.com"], + "condition": { "title": "expirable access", + "description": "Does not grant access after + Sep 2020", "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } + + ] + + } + + **YAML Example** + + bindings: - members: - user:\ mike@example.com - + group:\ admins@example.com - domain:google.com - + serviceAccount:\ my-project-id@appspot.gserviceaccount.com + role: roles/resourcemanager.organizationAdmin - + members: - user:\ eve@example.com role: + roles/resourcemanager.organizationViewer + condition: title: expirable access description: + Does not grant access after Sep 2020 expression: + request.time < + timestamp('2020-10-01T00:00:00.000Z') + + For a description of IAM and its features, see the + [IAM developer's + guide](\ https://cloud.google.com/iam/docs). """ # Create or coerce a protobuf request object. @@ -1390,7 +1393,7 @@ def test_iam_permissions( specified taxonomy or policy tag. Args: - request (:class:`~.iam_policy.TestIamPermissionsRequest`): + request (google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest): The request object. Request message for `TestIamPermissions` method. @@ -1401,8 +1404,8 @@ def test_iam_permissions( sent along with the request as metadata. Returns: - ~.iam_policy.TestIamPermissionsResponse: - Response message for ``TestIamPermissions`` method. + google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse: + Response message for TestIamPermissions method. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/pagers.py b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/pagers.py index 4dd9013d..c216e352 100644 --- a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/pagers.py +++ b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager/pagers.py @@ -24,7 +24,7 @@ class ListTaxonomiesPager: """A pager for iterating through ``list_taxonomies`` requests. This class thinly wraps an initial - :class:`~.policytagmanager.ListTaxonomiesResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListTaxonomiesResponse` object, and provides an ``__iter__`` method to iterate through its ``taxonomies`` field. @@ -33,7 +33,7 @@ class ListTaxonomiesPager: through the ``taxonomies`` field on the corresponding responses. - All the usual :class:`~.policytagmanager.ListTaxonomiesResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListTaxonomiesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -51,9 +51,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.policytagmanager.ListTaxonomiesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListTaxonomiesRequest): The initial request object. - response (:class:`~.policytagmanager.ListTaxonomiesResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListTaxonomiesResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -86,7 +86,7 @@ class ListTaxonomiesAsyncPager: """A pager for iterating through ``list_taxonomies`` requests. This class thinly wraps an initial - :class:`~.policytagmanager.ListTaxonomiesResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListTaxonomiesResponse` object, and provides an ``__aiter__`` method to iterate through its ``taxonomies`` field. @@ -95,7 +95,7 @@ class ListTaxonomiesAsyncPager: through the ``taxonomies`` field on the corresponding responses. - All the usual :class:`~.policytagmanager.ListTaxonomiesResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListTaxonomiesResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -113,9 +113,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.policytagmanager.ListTaxonomiesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListTaxonomiesRequest): The initial request object. - response (:class:`~.policytagmanager.ListTaxonomiesResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListTaxonomiesResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -152,7 +152,7 @@ class ListPolicyTagsPager: """A pager for iterating through ``list_policy_tags`` requests. This class thinly wraps an initial - :class:`~.policytagmanager.ListPolicyTagsResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListPolicyTagsResponse` object, and provides an ``__iter__`` method to iterate through its ``policy_tags`` field. @@ -161,7 +161,7 @@ class ListPolicyTagsPager: through the ``policy_tags`` field on the corresponding responses. - All the usual :class:`~.policytagmanager.ListPolicyTagsResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListPolicyTagsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -179,9 +179,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.policytagmanager.ListPolicyTagsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListPolicyTagsRequest): The initial request object. - response (:class:`~.policytagmanager.ListPolicyTagsResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListPolicyTagsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. @@ -214,7 +214,7 @@ class ListPolicyTagsAsyncPager: """A pager for iterating through ``list_policy_tags`` requests. This class thinly wraps an initial - :class:`~.policytagmanager.ListPolicyTagsResponse` object, and + :class:`google.cloud.datacatalog_v1beta1.types.ListPolicyTagsResponse` object, and provides an ``__aiter__`` method to iterate through its ``policy_tags`` field. @@ -223,7 +223,7 @@ class ListPolicyTagsAsyncPager: through the ``policy_tags`` field on the corresponding responses. - All the usual :class:`~.policytagmanager.ListPolicyTagsResponse` + All the usual :class:`google.cloud.datacatalog_v1beta1.types.ListPolicyTagsResponse` attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup. """ @@ -241,9 +241,9 @@ def __init__( Args: method (Callable): The method that was originally called, and which instantiated this pager. - request (:class:`~.policytagmanager.ListPolicyTagsRequest`): + request (google.cloud.datacatalog_v1beta1.types.ListPolicyTagsRequest): The initial request object. - response (:class:`~.policytagmanager.ListPolicyTagsResponse`): + response (google.cloud.datacatalog_v1beta1.types.ListPolicyTagsResponse): The initial response object. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. diff --git a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/async_client.py b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/async_client.py index cfbd3082..36c2a489 100644 --- a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/async_client.py +++ b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/async_client.py @@ -87,6 +87,9 @@ class PolicyTagManagerSerializationAsyncClient: PolicyTagManagerSerializationClient.parse_common_location_path ) + from_service_account_info = ( + PolicyTagManagerSerializationClient.from_service_account_info + ) from_service_account_file = ( PolicyTagManagerSerializationClient.from_service_account_file ) @@ -169,7 +172,7 @@ async def import_taxonomies( creation using nested proto structure. Args: - request (:class:`~.policytagmanagerserialization.ImportTaxonomiesRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ImportTaxonomiesRequest`): The request object. Request message for [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. @@ -180,9 +183,9 @@ async def import_taxonomies( sent along with the request as metadata. Returns: - ~.policytagmanagerserialization.ImportTaxonomiesResponse: + google.cloud.datacatalog_v1beta1.types.ImportTaxonomiesResponse: Response message for - [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. + [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. """ # Create or coerce a protobuf request object. @@ -224,7 +227,7 @@ async def export_taxonomies( future ImportTaxonomies calls. Args: - request (:class:`~.policytagmanagerserialization.ExportTaxonomiesRequest`): + request (:class:`google.cloud.datacatalog_v1beta1.types.ExportTaxonomiesRequest`): The request object. Request message for [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. @@ -235,9 +238,9 @@ async def export_taxonomies( sent along with the request as metadata. Returns: - ~.policytagmanagerserialization.ExportTaxonomiesResponse: + google.cloud.datacatalog_v1beta1.types.ExportTaxonomiesResponse: Response message for - [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. + [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/client.py b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/client.py index 65a709e3..739c3020 100644 --- a/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/client.py +++ b/google/cloud/datacatalog_v1beta1/services/policy_tag_manager_serialization/client.py @@ -119,6 +119,22 @@ def _get_default_mtls_endpoint(api_endpoint): DEFAULT_ENDPOINT ) + @classmethod + def from_service_account_info(cls, info: dict, *args, **kwargs): + """Creates an instance of this client using the provided credentials info. + + Args: + info (dict): The service account private key info. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + PolicyTagManagerSerializationClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_info(info) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials @@ -131,7 +147,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): kwargs: Additional arguments to pass to the constructor. Returns: - {@api.name}: The constructed client. + PolicyTagManagerSerializationClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials @@ -239,10 +255,10 @@ def __init__( credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. - transport (Union[str, ~.PolicyTagManagerSerializationTransport]): The + transport (Union[str, PolicyTagManagerSerializationTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (client_options_lib.ClientOptions): Custom options for the + client_options (google.api_core.client_options.ClientOptions): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -355,7 +371,7 @@ def import_taxonomies( creation using nested proto structure. Args: - request (:class:`~.policytagmanagerserialization.ImportTaxonomiesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ImportTaxonomiesRequest): The request object. Request message for [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. @@ -366,9 +382,9 @@ def import_taxonomies( sent along with the request as metadata. Returns: - ~.policytagmanagerserialization.ImportTaxonomiesResponse: + google.cloud.datacatalog_v1beta1.types.ImportTaxonomiesResponse: Response message for - [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. + [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. """ # Create or coerce a protobuf request object. @@ -413,7 +429,7 @@ def export_taxonomies( future ImportTaxonomies calls. Args: - request (:class:`~.policytagmanagerserialization.ExportTaxonomiesRequest`): + request (google.cloud.datacatalog_v1beta1.types.ExportTaxonomiesRequest): The request object. Request message for [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. @@ -424,9 +440,9 @@ def export_taxonomies( sent along with the request as metadata. Returns: - ~.policytagmanagerserialization.ExportTaxonomiesResponse: + google.cloud.datacatalog_v1beta1.types.ExportTaxonomiesResponse: Response message for - [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. + [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/datacatalog_v1beta1/types/datacatalog.py b/google/cloud/datacatalog_v1beta1/types/datacatalog.py index ee843cac..f12ca6e6 100644 --- a/google/cloud/datacatalog_v1beta1/types/datacatalog.py +++ b/google/cloud/datacatalog_v1beta1/types/datacatalog.py @@ -85,7 +85,7 @@ class SearchCatalogRequest(proto.Message): [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. Attributes: - scope (~.datacatalog.SearchCatalogRequest.Scope): + scope (google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest.Scope): Required. The scope of this search request. A ``scope`` that has empty ``include_org_ids``, ``include_project_ids`` AND false ``include_gcp_public_datasets`` is considered invalid. @@ -172,7 +172,7 @@ class SearchCatalogResponse(proto.Message): [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. Attributes: - results (Sequence[~.search.SearchCatalogResult]): + results (Sequence[google.cloud.datacatalog_v1beta1.types.SearchCatalogResult]): Search results. next_page_token (str): The token that can be used to retrieve the @@ -209,7 +209,7 @@ class CreateEntryGroupRequest(proto.Message): underscore, contain only English letters, numbers and underscores, and be at most 64 characters. - entry_group (~.datacatalog.EntryGroup): + entry_group (google.cloud.datacatalog_v1beta1.types.EntryGroup): The entry group to create. Defaults to an empty entry group. """ @@ -226,10 +226,10 @@ class UpdateEntryGroupRequest(proto.Message): [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. Attributes: - entry_group (~.datacatalog.EntryGroup): + entry_group (google.cloud.datacatalog_v1beta1.types.EntryGroup): Required. The updated entry group. "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry group. If absent or empty, all modifiable fields are updated. @@ -248,7 +248,7 @@ class GetEntryGroupRequest(proto.Message): name (str): Required. The name of the entry group. For example, ``projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}``. - read_mask (~.field_mask.FieldMask): + read_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to return. If not set or empty, all fields are returned. """ @@ -307,7 +307,7 @@ class ListEntryGroupsResponse(proto.Message): [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. Attributes: - entry_groups (Sequence[~.datacatalog.EntryGroup]): + entry_groups (Sequence[google.cloud.datacatalog_v1beta1.types.EntryGroup]): EntryGroup details. next_page_token (str): Token to retrieve the next page of results. @@ -339,7 +339,7 @@ class CreateEntryRequest(proto.Message): actually be stored in the location in this name. entry_id (str): Required. The id of the entry to create. - entry (~.datacatalog.Entry): + entry (google.cloud.datacatalog_v1beta1.types.Entry): Required. The entry to create. """ @@ -355,10 +355,10 @@ class UpdateEntryRequest(proto.Message): [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. Attributes: - entry (~.datacatalog.Entry): + entry (google.cloud.datacatalog_v1beta1.types.Entry): Required. The updated entry. The "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the entry. If absent or empty, all modifiable fields are updated. @@ -490,7 +490,7 @@ class Entry(proto.Message): Output only when Entry is of type in the EntryType enum. For entries with user_specified_type, this field is optional and defaults to an empty string. - type_ (~.datacatalog.EntryType): + type_ (google.cloud.datacatalog_v1beta1.types.EntryType): The type of the entry. Only used for Entries with types in the EntryType enum. @@ -508,7 +508,7 @@ class Entry(proto.Message): Currently, only FILESET enum value is allowed. All other entries created through Data Catalog must use ``user_specified_type``. - integrated_system (~.common.IntegratedSystem): + integrated_system (google.cloud.datacatalog_v1beta1.types.IntegratedSystem): Output only. This field indicates the entry's source system that Data Catalog integrates with, such as BigQuery or Pub/Sub. @@ -519,14 +519,14 @@ class Entry(proto.Message): contain letters, numbers, and underscores; are case insensitive; must be at least 1 character and at most 64 characters long. - gcs_fileset_spec (~.gcd_gcs_fileset_spec.GcsFilesetSpec): + gcs_fileset_spec (google.cloud.datacatalog_v1beta1.types.GcsFilesetSpec): Specification that applies to a Cloud Storage fileset. This is only valid on entries of type FILESET. - bigquery_table_spec (~.table_spec.BigQueryTableSpec): + bigquery_table_spec (google.cloud.datacatalog_v1beta1.types.BigQueryTableSpec): Specification that applies to a BigQuery table. This is only valid on entries of type ``TABLE``. - bigquery_date_sharded_spec (~.table_spec.BigQueryDateShardedSpec): + bigquery_date_sharded_spec (google.cloud.datacatalog_v1beta1.types.BigQueryDateShardedSpec): Specification for a group of BigQuery tables with name pattern ``[prefix]YYYYMMDD``. Context: https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. @@ -540,10 +540,10 @@ class Entry(proto.Message): several sentences or paragraphs that describe entry contents. Default value is an empty string. - schema (~.gcd_schema.Schema): + schema (google.cloud.datacatalog_v1beta1.types.Schema): Schema of the entry. An entry might not have any schema attached to it. - source_system_timestamps (~.timestamps.SystemTimestamps): + source_system_timestamps (google.cloud.datacatalog_v1beta1.types.SystemTimestamps): Output only. Timestamps about the underlying resource, not about this Data Catalog entry. Output only when Entry is of type in the EntryType enum. For entries with @@ -619,7 +619,7 @@ class EntryGroup(proto.Message): several sentences or paragraphs that describe entry group contents. Default value is an empty string. - data_catalog_timestamps (~.timestamps.SystemTimestamps): + data_catalog_timestamps (google.cloud.datacatalog_v1beta1.types.SystemTimestamps): Output only. Timestamps about this EntryGroup. Default value is empty timestamps. """ @@ -650,7 +650,7 @@ class CreateTagTemplateRequest(proto.Message): tag_template_id (str): Required. The id of the tag template to create. - tag_template (~.gcd_tags.TagTemplate): + tag_template (google.cloud.datacatalog_v1beta1.types.TagTemplate): Required. The tag template to create. """ @@ -680,10 +680,10 @@ class UpdateTagTemplateRequest(proto.Message): [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. Attributes: - tag_template (~.gcd_tags.TagTemplate): + tag_template (google.cloud.datacatalog_v1beta1.types.TagTemplate): Required. The template to update. The "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The field mask specifies the parts of the template to overwrite. @@ -734,7 +734,7 @@ class CreateTagRequest(proto.Message): Note that this Tag and its child resources may not actually be stored in the location in this name. - tag (~.gcd_tags.Tag): + tag (google.cloud.datacatalog_v1beta1.types.Tag): Required. The tag to create. """ @@ -748,10 +748,10 @@ class UpdateTagRequest(proto.Message): [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. Attributes: - tag (~.gcd_tags.Tag): + tag (google.cloud.datacatalog_v1beta1.types.Tag): Required. The updated tag. The "name" field must be set. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field ``fields``. @@ -794,7 +794,7 @@ class CreateTagTemplateFieldRequest(proto.Message): numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. - tag_template_field (~.gcd_tags.TagTemplateField): + tag_template_field (google.cloud.datacatalog_v1beta1.types.TagTemplateField): Required. The tag template field to create. """ @@ -816,9 +816,9 @@ class UpdateTagTemplateFieldRequest(proto.Message): Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - tag_template_field (~.gcd_tags.TagTemplateField): + tag_template_field (google.cloud.datacatalog_v1beta1.types.TagTemplateField): Required. The template to update. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. The field mask specifies the parts of the template to be updated. Allowed fields: @@ -921,7 +921,7 @@ class ListTagsResponse(proto.Message): [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. Attributes: - tags (Sequence[~.gcd_tags.Tag]): + tags (Sequence[google.cloud.datacatalog_v1beta1.types.Tag]): [Tag][google.cloud.datacatalog.v1beta1.Tag] details. next_page_token (str): Token to retrieve the next page of results. @@ -955,7 +955,7 @@ class ListEntriesRequest(proto.Message): page_token (str): Token that specifies which page is requested. If empty, the first page is returned. - read_mask (~.field_mask.FieldMask): + read_mask (google.protobuf.field_mask_pb2.FieldMask): The fields to return for each Entry. If not set or empty, all fields are returned. For example, setting read_mask to contain only one path "name" will cause ListEntries to @@ -976,7 +976,7 @@ class ListEntriesResponse(proto.Message): [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. Attributes: - entries (Sequence[~.datacatalog.Entry]): + entries (Sequence[google.cloud.datacatalog_v1beta1.types.Entry]): Entry details. next_page_token (str): Token to retrieve the next page of results. diff --git a/google/cloud/datacatalog_v1beta1/types/gcs_fileset_spec.py b/google/cloud/datacatalog_v1beta1/types/gcs_fileset_spec.py index cc52615b..68826009 100644 --- a/google/cloud/datacatalog_v1beta1/types/gcs_fileset_spec.py +++ b/google/cloud/datacatalog_v1beta1/types/gcs_fileset_spec.py @@ -64,7 +64,7 @@ class GcsFilesetSpec(proto.Message): for example: - ``gs://bucket_name/[a-m]??.j*g`` - sample_gcs_file_specs (Sequence[~.gcs_fileset_spec.GcsFileSpec]): + sample_gcs_file_specs (Sequence[google.cloud.datacatalog_v1beta1.types.GcsFileSpec]): Output only. Sample files contained in this fileset, not all files contained in this fileset are represented here. @@ -84,7 +84,7 @@ class GcsFileSpec(proto.Message): file_path (str): Required. The full file path. Example: ``gs://bucket_name/a/b.txt``. - gcs_timestamps (~.timestamps.SystemTimestamps): + gcs_timestamps (google.cloud.datacatalog_v1beta1.types.SystemTimestamps): Output only. Timestamps about the Cloud Storage file. size_bytes (int): diff --git a/google/cloud/datacatalog_v1beta1/types/policytagmanager.py b/google/cloud/datacatalog_v1beta1/types/policytagmanager.py index ad1694c3..f3478c90 100644 --- a/google/cloud/datacatalog_v1beta1/types/policytagmanager.py +++ b/google/cloud/datacatalog_v1beta1/types/policytagmanager.py @@ -67,7 +67,7 @@ class Taxonomy(proto.Message): be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. - activated_policy_types (Sequence[~.policytagmanager.Taxonomy.PolicyType]): + activated_policy_types (Sequence[google.cloud.datacatalog_v1beta1.types.Taxonomy.PolicyType]): Optional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. @@ -146,7 +146,7 @@ class CreateTaxonomyRequest(proto.Message): parent (str): Required. Resource name of the project that the taxonomy will belong to. - taxonomy (~.policytagmanager.Taxonomy): + taxonomy (google.cloud.datacatalog_v1beta1.types.Taxonomy): The taxonomy to be created. """ @@ -174,10 +174,10 @@ class UpdateTaxonomyRequest(proto.Message): [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. Attributes: - taxonomy (~.policytagmanager.Taxonomy): + taxonomy (google.cloud.datacatalog_v1beta1.types.Taxonomy): The taxonomy to update. Only description, display_name, and activated policy types can be updated. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The update mask applies to the resource. For the ``FieldMask`` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask @@ -219,7 +219,7 @@ class ListTaxonomiesResponse(proto.Message): [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. Attributes: - taxonomies (Sequence[~.policytagmanager.Taxonomy]): + taxonomies (Sequence[google.cloud.datacatalog_v1beta1.types.Taxonomy]): Taxonomies that the project contains. next_page_token (str): Token used to retrieve the next page of @@ -257,7 +257,7 @@ class CreatePolicyTagRequest(proto.Message): parent (str): Required. Resource name of the taxonomy that the policy tag will belong to. - policy_tag (~.policytagmanager.PolicyTag): + policy_tag (google.cloud.datacatalog_v1beta1.types.PolicyTag): The policy tag to be created. """ @@ -285,10 +285,10 @@ class UpdatePolicyTagRequest(proto.Message): [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. Attributes: - policy_tag (~.policytagmanager.PolicyTag): + policy_tag (google.cloud.datacatalog_v1beta1.types.PolicyTag): The policy tag to update. Only the description, display_name, and parent_policy_tag fields can be updated. - update_mask (~.field_mask.FieldMask): + update_mask (google.protobuf.field_mask_pb2.FieldMask): The update mask applies to the resource. Only display_name, description and parent_policy_tag can be updated and thus can be listed in the mask. If update_mask is not provided, @@ -334,7 +334,7 @@ class ListPolicyTagsResponse(proto.Message): [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. Attributes: - policy_tags (Sequence[~.policytagmanager.PolicyTag]): + policy_tags (Sequence[google.cloud.datacatalog_v1beta1.types.PolicyTag]): The policy tags that are in the requested taxonomy. next_page_token (str): diff --git a/google/cloud/datacatalog_v1beta1/types/policytagmanagerserialization.py b/google/cloud/datacatalog_v1beta1/types/policytagmanagerserialization.py index 2f76dbc7..eba6c7b6 100644 --- a/google/cloud/datacatalog_v1beta1/types/policytagmanagerserialization.py +++ b/google/cloud/datacatalog_v1beta1/types/policytagmanagerserialization.py @@ -48,7 +48,7 @@ class SerializedTaxonomy(proto.Message): length of the description is limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an empty description. - policy_tags (Sequence[~.policytagmanagerserialization.SerializedPolicyTag]): + policy_tags (Sequence[google.cloud.datacatalog_v1beta1.types.SerializedPolicyTag]): Top level policy tags associated with the taxonomy if any. """ @@ -75,7 +75,7 @@ class SerializedPolicyTag(proto.Message): length of the description is limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an empty description. - child_policy_tags (Sequence[~.policytagmanagerserialization.SerializedPolicyTag]): + child_policy_tags (Sequence[google.cloud.datacatalog_v1beta1.types.SerializedPolicyTag]): Children of the policy tag if any. """ @@ -96,7 +96,7 @@ class ImportTaxonomiesRequest(proto.Message): parent (str): Required. Resource name of project that the newly created taxonomies will belong to. - inline_source (~.policytagmanagerserialization.InlineSource): + inline_source (google.cloud.datacatalog_v1beta1.types.InlineSource): Inline source used for taxonomies import """ @@ -111,7 +111,7 @@ class InlineSource(proto.Message): r"""Inline source used for taxonomies import. Attributes: - taxonomies (Sequence[~.policytagmanagerserialization.SerializedTaxonomy]): + taxonomies (Sequence[google.cloud.datacatalog_v1beta1.types.SerializedTaxonomy]): Required. Taxonomies to be imported. """ @@ -125,7 +125,7 @@ class ImportTaxonomiesResponse(proto.Message): [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. Attributes: - taxonomies (Sequence[~.policytagmanager.Taxonomy]): + taxonomies (Sequence[google.cloud.datacatalog_v1beta1.types.Taxonomy]): Taxonomies that were imported. """ @@ -161,7 +161,7 @@ class ExportTaxonomiesResponse(proto.Message): [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. Attributes: - taxonomies (Sequence[~.policytagmanagerserialization.SerializedTaxonomy]): + taxonomies (Sequence[google.cloud.datacatalog_v1beta1.types.SerializedTaxonomy]): List of taxonomies and policy tags in a tree structure. """ diff --git a/google/cloud/datacatalog_v1beta1/types/schema.py b/google/cloud/datacatalog_v1beta1/types/schema.py index ebc56879..51c2c566 100644 --- a/google/cloud/datacatalog_v1beta1/types/schema.py +++ b/google/cloud/datacatalog_v1beta1/types/schema.py @@ -27,7 +27,7 @@ class Schema(proto.Message): r"""Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). Attributes: - columns (Sequence[~.schema.ColumnSchema]): + columns (Sequence[google.cloud.datacatalog_v1beta1.types.ColumnSchema]): Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be specified. """ @@ -52,7 +52,7 @@ class ColumnSchema(proto.Message): this column are required, nullable, etc. Only ``NULLABLE``, ``REQUIRED`` and ``REPEATED`` are supported. Default mode is ``NULLABLE``. - subcolumns (Sequence[~.schema.ColumnSchema]): + subcolumns (Sequence[google.cloud.datacatalog_v1beta1.types.ColumnSchema]): Optional. Schema of sub-columns. A column can have zero or more sub-columns. """ diff --git a/google/cloud/datacatalog_v1beta1/types/search.py b/google/cloud/datacatalog_v1beta1/types/search.py index 87f828d2..5c4d9568 100644 --- a/google/cloud/datacatalog_v1beta1/types/search.py +++ b/google/cloud/datacatalog_v1beta1/types/search.py @@ -40,7 +40,7 @@ class SearchCatalogResult(proto.Message): search. Attributes: - search_result_type (~.search.SearchResultType): + search_result_type (google.cloud.datacatalog_v1beta1.types.SearchResultType): Type of the search result. This field can be used to determine which Get method to call to fetch the full resource. diff --git a/google/cloud/datacatalog_v1beta1/types/table_spec.py b/google/cloud/datacatalog_v1beta1/types/table_spec.py index 254afd21..8c041930 100644 --- a/google/cloud/datacatalog_v1beta1/types/table_spec.py +++ b/google/cloud/datacatalog_v1beta1/types/table_spec.py @@ -41,12 +41,12 @@ class BigQueryTableSpec(proto.Message): r"""Describes a BigQuery table. Attributes: - table_source_type (~.gcd_table_spec.TableSourceType): + table_source_type (google.cloud.datacatalog_v1beta1.types.TableSourceType): Output only. The table source type. - view_spec (~.gcd_table_spec.ViewSpec): + view_spec (google.cloud.datacatalog_v1beta1.types.ViewSpec): Table view specification. This field should only be populated if ``table_source_type`` is ``BIGQUERY_VIEW``. - table_spec (~.gcd_table_spec.TableSpec): + table_spec (google.cloud.datacatalog_v1beta1.types.TableSpec): Spec of a BigQuery table. This field should only be populated if ``table_source_type`` is ``BIGQUERY_TABLE``. """ diff --git a/google/cloud/datacatalog_v1beta1/types/tags.py b/google/cloud/datacatalog_v1beta1/types/tags.py index 098fd3c2..575e9964 100644 --- a/google/cloud/datacatalog_v1beta1/types/tags.py +++ b/google/cloud/datacatalog_v1beta1/types/tags.py @@ -63,7 +63,7 @@ class Tag(proto.Message): separate the column names. Example: - ``outer_column.inner_column`` - fields (Sequence[~.tags.Tag.FieldsEntry]): + fields (Sequence[google.cloud.datacatalog_v1beta1.types.Tag.FieldsEntry]): Required. This maps the ID of a tag field to the value of and additional information about that field. Valid field IDs are defined by the @@ -98,10 +98,10 @@ class TagField(proto.Message): bool_value (bool): Holds the value for a tag field with boolean type. - timestamp_value (~.timestamp.Timestamp): + timestamp_value (google.protobuf.timestamp_pb2.Timestamp): Holds the value for a tag field with timestamp type. - enum_value (~.tags.TagField.EnumValue): + enum_value (google.cloud.datacatalog_v1beta1.types.TagField.EnumValue): Holds the value for a tag field with enum type. This value must be one of the allowed values in the definition of this enum. @@ -165,7 +165,7 @@ class TagTemplate(proto.Message): display_name (str): The display name for this template. Defaults to an empty string. - fields (Sequence[~.tags.TagTemplate.FieldsEntry]): + fields (Sequence[google.cloud.datacatalog_v1beta1.types.TagTemplate.FieldsEntry]): Required. Map of tag template field IDs to the settings for the field. This map is an exhaustive list of the allowed fields. This map must contain at least one field and at most @@ -202,7 +202,7 @@ class TagTemplateField(proto.Message): display_name (str): The display name for this field. Defaults to an empty string. - type_ (~.tags.FieldType): + type_ (google.cloud.datacatalog_v1beta1.types.FieldType): Required. The type of value this tag field can contain. is_required (bool): @@ -232,10 +232,10 @@ class FieldType(proto.Message): r""" Attributes: - primitive_type (~.tags.FieldType.PrimitiveType): + primitive_type (google.cloud.datacatalog_v1beta1.types.FieldType.PrimitiveType): Represents primitive types - string, bool etc. - enum_type (~.tags.FieldType.EnumType): + enum_type (google.cloud.datacatalog_v1beta1.types.FieldType.EnumType): Represents an enum type. """ @@ -251,7 +251,7 @@ class EnumType(proto.Message): r""" Attributes: - allowed_values (Sequence[~.tags.FieldType.EnumType.EnumValue]): + allowed_values (Sequence[google.cloud.datacatalog_v1beta1.types.FieldType.EnumType.EnumValue]): Required on create; optional on update. The set of allowed values for this enum. This set must not be empty, the display names of the diff --git a/google/cloud/datacatalog_v1beta1/types/timestamps.py b/google/cloud/datacatalog_v1beta1/types/timestamps.py index 82ef8a06..fe45394c 100644 --- a/google/cloud/datacatalog_v1beta1/types/timestamps.py +++ b/google/cloud/datacatalog_v1beta1/types/timestamps.py @@ -31,13 +31,13 @@ class SystemTimestamps(proto.Message): system. Attributes: - create_time (~.timestamp.Timestamp): + create_time (google.protobuf.timestamp_pb2.Timestamp): The creation time of the resource within the given system. - update_time (~.timestamp.Timestamp): + update_time (google.protobuf.timestamp_pb2.Timestamp): The last-modified time of the resource within the given system. - expire_time (~.timestamp.Timestamp): + expire_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The expiration time of the resource within the given system. Currently only apllicable to BigQuery resources. diff --git a/synth.metadata b/synth.metadata index 059cec33..3dc57936 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-datacatalog.git", - "sha": "890b6cc7c323a61255e001a21081beafb88c83f5" + "sha": "fda528a1da2ec1dbf6b3ad33eb2d33780a77f3d9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", - "internalRef": "347055288" + "sha": "520682435235d9c503983a360a2090025aa47cd1", + "internalRef": "350246057" } }, { @@ -51,6 +51,7 @@ } ], "generatedFiles": [ + ".coveragerc", ".flake8", ".github/CONTRIBUTING.md", ".github/ISSUE_TEMPLATE/bug_report.md", @@ -103,8 +104,12 @@ "docs/_static/custom.css", "docs/_templates/layout.html", "docs/conf.py", + "docs/datacatalog_v1/data_catalog.rst", "docs/datacatalog_v1/services.rst", "docs/datacatalog_v1/types.rst", + "docs/datacatalog_v1beta1/data_catalog.rst", + "docs/datacatalog_v1beta1/policy_tag_manager.rst", + "docs/datacatalog_v1beta1/policy_tag_manager_serialization.rst", "docs/datacatalog_v1beta1/services.rst", "docs/datacatalog_v1beta1/types.rst", "docs/multiprocessing.rst", diff --git a/tests/unit/gapic/datacatalog_v1/test_data_catalog.py b/tests/unit/gapic/datacatalog_v1/test_data_catalog.py index ba76e5b9..3c2ea655 100644 --- a/tests/unit/gapic/datacatalog_v1/test_data_catalog.py +++ b/tests/unit/gapic/datacatalog_v1/test_data_catalog.py @@ -94,7 +94,20 @@ def test__get_default_mtls_endpoint(): assert DataCatalogClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -@pytest.mark.parametrize("client_class", [DataCatalogClient, DataCatalogAsyncClient]) +def test_data_catalog_client_from_service_account_info(): + creds = credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = DataCatalogClient.from_service_account_info(info) + assert client.transport._credentials == creds + + assert client.transport._host == "datacatalog.googleapis.com:443" + + +@pytest.mark.parametrize("client_class", [DataCatalogClient, DataCatalogAsyncClient,]) def test_data_catalog_client_from_service_account_file(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( @@ -112,7 +125,10 @@ def test_data_catalog_client_from_service_account_file(client_class): def test_data_catalog_client_get_transport_class(): transport = DataCatalogClient.get_transport_class() - assert transport == transports.DataCatalogGrpcTransport + available_transports = [ + transports.DataCatalogGrpcTransport, + ] + assert transport in available_transports transport = DataCatalogClient.get_transport_class("grpc") assert transport == transports.DataCatalogGrpcTransport @@ -6589,7 +6605,7 @@ def test_transport_get_channel(): @pytest.mark.parametrize( "transport_class", - [transports.DataCatalogGrpcTransport, transports.DataCatalogGrpcAsyncIOTransport], + [transports.DataCatalogGrpcTransport, transports.DataCatalogGrpcAsyncIOTransport,], ) def test_transport_adc(transport_class): # Test default credentials are used if not provided. @@ -6736,7 +6752,7 @@ def test_data_catalog_host_with_port(): def test_data_catalog_grpc_transport_channel(): - channel = grpc.insecure_channel("http://localhost/") + channel = grpc.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.DataCatalogGrpcTransport( @@ -6748,7 +6764,7 @@ def test_data_catalog_grpc_transport_channel(): def test_data_catalog_grpc_asyncio_transport_channel(): - channel = aio.insecure_channel("http://localhost/") + channel = aio.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.DataCatalogGrpcAsyncIOTransport( @@ -6768,7 +6784,7 @@ def test_data_catalog_transport_channel_mtls_with_client_cert_source(transport_c "grpc.ssl_channel_credentials", autospec=True ) as grpc_ssl_channel_cred: with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_ssl_cred = mock.Mock() grpc_ssl_channel_cred.return_value = mock_ssl_cred @@ -6818,7 +6834,7 @@ def test_data_catalog_transport_channel_mtls_with_adc(transport_class): ssl_credentials=mock.PropertyMock(return_value=mock_ssl_cred), ): with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_grpc_channel = mock.Mock() grpc_create_channel.return_value = mock_grpc_channel diff --git a/tests/unit/gapic/datacatalog_v1beta1/test_data_catalog.py b/tests/unit/gapic/datacatalog_v1beta1/test_data_catalog.py index e1b71ede..4f9f630f 100644 --- a/tests/unit/gapic/datacatalog_v1beta1/test_data_catalog.py +++ b/tests/unit/gapic/datacatalog_v1beta1/test_data_catalog.py @@ -96,7 +96,20 @@ def test__get_default_mtls_endpoint(): assert DataCatalogClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -@pytest.mark.parametrize("client_class", [DataCatalogClient, DataCatalogAsyncClient]) +def test_data_catalog_client_from_service_account_info(): + creds = credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = DataCatalogClient.from_service_account_info(info) + assert client.transport._credentials == creds + + assert client.transport._host == "datacatalog.googleapis.com:443" + + +@pytest.mark.parametrize("client_class", [DataCatalogClient, DataCatalogAsyncClient,]) def test_data_catalog_client_from_service_account_file(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( @@ -114,7 +127,10 @@ def test_data_catalog_client_from_service_account_file(client_class): def test_data_catalog_client_get_transport_class(): transport = DataCatalogClient.get_transport_class() - assert transport == transports.DataCatalogGrpcTransport + available_transports = [ + transports.DataCatalogGrpcTransport, + ] + assert transport in available_transports transport = DataCatalogClient.get_transport_class("grpc") assert transport == transports.DataCatalogGrpcTransport @@ -6584,7 +6600,7 @@ def test_transport_get_channel(): @pytest.mark.parametrize( "transport_class", - [transports.DataCatalogGrpcTransport, transports.DataCatalogGrpcAsyncIOTransport], + [transports.DataCatalogGrpcTransport, transports.DataCatalogGrpcAsyncIOTransport,], ) def test_transport_adc(transport_class): # Test default credentials are used if not provided. @@ -6731,7 +6747,7 @@ def test_data_catalog_host_with_port(): def test_data_catalog_grpc_transport_channel(): - channel = grpc.insecure_channel("http://localhost/") + channel = grpc.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.DataCatalogGrpcTransport( @@ -6743,7 +6759,7 @@ def test_data_catalog_grpc_transport_channel(): def test_data_catalog_grpc_asyncio_transport_channel(): - channel = aio.insecure_channel("http://localhost/") + channel = aio.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.DataCatalogGrpcAsyncIOTransport( @@ -6763,7 +6779,7 @@ def test_data_catalog_transport_channel_mtls_with_client_cert_source(transport_c "grpc.ssl_channel_credentials", autospec=True ) as grpc_ssl_channel_cred: with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_ssl_cred = mock.Mock() grpc_ssl_channel_cred.return_value = mock_ssl_cred @@ -6813,7 +6829,7 @@ def test_data_catalog_transport_channel_mtls_with_adc(transport_class): ssl_credentials=mock.PropertyMock(return_value=mock_ssl_cred), ): with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_grpc_channel = mock.Mock() grpc_create_channel.return_value = mock_grpc_channel diff --git a/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager.py b/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager.py index 98b5c966..a8e44f60 100644 --- a/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager.py +++ b/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager.py @@ -94,8 +94,21 @@ def test__get_default_mtls_endpoint(): ) +def test_policy_tag_manager_client_from_service_account_info(): + creds = credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = PolicyTagManagerClient.from_service_account_info(info) + assert client.transport._credentials == creds + + assert client.transport._host == "datacatalog.googleapis.com:443" + + @pytest.mark.parametrize( - "client_class", [PolicyTagManagerClient, PolicyTagManagerAsyncClient] + "client_class", [PolicyTagManagerClient, PolicyTagManagerAsyncClient,] ) def test_policy_tag_manager_client_from_service_account_file(client_class): creds = credentials.AnonymousCredentials() @@ -114,7 +127,10 @@ def test_policy_tag_manager_client_from_service_account_file(client_class): def test_policy_tag_manager_client_get_transport_class(): transport = PolicyTagManagerClient.get_transport_class() - assert transport == transports.PolicyTagManagerGrpcTransport + available_transports = [ + transports.PolicyTagManagerGrpcTransport, + ] + assert transport in available_transports transport = PolicyTagManagerClient.get_transport_class("grpc") assert transport == transports.PolicyTagManagerGrpcTransport @@ -3610,7 +3626,7 @@ def test_policy_tag_manager_host_with_port(): def test_policy_tag_manager_grpc_transport_channel(): - channel = grpc.insecure_channel("http://localhost/") + channel = grpc.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.PolicyTagManagerGrpcTransport( @@ -3622,7 +3638,7 @@ def test_policy_tag_manager_grpc_transport_channel(): def test_policy_tag_manager_grpc_asyncio_transport_channel(): - channel = aio.insecure_channel("http://localhost/") + channel = aio.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.PolicyTagManagerGrpcAsyncIOTransport( @@ -3647,7 +3663,7 @@ def test_policy_tag_manager_transport_channel_mtls_with_client_cert_source( "grpc.ssl_channel_credentials", autospec=True ) as grpc_ssl_channel_cred: with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_ssl_cred = mock.Mock() grpc_ssl_channel_cred.return_value = mock_ssl_cred @@ -3700,7 +3716,7 @@ def test_policy_tag_manager_transport_channel_mtls_with_adc(transport_class): ssl_credentials=mock.PropertyMock(return_value=mock_ssl_cred), ): with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_grpc_channel = mock.Mock() grpc_create_channel.return_value = mock_grpc_channel diff --git a/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager_serialization.py b/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager_serialization.py index a3c3540e..6a42e9d0 100644 --- a/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager_serialization.py +++ b/tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager_serialization.py @@ -95,9 +95,22 @@ def test__get_default_mtls_endpoint(): ) +def test_policy_tag_manager_serialization_client_from_service_account_info(): + creds = credentials.AnonymousCredentials() + with mock.patch.object( + service_account.Credentials, "from_service_account_info" + ) as factory: + factory.return_value = creds + info = {"valid": True} + client = PolicyTagManagerSerializationClient.from_service_account_info(info) + assert client.transport._credentials == creds + + assert client.transport._host == "datacatalog.googleapis.com:443" + + @pytest.mark.parametrize( "client_class", - [PolicyTagManagerSerializationClient, PolicyTagManagerSerializationAsyncClient], + [PolicyTagManagerSerializationClient, PolicyTagManagerSerializationAsyncClient,], ) def test_policy_tag_manager_serialization_client_from_service_account_file( client_class, @@ -118,7 +131,10 @@ def test_policy_tag_manager_serialization_client_from_service_account_file( def test_policy_tag_manager_serialization_client_get_transport_class(): transport = PolicyTagManagerSerializationClient.get_transport_class() - assert transport == transports.PolicyTagManagerSerializationGrpcTransport + available_transports = [ + transports.PolicyTagManagerSerializationGrpcTransport, + ] + assert transport in available_transports transport = PolicyTagManagerSerializationClient.get_transport_class("grpc") assert transport == transports.PolicyTagManagerSerializationGrpcTransport @@ -930,7 +946,7 @@ def test_policy_tag_manager_serialization_host_with_port(): def test_policy_tag_manager_serialization_grpc_transport_channel(): - channel = grpc.insecure_channel("http://localhost/") + channel = grpc.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.PolicyTagManagerSerializationGrpcTransport( @@ -942,7 +958,7 @@ def test_policy_tag_manager_serialization_grpc_transport_channel(): def test_policy_tag_manager_serialization_grpc_asyncio_transport_channel(): - channel = aio.insecure_channel("http://localhost/") + channel = aio.secure_channel("http://localhost/", grpc.local_channel_credentials()) # Check that channel is used if provided. transport = transports.PolicyTagManagerSerializationGrpcAsyncIOTransport( @@ -967,7 +983,7 @@ def test_policy_tag_manager_serialization_transport_channel_mtls_with_client_cer "grpc.ssl_channel_credentials", autospec=True ) as grpc_ssl_channel_cred: with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_ssl_cred = mock.Mock() grpc_ssl_channel_cred.return_value = mock_ssl_cred @@ -1022,7 +1038,7 @@ def test_policy_tag_manager_serialization_transport_channel_mtls_with_adc( ssl_credentials=mock.PropertyMock(return_value=mock_ssl_cred), ): with mock.patch.object( - transport_class, "create_channel", autospec=True + transport_class, "create_channel" ) as grpc_create_channel: mock_grpc_channel = mock.Mock() grpc_create_channel.return_value = mock_grpc_channel