Class TrafficDetectionRule
java.lang.Object
com.azure.resourcemanager.network.models.TrafficDetectionRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TrafficDetectionRule>
public final class TrafficDetectionRule
extends Object
implements com.azure.json.JsonSerializable<TrafficDetectionRule>
Ddos Custom Policy traffic detection rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TrafficDetectionRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TrafficDetectionRule from the JsonReader.Get the packetsPerSecond property: The customized packets per second threshold.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon.voidvalidate()Validates the instance.withPacketsPerSecond(Integer packetsPerSecond) Set the packetsPerSecond property: The customized packets per second threshold.withTrafficType(DdosTrafficType trafficType) Set the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon.Methods inherited from class 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
-
TrafficDetectionRule
public TrafficDetectionRule()Creates an instance of TrafficDetectionRule class.
-
-
Method Details
-
trafficType
Get the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon.- Returns:
- the trafficType value.
-
withTrafficType
Set the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon.- Parameters:
trafficType- the trafficType value to set.- Returns:
- the TrafficDetectionRule object itself.
-
packetsPerSecond
Get the packetsPerSecond property: The customized packets per second threshold.- Returns:
- the packetsPerSecond value.
-
withPacketsPerSecond
Set the packetsPerSecond property: The customized packets per second threshold.- Parameters:
packetsPerSecond- the packetsPerSecond value to set.- Returns:
- the TrafficDetectionRule 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<TrafficDetectionRule>- Throws:
IOException
-
fromJson
public static TrafficDetectionRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of TrafficDetectionRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of TrafficDetectionRule 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 TrafficDetectionRule.
-