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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.Get the destinationPortRange property: NVA port ranges to be opened up.Get the destinationPortRanges property: NVA port ranges to be opened up.static InboundSecurityRulesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of InboundSecurityRules from the JsonReader.name()Get the name property: Name of the rule.protocol()Get the protocol property: Protocol.Get the sourceAddressPrefix property: The CIDR or source IP range.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.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.withDestinationPortRange(Integer destinationPortRange) Set the destinationPortRange property: NVA port ranges to be opened up.withDestinationPortRanges(List<String> destinationPortRanges) Set the destinationPortRanges property: NVA port ranges to be opened up.Set the name property: Name of the rule.withProtocol(InboundSecurityRulesProtocol protocol) Set the protocol property: Protocol.withSourceAddressPrefix(String sourceAddressPrefix) Set the sourceAddressPrefix property: The CIDR or source IP range.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
-
InboundSecurityRules
public InboundSecurityRules()Creates an instance of InboundSecurityRules class.
-
-
Method Details
-
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 InboundSecurityRules object itself.
-
protocol
Get the protocol property: Protocol. This should be either TCP or UDP.- Returns:
- the protocol value.
-
withProtocol
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
Get the sourceAddressPrefix property: The CIDR or source IP range.- Returns:
- the sourceAddressPrefix value.
-
withSourceAddressPrefix
Set the sourceAddressPrefix property: The CIDR or source IP range.- Parameters:
sourceAddressPrefix- the sourceAddressPrefix value to set.- Returns:
- the InboundSecurityRules object itself.
-
destinationPortRange
Get the destinationPortRange property: NVA port ranges to be opened up. One needs to provide specific ports.- Returns:
- the destinationPortRange value.
-
withDestinationPortRange
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
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
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
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
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
- Specified by:
toJsonin interfacecom.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.
-