NatRulePortMapping Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.NatRulePortMapping

Implements

public final class NatRulePortMapping
implements JsonSerializable<NatRulePortMapping>

Individual port mappings for inbound NAT rule created for backend pool.

Constructor Summary

Constructor Description
NatRulePortMapping()

Creates an instance of NatRulePortMapping class.

Method Summary

Modifier and Type Method and Description
Integer backendPort()

Get the backendPort property: Backend port.

static NatRulePortMapping fromJson(JsonReader jsonReader)

Reads an instance of NatRulePortMapping from the JsonReader.

Integer frontendPort()

Get the frontendPort property: Frontend port.

String inboundNatRuleName()

Get the inboundNatRuleName property: Name of inbound NAT rule.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

NatRulePortMapping withBackendPort(Integer backendPort)

Set the backendPort property: Backend port.

NatRulePortMapping withFrontendPort(Integer frontendPort)

Set the frontendPort property: Frontend port.

NatRulePortMapping withInboundNatRuleName(String inboundNatRuleName)

Set the inboundNatRuleName property: Name of inbound NAT rule.

Methods inherited from java.lang.Object

Constructor Details

NatRulePortMapping

public NatRulePortMapping()

Creates an instance of NatRulePortMapping class.

Method Details

backendPort

public Integer backendPort()

Get the backendPort property: Backend port.

Returns:

the backendPort value.

fromJson

public static NatRulePortMapping fromJson(JsonReader jsonReader)

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.

frontendPort

public Integer frontendPort()

Get the frontendPort property: Frontend port.

Returns:

the frontendPort value.

inboundNatRuleName

public String inboundNatRuleName()

Get the inboundNatRuleName property: Name of inbound NAT rule.

Returns:

the inboundNatRuleName value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withBackendPort

public NatRulePortMapping withBackendPort(Integer backendPort)

Set the backendPort property: Backend port.

Parameters:

backendPort - the backendPort value to set.

Returns:

the NatRulePortMapping object itself.

withFrontendPort

public NatRulePortMapping withFrontendPort(Integer frontendPort)

Set the frontendPort property: Frontend port.

Parameters:

frontendPort - the frontendPort value to set.

Returns:

the NatRulePortMapping object itself.

withInboundNatRuleName

public NatRulePortMapping withInboundNatRuleName(String inboundNatRuleName)

Set the inboundNatRuleName property: Name of inbound NAT rule.

Parameters:

inboundNatRuleName - the inboundNatRuleName value to set.

Returns:

the NatRulePortMapping object itself.

Applies to