@@ -92,7 +92,12 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9292
9393 @classmethod
9494 def crypto_key_path (cls , project , location , key_ring , crypto_key ):
95- """Return a fully-qualified crypto_key string."""
95+ """DEPRECATED. Return a fully-qualified crypto_key string."""
96+ warnings .warn (
97+ "Resource name helper functions are deprecated." ,
98+ PendingDeprecationWarning ,
99+ stacklevel = 1 ,
100+ )
96101 return google .api_core .path_template .expand (
97102 "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" ,
98103 project = project ,
@@ -103,7 +108,12 @@ def crypto_key_path(cls, project, location, key_ring, crypto_key):
103108
104109 @classmethod
105110 def crypto_key_path_path (cls , project , location , key_ring , crypto_key_path ):
106- """Return a fully-qualified crypto_key_path string."""
111+ """DEPRECATED. Return a fully-qualified crypto_key_path 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}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key_path=**}" ,
109119 project = project ,
@@ -116,7 +126,12 @@ def crypto_key_path_path(cls, project, location, key_ring, crypto_key_path):
116126 def crypto_key_version_path (
117127 cls , project , location , key_ring , crypto_key , crypto_key_version
118128 ):
119- """Return a fully-qualified crypto_key_version string."""
129+ """DEPRECATED. Return a fully-qualified crypto_key_version string."""
130+ warnings .warn (
131+ "Resource name helper functions are deprecated." ,
132+ PendingDeprecationWarning ,
133+ stacklevel = 1 ,
134+ )
120135 return google .api_core .path_template .expand (
121136 "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" ,
122137 project = project ,
@@ -128,7 +143,12 @@ def crypto_key_version_path(
128143
129144 @classmethod
130145 def import_job_path (cls , project , location , key_ring , import_job ):
131- """Return a fully-qualified import_job string."""
146+ """DEPRECATED. Return a fully-qualified import_job string."""
147+ warnings .warn (
148+ "Resource name helper functions are deprecated." ,
149+ PendingDeprecationWarning ,
150+ stacklevel = 1 ,
151+ )
132152 return google .api_core .path_template .expand (
133153 "projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}" ,
134154 project = project ,
@@ -139,7 +159,12 @@ def import_job_path(cls, project, location, key_ring, import_job):
139159
140160 @classmethod
141161 def key_ring_path (cls , project , location , key_ring ):
142- """Return a fully-qualified key_ring string."""
162+ """DEPRECATED. Return a fully-qualified key_ring string."""
163+ warnings .warn (
164+ "Resource name helper functions are deprecated." ,
165+ PendingDeprecationWarning ,
166+ stacklevel = 1 ,
167+ )
143168 return google .api_core .path_template .expand (
144169 "projects/{project}/locations/{location}/keyRings/{key_ring}" ,
145170 project = project ,
@@ -149,7 +174,12 @@ def key_ring_path(cls, project, location, key_ring):
149174
150175 @classmethod
151176 def location_path (cls , project , location ):
152- """Return a fully-qualified location string."""
177+ """DEPRECATED. Return a fully-qualified location string."""
178+ warnings .warn (
179+ "Resource name helper functions are deprecated." ,
180+ PendingDeprecationWarning ,
181+ stacklevel = 1 ,
182+ )
153183 return google .api_core .path_template .expand (
154184 "projects/{project}/locations/{location}" ,
155185 project = project ,
0 commit comments