Class NatRule
- java.lang.Object
-
- com.azure.resourcemanager.network.models.FirewallPolicyRule
-
- com.azure.resourcemanager.network.models.NatRule
-
public final class NatRule extends FirewallPolicyRule
Rule of type nat.
-
-
Constructor Summary
Constructors Constructor Description NatRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>destinationAddresses()Get the destinationAddresses property: List of destination IP addresses or Service Tags.List<String>destinationPorts()Get the destinationPorts property: List of destination ports.List<FirewallPolicyRuleNetworkProtocol>ipProtocols()Get the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.List<String>sourceAddresses()Get the sourceAddresses property: List of source IP addresses for this rule.List<String>sourceIpGroups()Get the sourceIpGroups property: List of source IpGroups for this rule.StringtranslatedAddress()Get the translatedAddress property: The translated address for this NAT rule.StringtranslatedFqdn()Get the translatedFqdn property: The translated FQDN for this NAT rule.StringtranslatedPort()Get the translatedPort property: The translated port for this NAT rule.voidvalidate()Validates the instance.NatRulewithDescription(String description)Set the description property: Description of the rule.NatRulewithDestinationAddresses(List<String> destinationAddresses)Set the destinationAddresses property: List of destination IP addresses or Service Tags.NatRulewithDestinationPorts(List<String> destinationPorts)Set the destinationPorts property: List of destination ports.NatRulewithIpProtocols(List<FirewallPolicyRuleNetworkProtocol> ipProtocols)Set the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.NatRulewithName(String name)Set the name property: Name of the rule.NatRulewithSourceAddresses(List<String> sourceAddresses)Set the sourceAddresses property: List of source IP addresses for this rule.NatRulewithSourceIpGroups(List<String> sourceIpGroups)Set the sourceIpGroups property: List of source IpGroups for this rule.NatRulewithTranslatedAddress(String translatedAddress)Set the translatedAddress property: The translated address for this NAT rule.NatRulewithTranslatedFqdn(String translatedFqdn)Set the translatedFqdn property: The translated FQDN for this NAT rule.NatRulewithTranslatedPort(String translatedPort)Set the translatedPort property: The translated port for this NAT rule.-
Methods inherited from class com.azure.resourcemanager.network.models.FirewallPolicyRule
description, name
-
-
-
-
Method Detail
-
ipProtocols
public List<FirewallPolicyRuleNetworkProtocol> ipProtocols()
Get the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.- Returns:
- the ipProtocols value.
-
withIpProtocols
public NatRule withIpProtocols(List<FirewallPolicyRuleNetworkProtocol> ipProtocols)
Set the ipProtocols property: Array of FirewallPolicyRuleNetworkProtocols.- Parameters:
ipProtocols- the ipProtocols value to set.- Returns:
- the NatRule object itself.
-
sourceAddresses
public List<String> sourceAddresses()
Get the sourceAddresses property: List of source IP addresses for this rule.- Returns:
- the sourceAddresses value.
-
withSourceAddresses
public NatRule withSourceAddresses(List<String> sourceAddresses)
Set the sourceAddresses property: List of source IP addresses for this rule.- Parameters:
sourceAddresses- the sourceAddresses value to set.- Returns:
- the NatRule object itself.
-
destinationAddresses
public List<String> destinationAddresses()
Get the destinationAddresses property: List of destination IP addresses or Service Tags.- Returns:
- the destinationAddresses value.
-
withDestinationAddresses
public NatRule withDestinationAddresses(List<String> destinationAddresses)
Set the destinationAddresses property: List of destination IP addresses or Service Tags.- Parameters:
destinationAddresses- the destinationAddresses value to set.- Returns:
- the NatRule object itself.
-
destinationPorts
public List<String> destinationPorts()
Get the destinationPorts property: List of destination ports.- Returns:
- the destinationPorts value.
-
withDestinationPorts
public NatRule withDestinationPorts(List<String> destinationPorts)
Set the destinationPorts property: List of destination ports.- Parameters:
destinationPorts- the destinationPorts value to set.- Returns:
- the NatRule object itself.
-
translatedAddress
public String translatedAddress()
Get the translatedAddress property: The translated address for this NAT rule.- Returns:
- the translatedAddress value.
-
withTranslatedAddress
public NatRule withTranslatedAddress(String translatedAddress)
Set the translatedAddress property: The translated address for this NAT rule.- Parameters:
translatedAddress- the translatedAddress value to set.- Returns:
- the NatRule object itself.
-
translatedPort
public String translatedPort()
Get the translatedPort property: The translated port for this NAT rule.- Returns:
- the translatedPort value.
-
withTranslatedPort
public NatRule withTranslatedPort(String translatedPort)
Set the translatedPort property: The translated port for this NAT rule.- Parameters:
translatedPort- the translatedPort value to set.- Returns:
- the NatRule object itself.
-
sourceIpGroups
public List<String> sourceIpGroups()
Get the sourceIpGroups property: List of source IpGroups for this rule.- Returns:
- the sourceIpGroups value.
-
withSourceIpGroups
public NatRule withSourceIpGroups(List<String> sourceIpGroups)
Set the sourceIpGroups property: List of source IpGroups for this rule.- Parameters:
sourceIpGroups- the sourceIpGroups value to set.- Returns:
- the NatRule object itself.
-
translatedFqdn
public String translatedFqdn()
Get the translatedFqdn property: The translated FQDN for this NAT rule.- Returns:
- the translatedFqdn value.
-
withTranslatedFqdn
public NatRule withTranslatedFqdn(String translatedFqdn)
Set the translatedFqdn property: The translated FQDN for this NAT rule.- Parameters:
translatedFqdn- the translatedFqdn value to set.- Returns:
- the NatRule object itself.
-
withName
public NatRule withName(String name)
Set the name property: Name of the rule.- Overrides:
withNamein classFirewallPolicyRule- Parameters:
name- the name value to set.- Returns:
- the FirewallPolicyRule object itself.
-
withDescription
public NatRule withDescription(String description)
Set the description property: Description of the rule.- Overrides:
withDescriptionin classFirewallPolicyRule- Parameters:
description- the description value to set.- Returns:
- the FirewallPolicyRule object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classFirewallPolicyRule- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-