From 56c7a8796510b75242e4d5863be907b484e75578 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 Nov 2019 09:53:10 -0800 Subject: [PATCH] fix(talent): deprecate resource name helper methods (via synth) (#9844) --- .../gapic/application_service_client.py | 14 ++++++- .../gapic/company_service_client.py | 28 +++++++++++-- .../talent_v4beta1/gapic/completion_client.py | 28 +++++++++++-- .../gapic/event_service_client.py | 14 ++++++- .../gapic/job_service_client.py | 42 ++++++++++++++++--- .../gapic/profile_service_client.py | 14 ++++++- .../gapic/tenant_service_client.py | 14 ++++++- synth.metadata | 10 ++--- 8 files changed, 137 insertions(+), 27 deletions(-) diff --git a/google/cloud/talent_v4beta1/gapic/application_service_client.py b/google/cloud/talent_v4beta1/gapic/application_service_client.py index 7bfc6ccc..6fc13645 100644 --- a/google/cloud/talent_v4beta1/gapic/application_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/application_service_client.py @@ -81,7 +81,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def application_path(cls, project, tenant, profile, application): - """Return a fully-qualified application string.""" + """DEPRECATED. Return a fully-qualified application string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}", project=project, @@ -92,7 +97,12 @@ def application_path(cls, project, tenant, profile, application): @classmethod def profile_path(cls, project, tenant, profile): - """Return a fully-qualified profile string.""" + """DEPRECATED. Return a fully-qualified profile string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/profiles/{profile}", project=project, diff --git a/google/cloud/talent_v4beta1/gapic/company_service_client.py b/google/cloud/talent_v4beta1/gapic/company_service_client.py index 64e861b4..ca6da2d7 100644 --- a/google/cloud/talent_v4beta1/gapic/company_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/company_service_client.py @@ -79,7 +79,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def company_path(cls, project, tenant, company): - """Return a fully-qualified company string.""" + """DEPRECATED. Return a fully-qualified company string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/companies/{company}", project=project, @@ -89,21 +94,36 @@ def company_path(cls, project, tenant, company): @classmethod def company_without_tenant_path(cls, project, company): - """Return a fully-qualified company_without_tenant string.""" + """DEPRECATED. Return a fully-qualified company_without_tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/companies/{company}", project=project, company=company ) @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 tenant_path(cls, project, tenant): - """Return a fully-qualified tenant string.""" + """DEPRECATED. Return a fully-qualified tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}", project=project, tenant=tenant ) diff --git a/google/cloud/talent_v4beta1/gapic/completion_client.py b/google/cloud/talent_v4beta1/gapic/completion_client.py index 6d5331a6..74712ac0 100644 --- a/google/cloud/talent_v4beta1/gapic/completion_client.py +++ b/google/cloud/talent_v4beta1/gapic/completion_client.py @@ -79,7 +79,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def company_path(cls, project, tenant, company): - """Return a fully-qualified company string.""" + """DEPRECATED. Return a fully-qualified company string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/companies/{company}", project=project, @@ -89,21 +94,36 @@ def company_path(cls, project, tenant, company): @classmethod def company_without_tenant_path(cls, project, company): - """Return a fully-qualified company_without_tenant string.""" + """DEPRECATED. Return a fully-qualified company_without_tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/companies/{company}", project=project, company=company ) @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 tenant_path(cls, project, tenant): - """Return a fully-qualified tenant string.""" + """DEPRECATED. Return a fully-qualified tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}", project=project, tenant=tenant ) diff --git a/google/cloud/talent_v4beta1/gapic/event_service_client.py b/google/cloud/talent_v4beta1/gapic/event_service_client.py index 3db94322..7276977b 100644 --- a/google/cloud/talent_v4beta1/gapic/event_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/event_service_client.py @@ -82,14 +82,24 @@ 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 ) @classmethod def tenant_path(cls, project, tenant): - """Return a fully-qualified tenant string.""" + """DEPRECATED. Return a fully-qualified tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}", project=project, tenant=tenant ) diff --git a/google/cloud/talent_v4beta1/gapic/job_service_client.py b/google/cloud/talent_v4beta1/gapic/job_service_client.py index ac82a8ac..06f64c3b 100644 --- a/google/cloud/talent_v4beta1/gapic/job_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/job_service_client.py @@ -93,7 +93,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def company_path(cls, project, tenant, company): - """Return a fully-qualified company string.""" + """DEPRECATED. Return a fully-qualified company string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/companies/{company}", project=project, @@ -103,14 +108,24 @@ def company_path(cls, project, tenant, company): @classmethod def company_without_tenant_path(cls, project, company): - """Return a fully-qualified company_without_tenant string.""" + """DEPRECATED. Return a fully-qualified company_without_tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/companies/{company}", project=project, company=company ) @classmethod def job_path(cls, project, tenant, jobs): - """Return a fully-qualified job string.""" + """DEPRECATED. Return a fully-qualified job string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/jobs/{jobs}", project=project, @@ -120,21 +135,36 @@ def job_path(cls, project, tenant, jobs): @classmethod def job_without_tenant_path(cls, project, jobs): - """Return a fully-qualified job_without_tenant string.""" + """DEPRECATED. Return a fully-qualified job_without_tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/jobs/{jobs}", project=project, jobs=jobs ) @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 tenant_path(cls, project, tenant): - """Return a fully-qualified tenant string.""" + """DEPRECATED. Return a fully-qualified tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}", project=project, tenant=tenant ) diff --git a/google/cloud/talent_v4beta1/gapic/profile_service_client.py b/google/cloud/talent_v4beta1/gapic/profile_service_client.py index 307bc488..745c8ff4 100644 --- a/google/cloud/talent_v4beta1/gapic/profile_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/profile_service_client.py @@ -97,7 +97,12 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def profile_path(cls, project, tenant, profile): - """Return a fully-qualified profile string.""" + """DEPRECATED. Return a fully-qualified profile string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}/profiles/{profile}", project=project, @@ -107,7 +112,12 @@ def profile_path(cls, project, tenant, profile): @classmethod def tenant_path(cls, project, tenant): - """Return a fully-qualified tenant string.""" + """DEPRECATED. Return a fully-qualified tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}", project=project, tenant=tenant ) diff --git a/google/cloud/talent_v4beta1/gapic/tenant_service_client.py b/google/cloud/talent_v4beta1/gapic/tenant_service_client.py index 69a4ba42..7c5008a5 100644 --- a/google/cloud/talent_v4beta1/gapic/tenant_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/tenant_service_client.py @@ -97,14 +97,24 @@ 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 ) @classmethod def tenant_path(cls, project, tenant): - """Return a fully-qualified tenant string.""" + """DEPRECATED. Return a fully-qualified tenant string.""" + warnings.warn( + "Resource name helper functions are deprecated.", + PendingDeprecationWarning, + stacklevel=1, + ) return google.api_core.path_template.expand( "projects/{project}/tenants/{tenant}", project=project, tenant=tenant ) diff --git a/synth.metadata b/synth.metadata index 58752b45..ff437ae1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-12T13:41:12.564647Z", + "updateTime": "2019-11-19T13:36:53.978549Z", "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" } }, {