From d6d974e3bf37fb8479c3df9ed4d33fb9fd9fbcf3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 Nov 2019 09:56:09 -0800 Subject: [PATCH] fix(redis): deprecate resource name helper methods (via synth) (#9840) --- .../cloud/redis_v1/gapic/cloud_redis_client.py | 14 ++++++++++++-- .../redis_v1beta1/gapic/cloud_redis_client.py | 14 ++++++++++++-- redis/synth.metadata | 10 +++++----- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/redis/google/cloud/redis_v1/gapic/cloud_redis_client.py b/redis/google/cloud/redis_v1/gapic/cloud_redis_client.py index 5060fd7c5f77..cb01d0cd1b18 100644 --- a/redis/google/cloud/redis_v1/gapic/cloud_redis_client.py +++ b/redis/google/cloud/redis_v1/gapic/cloud_redis_client.py @@ -100,7 +100,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def instance_path(cls, project, location, instance): - """Return a fully-qualified instance string.""" + """DEPRECATED. Return a fully-qualified instance string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}/instances/{instance}", project=project, @@ -110,7 +115,12 @@ def instance_path(cls, project, location, instance): @classmethod def location_path(cls, project, location): - """Return a fully-qualified location string.""" + """DEPRECATED. Return a fully-qualified location string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, diff --git a/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py b/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py index 33e55cddd7dd..b0f199642bcf 100644 --- a/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py +++ b/redis/google/cloud/redis_v1beta1/gapic/cloud_redis_client.py @@ -101,7 +101,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def instance_path(cls, project, location, instance): - """Return a fully-qualified instance string.""" + """DEPRECATED. Return a fully-qualified instance string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}/instances/{instance}", project=project, @@ -111,7 +116,12 @@ def instance_path(cls, project, location, instance): @classmethod def location_path(cls, project, location): - """Return a fully-qualified location string.""" + """DEPRECATED. Return a fully-qualified location string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, diff --git a/redis/synth.metadata b/redis/synth.metadata index d443cee2d493..7662a87131c3 100644 --- a/redis/synth.metadata +++ b/redis/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-12T13:36:07.423028Z", + "updateTime": "2019-11-19T13:30:31.987393Z", "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" } }, {