Class FirewallPolicyRule
java.lang.Object
com.azure.resourcemanager.network.models.FirewallPolicyRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<FirewallPolicyRule>
- Direct Known Subclasses:
ApplicationRule,NatRule,NetworkRule
public class FirewallPolicyRule
extends Object
implements com.azure.json.JsonSerializable<FirewallPolicyRule>
Properties of a rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the description property: Description of the rule.static FirewallPolicyRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of FirewallPolicyRule from the JsonReader.name()Get the name property: Name of the rule.ruleType()Get the ruleType property: Rule Type.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDescription(String description) Set the description property: Description of the rule.Set the name property: Name of the rule.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
-
FirewallPolicyRule
public FirewallPolicyRule()Creates an instance of FirewallPolicyRule class.
-
-
Method Details
-
ruleType
Get the ruleType property: Rule Type.- Returns:
- the ruleType value.
-
name
Get the name property: Name of the rule.- Returns:
- the name value.
-
withName
Set the name property: Name of the rule.- Parameters:
name- the name value to set.- Returns:
- the FirewallPolicyRule object itself.
-
description
Get the description property: Description of the rule.- Returns:
- the description value.
-
withDescription
Set the description property: Description of the rule.- Parameters:
description- the description value to set.- Returns:
- the FirewallPolicyRule 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<FirewallPolicyRule>- Throws:
IOException
-
fromJson
Reads an instance of FirewallPolicyRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of FirewallPolicyRule 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 FirewallPolicyRule.
-