Skip to content

Commit 3d00a9c

Browse files
yoshi-automationbusunkim96
authored andcommitted
feat(datalabeling): undeprecate resource name helper methods (via synth) (#10039)
1 parent 3093f3c commit 3d00a9c

File tree

2 files changed

+3523
-59
lines changed

2 files changed

+3523
-59
lines changed

datalabeling/google/cloud/datalabeling_v1beta1/gapic/data_labeling_service_client.py

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9090

9191
@classmethod
9292
def annotated_dataset_path(cls, project, dataset, annotated_dataset):
93-
"""DEPRECATED. Return a fully-qualified annotated_dataset string."""
94-
warnings.warn(
95-
"Resource name helper functions are deprecated.",
96-
PendingDeprecationWarning,
97-
stacklevel=1,
98-
)
93+
"""Return a fully-qualified annotated_dataset string."""
9994
return google.api_core.path_template.expand(
10095
"projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}",
10196
project=project,
@@ -105,12 +100,7 @@ def annotated_dataset_path(cls, project, dataset, annotated_dataset):
105100

106101
@classmethod
107102
def annotation_spec_set_path(cls, project, annotation_spec_set):
108-
"""DEPRECATED. Return a fully-qualified annotation_spec_set string."""
109-
warnings.warn(
110-
"Resource name helper functions are deprecated.",
111-
PendingDeprecationWarning,
112-
stacklevel=1,
113-
)
103+
"""Return a fully-qualified annotation_spec_set string."""
114104
return google.api_core.path_template.expand(
115105
"projects/{project}/annotationSpecSets/{annotation_spec_set}",
116106
project=project,
@@ -119,12 +109,7 @@ def annotation_spec_set_path(cls, project, annotation_spec_set):
119109

120110
@classmethod
121111
def data_item_path(cls, project, dataset, data_item):
122-
"""DEPRECATED. Return a fully-qualified data_item string."""
123-
warnings.warn(
124-
"Resource name helper functions are deprecated.",
125-
PendingDeprecationWarning,
126-
stacklevel=1,
127-
)
112+
"""Return a fully-qualified data_item string."""
128113
return google.api_core.path_template.expand(
129114
"projects/{project}/datasets/{dataset}/dataItems/{data_item}",
130115
project=project,
@@ -134,24 +119,14 @@ def data_item_path(cls, project, dataset, data_item):
134119

135120
@classmethod
136121
def dataset_path(cls, project, dataset):
137-
"""DEPRECATED. Return a fully-qualified dataset string."""
138-
warnings.warn(
139-
"Resource name helper functions are deprecated.",
140-
PendingDeprecationWarning,
141-
stacklevel=1,
142-
)
122+
"""Return a fully-qualified dataset string."""
143123
return google.api_core.path_template.expand(
144124
"projects/{project}/datasets/{dataset}", project=project, dataset=dataset
145125
)
146126

147127
@classmethod
148128
def evaluation_path(cls, project, dataset, evaluation):
149-
"""DEPRECATED. Return a fully-qualified evaluation string."""
150-
warnings.warn(
151-
"Resource name helper functions are deprecated.",
152-
PendingDeprecationWarning,
153-
stacklevel=1,
154-
)
129+
"""Return a fully-qualified evaluation string."""
155130
return google.api_core.path_template.expand(
156131
"projects/{project}/datasets/{dataset}/evaluations/{evaluation}",
157132
project=project,
@@ -161,12 +136,7 @@ def evaluation_path(cls, project, dataset, evaluation):
161136

162137
@classmethod
163138
def evaluation_job_path(cls, project, evaluation_job):
164-
"""DEPRECATED. Return a fully-qualified evaluation_job string."""
165-
warnings.warn(
166-
"Resource name helper functions are deprecated.",
167-
PendingDeprecationWarning,
168-
stacklevel=1,
169-
)
139+
"""Return a fully-qualified evaluation_job string."""
170140
return google.api_core.path_template.expand(
171141
"projects/{project}/evaluationJobs/{evaluation_job}",
172142
project=project,
@@ -175,12 +145,7 @@ def evaluation_job_path(cls, project, evaluation_job):
175145

176146
@classmethod
177147
def example_path(cls, project, dataset, annotated_dataset, example):
178-
"""DEPRECATED. Return a fully-qualified example string."""
179-
warnings.warn(
180-
"Resource name helper functions are deprecated.",
181-
PendingDeprecationWarning,
182-
stacklevel=1,
183-
)
148+
"""Return a fully-qualified example string."""
184149
return google.api_core.path_template.expand(
185150
"projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}",
186151
project=project,
@@ -191,12 +156,7 @@ def example_path(cls, project, dataset, annotated_dataset, example):
191156

192157
@classmethod
193158
def instruction_path(cls, project, instruction):
194-
"""DEPRECATED. Return a fully-qualified instruction string."""
195-
warnings.warn(
196-
"Resource name helper functions are deprecated.",
197-
PendingDeprecationWarning,
198-
stacklevel=1,
199-
)
159+
"""Return a fully-qualified instruction string."""
200160
return google.api_core.path_template.expand(
201161
"projects/{project}/instructions/{instruction}",
202162
project=project,
@@ -205,12 +165,7 @@ def instruction_path(cls, project, instruction):
205165

206166
@classmethod
207167
def project_path(cls, project):
208-
"""DEPRECATED. Return a fully-qualified project string."""
209-
warnings.warn(
210-
"Resource name helper functions are deprecated.",
211-
PendingDeprecationWarning,
212-
stacklevel=1,
213-
)
168+
"""Return a fully-qualified project string."""
214169
return google.api_core.path_template.expand(
215170
"projects/{project}", project=project
216171
)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy