4747 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4848 * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
4949 * AdvisoryNotificationsServiceClient.create()) {
50- * NotificationName name = NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]");
50+ * NotificationName name =
51+ * NotificationName.ofOrganizationLocationNotificationName(
52+ * "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]");
5153 * Notification response = advisoryNotificationsServiceClient.getNotification(name);
5254 * }
5355 * }</pre>
@@ -194,7 +196,7 @@ public AdvisoryNotificationsServiceStub getStub() {
194196 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
195197 * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
196198 * AdvisoryNotificationsServiceClient.create()) {
197- * LocationName parent = LocationName.of ("[ORGANIZATION]", "[LOCATION]");
199+ * LocationName parent = LocationName.ofOrganizationLocationName ("[ORGANIZATION]", "[LOCATION]");
198200 * for (Notification element :
199201 * advisoryNotificationsServiceClient.listNotifications(parent).iterateAll()) {
200202 * // doThingsWith(element);
@@ -203,7 +205,8 @@ public AdvisoryNotificationsServiceStub getStub() {
203205 * }</pre>
204206 *
205207 * @param parent Required. The parent, which owns this collection of notifications. Must be of the
206- * form "organizations/{organization}/locations/{location}".
208+ * form "organizations/{organization}/locations/{location}" or
209+ * "projects/{project}/locations/{location}"
207210 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
208211 */
209212 public final ListNotificationsPagedResponse listNotifications (LocationName parent ) {
@@ -228,7 +231,8 @@ public final ListNotificationsPagedResponse listNotifications(LocationName paren
228231 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
229232 * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
230233 * AdvisoryNotificationsServiceClient.create()) {
231- * String parent = LocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
234+ * String parent =
235+ * LocationName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString();
232236 * for (Notification element :
233237 * advisoryNotificationsServiceClient.listNotifications(parent).iterateAll()) {
234238 * // doThingsWith(element);
@@ -237,7 +241,8 @@ public final ListNotificationsPagedResponse listNotifications(LocationName paren
237241 * }</pre>
238242 *
239243 * @param parent Required. The parent, which owns this collection of notifications. Must be of the
240- * form "organizations/{organization}/locations/{location}".
244+ * form "organizations/{organization}/locations/{location}" or
245+ * "projects/{project}/locations/{location}"
241246 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
242247 */
243248 public final ListNotificationsPagedResponse listNotifications (String parent ) {
@@ -262,7 +267,9 @@ public final ListNotificationsPagedResponse listNotifications(String parent) {
262267 * AdvisoryNotificationsServiceClient.create()) {
263268 * ListNotificationsRequest request =
264269 * ListNotificationsRequest.newBuilder()
265- * .setParent(LocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
270+ * .setParent(
271+ * LocationName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]")
272+ * .toString())
266273 * .setPageSize(883849137)
267274 * .setPageToken("pageToken873572522")
268275 * .setView(NotificationView.forNumber(0))
@@ -298,7 +305,9 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
298305 * AdvisoryNotificationsServiceClient.create()) {
299306 * ListNotificationsRequest request =
300307 * ListNotificationsRequest.newBuilder()
301- * .setParent(LocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
308+ * .setParent(
309+ * LocationName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]")
310+ * .toString())
302311 * .setPageSize(883849137)
303312 * .setPageToken("pageToken873572522")
304313 * .setView(NotificationView.forNumber(0))
@@ -334,7 +343,9 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
334343 * AdvisoryNotificationsServiceClient.create()) {
335344 * ListNotificationsRequest request =
336345 * ListNotificationsRequest.newBuilder()
337- * .setParent(LocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
346+ * .setParent(
347+ * LocationName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]")
348+ * .toString())
338349 * .setPageSize(883849137)
339350 * .setPageToken("pageToken873572522")
340351 * .setView(NotificationView.forNumber(0))
@@ -375,13 +386,16 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
375386 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
376387 * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
377388 * AdvisoryNotificationsServiceClient.create()) {
378- * NotificationName name = NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]");
389+ * NotificationName name =
390+ * NotificationName.ofOrganizationLocationNotificationName(
391+ * "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]");
379392 * Notification response = advisoryNotificationsServiceClient.getNotification(name);
380393 * }
381394 * }</pre>
382395 *
383396 * @param name Required. A name of the notification to retrieve. Format:
384- * organizations/{organization}/locations/{location}/notifications/{notification}.
397+ * organizations/{organization}/locations/{location}/notifications/{notification} or
398+ * projects/{projects}/locations/{location}/notifications/{notification}.
385399 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
386400 */
387401 public final Notification getNotification (NotificationName name ) {
@@ -405,13 +419,16 @@ public final Notification getNotification(NotificationName name) {
405419 * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
406420 * AdvisoryNotificationsServiceClient.create()) {
407421 * String name =
408- * NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]").toString();
422+ * NotificationName.ofOrganizationLocationNotificationName(
423+ * "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]")
424+ * .toString();
409425 * Notification response = advisoryNotificationsServiceClient.getNotification(name);
410426 * }
411427 * }</pre>
412428 *
413429 * @param name Required. A name of the notification to retrieve. Format:
414- * organizations/{organization}/locations/{location}/notifications/{notification}.
430+ * organizations/{organization}/locations/{location}/notifications/{notification} or
431+ * projects/{projects}/locations/{location}/notifications/{notification}.
415432 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
416433 */
417434 public final Notification getNotification (String name ) {
@@ -436,7 +453,9 @@ public final Notification getNotification(String name) {
436453 * GetNotificationRequest request =
437454 * GetNotificationRequest.newBuilder()
438455 * .setName(
439- * NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]").toString())
456+ * NotificationName.ofOrganizationLocationNotificationName(
457+ * "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]")
458+ * .toString())
440459 * .setLanguageCode("languageCode-2092349083")
441460 * .build();
442461 * Notification response = advisoryNotificationsServiceClient.getNotification(request);
@@ -467,7 +486,9 @@ public final Notification getNotification(GetNotificationRequest request) {
467486 * GetNotificationRequest request =
468487 * GetNotificationRequest.newBuilder()
469488 * .setName(
470- * NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]").toString())
489+ * NotificationName.ofOrganizationLocationNotificationName(
490+ * "[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]")
491+ * .toString())
471492 * .setLanguageCode("languageCode-2092349083")
472493 * .build();
473494 * ApiFuture<Notification> future =
0 commit comments