Class NetworkInterfaceAssociation

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

public final class NetworkInterfaceAssociation extends Object implements com.azure.json.JsonSerializable<NetworkInterfaceAssociation>
Network interface and its custom security rules.
  • Constructor Details

    • NetworkInterfaceAssociation

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

    • id

      public String id()
      Get the id property: Network interface ID.
      Returns:
      the id value.
    • securityRules

      public List<SecurityRuleInner> securityRules()
      Get the securityRules property: Collection of custom security rules.
      Returns:
      the securityRules value.
    • withSecurityRules

      public NetworkInterfaceAssociation withSecurityRules(List<SecurityRuleInner> securityRules)
      Set the securityRules property: Collection of custom security rules.
      Parameters:
      securityRules - the securityRules value to set.
      Returns:
      the NetworkInterfaceAssociation 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<NetworkInterfaceAssociation>
      Throws:
      IOException
    • fromJson

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