@@ -114,24 +114,12 @@ public class TranslationServiceClient implements BackgroundResource {
114114 private final TranslationServiceStub stub ;
115115 private final OperationsClient operationsClient ;
116116
117- private static final PathTemplate LOCATION_PATH_TEMPLATE =
118- PathTemplate .createWithoutUrlEncoding ("projects/{project}/locations/{location}" );
119-
120117 private static final PathTemplate GLOSSARY_PATH_TEMPLATE =
121118 PathTemplate .createWithoutUrlEncoding (
122119 "projects/{project}/locations/{location}/glossaries/{glossary}" );
123120
124- /**
125- * Formats a string containing the fully-qualified path to represent a location resource.
126- *
127- * @deprecated Use the {@link LocationName} class instead.
128- */
129- @ Deprecated
130- public static final String formatLocationName (String project , String location ) {
131- return LOCATION_PATH_TEMPLATE .instantiate (
132- "project" , project ,
133- "location" , location );
134- }
121+ private static final PathTemplate LOCATION_PATH_TEMPLATE =
122+ PathTemplate .createWithoutUrlEncoding ("projects/{project}/locations/{location}" );
135123
136124 /**
137125 * Formats a string containing the fully-qualified path to represent a glossary resource.
@@ -147,23 +135,15 @@ public static final String formatGlossaryName(String project, String location, S
147135 }
148136
149137 /**
150- * Parses the project from the given fully-qualified path which represents a location resource.
151- *
152- * @deprecated Use the {@link LocationName} class instead.
153- */
154- @ Deprecated
155- public static final String parseProjectFromLocationName (String locationName ) {
156- return LOCATION_PATH_TEMPLATE .parse (locationName ).get ("project" );
157- }
158-
159- /**
160- * Parses the location from the given fully-qualified path which represents a location resource.
138+ * Formats a string containing the fully-qualified path to represent a location resource.
161139 *
162140 * @deprecated Use the {@link LocationName} class instead.
163141 */
164142 @ Deprecated
165- public static final String parseLocationFromLocationName (String locationName ) {
166- return LOCATION_PATH_TEMPLATE .parse (locationName ).get ("location" );
143+ public static final String formatLocationName (String project , String location ) {
144+ return LOCATION_PATH_TEMPLATE .instantiate (
145+ "project" , project ,
146+ "location" , location );
167147 }
168148
169149 /**
@@ -196,6 +176,26 @@ public static final String parseGlossaryFromGlossaryName(String glossaryName) {
196176 return GLOSSARY_PATH_TEMPLATE .parse (glossaryName ).get ("glossary" );
197177 }
198178
179+ /**
180+ * Parses the project from the given fully-qualified path which represents a location resource.
181+ *
182+ * @deprecated Use the {@link LocationName} class instead.
183+ */
184+ @ Deprecated
185+ public static final String parseProjectFromLocationName (String locationName ) {
186+ return LOCATION_PATH_TEMPLATE .parse (locationName ).get ("project" );
187+ }
188+
189+ /**
190+ * Parses the location from the given fully-qualified path which represents a location resource.
191+ *
192+ * @deprecated Use the {@link LocationName} class instead.
193+ */
194+ @ Deprecated
195+ public static final String parseLocationFromLocationName (String locationName ) {
196+ return LOCATION_PATH_TEMPLATE .parse (locationName ).get ("location" );
197+ }
198+
199199 /** Constructs an instance of TranslationServiceClient with default settings. */
200200 public static final TranslationServiceClient create () throws IOException {
201201 return create (TranslationServiceSettings .newBuilder ().build ());
0 commit comments