From 2562eaa5bff506d02e0b3473a248654c0de0bdb1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 10 Jul 2019 10:18:56 -0700 Subject: [PATCH] Add path-construction helpers to GAPIC clients (via synth). (#8632) --- .../gapic/company_service_client.py | 14 +++++++++++++ .../talent_v4beta1/gapic/completion_client.py | 14 +++++++++++++ .../gapic/event_service_client.py | 7 +++++++ .../gapic/job_service_client.py | 21 +++++++++++++++++++ packages/google-cloud-talent/synth.metadata | 10 ++++----- 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/company_service_client.py b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/company_service_client.py index a63a50c8821a..11fd108bc639 100644 --- a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/company_service_client.py +++ b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/company_service_client.py @@ -87,6 +87,20 @@ def company_path(cls, project, tenant, company): company=company, ) + @classmethod + def company_without_tenant_path(cls, project, company): + """Return a fully-qualified company_without_tenant string.""" + 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.""" + return google.api_core.path_template.expand( + "projects/{project}", project=project + ) + @classmethod def tenant_path(cls, project, tenant): """Return a fully-qualified tenant string.""" diff --git a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/completion_client.py b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/completion_client.py index 650f30709b40..9674435f6b26 100644 --- a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/completion_client.py +++ b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/completion_client.py @@ -87,6 +87,20 @@ def company_path(cls, project, tenant, company): company=company, ) + @classmethod + def company_without_tenant_path(cls, project, company): + """Return a fully-qualified company_without_tenant string.""" + 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.""" + return google.api_core.path_template.expand( + "projects/{project}", project=project + ) + @classmethod def tenant_path(cls, project, tenant): """Return a fully-qualified tenant string.""" diff --git a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/event_service_client.py b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/event_service_client.py index df397eba24e5..732b72ddfdf2 100644 --- a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/event_service_client.py +++ b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/event_service_client.py @@ -80,6 +80,13 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file + @classmethod + def project_path(cls, project): + """Return a fully-qualified project string.""" + return google.api_core.path_template.expand( + "projects/{project}", project=project + ) + @classmethod def tenant_path(cls, project, tenant): """Return a fully-qualified tenant string.""" diff --git a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/job_service_client.py b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/job_service_client.py index 3bccf7d8d7a6..da7a7f3392c0 100644 --- a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/job_service_client.py +++ b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic/job_service_client.py @@ -102,6 +102,13 @@ def company_path(cls, project, tenant, company): company=company, ) + @classmethod + def company_without_tenant_path(cls, project, company): + """Return a fully-qualified company_without_tenant string.""" + 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.""" @@ -112,6 +119,20 @@ def job_path(cls, project, tenant, jobs): jobs=jobs, ) + @classmethod + def job_without_tenant_path(cls, project, jobs): + """Return a fully-qualified job_without_tenant string.""" + 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.""" + return google.api_core.path_template.expand( + "projects/{project}", project=project + ) + @classmethod def tenant_path(cls, project, tenant): """Return a fully-qualified tenant string.""" diff --git a/packages/google-cloud-talent/synth.metadata b/packages/google-cloud-talent/synth.metadata index c08954409689..0ad2992264a3 100644 --- a/packages/google-cloud-talent/synth.metadata +++ b/packages/google-cloud-talent/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-07-03T12:39:55.307403Z", + "updateTime": "2019-07-10T12:28:53.668819Z", "sources": [ { "generator": { "name": "artman", - "version": "0.29.3", - "dockerImage": "googleapis/artman@sha256:8900f94a81adaab0238965aa8a7b3648791f4f3a95ee65adc6a56cfcc3753101" + "version": "0.29.4", + "dockerImage": "googleapis/artman@sha256:63f21e83cb92680b7001dc381069e962c9e6dee314fd8365ac554c07c89221fb" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "69916b6ffbb7717fa009033351777d0c9909fb79", - "internalRef": "256241904" + "sha": "16c0ea3cde17a897ba04b7b94d9bf4dd57e3227e", + "internalRef": "257239177" } }, {