Class NotifyParameters
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.NotifyParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<NotifyParameters>
public final class NotifyParameters
extends Object
implements com.azure.json.JsonSerializable<NotifyParameters>
Properties for generating a Notification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the eventName property: The type of event (i.e.static NotifyParameters
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of NotifyParameters from the JsonReader.Get the jsonPayload property: Properties for the notification in json format.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withEventName
(NotificationChannelEventType eventName) Set the eventName property: The type of event (i.e.withJsonPayload
(String jsonPayload) Set the jsonPayload property: Properties for the notification in json format.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
-
NotifyParameters
public NotifyParameters()Creates an instance of NotifyParameters class.
-
-
Method Details
-
eventName
Get the eventName property: The type of event (i.e. AutoShutdown, Cost).- Returns:
- the eventName value.
-
withEventName
Set the eventName property: The type of event (i.e. AutoShutdown, Cost).- Parameters:
eventName
- the eventName value to set.- Returns:
- the NotifyParameters object itself.
-
jsonPayload
Get the jsonPayload property: Properties for the notification in json format.- Returns:
- the jsonPayload value.
-
withJsonPayload
Set the jsonPayload property: Properties for the notification in json format.- Parameters:
jsonPayload
- the jsonPayload value to set.- Returns:
- the NotifyParameters 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<NotifyParameters>
- Throws:
IOException
-
fromJson
Reads an instance of NotifyParameters from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of NotifyParameters 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 NotifyParameters.
-