Skip to content

Commit 075ca4f

Browse files
yoshi-automationbusunkim96
authored andcommitted
fix(talent): deprecate resource name helper methods (via synth) (#9844)
1 parent a6fc8bd commit 075ca4f

File tree

8 files changed

+137
-27
lines changed

8 files changed

+137
-27
lines changed

talent/google/cloud/talent_v4beta1/gapic/application_service_client.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
8181

8282
@classmethod
8383
def application_path(cls, project, tenant, profile, application):
84-
"""Return a fully-qualified application string."""
84+
"""DEPRECATED. Return a fully-qualified application string."""
85+
warnings.warn(
86+
"Resource name helper functions are deprecated.",
87+
PendingDeprecationWarning,
88+
stacklevel=1,
89+
)
8590
return google.api_core.path_template.expand(
8691
"projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}",
8792
project=project,
@@ -92,7 +97,12 @@ def application_path(cls, project, tenant, profile, application):
9297

9398
@classmethod
9499
def profile_path(cls, project, tenant, profile):
95-
"""Return a fully-qualified profile string."""
100+
"""DEPRECATED. Return a fully-qualified profile string."""
101+
warnings.warn(
102+
"Resource name helper functions are deprecated.",
103+
PendingDeprecationWarning,
104+
stacklevel=1,
105+
)
96106
return google.api_core.path_template.expand(
97107
"projects/{project}/tenants/{tenant}/profiles/{profile}",
98108
project=project,

talent/google/cloud/talent_v4beta1/gapic/company_service_client.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
7979

8080
@classmethod
8181
def company_path(cls, project, tenant, company):
82-
"""Return a fully-qualified company string."""
82+
"""DEPRECATED. Return a fully-qualified company string."""
83+
warnings.warn(
84+
"Resource name helper functions are deprecated.",
85+
PendingDeprecationWarning,
86+
stacklevel=1,
87+
)
8388
return google.api_core.path_template.expand(
8489
"projects/{project}/tenants/{tenant}/companies/{company}",
8590
project=project,
@@ -89,21 +94,36 @@ def company_path(cls, project, tenant, company):
8994

9095
@classmethod
9196
def company_without_tenant_path(cls, project, company):
92-
"""Return a fully-qualified company_without_tenant string."""
97+
"""DEPRECATED. Return a fully-qualified company_without_tenant string."""
98+
warnings.warn(
99+
"Resource name helper functions are deprecated.",
100+
PendingDeprecationWarning,
101+
stacklevel=1,
102+
)
93103
return google.api_core.path_template.expand(
94104
"projects/{project}/companies/{company}", project=project, company=company
95105
)
96106

97107
@classmethod
98108
def project_path(cls, project):
99-
"""Return a fully-qualified project string."""
109+
"""DEPRECATED. Return a fully-qualified project string."""
110+
warnings.warn(
111+
"Resource name helper functions are deprecated.",
112+
PendingDeprecationWarning,
113+
stacklevel=1,
114+
)
100115
return google.api_core.path_template.expand(
101116
"projects/{project}", project=project
102117
)
103118

104119
@classmethod
105120
def tenant_path(cls, project, tenant):
106-
"""Return a fully-qualified tenant string."""
121+
"""DEPRECATED. Return a fully-qualified tenant string."""
122+
warnings.warn(
123+
"Resource name helper functions are deprecated.",
124+
PendingDeprecationWarning,
125+
stacklevel=1,
126+
)
107127
return google.api_core.path_template.expand(
108128
"projects/{project}/tenants/{tenant}", project=project, tenant=tenant
109129
)

talent/google/cloud/talent_v4beta1/gapic/completion_client.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
7979

8080
@classmethod
8181
def company_path(cls, project, tenant, company):
82-
"""Return a fully-qualified company string."""
82+
"""DEPRECATED. Return a fully-qualified company string."""
83+
warnings.warn(
84+
"Resource name helper functions are deprecated.",
85+
PendingDeprecationWarning,
86+
stacklevel=1,
87+
)
8388
return google.api_core.path_template.expand(
8489
"projects/{project}/tenants/{tenant}/companies/{company}",
8590
project=project,
@@ -89,21 +94,36 @@ def company_path(cls, project, tenant, company):
8994

9095
@classmethod
9196
def company_without_tenant_path(cls, project, company):
92-
"""Return a fully-qualified company_without_tenant string."""
97+
"""DEPRECATED. Return a fully-qualified company_without_tenant string."""
98+
warnings.warn(
99+
"Resource name helper functions are deprecated.",
100+
PendingDeprecationWarning,
101+
stacklevel=1,
102+
)
93103
return google.api_core.path_template.expand(
94104
"projects/{project}/companies/{company}", project=project, company=company
95105
)
96106

97107
@classmethod
98108
def project_path(cls, project):
99-
"""Return a fully-qualified project string."""
109+
"""DEPRECATED. Return a fully-qualified project string."""
110+
warnings.warn(
111+
"Resource name helper functions are deprecated.",
112+
PendingDeprecationWarning,
113+
stacklevel=1,
114+
)
100115
return google.api_core.path_template.expand(
101116
"projects/{project}", project=project
102117
)
103118

104119
@classmethod
105120
def tenant_path(cls, project, tenant):
106-
"""Return a fully-qualified tenant string."""
121+
"""DEPRECATED. Return a fully-qualified tenant string."""
122+
warnings.warn(
123+
"Resource name helper functions are deprecated.",
124+
PendingDeprecationWarning,
125+
stacklevel=1,
126+
)
107127
return google.api_core.path_template.expand(
108128
"projects/{project}/tenants/{tenant}", project=project, tenant=tenant
109129
)

talent/google/cloud/talent_v4beta1/gapic/event_service_client.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,24 @@ def from_service_account_file(cls, filename, *args, **kwargs):
8282

8383
@classmethod
8484
def project_path(cls, project):
85-
"""Return a fully-qualified project string."""
85+
"""DEPRECATED. Return a fully-qualified project string."""
86+
warnings.warn(
87+
"Resource name helper functions are deprecated.",
88+
PendingDeprecationWarning,
89+
stacklevel=1,
90+
)
8691
return google.api_core.path_template.expand(
8792
"projects/{project}", project=project
8893
)
8994

9095
@classmethod
9196
def tenant_path(cls, project, tenant):
92-
"""Return a fully-qualified tenant string."""
97+
"""DEPRECATED. Return a fully-qualified tenant string."""
98+
warnings.warn(
99+
"Resource name helper functions are deprecated.",
100+
PendingDeprecationWarning,
101+
stacklevel=1,
102+
)
93103
return google.api_core.path_template.expand(
94104
"projects/{project}/tenants/{tenant}", project=project, tenant=tenant
95105
)

talent/google/cloud/talent_v4beta1/gapic/job_service_client.py

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9393

9494
@classmethod
9595
def company_path(cls, project, tenant, company):
96-
"""Return a fully-qualified company string."""
96+
"""DEPRECATED. Return a fully-qualified company string."""
97+
warnings.warn(
98+
"Resource name helper functions are deprecated.",
99+
PendingDeprecationWarning,
100+
stacklevel=1,
101+
)
97102
return google.api_core.path_template.expand(
98103
"projects/{project}/tenants/{tenant}/companies/{company}",
99104
project=project,
@@ -103,14 +108,24 @@ def company_path(cls, project, tenant, company):
103108

104109
@classmethod
105110
def company_without_tenant_path(cls, project, company):
106-
"""Return a fully-qualified company_without_tenant string."""
111+
"""DEPRECATED. Return a fully-qualified company_without_tenant string."""
112+
warnings.warn(
113+
"Resource name helper functions are deprecated.",
114+
PendingDeprecationWarning,
115+
stacklevel=1,
116+
)
107117
return google.api_core.path_template.expand(
108118
"projects/{project}/companies/{company}", project=project, company=company
109119
)
110120

111121
@classmethod
112122
def job_path(cls, project, tenant, jobs):
113-
"""Return a fully-qualified job string."""
123+
"""DEPRECATED. Return a fully-qualified job string."""
124+
warnings.warn(
125+
"Resource name helper functions are deprecated.",
126+
PendingDeprecationWarning,
127+
stacklevel=1,
128+
)
114129
return google.api_core.path_template.expand(
115130
"projects/{project}/tenants/{tenant}/jobs/{jobs}",
116131
project=project,
@@ -120,21 +135,36 @@ def job_path(cls, project, tenant, jobs):
120135

121136
@classmethod
122137
def job_without_tenant_path(cls, project, jobs):
123-
"""Return a fully-qualified job_without_tenant string."""
138+
"""DEPRECATED. Return a fully-qualified job_without_tenant string."""
139+
warnings.warn(
140+
"Resource name helper functions are deprecated.",
141+
PendingDeprecationWarning,
142+
stacklevel=1,
143+
)
124144
return google.api_core.path_template.expand(
125145
"projects/{project}/jobs/{jobs}", project=project, jobs=jobs
126146
)
127147

128148
@classmethod
129149
def project_path(cls, project):
130-
"""Return a fully-qualified project string."""
150+
"""DEPRECATED. Return a fully-qualified project string."""
151+
warnings.warn(
152+
"Resource name helper functions are deprecated.",
153+
PendingDeprecationWarning,
154+
stacklevel=1,
155+
)
131156
return google.api_core.path_template.expand(
132157
"projects/{project}", project=project
133158
)
134159

135160
@classmethod
136161
def tenant_path(cls, project, tenant):
137-
"""Return a fully-qualified tenant string."""
162+
"""DEPRECATED. Return a fully-qualified tenant string."""
163+
warnings.warn(
164+
"Resource name helper functions are deprecated.",
165+
PendingDeprecationWarning,
166+
stacklevel=1,
167+
)
138168
return google.api_core.path_template.expand(
139169
"projects/{project}/tenants/{tenant}", project=project, tenant=tenant
140170
)

talent/google/cloud/talent_v4beta1/gapic/profile_service_client.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9797

9898
@classmethod
9999
def profile_path(cls, project, tenant, profile):
100-
"""Return a fully-qualified profile string."""
100+
"""DEPRECATED. Return a fully-qualified profile string."""
101+
warnings.warn(
102+
"Resource name helper functions are deprecated.",
103+
PendingDeprecationWarning,
104+
stacklevel=1,
105+
)
101106
return google.api_core.path_template.expand(
102107
"projects/{project}/tenants/{tenant}/profiles/{profile}",
103108
project=project,
@@ -107,7 +112,12 @@ def profile_path(cls, project, tenant, profile):
107112

108113
@classmethod
109114
def tenant_path(cls, project, tenant):
110-
"""Return a fully-qualified tenant string."""
115+
"""DEPRECATED. Return a fully-qualified tenant string."""
116+
warnings.warn(
117+
"Resource name helper functions are deprecated.",
118+
PendingDeprecationWarning,
119+
stacklevel=1,
120+
)
111121
return google.api_core.path_template.expand(
112122
"projects/{project}/tenants/{tenant}", project=project, tenant=tenant
113123
)

talent/google/cloud/talent_v4beta1/gapic/tenant_service_client.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,24 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9797

9898
@classmethod
9999
def project_path(cls, project):
100-
"""Return a fully-qualified project string."""
100+
"""DEPRECATED. Return a fully-qualified project string."""
101+
warnings.warn(
102+
"Resource name helper functions are deprecated.",
103+
PendingDeprecationWarning,
104+
stacklevel=1,
105+
)
101106
return google.api_core.path_template.expand(
102107
"projects/{project}", project=project
103108
)
104109

105110
@classmethod
106111
def tenant_path(cls, project, tenant):
107-
"""Return a fully-qualified tenant string."""
112+
"""DEPRECATED. Return a fully-qualified tenant string."""
113+
warnings.warn(
114+
"Resource name helper functions are deprecated.",
115+
PendingDeprecationWarning,
116+
stacklevel=1,
117+
)
108118
return google.api_core.path_template.expand(
109119
"projects/{project}/tenants/{tenant}", project=project, tenant=tenant
110120
)

talent/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-11-12T13:41:12.564647Z",
2+
"updateTime": "2019-11-19T13:36:53.978549Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.41.1",
8-
"dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e"
7+
"version": "0.42.1",
8+
"dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8",
16-
"internalRef": "279774957"
15+
"sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a",
16+
"internalRef": "281088257"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)