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 Details

    • AutoscaleNotification

      public AutoscaleNotification()
      Creates an instance of AutoscaleNotification class.
  • Method Details

    • operation

      public String operation()
      Get the operation property: the operation associated with the notification and its value must be "scale".
      Returns:
      the operation value.
    • withOperation

      public AutoscaleNotification withOperation(String operation)
      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

      public EmailNotification email()
      Get the email property: the email notification.
      Returns:
      the email value.
    • withEmail

      public AutoscaleNotification withEmail(EmailNotification email)
      Set the email property: the email notification.
      Parameters:
      email - the email value to set.
      Returns:
      the AutoscaleNotification object itself.
    • webhooks

      public List<WebhookNotification> webhooks()
      Get the webhooks property: the collection of webhook notifications.
      Returns:
      the webhooks value.
    • withWebhooks

      public AutoscaleNotification withWebhooks(List<WebhookNotification> webhooks)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.