Class RouterNatRule (1.53.0)

public final class RouterNatRule extends GeneratedMessageV3 implements RouterNatRuleOrBuilder

Protobuf type google.cloud.compute.v1.RouterNatRule

Static Fields

ACTION_FIELD_NUMBER

public static final int ACTION_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

MATCH_FIELD_NUMBER

public static final int MATCH_FIELD_NUMBER
Field Value
Type Description
int

RULE_NUMBER_FIELD_NUMBER

public static final int RULE_NUMBER_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static RouterNatRule getDefaultInstance()
Returns
Type Description
RouterNatRule

getDescriptor()

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

newBuilder()

public static RouterNatRule.Builder newBuilder()
Returns
Type Description
RouterNatRule.Builder

newBuilder(RouterNatRule prototype)

public static RouterNatRule.Builder newBuilder(RouterNatRule prototype)
Parameter
Name Description
prototype RouterNatRule
Returns
Type Description
RouterNatRule.Builder

parseDelimitedFrom(InputStream input)

public static RouterNatRule parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
RouterNatRule
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RouterNatRule
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static RouterNatRule parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
RouterNatRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RouterNatRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RouterNatRule parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
RouterNatRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RouterNatRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RouterNatRule parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
RouterNatRule
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RouterNatRule
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static RouterNatRule parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
RouterNatRule
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RouterNatRule
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static RouterNatRule parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
RouterNatRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RouterNatRule
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<RouterNatRule> parser()
Returns
Type Description
Parser<RouterNatRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAction()

public RouterNatRuleAction getAction()

The action to be enforced for traffic that matches this rule.

optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;

Returns
Type Description
RouterNatRuleAction

The action.

getActionOrBuilder()

public RouterNatRuleActionOrBuilder getActionOrBuilder()

The action to be enforced for traffic that matches this rule.

optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;

Returns
Type Description
RouterNatRuleActionOrBuilder

getDefaultInstanceForType()

public RouterNatRule getDefaultInstanceForType()
Returns
Type Description
RouterNatRule

getDescription()

public String getDescription()

An optional description of this rule.

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this rule.

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getMatch()

public String getMatch()

CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding action is enforced. The following examples are valid match expressions for public NAT: "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')" "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'" The following example is a valid match expression for private NAT: "nexthop.hub == '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'"

optional string match = 103668165;

Returns
Type Description
String

The match.

getMatchBytes()

public ByteString getMatchBytes()

CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding action is enforced. The following examples are valid match expressions for public NAT: "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')" "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'" The following example is a valid match expression for private NAT: "nexthop.hub == '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'"

optional string match = 103668165;

Returns
Type Description
ByteString

The bytes for match.

getParserForType()

public Parser<RouterNatRule> getParserForType()
Returns
Type Description
Parser<RouterNatRule>
Overrides

getRuleNumber()

public int getRuleNumber()

An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.

optional uint32 rule_number = 535211500;

Returns
Type Description
int

The ruleNumber.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasAction()

public boolean hasAction()

The action to be enforced for traffic that matches this rule.

optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;

Returns
Type Description
boolean

Whether the action field is set.

hasDescription()

public boolean hasDescription()

An optional description of this rule.

optional string description = 422937596;

Returns
Type Description
boolean

Whether the description field is set.

hasMatch()

public boolean hasMatch()

CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding action is enforced. The following examples are valid match expressions for public NAT: "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')" "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'" The following example is a valid match expression for private NAT: "nexthop.hub == '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'"

optional string match = 103668165;

Returns
Type Description
boolean

Whether the match field is set.

hasRuleNumber()

public boolean hasRuleNumber()

An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.

optional uint32 rule_number = 535211500;

Returns
Type Description
boolean

Whether the ruleNumber field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public RouterNatRule.Builder newBuilderForType()
Returns
Type Description
RouterNatRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RouterNatRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
RouterNatRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public RouterNatRule.Builder toBuilder()
Returns
Type Description
RouterNatRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException