From 0015b0f0f8fbf4000339ca7941357783f9add6ce Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 Nov 2019 09:48:00 -0800 Subject: [PATCH] fix(asset): deprecate resource name helper methods (via synth) (#9827) --- .../cloud/asset_v1/gapic/asset_service_client.py | 7 ++++++- .../cloud/asset_v1beta1/gapic/asset_service_client.py | 7 ++++++- .../asset_v1p2beta1/gapic/asset_service_client.py | 7 ++++++- packages/google-cloud-asset/synth.metadata | 10 +++++----- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-asset/google/cloud/asset_v1/gapic/asset_service_client.py b/packages/google-cloud-asset/google/cloud/asset_v1/gapic/asset_service_client.py index e4b3c18bc799..fa3c32625d6d 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1/gapic/asset_service_client.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1/gapic/asset_service_client.py @@ -76,7 +76,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def project_path(cls, project): - """Return a fully-qualified project string.""" + """DEPRECATED. Return a fully-qualified project string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}", project=project ) diff --git a/packages/google-cloud-asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py b/packages/google-cloud-asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py index 32b796af82ec..d3522c39e6e5 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1beta1/gapic/asset_service_client.py @@ -76,7 +76,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def project_path(cls, project): - """Return a fully-qualified project string.""" + """DEPRECATED. Return a fully-qualified project string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}", project=project ) diff --git a/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py b/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py index b4cdc2b0da2d..880fabc1cc3e 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic/asset_service_client.py @@ -78,7 +78,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def feed_path(cls, project, feed): - """Return a fully-qualified feed string.""" + """DEPRECATED. Return a fully-qualified feed string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/feeds/{feed}", project=project, feed=feed ) diff --git a/packages/google-cloud-asset/synth.metadata b/packages/google-cloud-asset/synth.metadata index ad81ea243a55..4c5e9ceeaa19 100644 --- a/packages/google-cloud-asset/synth.metadata +++ b/packages/google-cloud-asset/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-12T13:15:17.614849Z", + "updateTime": "2019-11-19T13:12:01.626148Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.1", - "dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e" + "version": "0.42.1", + "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8", - "internalRef": "279774957" + "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", + "internalRef": "281088257" } }, {