Class NatInfo.Builder (1.47.0)

public static final class NatInfo.Builder extends GeneratedMessageV3.Builder<NatInfo.Builder> implements NatInfoOrBuilder

For display only. Metadata associated with NAT.

Protobuf type google.cloud.networkmanagement.v1.NatInfo

Implements

NatInfoOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NatInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NatInfo.Builder
Overrides

build()

public NatInfo build()
Returns
Type Description
NatInfo

buildPartial()

public NatInfo buildPartial()
Returns
Type Description
NatInfo

clear()

public NatInfo.Builder clear()
Returns
Type Description
NatInfo.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public NatInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
NatInfo.Builder
Overrides

clearNatGatewayName()

public NatInfo.Builder clearNatGatewayName()

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

string nat_gateway_name = 13;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearNetworkUri()

public NatInfo.Builder clearNetworkUri()

URI of the network where NAT translation takes place.

string network_uri = 3;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearNewDestinationIp()

public NatInfo.Builder clearNewDestinationIp()

Destination IP address after NAT translation.

string new_destination_ip = 7;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearNewDestinationPort()

public NatInfo.Builder clearNewDestinationPort()

Destination port after NAT translation. Only valid when protocol is TCP or UDP.

int32 new_destination_port = 11;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearNewSourceIp()

public NatInfo.Builder clearNewSourceIp()

Source IP address after NAT translation.

string new_source_ip = 5;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearNewSourcePort()

public NatInfo.Builder clearNewSourcePort()

Source port after NAT translation. Only valid when protocol is TCP or UDP.

int32 new_source_port = 9;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearOldDestinationIp()

public NatInfo.Builder clearOldDestinationIp()

Destination IP address before NAT translation.

string old_destination_ip = 6;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearOldDestinationPort()

public NatInfo.Builder clearOldDestinationPort()

Destination port before NAT translation. Only valid when protocol is TCP or UDP.

int32 old_destination_port = 10;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearOldSourceIp()

public NatInfo.Builder clearOldSourceIp()

Source IP address before NAT translation.

string old_source_ip = 4;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearOldSourcePort()

public NatInfo.Builder clearOldSourcePort()

Source port before NAT translation. Only valid when protocol is TCP or UDP.

int32 old_source_port = 8;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NatInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
NatInfo.Builder
Overrides

clearProtocol()

public NatInfo.Builder clearProtocol()

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

string protocol = 2;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearRouterUri()

public NatInfo.Builder clearRouterUri()

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

string router_uri = 12;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clearType()

public NatInfo.Builder clearType()

Type of NAT.

.google.cloud.networkmanagement.v1.NatInfo.Type type = 1;

Returns
Type Description
NatInfo.Builder

This builder for chaining.

clone()

public NatInfo.Builder clone()
Returns
Type Description
NatInfo.Builder
Overrides

getDefaultInstanceForType()

public NatInfo getDefaultInstanceForType()
Returns
Type Description
NatInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNatGatewayName()

public String getNatGatewayName()

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

string nat_gateway_name = 13;

Returns
Type Description
String

The natGatewayName.

getNatGatewayNameBytes()

public ByteString getNatGatewayNameBytes()

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

string nat_gateway_name = 13;

Returns
Type Description
ByteString

The bytes for natGatewayName.

getNetworkUri()

public String getNetworkUri()

URI of the network where NAT translation takes place.

string network_uri = 3;

Returns
Type Description
String

The networkUri.

getNetworkUriBytes()

public ByteString getNetworkUriBytes()

URI of the network where NAT translation takes place.

string network_uri = 3;

Returns
Type Description
ByteString

The bytes for networkUri.

getNewDestinationIp()

public String getNewDestinationIp()

Destination IP address after NAT translation.

string new_destination_ip = 7;

Returns
Type Description
String

The newDestinationIp.

getNewDestinationIpBytes()

public ByteString getNewDestinationIpBytes()

Destination IP address after NAT translation.

string new_destination_ip = 7;

Returns
Type Description
ByteString

The bytes for newDestinationIp.

getNewDestinationPort()

public int getNewDestinationPort()

