Class MatchedRule

java.lang.Object
com.azure.resourcemanager.network.models.MatchedRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<MatchedRule>

public final class MatchedRule extends Object implements com.azure.json.JsonSerializable<MatchedRule>
Matched rule.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of MatchedRule class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the action property: The network traffic is allowed or denied.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of MatchedRule from the JsonReader.
    Get the ruleName property: Name of the matched network security rule.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the action property: The network traffic is allowed or denied.
    withRuleName(String ruleName)
    Set the ruleName property: Name of the matched network security rule.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • MatchedRule

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

    • ruleName

      public String ruleName()
      Get the ruleName property: Name of the matched network security rule.
      Returns:
      the ruleName value.
    • withRuleName

      public MatchedRule withRuleName(String ruleName)
      Set the ruleName property: Name of the matched network security rule.
      Parameters:
      ruleName - the ruleName value to set.
      Returns:
      the MatchedRule object itself.
    • action

      public String action()
      Get the action property: The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
      Returns:
      the action value.
    • withAction

      public MatchedRule withAction(String action)
      Set the action property: The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
      Parameters:
      action - the action value to set.
      Returns:
      the MatchedRule 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<MatchedRule>
      Throws:
      IOException
    • fromJson

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