Class InboundNatRule
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.InboundNatRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<InboundNatRule>
public final class InboundNatRule
extends Object
implements com.azure.json.JsonSerializable<InboundNatRule>
A rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load balancer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the backendPort property: The port to which the external traffic will be redirected.static InboundNatRule
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of InboundNatRule from the JsonReader.Get the frontendPort property: The external endpoint port of the inbound connection.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Get the transportProtocol property: The transport protocol for the endpoint.void
validate()
Validates the instance.withBackendPort
(Integer backendPort) Set the backendPort property: The port to which the external traffic will be redirected.withFrontendPort
(Integer frontendPort) Set the frontendPort property: The external endpoint port of the inbound connection.withTransportProtocol
(TransportProtocol transportProtocol) Set the transportProtocol property: The transport protocol for the endpoint.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
InboundNatRule
public InboundNatRule()Creates an instance of InboundNatRule class.
-
-
Method Details
-
transportProtocol
Get the transportProtocol property: The transport protocol for the endpoint.- Returns:
- the transportProtocol value.
-
withTransportProtocol
Set the transportProtocol property: The transport protocol for the endpoint.- Parameters:
transportProtocol
- the transportProtocol value to set.- Returns:
- the InboundNatRule object itself.
-
frontendPort
Get the frontendPort property: The external endpoint port of the inbound connection. Possible values range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically.- Returns:
- the frontendPort value.
-
withFrontendPort
Set the frontendPort property: The external endpoint port of the inbound connection. Possible values range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically.- Parameters:
frontendPort
- the frontendPort value to set.- Returns:
- the InboundNatRule object itself.
-
backendPort
Get the backendPort property: The port to which the external traffic will be redirected.- Returns:
- the backendPort value.
-
withBackendPort
Set the backendPort property: The port to which the external traffic will be redirected.- Parameters:
backendPort
- the backendPort value to set.- Returns:
- the InboundNatRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<InboundNatRule>
- Throws:
IOException
-
fromJson
Reads an instance of InboundNatRule from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of InboundNatRule 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 InboundNatRule.
-