Destination port after NAT translation. Only valid when protocol is TCP or UDP.

int32 new_destination_port = 11;

Returns
Type Description
int

The newDestinationPort.

getNewSourceIp()

public String getNewSourceIp()

Source IP address after NAT translation.

string new_source_ip = 5;

Returns
Type Description
String

The newSourceIp.

getNewSourceIpBytes()

public ByteString getNewSourceIpBytes()

Source IP address after NAT translation.

string new_source_ip = 5;

Returns
Type Description
ByteString

The bytes for newSourceIp.

getNewSourcePort()

public int getNewSourcePort()

Source port after NAT translation. Only valid when protocol is TCP or UDP.

int32 new_source_port = 9;

Returns
Type Description
int

The newSourcePort.

getOldDestinationIp()

public String getOldDestinationIp()

Destination IP address before NAT translation.

string old_destination_ip = 6;

Returns
Type Description
String

The oldDestinationIp.

getOldDestinationIpBytes()

public ByteString getOldDestinationIpBytes()

Destination IP address before NAT translation.

string old_destination_ip = 6;

Returns
Type Description
ByteString

The bytes for oldDestinationIp.

getOldDestinationPort()

public int getOldDestinationPort()

Destination port before NAT translation. Only valid when protocol is TCP or UDP.

int32 old_destination_port = 10;

Returns
Type Description
int

The oldDestinationPort.

getOldSourceIp()

public String getOldSourceIp()

Source IP address before NAT translation.

string old_source_ip = 4;

Returns
Type Description
String

The oldSourceIp.

getOldSourceIpBytes()

public ByteString getOldSourceIpBytes()

Source IP address before NAT translation.

string old_source_ip = 4;

Returns
Type Description
ByteString

The bytes for oldSourceIp.

getOldSourcePort()

public int getOldSourcePort()

Source port before NAT translation. Only valid when protocol is TCP or UDP.

int32 old_source_port = 8;

Returns
Type Description
int

The oldSourcePort.

getProtocol()

public String getProtocol()

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

string protocol = 2;

Returns
Type Description
String

The protocol.

getProtocolBytes()

public ByteString getProtocolBytes()

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

string protocol = 2;

Returns
Type Description
ByteString

The bytes for protocol.

getRouterUri()

public String getRouterUri()

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

string router_uri = 12;

Returns
Type Description
String

The routerUri.

getRouterUriBytes()

public ByteString getRouterUriBytes()

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

string router_uri = 12;

Returns
Type Description
ByteString

The bytes for routerUri.

getType()

public NatInfo.Type getType()

Type of NAT.

.google.cloud.networkmanagement.v1.NatInfo.Type type = 1;

Returns
Type Description
NatInfo.Type

The type.

getTypeValue()

public int getTypeValue()

Type of NAT.

.google.cloud.networkmanagement.v1.NatInfo.Type type = 1;

Returns
Type Description
int

The enum numeric value on the wire for type.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(NatInfo other)

public NatInfo.Builder mergeFrom(NatInfo other)
Parameter
Name Description
other NatInfo
Returns
Type Description
NatInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NatInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NatInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public NatInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
NatInfo.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NatInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
NatInfo.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public NatInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NatInfo.Builder
Overrides

setNatGatewayName(String value)

public NatInfo.Builder setNatGatewayName(String value)

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

string nat_gateway_name = 13;

Parameter
Name Description
value String

The natGatewayName to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNatGatewayNameBytes(ByteString value)

public NatInfo.Builder setNatGatewayNameBytes(ByteString value)

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

string nat_gateway_name = 13;

Parameter
Name Description
value ByteString

The bytes for natGatewayName to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNetworkUri(String value)

public NatInfo.Builder setNetworkUri(String value)

URI of the network where NAT translation takes place.

string network_uri = 3;

Parameter
Name Description
value String

The networkUri to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNetworkUriBytes(ByteString value)

public NatInfo.Builder setNetworkUriBytes(ByteString value)

URI of the network where NAT translation takes place.

string network_uri = 3;

Parameter
Name Description
value ByteString

The bytes for networkUri to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNewDestinationIp(String value)

