Class RouterNatRule (1.26.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
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

MATCH_FIELD_NUMBER

public static final int MATCH_FIELD_NUMBER
Field Value
TypeDescription
int

RULE_NUMBER_FIELD_NUMBER

public static final int RULE_NUMBER_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RouterNatRule getDefaultInstance()
Returns
TypeDescription
RouterNatRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static RouterNatRule.Builder newBuilder()
Returns
TypeDescription
RouterNatRule.Builder

newBuilder(RouterNatRule prototype)

public static RouterNatRule.Builder newBuilder(RouterNatRule prototype)
Parameter
NameDescription
prototypeRouterNatRule
Returns
TypeDescription
RouterNatRule.Builder

parseDelimitedFrom(InputStream input)

public static RouterNatRule parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static RouterNatRule parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RouterNatRule parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RouterNatRule parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static RouterNatRule parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static RouterNatRule parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RouterNatRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouterNatRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<RouterNatRule> parser()
Returns
TypeDescription
Parser<RouterNatRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
RouterNatRuleActionOrBuilder

getDefaultInstanceForType()

public RouterNatRule getDefaultInstanceForType()
Returns
TypeDescription
RouterNatRule

getDescription()

public String getDescription()

An optional description of this rule.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this rule.

optional string description = 422937596;

Returns
TypeDescription
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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"

optional string match = 103668165;

Returns
TypeDescription
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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"

optional string match = 103668165;

Returns
TypeDescription
ByteString

The bytes for match.

getParserForType()

public Parser<RouterNatRule> getParserForType()
Returns
TypeDescription
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
TypeDescription
int

The ruleNumber.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
TypeDescription
boolean

Whether the action field is set.

hasDescription()

public boolean hasDescription()

An optional description of this rule.

optional string description = 422937596;

Returns
TypeDescription
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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"

optional string match = 103668165;

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

Whether the ruleNumber field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public RouterNatRule.Builder newBuilderForType()
Returns
TypeDescription
RouterNatRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RouterNatRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
RouterNatRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public RouterNatRule.Builder toBuilder()
Returns
TypeDescription
RouterNatRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException