Class 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.GeneratedMessageV3.Builder<RouterNatRule.Builder>
    implements RouterNatRuleOrBuilder
     
    Protobuf type google.cloud.compute.v1.RouterNatRule
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public RouterNatRule.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>
      • setField

        public RouterNatRule.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>
      • clearField

        public RouterNatRule.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>
      • clearOneof

        public RouterNatRule.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>
      • setRepeatedField

        public RouterNatRule.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      int index,
                                                      Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>
      • addRepeatedField

        public RouterNatRule.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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;
      • 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;
      • 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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/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 == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/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.
      • setUnknownFields

        public final RouterNatRule.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>
      • mergeUnknownFields

        public final RouterNatRule.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouterNatRule.Builder>