Class AutoscaleNotification
java.lang.Object
com.azure.resourcemanager.monitor.models.AutoscaleNotification
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AutoscaleNotification>
public final class AutoscaleNotification
extends Object
implements com.azure.json.JsonSerializable<AutoscaleNotification>
Autoscale notification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemail()
Get the email property: the email notification.static AutoscaleNotification
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AutoscaleNotification from the JsonReader.Get the operation property: the operation associated with the notification and its value must be "scale".com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.webhooks()
Get the webhooks property: the collection of webhook notifications.withEmail
(EmailNotification email) Set the email property: the email notification.withOperation
(String operation) Set the operation property: the operation associated with the notification and its value must be "scale".withWebhooks
(List<WebhookNotification> webhooks) Set the webhooks property: the collection of webhook notifications.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
-
AutoscaleNotification
public AutoscaleNotification()Creates an instance of AutoscaleNotification class.
-
-
Method Details
-
operation
Get the operation property: the operation associated with the notification and its value must be "scale".- Returns:
- the operation value.
-
withOperation
Set the operation property: the operation associated with the notification and its value must be "scale".- Parameters:
operation
- the operation value to set.- Returns:
- the AutoscaleNotification object itself.
-
email
Get the email property: the email notification.- Returns:
- the email value.
-
withEmail
Set the email property: the email notification.- Parameters:
email
- the email value to set.- Returns:
- the AutoscaleNotification object itself.
-
webhooks
Get the webhooks property: the collection of webhook notifications.- Returns:
- the webhooks value.
-
withWebhooks
Set the webhooks property: the collection of webhook notifications.- Parameters:
webhooks
- the webhooks value to set.- Returns:
- the AutoscaleNotification 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<AutoscaleNotification>
- Throws:
IOException
-
fromJson
public static AutoscaleNotification fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AutoscaleNotification from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AutoscaleNotification if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the AutoscaleNotification.
-