diff --git a/packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py b/packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py index 1da9d85e07e5..4fe45281020d 100644 --- a/packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py +++ b/packages/google-cloud-datacatalog/google/cloud/datacatalog_v1beta1/gapic/data_catalog_client.py @@ -21,6 +21,7 @@ import warnings from google.oauth2 import service_account +import google.api_core.client_options import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method @@ -143,6 +144,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -173,6 +175,9 @@ def __init__( API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. + client_options (Union[dict, google.api_core.client_options.ClientOptions]): + Client options used to set user options on the client. API Endpoint + should be set through client_options. """ # Raise deprecation warnings for things we want to go away. if client_config is not None: @@ -191,6 +196,15 @@ def __init__( stacklevel=2, ) + api_endpoint = self.SERVICE_ADDRESS + if client_options: + if type(client_options) == dict: + client_options = google.api_core.client_options.from_dict( + client_options + ) + if client_options.api_endpoint: + api_endpoint = client_options.api_endpoint + # Instantiate the transport. # The transport is responsible for handling serialization and # deserialization and actually sending data to the service. @@ -199,6 +213,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=data_catalog_grpc_transport.DataCatalogGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -209,7 +224,7 @@ def __init__( self.transport = transport else: self.transport = data_catalog_grpc_transport.DataCatalogGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -333,10 +348,10 @@ def search_catalog( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.datacatalog_v1beta1.types.SearchCatalogResult` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.datacatalog_v1beta1.types.SearchCatalogResult` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -1562,10 +1577,10 @@ def list_tags( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.datacatalog_v1beta1.types.Tag` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.datacatalog_v1beta1.types.Tag` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request diff --git a/packages/google-cloud-datacatalog/synth.metadata b/packages/google-cloud-datacatalog/synth.metadata index 7eaa3355a9d5..125f520c3b4b 100644 --- a/packages/google-cloud-datacatalog/synth.metadata +++ b/packages/google-cloud-datacatalog/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-19T12:12:54.820072Z", + "updateTime": "2019-06-28T12:17:18.221154Z", "sources": [ { "generator": { "name": "artman", - "version": "0.28.0", - "dockerImage": "googleapis/artman@sha256:6ced5a36b08b82a328c69844e629300d58c14067f25cadab47f52542bdef7daf" + "version": "0.29.2", + "dockerImage": "googleapis/artman@sha256:45263333b058a4b3c26a8b7680a2710f43eae3d250f791a6cb66423991dcb2df" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ac13167e31a20314aa05cc9911c95df250880485", - "internalRef": "253867808" + "sha": "84c8ad4e52f8eec8f08a60636cfa597b86969b5c", + "internalRef": "255474859" } }, {