Class DdosSettings

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

public final class DdosSettings extends Object implements com.azure.json.JsonSerializable<DdosSettings>
Contains the DDoS protection settings of the public IP.
  • Constructor Details

    • DdosSettings

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

    • protectionMode

      public DdosSettingsProtectionMode protectionMode()
      Get the protectionMode property: The DDoS protection mode of the public IP.
      Returns:
      the protectionMode value.
    • withProtectionMode

      public DdosSettings withProtectionMode(DdosSettingsProtectionMode protectionMode)
      Set the protectionMode property: The DDoS protection mode of the public IP.
      Parameters:
      protectionMode - the protectionMode value to set.
      Returns:
      the DdosSettings object itself.
    • ddosProtectionPlan

      public com.azure.core.management.SubResource ddosProtectionPlan()
      Get the ddosProtectionPlan property: The DDoS protection plan associated with the public IP. Can only be set if ProtectionMode is Enabled.
      Returns:
      the ddosProtectionPlan value.
    • withDdosProtectionPlan

      public DdosSettings withDdosProtectionPlan(com.azure.core.management.SubResource ddosProtectionPlan)
      Set the ddosProtectionPlan property: The DDoS protection plan associated with the public IP. Can only be set if ProtectionMode is Enabled.
      Parameters:
      ddosProtectionPlan - the ddosProtectionPlan value to set.
      Returns:
      the DdosSettings 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<DdosSettings>
      Throws:
      IOException
    • fromJson

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