From 37f06775625237d80654caff0aa1d620cb504e9f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Dec 2019 08:16:23 -0800 Subject: [PATCH] fix(bigquery_datatransfer): deprecate resource name helper methods (via synth) (#9829) --- .../gapic/data_transfer_service_client.py | 56 ++++++++++++++++--- bigquery_datatransfer/synth.metadata | 10 ++-- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py b/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py index 4466ec5b9c18..af0480fa18c6 100644 --- a/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py +++ b/bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py @@ -90,7 +90,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @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, @@ -99,7 +104,12 @@ def location_path(cls, project, location): @classmethod def location_data_source_path(cls, project, location, data_source): - """Return a fully-qualified location_data_source string.""" + """DEPRECATED. Return a fully-qualified location_data_source string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}/dataSources/{data_source}", project=project, @@ -109,7 +119,12 @@ def location_data_source_path(cls, project, location, data_source): @classmethod def location_run_path(cls, project, location, transfer_config, run): - """Return a fully-qualified location_run string.""" + """DEPRECATED. Return a fully-qualified location_run string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}", project=project, @@ -120,7 +135,12 @@ def location_run_path(cls, project, location, transfer_config, run): @classmethod def location_transfer_config_path(cls, project, location, transfer_config): - """Return a fully-qualified location_transfer_config string.""" + """DEPRECATED. Return a fully-qualified location_transfer_config string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/locations/{location}/transferConfigs/{transfer_config}", project=project, @@ -130,14 +150,24 @@ def location_transfer_config_path(cls, project, location, transfer_config): @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 ) @classmethod def project_data_source_path(cls, project, data_source): - """Return a fully-qualified project_data_source string.""" + """DEPRECATED. Return a fully-qualified project_data_source string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/dataSources/{data_source}", project=project, @@ -146,7 +176,12 @@ def project_data_source_path(cls, project, data_source): @classmethod def project_run_path(cls, project, transfer_config, run): - """Return a fully-qualified project_run string.""" + """DEPRECATED. Return a fully-qualified project_run string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}/runs/{run}", project=project, @@ -156,7 +191,12 @@ def project_run_path(cls, project, transfer_config, run): @classmethod def project_transfer_config_path(cls, project, transfer_config): - """Return a fully-qualified project_transfer_config string.""" + """DEPRECATED. Return a fully-qualified project_transfer_config string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/transferConfigs/{transfer_config}", project=project, diff --git a/bigquery_datatransfer/synth.metadata b/bigquery_datatransfer/synth.metadata index b6ad5d0dc050..801af15b3e7d 100644 --- a/bigquery_datatransfer/synth.metadata +++ b/bigquery_datatransfer/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-12T13:16:39.771005Z", + "updateTime": "2019-11-19T13:15:31.582050Z", "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" } }, {