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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.management.SubResourceGet the ddosProtectionPlan property: The DDoS protection plan associated with the public IP.static DdosSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DdosSettings from the JsonReader.Get the protectionMode property: The DDoS protection mode of the public IP.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDdosProtectionPlan(com.azure.core.management.SubResource ddosProtectionPlan) Set the ddosProtectionPlan property: The DDoS protection plan associated with the public IP.withProtectionMode(DdosSettingsProtectionMode protectionMode) Set the protectionMode property: The DDoS protection mode of the public IP.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DdosSettings
public DdosSettings()Creates an instance of DdosSettings class.
-
-
Method Details
-
protectionMode
Get the protectionMode property: The DDoS protection mode of the public IP.- Returns:
- the protectionMode value.
-
withProtectionMode
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DdosSettings>- Throws:
IOException
-
fromJson
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.
-