Class RouterNatRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RouterNatRule.Builder>
com.google.cloud.compute.v1.RouterNatRule.Builder
All Implemented Interfaces:
RouterNatRuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RouterNatRule

public static final class RouterNatRule.Builder extends com.google.protobuf.GeneratedMessage.Builder<RouterNatRule.Builder> implements RouterNatRuleOrBuilder
 
Protobuf type google.cloud.compute.v1.RouterNatRule
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RouterNatRule.Builder>
    • clear

      public RouterNatRule.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<RouterNatRule.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<RouterNatRule.Builder>
    • getDefaultInstanceForType

      public RouterNatRule getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public RouterNatRule build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RouterNatRule buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public RouterNatRule.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouterNatRule.Builder>
    • mergeFrom

      public RouterNatRule.Builder mergeFrom(RouterNatRule other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<RouterNatRule.Builder>
    • mergeFrom

      public RouterNatRule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouterNatRule.Builder>
      Throws:
      IOException
    • hasAction

      public boolean hasAction()
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
      Specified by:
      hasAction in interface RouterNatRuleOrBuilder
      Returns:
      Whether the action field is set.
    • getAction

      public RouterNatRuleAction getAction()
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
      Specified by:
      getAction in interface RouterNatRuleOrBuilder
      Returns:
      The action.
    • setAction

      public RouterNatRule.Builder setAction(RouterNatRuleAction value)
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
    • setAction

      public RouterNatRule.Builder setAction(RouterNatRuleAction.Builder builderForValue)
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
    • mergeAction

      public RouterNatRule.Builder mergeAction(RouterNatRuleAction value)
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
    • clearAction

      public RouterNatRule.Builder clearAction()
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
    • getActionBuilder

      public RouterNatRuleAction.Builder getActionBuilder()
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
    • getActionOrBuilder

      public RouterNatRuleActionOrBuilder getActionOrBuilder()
       The action to be enforced for traffic that matches this rule.
       
      optional .google.cloud.compute.v1.RouterNatRuleAction action = 187661878;
      Specified by:
      getActionOrBuilder in interface RouterNatRuleOrBuilder
    • hasDescription

      public boolean hasDescription()
       An optional description of this rule.
       
      optional string description = 422937596;
      Specified by:
      hasDescription in interface RouterNatRuleOrBuilder
      Returns:
      Whether the description field is set.
    • getDescription

      public String getDescription()
       An optional description of this rule.
       
      optional string description = 422937596;
      Specified by:
      getDescription in interface RouterNatRuleOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       An optional description of this rule.
       
      optional string description = 422937596;
      Specified by:
      getDescriptionBytes in interface RouterNatRuleOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public RouterNatRule.Builder setDescription(String value)
       An optional description of this rule.
       
      optional string description = 422937596;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public RouterNatRule.Builder clearDescription()
       An optional description of this rule.
       
      optional string description = 422937596;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public RouterNatRule.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       An optional description of this rule.
       
      optional string description = 422937596;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasMatch in interface RouterNatRuleOrBuilder
      Returns:
      Whether the match field is set.
    • 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;
      Specified by:
      getMatch in interface RouterNatRuleOrBuilder
      Returns:
      The match.
    • getMatchBytes

      public com.google.protobuf.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;
      Specified by:
      getMatchBytes in interface RouterNatRuleOrBuilder
      Returns:
      The bytes for match.
    • setMatch

      public RouterNatRule.Builder setMatch(String value)
       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;
      Parameters:
      value - The match to set.
      Returns:
      This builder for chaining.
    • clearMatch

      public RouterNatRule.Builder clearMatch()
       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:
      This builder for chaining.
    • setMatchBytes

      public RouterNatRule.Builder setMatchBytes(com.google.protobuf.ByteString value)
       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;
      Parameters:
      value - The bytes for match to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasRuleNumber in interface RouterNatRuleOrBuilder
      Returns:
      Whether the ruleNumber field is set.
    • 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;
      Specified by:
      getRuleNumber in interface RouterNatRuleOrBuilder
      Returns:
      The ruleNumber.
    • setRuleNumber

      public RouterNatRule.Builder setRuleNumber(int value)
       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;
      Parameters:
      value - The ruleNumber to set.
      Returns:
      This builder for chaining.
    • clearRuleNumber

      public RouterNatRule.Builder clearRuleNumber()
       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:
      This builder for chaining.