Class InboundSecurityRules

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

public final class InboundSecurityRules extends Object implements com.azure.json.JsonSerializable<InboundSecurityRules>
Properties of the Inbound Security Rules resource.
  • Constructor Details

    • InboundSecurityRules

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

    • name

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

      public InboundSecurityRules withName(String name)
      Set the name property: Name of the rule.
      Parameters:
      name - the name value to set.
      Returns:
      the InboundSecurityRules object itself.
    • protocol

      public InboundSecurityRulesProtocol protocol()
      Get the protocol property: Protocol. This should be either TCP or UDP.
      Returns:
      the protocol value.
    • withProtocol

      public InboundSecurityRules withProtocol(InboundSecurityRulesProtocol protocol)
      Set the protocol property: Protocol. This should be either TCP or UDP.
      Parameters:
      protocol - the protocol value to set.
      Returns:
      the InboundSecurityRules object itself.
    • sourceAddressPrefix

      public String sourceAddressPrefix()
      Get the sourceAddressPrefix property: The CIDR or source IP range.
      Returns:
      the sourceAddressPrefix value.
    • withSourceAddressPrefix

      public InboundSecurityRules withSourceAddressPrefix(String sourceAddressPrefix)
      Set the sourceAddressPrefix property: The CIDR or source IP range.
      Parameters:
      sourceAddressPrefix - the sourceAddressPrefix value to set.
      Returns:
      the InboundSecurityRules object itself.
    • destinationPortRange

      public Integer destinationPortRange()
      Get the destinationPortRange property: NVA port ranges to be opened up. One needs to provide specific ports.
      Returns:
      the destinationPortRange value.
    • withDestinationPortRange

      public InboundSecurityRules withDestinationPortRange(Integer destinationPortRange)
      Set the destinationPortRange property: NVA port ranges to be opened up. One needs to provide specific ports.
      Parameters:
      destinationPortRange - the destinationPortRange value to set.
      Returns:
      the InboundSecurityRules object itself.
    • destinationPortRanges

      public List<String> destinationPortRanges()
      Get the destinationPortRanges property: NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535.
      Returns:
      the destinationPortRanges value.
    • withDestinationPortRanges

      public InboundSecurityRules withDestinationPortRanges(List<String> destinationPortRanges)
      Set the destinationPortRanges property: NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535.
      Parameters:
      destinationPortRanges - the destinationPortRanges value to set.
      Returns:
      the InboundSecurityRules object itself.
    • appliesOn

      public List<String> appliesOn()
      Get the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.
      Returns:
      the appliesOn value.
    • withAppliesOn

      public InboundSecurityRules withAppliesOn(List<String> appliesOn)
      Set the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.
      Parameters:
      appliesOn - the appliesOn value to set.
      Returns:
      the InboundSecurityRules 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<InboundSecurityRules>
      Throws:
      IOException
    • fromJson

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