Class NatRulePortMapping
java.lang.Object
com.azure.resourcemanager.network.models.NatRulePortMapping
- All Implemented Interfaces:
com.azure.json.JsonSerializable<NatRulePortMapping>
public final class NatRulePortMapping
extends Object
implements com.azure.json.JsonSerializable<NatRulePortMapping>
Individual port mappings for inbound NAT rule created for backend pool.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the backendPort property: Backend port.static NatRulePortMappingfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of NatRulePortMapping from the JsonReader.Get the frontendPort property: Frontend port.Get the inboundNatRuleName property: Name of inbound NAT rule.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBackendPort(Integer backendPort) Set the backendPort property: Backend port.withFrontendPort(Integer frontendPort) Set the frontendPort property: Frontend port.withInboundNatRuleName(String inboundNatRuleName) Set the inboundNatRuleName property: Name of inbound NAT rule.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
-
NatRulePortMapping
public NatRulePortMapping()Creates an instance of NatRulePortMapping class.
-
-
Method Details
-
inboundNatRuleName
Get the inboundNatRuleName property: Name of inbound NAT rule.- Returns:
- the inboundNatRuleName value.
-
withInboundNatRuleName
Set the inboundNatRuleName property: Name of inbound NAT rule.- Parameters:
inboundNatRuleName- the inboundNatRuleName value to set.- Returns:
- the NatRulePortMapping object itself.
-
frontendPort
Get the frontendPort property: Frontend port.- Returns:
- the frontendPort value.
-
withFrontendPort
Set the frontendPort property: Frontend port.- Parameters:
frontendPort- the frontendPort value to set.- Returns:
- the NatRulePortMapping object itself.
-
backendPort
Get the backendPort property: Backend port.- Returns:
- the backendPort value.
-
withBackendPort
Set the backendPort property: Backend port.- Parameters:
backendPort- the backendPort value to set.- Returns:
- the NatRulePortMapping 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<NatRulePortMapping>- Throws:
IOException
-
fromJson
Reads an instance of NatRulePortMapping from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of NatRulePortMapping 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 NatRulePortMapping.
-