Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Talent: Add path-construction helpers to GAPIC clients (via synth). #8632

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions talent/google/cloud/talent_v4beta1/gapic/company_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
14 changes: 14 additions & 0 deletions talent/google/cloud/talent_v4beta1/gapic/completion_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
21 changes: 21 additions & 0 deletions talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand All @@ -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."""
Expand Down
10 changes: 5 additions & 5 deletions talent/synth.metadata
Original file line number Diff line number Diff line change
@@ -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"
}
},
{
Expand Down