@@ -90,7 +90,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9090
9191 @classmethod
9292 def annotated_dataset_path (cls , project , dataset , annotated_dataset ):
93- """Return a fully-qualified annotated_dataset string."""
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+ )
9499 return google .api_core .path_template .expand (
95100 "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}" ,
96101 project = project ,
@@ -100,7 +105,12 @@ def annotated_dataset_path(cls, project, dataset, annotated_dataset):
100105
101106 @classmethod
102107 def annotation_spec_set_path (cls , project , annotation_spec_set ):
103- """Return a fully-qualified annotation_spec_set string."""
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+ )
104114 return google .api_core .path_template .expand (
105115 "projects/{project}/annotationSpecSets/{annotation_spec_set}" ,
106116 project = project ,
@@ -109,7 +119,12 @@ def annotation_spec_set_path(cls, project, annotation_spec_set):
109119
110120 @classmethod
111121 def data_item_path (cls , project , dataset , data_item ):
112- """Return a fully-qualified data_item string."""
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+ )
113128 return google .api_core .path_template .expand (
114129 "projects/{project}/datasets/{dataset}/dataItems/{data_item}" ,
115130 project = project ,
@@ -119,14 +134,24 @@ def data_item_path(cls, project, dataset, data_item):
119134
120135 @classmethod
121136 def dataset_path (cls , project , dataset ):
122- """Return a fully-qualified dataset string."""
137+ """DEPRECATED. Return a fully-qualified dataset string."""
138+ warnings .warn (
139+ "Resource name helper functions are deprecated." ,
140+ PendingDeprecationWarning ,
141+ stacklevel = 1 ,
142+ )
123143 return google .api_core .path_template .expand (
124144 "projects/{project}/datasets/{dataset}" , project = project , dataset = dataset
125145 )
126146
127147 @classmethod
128148 def evaluation_path (cls , project , dataset , evaluation ):
129- """Return a fully-qualified evaluation string."""
149+ """DEPRECATED. Return a fully-qualified evaluation string."""
150+ warnings .warn (
151+ "Resource name helper functions are deprecated." ,
152+ PendingDeprecationWarning ,
153+ stacklevel = 1 ,
154+ )
130155 return google .api_core .path_template .expand (
131156 "projects/{project}/datasets/{dataset}/evaluations/{evaluation}" ,
132157 project = project ,
@@ -136,7 +161,12 @@ def evaluation_path(cls, project, dataset, evaluation):
136161
137162 @classmethod
138163 def evaluation_job_path (cls , project , evaluation_job ):
139- """Return a fully-qualified evaluation_job string."""
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+ )
140170 return google .api_core .path_template .expand (
141171 "projects/{project}/evaluationJobs/{evaluation_job}" ,
142172 project = project ,
@@ -145,7 +175,12 @@ def evaluation_job_path(cls, project, evaluation_job):
145175
146176 @classmethod
147177 def example_path (cls , project , dataset , annotated_dataset , example ):
148- """Return a fully-qualified example string."""
178+ """DEPRECATED. Return a fully-qualified example string."""
179+ warnings .warn (
180+ "Resource name helper functions are deprecated." ,
181+ PendingDeprecationWarning ,
182+ stacklevel = 1 ,
183+ )
149184 return google .api_core .path_template .expand (
150185 "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}" ,
151186 project = project ,
@@ -156,7 +191,12 @@ def example_path(cls, project, dataset, annotated_dataset, example):
156191
157192 @classmethod
158193 def instruction_path (cls , project , instruction ):
159- """Return a fully-qualified instruction string."""
194+ """DEPRECATED. Return a fully-qualified instruction string."""
195+ warnings .warn (
196+ "Resource name helper functions are deprecated." ,
197+ PendingDeprecationWarning ,
198+ stacklevel = 1 ,
199+ )
160200 return google .api_core .path_template .expand (
161201 "projects/{project}/instructions/{instruction}" ,
162202 project = project ,
@@ -165,7 +205,12 @@ def instruction_path(cls, project, instruction):
165205
166206 @classmethod
167207 def project_path (cls , project ):
168- """Return a fully-qualified project string."""
208+ """DEPRECATED. Return a fully-qualified project string."""
209+ warnings .warn (
210+ "Resource name helper functions are deprecated." ,
211+ PendingDeprecationWarning ,
212+ stacklevel = 1 ,
213+ )
169214 return google .api_core .path_template .expand (
170215 "projects/{project}" , project = project
171216 )
0 commit comments