@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Deletes a notification channel. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); * boolean force = false; * notificationChannelServiceClient.deleteNotificationChannel(name.toString(), force); * } * </code></pre> * * @param name The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * @param force If true, the notification channel will be deleted regardless of its use in alert * policies (the policies will be updated to remove the channel). If false, channels that are * still referenced by an existing alerting policy will fail to be deleted in a delete * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotificationChannel(String name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder().setName(name).setForce(force).build(); deleteNotificationChannel(request); }
/** * Deletes a notification channel. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); * boolean force = false; * notificationChannelServiceClient.deleteNotificationChannel(name, force); * } * </code></pre> * * @param name The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * @param force If true, the notification channel will be deleted regardless of its use in alert * policies (the policies will be updated to remove the channel). If false, channels that are * still referenced by an existing alerting policy will fail to be deleted in a delete * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotificationChannel(NotificationChannelName name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setForce(force) .build(); deleteNotificationChannel(request); }
/** * Deletes a notification channel. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); * boolean force = false; * notificationChannelServiceClient.deleteNotificationChannel(name.toString(), force); * } * </code></pre> * * @param name The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * @param force If true, the notification channel will be deleted regardless of its use in alert * policies (the policies will be updated to remove the channel). If false, channels that are * still referenced by an existing alerting policy will fail to be deleted in a delete * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotificationChannel(String name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder().setName(name).setForce(force).build(); deleteNotificationChannel(request); }
/** * Deletes a notification channel. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); * boolean force = false; * notificationChannelServiceClient.deleteNotificationChannel(name, force); * } * </code></pre> * * @param name The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * @param force If true, the notification channel will be deleted regardless of its use in alert * policies (the policies will be updated to remove the channel). If false, channels that are * still referenced by an existing alerting policy will fail to be deleted in a delete * operation. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteNotificationChannel(NotificationChannelName name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setForce(force) .build(); deleteNotificationChannel(request); }