Condividi tramite


TrafficDetectionRule Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.TrafficDetectionRule

Implements

public final class TrafficDetectionRule
implements JsonSerializable<TrafficDetectionRule>

Ddos Custom Policy traffic detection rule.

Constructor Summary

Constructor Description
TrafficDetectionRule()

Creates an instance of TrafficDetectionRule class.

Method Summary

Modifier and Type Method and Description
static TrafficDetectionRule fromJson(JsonReader jsonReader)

Reads an instance of TrafficDetectionRule from the JsonReader.

Integer packetsPerSecond()

Get the packetsPerSecond property: The customized packets per second threshold.

JsonWriter toJson(JsonWriter jsonWriter)
DdosTrafficType trafficType()

Get the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon.

void validate()

Validates the instance.

TrafficDetectionRule withPacketsPerSecond(Integer packetsPerSecond)

Set the packetsPerSecond property: The customized packets per second threshold.

TrafficDetectionRule 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 java.lang.Object

Constructor Details

TrafficDetectionRule

public TrafficDetectionRule()

Creates an instance of TrafficDetectionRule class.

Method Details

fromJson

public static TrafficDetectionRule fromJson(JsonReader jsonReader)

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.

packetsPerSecond

public Integer packetsPerSecond()

Get the packetsPerSecond property: The customized packets per second threshold.

Returns:

the packetsPerSecond value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

trafficType

public DdosTrafficType 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.

validate

public void validate()

Validates the instance.

withPacketsPerSecond

public TrafficDetectionRule withPacketsPerSecond(Integer packetsPerSecond)

Set the packetsPerSecond property: The customized packets per second threshold.

Parameters:

packetsPerSecond - the packetsPerSecond value to set.

Returns:

the TrafficDetectionRule object itself.

withTrafficType

public TrafficDetectionRule withTrafficType(DdosTrafficType trafficType)

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.

Applies to