Class NatInfo.Builder (1.41.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NatInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NatInfo.Builder
Overrides

build()

public NatInfo build()
Returns
TypeDescription
NatInfo

buildPartial()

public NatInfo buildPartial()
Returns
TypeDescription
NatInfo

clear()

public NatInfo.Builder clear()
Returns
TypeDescription
NatInfo.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public NatInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
NatInfo.Builder

This builder for chaining.

clearNewDestinationIp()

public NatInfo.Builder clearNewDestinationIp()

Destination IP address after NAT translation.

string new_destination_ip = 7;

Returns
TypeDescription
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
TypeDescription
NatInfo.Builder

This builder for chaining.

clearNewSourceIp()

public NatInfo.Builder clearNewSourceIp()

Source IP address after NAT translation.

string new_source_ip = 5;

Returns
TypeDescription
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
TypeDescription
NatInfo.Builder

This builder for chaining.

clearOldDestinationIp()

public NatInfo.Builder clearOldDestinationIp()

Destination IP address before NAT translation.

string old_destination_ip = 6;

Returns
TypeDescription
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
TypeDescription
NatInfo.Builder

This builder for chaining.

clearOldSourceIp()

public NatInfo.Builder clearOldSourceIp()

Source IP address before NAT translation.

string old_source_ip = 4;

Returns
TypeDescription
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
TypeDescription
NatInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NatInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
NatInfo.Builder
Overrides

clearProtocol()

public NatInfo.Builder clearProtocol()

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

string protocol = 2;

Returns
TypeDescription
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
TypeDescription
NatInfo.Builder

This builder for chaining.

clearType()

public NatInfo.Builder clearType()

Type of NAT.

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

Returns
TypeDescription
NatInfo.Builder

This builder for chaining.

clone()

public NatInfo.Builder clone()
Returns
TypeDescription
NatInfo.Builder
Overrides

getDefaultInstanceForType()

public NatInfo getDefaultInstanceForType()
Returns
TypeDescription
NatInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for natGatewayName.

getNetworkUri()

public String getNetworkUri()

URI of the network where NAT translation takes place.

string network_uri = 3;

Returns
TypeDescription
String

The networkUri.

getNetworkUriBytes()

public ByteString getNetworkUriBytes()

URI of the network where NAT translation takes place.

string network_uri = 3;

Returns
TypeDescription
ByteString

The bytes for networkUri.

getNewDestinationIp()

public String getNewDestinationIp()

Destination IP address after NAT translation.

string new_destination_ip = 7;

Returns
TypeDescription
String

The newDestinationIp.

getNewDestinationIpBytes()

public ByteString getNewDestinationIpBytes()

Destination IP address after NAT translation.

string new_destination_ip = 7;

Returns
TypeDescription
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
TypeDescription
int

The newDestinationPort.

getNewSourceIp()

public String getNewSourceIp()

Source IP address after NAT translation.

string new_source_ip = 5;

Returns
TypeDescription
String

The newSourceIp.

getNewSourceIpBytes()

public ByteString getNewSourceIpBytes()

Source IP address after NAT translation.

string new_source_ip = 5;

Returns
TypeDescription
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
TypeDescription
int

The newSourcePort.

getOldDestinationIp()

public String getOldDestinationIp()

Destination IP address before NAT translation.

string old_destination_ip = 6;

Returns
TypeDescription
String

The oldDestinationIp.

getOldDestinationIpBytes()

public ByteString getOldDestinationIpBytes()

Destination IP address before NAT translation.

string old_destination_ip = 6;

Returns
TypeDescription
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
TypeDescription
int

The oldDestinationPort.

getOldSourceIp()

public String getOldSourceIp()

Source IP address before NAT translation.

string old_source_ip = 4;

Returns
TypeDescription
String

The oldSourceIp.

getOldSourceIpBytes()

public ByteString getOldSourceIpBytes()

Source IP address before NAT translation.

string old_source_ip = 4;

Returns
TypeDescription
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
TypeDescription
int

The oldSourcePort.

getProtocol()

public String getProtocol()

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

string protocol = 2;

Returns
TypeDescription
String

The protocol.

getProtocolBytes()

public ByteString getProtocolBytes()

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

string protocol = 2;

Returns
TypeDescription
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
TypeDescription
String

The routerUri.

getRouterUriBytes()

public ByteString getRouterUriBytes()

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

string router_uri = 12;

Returns
TypeDescription
ByteString

The bytes for routerUri.

getType()

public NatInfo.Type getType()

Type of NAT.

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

Returns
TypeDescription
NatInfo.Type

The type.

getTypeValue()

public int getTypeValue()

Type of NAT.

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

Returns
TypeDescription
int

The enum numeric value on the wire for type.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(NatInfo other)

public NatInfo.Builder mergeFrom(NatInfo other)
Parameter
NameDescription
otherNatInfo
Returns
TypeDescription
NatInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NatInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NatInfo.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public NatInfo.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
NatInfo.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NatInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NatInfo.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public NatInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The natGatewayName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for natGatewayName to set.

Returns
TypeDescription
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
NameDescription
valueString

The networkUri to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for networkUri to set.

Returns
TypeDescription
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
NameDescription
valueString

The newDestinationIp to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for newDestinationIp to set.

Returns
TypeDescription
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
NameDescription
valueint

The newDestinationPort to set.

Returns
TypeDescription
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
NameDescription
valueString

The newSourceIp to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for newSourceIp to set.

Returns
TypeDescription
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
NameDescription
valueint

The newSourcePort to set.

Returns
TypeDescription
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
NameDescription
valueString

The oldDestinationIp to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for oldDestinationIp to set.

Returns
TypeDescription
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
NameDescription
valueint

The oldDestinationPort to set.

Returns
TypeDescription
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
NameDescription
valueString

The oldSourceIp to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for oldSourceIp to set.

Returns
TypeDescription
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
NameDescription
valueint

The oldSourcePort to set.

Returns
TypeDescription
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
NameDescription
valueString

The protocol to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for protocol to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The routerUri to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for routerUri to set.

Returns
TypeDescription
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
NameDescription
valueNatInfo.Type

The type to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
NatInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final NatInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NatInfo.Builder
Overrides