Package com.github.xds.type.matcher.v3
Class IPMatcher.IPRangeMatcher
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.github.xds.type.matcher.v3.IPMatcher.IPRangeMatcher
-
- All Implemented Interfaces:
IPMatcher.IPRangeMatcherOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
- Enclosing class:
- IPMatcher
public static final class IPMatcher.IPRangeMatcher extends com.google.protobuf.GeneratedMessageV3 implements IPMatcher.IPRangeMatcherOrBuilder
Specifies a list of IP address ranges and a match action.
Protobuf typexds.type.matcher.v3.IPMatcher.IPRangeMatcher- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIPMatcher.IPRangeMatcher.BuilderSpecifies a list of IP address ranges and a match action.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intEXCLUSIVE_FIELD_NUMBERstatic intON_MATCH_FIELD_NUMBERstatic intRANGES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static IPMatcher.IPRangeMatchergetDefaultInstance()IPMatcher.IPRangeMatchergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()booleangetExclusive()Indicates whether this match option should be considered if there is a more specific matcher.Matcher.OnMatchgetOnMatch()Match action to apply when the IP address is within one of the CIDR ranges.Matcher.OnMatchOrBuildergetOnMatchOrBuilder()Match action to apply when the IP address is within one of the CIDR ranges.com.google.protobuf.Parser<IPMatcher.IPRangeMatcher>getParserForType()CidrRangegetRanges(int index)A non-empty set of CIDR ranges.intgetRangesCount()A non-empty set of CIDR ranges.List<CidrRange>getRangesList()A non-empty set of CIDR ranges.CidrRangeOrBuildergetRangesOrBuilder(int index)A non-empty set of CIDR ranges.List<? extends CidrRangeOrBuilder>getRangesOrBuilderList()A non-empty set of CIDR ranges.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasOnMatch()Match action to apply when the IP address is within one of the CIDR ranges.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static IPMatcher.IPRangeMatcher.BuildernewBuilder()static IPMatcher.IPRangeMatcher.BuildernewBuilder(IPMatcher.IPRangeMatcher prototype)IPMatcher.IPRangeMatcher.BuildernewBuilderForType()protected IPMatcher.IPRangeMatcher.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static IPMatcher.IPRangeMatcherparseDelimitedFrom(InputStream input)static IPMatcher.IPRangeMatcherparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static IPMatcher.IPRangeMatcherparseFrom(byte[] data)static IPMatcher.IPRangeMatcherparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static IPMatcher.IPRangeMatcherparseFrom(com.google.protobuf.ByteString data)static IPMatcher.IPRangeMatcherparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static IPMatcher.IPRangeMatcherparseFrom(com.google.protobuf.CodedInputStream input)static IPMatcher.IPRangeMatcherparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static IPMatcher.IPRangeMatcherparseFrom(InputStream input)static IPMatcher.IPRangeMatcherparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static IPMatcher.IPRangeMatcherparseFrom(ByteBuffer data)static IPMatcher.IPRangeMatcherparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<IPMatcher.IPRangeMatcher>parser()IPMatcher.IPRangeMatcher.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
RANGES_FIELD_NUMBER
public static final int RANGES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ON_MATCH_FIELD_NUMBER
public static final int ON_MATCH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXCLUSIVE_FIELD_NUMBER
public static final int EXCLUSIVE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getRangesList
public List<CidrRange> getRangesList()
A non-empty set of CIDR ranges.
repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }- Specified by:
getRangesListin interfaceIPMatcher.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:
getRangesOrBuilderListin interfaceIPMatcher.IPRangeMatcherOrBuilder
-
getRangesCount
public int getRangesCount()
A non-empty set of CIDR ranges.
repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }- Specified by:
getRangesCountin interfaceIPMatcher.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:
getRangesin interfaceIPMatcher.IPRangeMatcherOrBuilder
-
getRangesOrBuilder
public CidrRangeOrBuilder getRangesOrBuilder(int index)
A non-empty set of CIDR ranges.
repeated .xds.core.v3.CidrRange ranges = 1 [(.validate.rules) = { ... }- Specified by:
getRangesOrBuilderin interfaceIPMatcher.IPRangeMatcherOrBuilder
-
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:
hasOnMatchin interfaceIPMatcher.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:
getOnMatchin interfaceIPMatcher.IPRangeMatcherOrBuilder- Returns:
- The onMatch.
-
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:
getOnMatchOrBuilderin interfaceIPMatcher.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:
getExclusivein interfaceIPMatcher.IPRangeMatcherOrBuilder- Returns:
- The exclusive.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static IPMatcher.IPRangeMatcher parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static IPMatcher.IPRangeMatcher parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static IPMatcher.IPRangeMatcher parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public IPMatcher.IPRangeMatcher.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static IPMatcher.IPRangeMatcher.Builder newBuilder()
-
newBuilder
public static IPMatcher.IPRangeMatcher.Builder newBuilder(IPMatcher.IPRangeMatcher prototype)
-
toBuilder
public IPMatcher.IPRangeMatcher.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected IPMatcher.IPRangeMatcher.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static IPMatcher.IPRangeMatcher getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<IPMatcher.IPRangeMatcher> parser()
-
getParserForType
public com.google.protobuf.Parser<IPMatcher.IPRangeMatcher> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public IPMatcher.IPRangeMatcher getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-