Class EmailReceiver

java.lang.Object
com.azure.resourcemanager.monitor.models.EmailReceiver
All Implemented Interfaces:
com.azure.json.JsonSerializable<EmailReceiver>

public final class EmailReceiver extends Object implements com.azure.json.JsonSerializable<EmailReceiver>
An email receiver.
  • Constructor Details

    • EmailReceiver

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

    • name

      public String name()
      Get the name property: The name of the email receiver. Names must be unique across all receivers within an action group.
      Returns:
      the name value.
    • withName

      public EmailReceiver withName(String name)
      Set the name property: The name of the email receiver. Names must be unique across all receivers within an action group.
      Parameters:
      name - the name value to set.
      Returns:
      the EmailReceiver object itself.
    • emailAddress

      public String emailAddress()
      Get the emailAddress property: The email address of this receiver.
      Returns:
      the emailAddress value.
    • withEmailAddress

      public EmailReceiver withEmailAddress(String emailAddress)
      Set the emailAddress property: The email address of this receiver.
      Parameters:
      emailAddress - the emailAddress value to set.
      Returns:
      the EmailReceiver object itself.
    • useCommonAlertSchema

      public Boolean useCommonAlertSchema()
      Get the useCommonAlertSchema property: Indicates whether to use common alert schema.
      Returns:
      the useCommonAlertSchema value.
    • withUseCommonAlertSchema

      public EmailReceiver withUseCommonAlertSchema(Boolean useCommonAlertSchema)
      Set the useCommonAlertSchema property: Indicates whether to use common alert schema.
      Parameters:
      useCommonAlertSchema - the useCommonAlertSchema value to set.
      Returns:
      the EmailReceiver object itself.
    • status

      public ReceiverStatus status()
      Get the status property: The receiver status of the e-mail.
      Returns:
      the status value.
    • 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<EmailReceiver>
      Throws:
      IOException
    • fromJson

      public static EmailReceiver fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of EmailReceiver from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of EmailReceiver 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 EmailReceiver.