NotificationTarget Class

  • java.lang.Object
    • com.azure.resourcemanager.servicefabric.models.NotificationTarget

Implements

public final class NotificationTarget
implements JsonSerializable<NotificationTarget>

Describes the notification target properties.

Constructor Summary

Constructor Description
NotificationTarget()

Creates an instance of NotificationTarget class.

Method Summary

Modifier and Type Method and Description
static NotificationTarget fromJson(JsonReader jsonReader)

Reads an instance of NotificationTarget from the JsonReader.

NotificationChannel notificationChannel()

Get the notificationChannel property: The notification channel indicates the type of receivers subscribed to the notification, either user or subscription.

List<String> receivers()

Get the receivers property: List of targets that subscribe to the notification.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

NotificationTarget withNotificationChannel(NotificationChannel notificationChannel)

Set the notificationChannel property: The notification channel indicates the type of receivers subscribed to the notification, either user or subscription.

NotificationTarget withReceivers(List<String> receivers)

Set the receivers property: List of targets that subscribe to the notification.

Methods inherited from java.lang.Object

Constructor Details

NotificationTarget

public NotificationTarget()

Creates an instance of NotificationTarget class.

Method Details

fromJson

public static NotificationTarget fromJson(JsonReader jsonReader)

Reads an instance of NotificationTarget from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of NotificationTarget if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

notificationChannel

public NotificationChannel notificationChannel()

Get the notificationChannel property: The notification channel indicates the type of receivers subscribed to the notification, either user or subscription.

Returns:

the notificationChannel value.

receivers

public List<String> receivers()

Get the receivers property: List of targets that subscribe to the notification.

Returns:

the receivers value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withNotificationChannel

public NotificationTarget withNotificationChannel(NotificationChannel notificationChannel)

Set the notificationChannel property: The notification channel indicates the type of receivers subscribed to the notification, either user or subscription.

Parameters:

notificationChannel - the notificationChannel value to set.

Returns:

the NotificationTarget object itself.

withReceivers

public NotificationTarget withReceivers(List<String> receivers)

Set the receivers property: List of targets that subscribe to the notification.

Parameters:

receivers - the receivers value to set.

Returns:

the NotificationTarget object itself.

Applies to