public NatInfo.Builder setNewDestinationIp(String value)

Destination IP address after NAT translation.

string new_destination_ip = 7;

Parameter
Name Description
value String

The newDestinationIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNewDestinationIpBytes(ByteString value)

public NatInfo.Builder setNewDestinationIpBytes(ByteString value)

Destination IP address after NAT translation.

string new_destination_ip = 7;

Parameter
Name Description
value ByteString

The bytes for newDestinationIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNewDestinationPort(int value)

public NatInfo.Builder setNewDestinationPort(int value)

Destination port after NAT translation. Only valid when protocol is TCP or UDP.

int32 new_destination_port = 11;

Parameter
Name Description
value int

The newDestinationPort to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNewSourceIp(String value)

public NatInfo.Builder setNewSourceIp(String value)

Source IP address after NAT translation.

string new_source_ip = 5;

Parameter
Name Description
value String

The newSourceIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNewSourceIpBytes(ByteString value)

public NatInfo.Builder setNewSourceIpBytes(ByteString value)

Source IP address after NAT translation.

string new_source_ip = 5;

Parameter
Name Description
value ByteString

The bytes for newSourceIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setNewSourcePort(int value)

public NatInfo.Builder setNewSourcePort(int value)

Source port after NAT translation. Only valid when protocol is TCP or UDP.

int32 new_source_port = 9;

Parameter
Name Description
value int

The newSourcePort to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setOldDestinationIp(String value)

public NatInfo.Builder setOldDestinationIp(String value)

Destination IP address before NAT translation.

string old_destination_ip = 6;

Parameter
Name Description
value String

The oldDestinationIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setOldDestinationIpBytes(ByteString value)

public NatInfo.Builder setOldDestinationIpBytes(ByteString value)

Destination IP address before NAT translation.

string old_destination_ip = 6;

Parameter
Name Description
value ByteString

The bytes for oldDestinationIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setOldDestinationPort(int value)

public NatInfo.Builder setOldDestinationPort(int value)

Destination port before NAT translation. Only valid when protocol is TCP or UDP.

int32 old_destination_port = 10;

Parameter
Name Description
value int

The oldDestinationPort to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setOldSourceIp(String value)

public NatInfo.Builder setOldSourceIp(String value)

Source IP address before NAT translation.

string old_source_ip = 4;

Parameter
Name Description
value String

The oldSourceIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setOldSourceIpBytes(ByteString value)

public NatInfo.Builder setOldSourceIpBytes(ByteString value)

Source IP address before NAT translation.

string old_source_ip = 4;

Parameter
Name Description
value ByteString

The bytes for oldSourceIp to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setOldSourcePort(int value)

public NatInfo.Builder setOldSourcePort(int value)

Source port before NAT translation. Only valid when protocol is TCP or UDP.

int32 old_source_port = 8;

Parameter
Name Description
value int

The oldSourcePort to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setProtocol(String value)

public NatInfo.Builder setProtocol(String value)

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

string protocol = 2;

Parameter
Name Description
value String

The protocol to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setProtocolBytes(ByteString value)

public NatInfo.Builder setProtocolBytes(ByteString value)

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

string protocol = 2;

Parameter
Name Description
value ByteString

The bytes for protocol to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public NatInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
NatInfo.Builder
Overrides

setRouterUri(String value)

public NatInfo.Builder setRouterUri(String value)

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

string router_uri = 12;

Parameter
Name Description
value String

The routerUri to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setRouterUriBytes(ByteString value)

public NatInfo.Builder setRouterUriBytes(ByteString value)

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

string router_uri = 12;

Parameter
Name Description
value ByteString

The bytes for routerUri to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setType(NatInfo.Type value)

public NatInfo.Builder setType(NatInfo.Type value)

Type of NAT.

.google.cloud.networkmanagement.v1.NatInfo.Type type = 1;

Parameter
Name Description
value NatInfo.Type

The type to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setTypeValue(int value)

public NatInfo.Builder setTypeValue(int value)

Type of NAT.

.google.cloud.networkmanagement.v1.NatInfo.Type type = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
NatInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final NatInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
NatInfo.Builder
Overrides