共用方式為


Notification Class

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

Implements

public final class Notification
implements JsonSerializable<Notification>

Describes the notification channel for cluster events.

Constructor Summary

Constructor Description
Notification()

Creates an instance of Notification class.

Method Summary

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

Reads an instance of Notification from the JsonReader.

boolean isEnabled()

Get the isEnabled property: Indicates if the notification is enabled.

NotificationCategory notificationCategory()

Get the notificationCategory property: The category of notification.

NotificationLevel notificationLevel()

Get the notificationLevel property: The level of notification.

List<NotificationTarget> notificationTargets()

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

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Notification withIsEnabled(boolean isEnabled)

Set the isEnabled property: Indicates if the notification is enabled.

Notification withNotificationCategory(NotificationCategory notificationCategory)

Set the notificationCategory property: The category of notification.

Notification withNotificationLevel(NotificationLevel notificationLevel)

Set the notificationLevel property: The level of notification.

Notification withNotificationTargets(List<NotificationTarget> notificationTargets)

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

Methods inherited from java.lang.Object

Constructor Details

Notification

public Notification()

Creates an instance of Notification class.

Method Details

fromJson

public static Notification fromJson(JsonReader jsonReader)

Reads an instance of Notification from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Notification 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.

isEnabled

public boolean isEnabled()

Get the isEnabled property: Indicates if the notification is enabled.

Returns:

the isEnabled value.

notificationCategory

public NotificationCategory notificationCategory()

Get the notificationCategory property: The category of notification.

Returns:

the notificationCategory value.

notificationLevel

public NotificationLevel notificationLevel()

Get the notificationLevel property: The level of notification.

Returns:

the notificationLevel value.

notificationTargets

public List<NotificationTarget> notificationTargets()

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

Returns:

the notificationTargets value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withIsEnabled

public Notification withIsEnabled(boolean isEnabled)

Set the isEnabled property: Indicates if the notification is enabled.

Parameters:

isEnabled - the isEnabled value to set.

Returns:

the Notification object itself.

withNotificationCategory

public Notification withNotificationCategory(NotificationCategory notificationCategory)

Set the notificationCategory property: The category of notification.

Parameters:

notificationCategory - the notificationCategory value to set.

Returns:

the Notification object itself.

withNotificationLevel

public Notification withNotificationLevel(NotificationLevel notificationLevel)

Set the notificationLevel property: The level of notification.

Parameters:

notificationLevel - the notificationLevel value to set.

Returns:

the Notification object itself.

withNotificationTargets

public Notification withNotificationTargets(List<NotificationTarget> notificationTargets)

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

Parameters:

notificationTargets - the notificationTargets value to set.

Returns:

the Notification object itself.

Applies to