Class DdosDetectionRule

java.lang.Object
com.azure.core.management.SubResource
com.azure.resourcemanager.network.models.DdosDetectionRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.SubResource>

public final class DdosDetectionRule extends com.azure.core.management.SubResource
A DDoS detection rule resource.
  • Constructor Details

    • DdosDetectionRule

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

    • name

      public String name()
      Get the name property: The name of the DDoS detection rule.
      Returns:
      the name value.
    • withName

      public DdosDetectionRule withName(String name)
      Set the name property: The name of the DDoS detection rule.
      Parameters:
      name - the name value to set.
      Returns:
      the DdosDetectionRule object itself.
    • etag

      public String etag()
      Get the etag property: A unique read-only string that changes whenever the resource is updated.
      Returns:
      the etag value.
    • type

      public String type()
      Get the type property: The resource type.
      Returns:
      the type value.
    • withId

      public DdosDetectionRule withId(String id)
      Overrides:
      withId in class com.azure.core.management.SubResource
    • provisioningState

      public ProvisioningState provisioningState()
      Get the provisioningState property: The provisioning state of the DDoS detection rule.
      Returns:
      the provisioningState value.
    • detectionMode

      public DdosDetectionMode detectionMode()
      Get the detectionMode property: The detection mode for the DDoS detection rule.
      Returns:
      the detectionMode value.
    • withDetectionMode

      public DdosDetectionRule withDetectionMode(DdosDetectionMode detectionMode)
      Set the detectionMode property: The detection mode for the DDoS detection rule.
      Parameters:
      detectionMode - the detectionMode value to set.
      Returns:
      the DdosDetectionRule object itself.
    • trafficDetectionRule

      public TrafficDetectionRule trafficDetectionRule()
      Get the trafficDetectionRule property: The traffic detection rule details.
      Returns:
      the trafficDetectionRule value.
    • withTrafficDetectionRule

      public DdosDetectionRule withTrafficDetectionRule(TrafficDetectionRule trafficDetectionRule)
      Set the trafficDetectionRule property: The traffic detection rule details.
      Parameters:
      trafficDetectionRule - the trafficDetectionRule value to set.
      Returns:
      the DdosDetectionRule 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<com.azure.core.management.SubResource>
      Overrides:
      toJson in class com.azure.core.management.SubResource
      Throws:
      IOException
    • fromJson

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