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

fix(talent): deprecate resource name helper methods (via synth) #9844

Merged
merged 1 commit into from
Nov 19, 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
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
28 changes: 24 additions & 4 deletions talent/google/cloud/talent_v4beta1/gapic/company_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
)
Expand Down
28 changes: 24 additions & 4 deletions talent/google/cloud/talent_v4beta1/gapic/completion_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
)
Expand Down
14 changes: 12 additions & 2 deletions talent/google/cloud/talent_v4beta1/gapic/event_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
42 changes: 36 additions & 6 deletions talent/google/cloud/talent_v4beta1/gapic/job_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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
)
Expand Down
14 changes: 12 additions & 2 deletions talent/google/cloud/talent_v4beta1/gapic/profile_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
)
Expand Down
14 changes: 12 additions & 2 deletions talent/google/cloud/talent_v4beta1/gapic/tenant_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
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-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"
}
},
{
Expand Down