@@ -77,7 +77,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
7777
7878 @classmethod
7979 def annotation_path (cls , project , incident , annotation ):
80- """Return a fully-qualified annotation string."""
80+ """DEPRECATED. Return a fully-qualified annotation string."""
81+ warnings .warn (
82+ "Resource name helper functions are deprecated." ,
83+ PendingDeprecationWarning ,
84+ stacklevel = 1 ,
85+ )
8186 return google .api_core .path_template .expand (
8287 "projects/{project}/incidents/{incident}/annotations/{annotation}" ,
8388 project = project ,
@@ -87,7 +92,12 @@ def annotation_path(cls, project, incident, annotation):
8792
8893 @classmethod
8994 def artifact_path (cls , project , incident , artifact ):
90- """Return a fully-qualified artifact string."""
95+ """DEPRECATED. Return a fully-qualified artifact string."""
96+ warnings .warn (
97+ "Resource name helper functions are deprecated." ,
98+ PendingDeprecationWarning ,
99+ stacklevel = 1 ,
100+ )
91101 return google .api_core .path_template .expand (
92102 "projects/{project}/incidents/{incident}/artifacts/{artifact}" ,
93103 project = project ,
@@ -97,7 +107,12 @@ def artifact_path(cls, project, incident, artifact):
97107
98108 @classmethod
99109 def incident_path (cls , project , incident ):
100- """Return a fully-qualified incident string."""
110+ """DEPRECATED. Return a fully-qualified incident string."""
111+ warnings .warn (
112+ "Resource name helper functions are deprecated." ,
113+ PendingDeprecationWarning ,
114+ stacklevel = 1 ,
115+ )
101116 return google .api_core .path_template .expand (
102117 "projects/{project}/incidents/{incident}" ,
103118 project = project ,
@@ -106,14 +121,24 @@ def incident_path(cls, project, incident):
106121
107122 @classmethod
108123 def project_path (cls , project ):
109- """Return a fully-qualified project string."""
124+ """DEPRECATED. Return a fully-qualified project string."""
125+ warnings .warn (
126+ "Resource name helper functions are deprecated." ,
127+ PendingDeprecationWarning ,
128+ stacklevel = 1 ,
129+ )
110130 return google .api_core .path_template .expand (
111131 "projects/{project}" , project = project
112132 )
113133
114134 @classmethod
115135 def role_assignment_path (cls , project , incident , role_assignment ):
116- """Return a fully-qualified role_assignment string."""
136+ """DEPRECATED. Return a fully-qualified role_assignment string."""
137+ warnings .warn (
138+ "Resource name helper functions are deprecated." ,
139+ PendingDeprecationWarning ,
140+ stacklevel = 1 ,
141+ )
117142 return google .api_core .path_template .expand (
118143 "projects/{project}/incidents/{incident}/roleAssignments/{role_assignment}" ,
119144 project = project ,
@@ -123,14 +148,24 @@ def role_assignment_path(cls, project, incident, role_assignment):
123148
124149 @classmethod
125150 def signal_path (cls , project , signal ):
126- """Return a fully-qualified signal string."""
151+ """DEPRECATED. Return a fully-qualified signal string."""
152+ warnings .warn (
153+ "Resource name helper functions are deprecated." ,
154+ PendingDeprecationWarning ,
155+ stacklevel = 1 ,
156+ )
127157 return google .api_core .path_template .expand (
128158 "projects/{project}/signals/{signal}" , project = project , signal = signal
129159 )
130160
131161 @classmethod
132162 def subscription_path (cls , project , incident , subscription ):
133- """Return a fully-qualified subscription string."""
163+ """DEPRECATED. Return a fully-qualified subscription string."""
164+ warnings .warn (
165+ "Resource name helper functions are deprecated." ,
166+ PendingDeprecationWarning ,
167+ stacklevel = 1 ,
168+ )
134169 return google .api_core .path_template .expand (
135170 "projects/{project}/incidents/{incident}/subscriptions/{subscription}" ,
136171 project = project ,
@@ -140,7 +175,12 @@ def subscription_path(cls, project, incident, subscription):
140175
141176 @classmethod
142177 def tag_path (cls , project , incident , tag ):
143- """Return a fully-qualified tag string."""
178+ """DEPRECATED. Return a fully-qualified tag string."""
179+ warnings .warn (
180+ "Resource name helper functions are deprecated." ,
181+ PendingDeprecationWarning ,
182+ stacklevel = 1 ,
183+ )
144184 return google .api_core .path_template .expand (
145185 "projects/{project}/incidents/{incident}/tags/{tag}" ,
146186 project = project ,
0 commit comments