Class NotificationSettings
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.NotificationSettings
- All Implemented Interfaces:
com.azure.json.JsonSerializable<NotificationSettings>
public final class NotificationSettings
extends Object
implements com.azure.json.JsonSerializable<NotificationSettings>
Notification settings for a schedule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the emailRecipient property: The email recipient to send notifications to (can be a list of semi-colon separated email addresses).static NotificationSettings
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of NotificationSettings from the JsonReader.Get the notificationLocale property: The locale to use when sending a notification (fallback for unsupported languages is EN).status()
Get the status property: If notifications are enabled for this schedule (i.e.Get the timeInMinutes property: Time in minutes before event at which notification will be sent.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Get the webhookUrl property: The webhook URL to which the notification will be sent.withEmailRecipient
(String emailRecipient) Set the emailRecipient property: The email recipient to send notifications to (can be a list of semi-colon separated email addresses).withNotificationLocale
(String notificationLocale) Set the notificationLocale property: The locale to use when sending a notification (fallback for unsupported languages is EN).withStatus
(EnableStatus status) Set the status property: If notifications are enabled for this schedule (i.e.withTimeInMinutes
(Integer timeInMinutes) Set the timeInMinutes property: Time in minutes before event at which notification will be sent.withWebhookUrl
(String webhookUrl) Set the webhookUrl property: The webhook URL to which the notification will be sent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
NotificationSettings
public NotificationSettings()Creates an instance of NotificationSettings class.
-
-
Method Details
-
status
Get the status property: If notifications are enabled for this schedule (i.e. Enabled, Disabled).- Returns:
- the status value.
-
withStatus
Set the status property: If notifications are enabled for this schedule (i.e. Enabled, Disabled).- Parameters:
status
- the status value to set.- Returns:
- the NotificationSettings object itself.
-
timeInMinutes
Get the timeInMinutes property: Time in minutes before event at which notification will be sent.- Returns:
- the timeInMinutes value.
-
withTimeInMinutes
Set the timeInMinutes property: Time in minutes before event at which notification will be sent.- Parameters:
timeInMinutes
- the timeInMinutes value to set.- Returns:
- the NotificationSettings object itself.
-
webhookUrl
Get the webhookUrl property: The webhook URL to which the notification will be sent.- Returns:
- the webhookUrl value.
-
withWebhookUrl
Set the webhookUrl property: The webhook URL to which the notification will be sent.- Parameters:
webhookUrl
- the webhookUrl value to set.- Returns:
- the NotificationSettings object itself.
-
emailRecipient
Get the emailRecipient property: The email recipient to send notifications to (can be a list of semi-colon separated email addresses).- Returns:
- the emailRecipient value.
-
withEmailRecipient
Set the emailRecipient property: The email recipient to send notifications to (can be a list of semi-colon separated email addresses).- Parameters:
emailRecipient
- the emailRecipient value to set.- Returns:
- the NotificationSettings object itself.
-
notificationLocale
Get the notificationLocale property: The locale to use when sending a notification (fallback for unsupported languages is EN).- Returns:
- the notificationLocale value.
-
withNotificationLocale
Set the notificationLocale property: The locale to use when sending a notification (fallback for unsupported languages is EN).- Parameters:
notificationLocale
- the notificationLocale value to set.- Returns:
- the NotificationSettings object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<NotificationSettings>
- Throws:
IOException
-
fromJson
public static NotificationSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of NotificationSettings from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of NotificationSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the NotificationSettings.
-