Class IPMatcher.IPRangeMatcher.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<IPMatcher.IPRangeMatcher.Builder>
com.github.xds.type.matcher.v3.IPMatcher.IPRangeMatcher.Builder
All Implemented Interfaces:
IPMatcher.IPRangeMatcherOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
IPMatcher.IPRangeMatcher

public static final class IPMatcher.IPRangeMatcher.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<IPMatcher.IPRangeMatcher.Builder> implements IPMatcher.IPRangeMatcherOrBuilder
 Specifies a list of IP address ranges and a match action.
 
Protobuf type xds.type.matcher.v3.IPMatcher.IPRangeMatcher
  • Method Details

    • 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<IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • getDefaultInstanceForType

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

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

      public IPMatcher.IPRangeMatcher buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<IPMatcher.IPRangeMatcher.Builder>
    • setField

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • clearField

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • clearOneof

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • setRepeatedField

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • addRepeatedField

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • mergeFrom

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • mergeFrom

    • isInitialized

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

      public IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
      Throws:
      IOException
    • getRangesList

      public List<CidrRange> getRangesList()
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
      Specified by:
      getRangesList in interface IPMatcher.IPRangeMatcherOrBuilder
    • getRangesCount

      public int getRangesCount()
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
      Specified by:
      getRangesCount in interface IPMatcher.IPRangeMatcherOrBuilder
    • getRanges

      public CidrRange getRanges(int index)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
      Specified by:
      getRanges in interface IPMatcher.IPRangeMatcherOrBuilder
    • setRanges

      public IPMatcher.IPRangeMatcher.Builder setRanges(int index, CidrRange value)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • setRanges

      public IPMatcher.IPRangeMatcher.Builder setRanges(int index, CidrRange.Builder builderForValue)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • addRanges

      public IPMatcher.IPRangeMatcher.Builder addRanges(CidrRange value)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • addRanges

      public IPMatcher.IPRangeMatcher.Builder addRanges(int index, CidrRange value)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • addRanges

      public IPMatcher.IPRangeMatcher.Builder addRanges(CidrRange.Builder builderForValue)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • addRanges

      public IPMatcher.IPRangeMatcher.Builder addRanges(int index, CidrRange.Builder builderForValue)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • addAllRanges

      public IPMatcher.IPRangeMatcher.Builder addAllRanges(Iterable<? extends CidrRange> values)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • clearRanges

      public IPMatcher.IPRangeMatcher.Builder clearRanges()
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • removeRanges

      public IPMatcher.IPRangeMatcher.Builder removeRanges(int index)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • getRangesBuilder

      public CidrRange.Builder getRangesBuilder(int index)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • getRangesOrBuilder

      public CidrRangeOrBuilder getRangesOrBuilder(int index)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
      Specified by:
      getRangesOrBuilder in interface IPMatcher.IPRangeMatcherOrBuilder
    • getRangesOrBuilderList

      public List<? extends CidrRangeOrBuilder> getRangesOrBuilderList()
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
      Specified by:
      getRangesOrBuilderList in interface IPMatcher.IPRangeMatcherOrBuilder
    • addRangesBuilder

      public CidrRange.Builder addRangesBuilder()
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • addRangesBuilder

      public CidrRange.Builder addRangesBuilder(int index)
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • getRangesBuilderList

      public List<CidrRange.Builder> getRangesBuilderList()
       A non-empty set of CIDR ranges.
       
      repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }
    • hasOnMatch

      public boolean hasOnMatch()
       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
      Specified by:
      hasOnMatch in interface IPMatcher.IPRangeMatcherOrBuilder
      Returns:
      Whether the onMatch field is set.
    • getOnMatch

      public Matcher.OnMatch getOnMatch()
       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
      Specified by:
      getOnMatch in interface IPMatcher.IPRangeMatcherOrBuilder
      Returns:
      The onMatch.
    • setOnMatch

       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • setOnMatch

      public IPMatcher.IPRangeMatcher.Builder setOnMatch(Matcher.OnMatch.Builder builderForValue)
       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • mergeOnMatch

       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • clearOnMatch

      public IPMatcher.IPRangeMatcher.Builder clearOnMatch()
       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • getOnMatchBuilder

      public Matcher.OnMatch.Builder getOnMatchBuilder()
       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • getOnMatchOrBuilder

      public Matcher.OnMatchOrBuilder getOnMatchOrBuilder()
       Match action to apply when the IP address is within one of the CIDR ranges.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
      Specified by:
      getOnMatchOrBuilder in interface IPMatcher.IPRangeMatcherOrBuilder
    • getExclusive

      public boolean getExclusive()
       Indicates whether this match option should be considered if there is a
       more specific matcher. Exclusive matchers are not selected whenever a
       more specific matcher exists (e.g. matcher with a longer prefix) even
       when the more specific matcher fails its nested match condition.
       Non-exclusive matchers are considered if the more specific matcher
       exists but its nested match condition does not entirely match.
       Non-exclusive matchers are selected in the order of their specificity
       first (longest prefix first), then the order of declaration next.
      
       For example, consider two range matchers: an exclusive matcher *X* on
       ``0.0.0.0/0`` and a matcher *Y* on ``192.0.0.0/2`` with a nested match
       condition *Z*. For the input IP ``192.168.0.1`` matcher *Y* is the most
       specific. If its nested match condition *Z* does not accept the input,
       then the less specific matcher *X* does not apply either despite the
       input being within the range, because matcher *X* is exclusive.
      
       The opposite is true if matcher *X* is not marked as exclusive. In that
       case matcher *X* always matches whenever matcher "*Y* rejects the input.
       
      bool exclusive = 3;
      Specified by:
      getExclusive in interface IPMatcher.IPRangeMatcherOrBuilder
      Returns:
      The exclusive.
    • setExclusive

      public IPMatcher.IPRangeMatcher.Builder setExclusive(boolean value)
       Indicates whether this match option should be considered if there is a
       more specific matcher. Exclusive matchers are not selected whenever a
       more specific matcher exists (e.g. matcher with a longer prefix) even
       when the more specific matcher fails its nested match condition.
       Non-exclusive matchers are considered if the more specific matcher
       exists but its nested match condition does not entirely match.
       Non-exclusive matchers are selected in the order of their specificity
       first (longest prefix first), then the order of declaration next.
      
       For example, consider two range matchers: an exclusive matcher *X* on
       ``0.0.0.0/0`` and a matcher *Y* on ``192.0.0.0/2`` with a nested match
       condition *Z*. For the input IP ``192.168.0.1`` matcher *Y* is the most
       specific. If its nested match condition *Z* does not accept the input,
       then the less specific matcher *X* does not apply either despite the
       input being within the range, because matcher *X* is exclusive.
      
       The opposite is true if matcher *X* is not marked as exclusive. In that
       case matcher *X* always matches whenever matcher "*Y* rejects the input.
       
      bool exclusive = 3;
      Parameters:
      value - The exclusive to set.
      Returns:
      This builder for chaining.
    • clearExclusive

      public IPMatcher.IPRangeMatcher.Builder clearExclusive()
       Indicates whether this match option should be considered if there is a
       more specific matcher. Exclusive matchers are not selected whenever a
       more specific matcher exists (e.g. matcher with a longer prefix) even
       when the more specific matcher fails its nested match condition.
       Non-exclusive matchers are considered if the more specific matcher
       exists but its nested match condition does not entirely match.
       Non-exclusive matchers are selected in the order of their specificity
       first (longest prefix first), then the order of declaration next.
      
       For example, consider two range matchers: an exclusive matcher *X* on
       ``0.0.0.0/0`` and a matcher *Y* on ``192.0.0.0/2`` with a nested match
       condition *Z*. For the input IP ``192.168.0.1`` matcher *Y* is the most
       specific. If its nested match condition *Z* does not accept the input,
       then the less specific matcher *X* does not apply either despite the
       input being within the range, because matcher *X* is exclusive.
      
       The opposite is true if matcher *X* is not marked as exclusive. In that
       case matcher *X* always matches whenever matcher "*Y* rejects the input.
       
      bool exclusive = 3;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>
    • mergeUnknownFields

      public final IPMatcher.IPRangeMatcher.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<IPMatcher.IPRangeMatcher.Builder>