Package build.buf.validate
Class BytesRules
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessage
-
- build.buf.validate.BytesRules
-
- All Implemented Interfaces:
BytesRulesOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable
public final class BytesRules extends com.google.protobuf.GeneratedMessage implements BytesRulesOrBuilder
BytesRules describe the constraints applied to `bytes` values. These rules may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
Protobuf typebuf.validate.BytesRules- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBytesRules.BuilderBytesRules describe the constraints applied to `bytes` values.static classBytesRules.WellKnownCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends java.lang.Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intCONST_FIELD_NUMBERstatic intCONTAINS_FIELD_NUMBERstatic intIN_FIELD_NUMBERstatic intIP_FIELD_NUMBERstatic intIPV4_FIELD_NUMBERstatic intIPV6_FIELD_NUMBERstatic intLEN_FIELD_NUMBERstatic intMAX_LEN_FIELD_NUMBERstatic intMIN_LEN_FIELD_NUMBERstatic intNOT_IN_FIELD_NUMBERstatic intPATTERN_FIELD_NUMBERstatic intPREFIX_FIELD_NUMBERstatic intSUFFIX_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)com.google.protobuf.ByteStringgetConst()`const` requires the field value to exactly match the specified bytes value.com.google.protobuf.ByteStringgetContains()`contains` requires the field value to have the specified bytes anywhere in the string.static BytesRulesgetDefaultInstance()BytesRulesgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.ByteStringgetIn(int index)`in` requires the field value to be equal to one of the specified values.intgetInCount()`in` requires the field value to be equal to one of the specified values.java.util.List<com.google.protobuf.ByteString>getInList()`in` requires the field value to be equal to one of the specified values.booleangetIp()`ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.booleangetIpv4()`ipv4` ensures that the field `value` is a valid IPv4 address in byte format.booleangetIpv6()`ipv6` ensures that the field `value` is a valid IPv6 address in byte format.longgetLen()`len` requires the field value to have the specified length in bytes.longgetMaxLen()`max_len` requires the field value to have at most the specified maximum length in bytes.longgetMinLen()`min_len` requires the field value to have at least the specified minimum length in bytes.com.google.protobuf.ByteStringgetNotIn(int index)`not_in` requires the field value to be not equal to any of the specified values.intgetNotInCount()`not_in` requires the field value to be not equal to any of the specified values.java.util.List<com.google.protobuf.ByteString>getNotInList()`not_in` requires the field value to be not equal to any of the specified values.com.google.protobuf.Parser<BytesRules>getParserForType()java.lang.StringgetPattern()`pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).com.google.protobuf.ByteStringgetPatternBytes()`pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).com.google.protobuf.ByteStringgetPrefix()`prefix` requires the field value to have the specified bytes at the beginning of the string.intgetSerializedSize()com.google.protobuf.ByteStringgetSuffix()`suffix` requires the field value to have the specified bytes at the end of the string.BytesRules.WellKnownCasegetWellKnownCase()booleanhasConst()`const` requires the field value to exactly match the specified bytes value.booleanhasContains()`contains` requires the field value to have the specified bytes anywhere in the string.inthashCode()booleanhasIp()`ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.booleanhasIpv4()`ipv4` ensures that the field `value` is a valid IPv4 address in byte format.booleanhasIpv6()`ipv6` ensures that the field `value` is a valid IPv6 address in byte format.booleanhasLen()`len` requires the field value to have the specified length in bytes.booleanhasMaxLen()`max_len` requires the field value to have at most the specified maximum length in bytes.booleanhasMinLen()`min_len` requires the field value to have at least the specified minimum length in bytes.booleanhasPattern()`pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).booleanhasPrefix()`prefix` requires the field value to have the specified bytes at the beginning of the string.booleanhasSuffix()`suffix` requires the field value to have the specified bytes at the end of the string.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static BytesRules.BuildernewBuilder()static BytesRules.BuildernewBuilder(BytesRules prototype)BytesRules.BuildernewBuilderForType()protected BytesRules.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)static BytesRulesparseDelimitedFrom(java.io.InputStream input)static BytesRulesparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static BytesRulesparseFrom(byte[] data)static BytesRulesparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static BytesRulesparseFrom(com.google.protobuf.ByteString data)static BytesRulesparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static BytesRulesparseFrom(com.google.protobuf.CodedInputStream input)static BytesRulesparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static BytesRulesparseFrom(java.io.InputStream input)static BytesRulesparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static BytesRulesparseFrom(java.nio.ByteBuffer data)static BytesRulesparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<BytesRules>parser()BytesRules.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, 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, hashFields, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CONST_FIELD_NUMBER
public static final int CONST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LEN_FIELD_NUMBER
public static final int LEN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MIN_LEN_FIELD_NUMBER
public static final int MIN_LEN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MAX_LEN_FIELD_NUMBER
public static final int MAX_LEN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PATTERN_FIELD_NUMBER
public static final int PATTERN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PREFIX_FIELD_NUMBER
public static final int PREFIX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SUFFIX_FIELD_NUMBER
public static final int SUFFIX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONTAINS_FIELD_NUMBER
public static final int CONTAINS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IN_FIELD_NUMBER
public static final int IN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NOT_IN_FIELD_NUMBER
public static final int NOT_IN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IP_FIELD_NUMBER
public static final int IP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IPV4_FIELD_NUMBER
public static final int IPV4_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IPV6_FIELD_NUMBER
public static final int IPV6_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getWellKnownCase
public BytesRules.WellKnownCase getWellKnownCase()
- Specified by:
getWellKnownCasein interfaceBytesRulesOrBuilder
-
hasConst
public boolean hasConst()
`const` requires the field value to exactly match the specified bytes value. If the field value doesn't match, an error message is generated. ```proto message MyBytes { // value must be "\x01\x02\x03\x04" bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; } ```optional bytes const = 1 [(.buf.validate.priv.field) = { ... }- Specified by:
hasConstin interfaceBytesRulesOrBuilder- Returns:
- Whether the const field is set.
-
getConst
public com.google.protobuf.ByteString getConst()
`const` requires the field value to exactly match the specified bytes value. If the field value doesn't match, an error message is generated. ```proto message MyBytes { // value must be "\x01\x02\x03\x04" bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; } ```optional bytes const = 1 [(.buf.validate.priv.field) = { ... }- Specified by:
getConstin interfaceBytesRulesOrBuilder- Returns:
- The const.
-
hasLen
public boolean hasLen()
`len` requires the field value to have the specified length in bytes. If the field value doesn't match, an error message is generated. ```proto message MyBytes { // value length must be 4 bytes. optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; } ```optional uint64 len = 13 [(.buf.validate.priv.field) = { ... }- Specified by:
hasLenin interfaceBytesRulesOrBuilder- Returns:
- Whether the len field is set.
-
getLen
public long getLen()
`len` requires the field value to have the specified length in bytes. If the field value doesn't match, an error message is generated. ```proto message MyBytes { // value length must be 4 bytes. optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; } ```optional uint64 len = 13 [(.buf.validate.priv.field) = { ... }- Specified by:
getLenin interfaceBytesRulesOrBuilder- Returns:
- The len.
-
hasMinLen
public boolean hasMinLen()
`min_len` requires the field value to have at least the specified minimum length in bytes. If the field value doesn't meet the requirement, an error message is generated. ```proto message MyBytes { // value length must be at least 2 bytes. optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; } ```optional uint64 min_len = 2 [(.buf.validate.priv.field) = { ... }- Specified by:
hasMinLenin interfaceBytesRulesOrBuilder- Returns:
- Whether the minLen field is set.
-
getMinLen
public long getMinLen()
`min_len` requires the field value to have at least the specified minimum length in bytes. If the field value doesn't meet the requirement, an error message is generated. ```proto message MyBytes { // value length must be at least 2 bytes. optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; } ```optional uint64 min_len = 2 [(.buf.validate.priv.field) = { ... }- Specified by:
getMinLenin interfaceBytesRulesOrBuilder- Returns:
- The minLen.
-
hasMaxLen
public boolean hasMaxLen()
`max_len` requires the field value to have at most the specified maximum length in bytes. If the field value exceeds the requirement, an error message is generated. ```proto message MyBytes { // value must be at most 6 bytes. optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; } ```optional uint64 max_len = 3 [(.buf.validate.priv.field) = { ... }- Specified by:
hasMaxLenin interfaceBytesRulesOrBuilder- Returns:
- Whether the maxLen field is set.
-
getMaxLen
public long getMaxLen()
`max_len` requires the field value to have at most the specified maximum length in bytes. If the field value exceeds the requirement, an error message is generated. ```proto message MyBytes { // value must be at most 6 bytes. optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; } ```optional uint64 max_len = 3 [(.buf.validate.priv.field) = { ... }- Specified by:
getMaxLenin interfaceBytesRulesOrBuilder- Returns:
- The maxLen.
-
hasPattern
public boolean hasPattern()
`pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). The value of the field must be valid UTF-8 or validation will fail with a runtime error. If the field value doesn't match the pattern, an error message is generated. ```proto message MyBytes { // value must match regex pattern "^[a-zA-Z0-9]+$". optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; } ```optional string pattern = 4 [(.buf.validate.priv.field) = { ... }- Specified by:
hasPatternin interfaceBytesRulesOrBuilder- Returns:
- Whether the pattern field is set.
-
getPattern
public java.lang.String getPattern()
`pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). The value of the field must be valid UTF-8 or validation will fail with a runtime error. If the field value doesn't match the pattern, an error message is generated. ```proto message MyBytes { // value must match regex pattern "^[a-zA-Z0-9]+$". optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; } ```optional string pattern = 4 [(.buf.validate.priv.field) = { ... }- Specified by:
getPatternin interfaceBytesRulesOrBuilder- Returns:
- The pattern.
-
getPatternBytes
public com.google.protobuf.ByteString getPatternBytes()
`pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). The value of the field must be valid UTF-8 or validation will fail with a runtime error. If the field value doesn't match the pattern, an error message is generated. ```proto message MyBytes { // value must match regex pattern "^[a-zA-Z0-9]+$". optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; } ```optional string pattern = 4 [(.buf.validate.priv.field) = { ... }- Specified by:
getPatternBytesin interfaceBytesRulesOrBuilder- Returns:
- The bytes for pattern.
-
hasPrefix
public boolean hasPrefix()
`prefix` requires the field value to have the specified bytes at the beginning of the string. If the field value doesn't meet the requirement, an error message is generated. ```proto message MyBytes { // value does not have prefix \x01\x02 optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; } ```optional bytes prefix = 5 [(.buf.validate.priv.field) = { ... }- Specified by:
hasPrefixin interfaceBytesRulesOrBuilder- Returns:
- Whether the prefix field is set.
-
getPrefix
public com.google.protobuf.ByteString getPrefix()
`prefix` requires the field value to have the specified bytes at the beginning of the string. If the field value doesn't meet the requirement, an error message is generated. ```proto message MyBytes { // value does not have prefix \x01\x02 optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; } ```optional bytes prefix = 5 [(.buf.validate.priv.field) = { ... }- Specified by:
getPrefixin interfaceBytesRulesOrBuilder- Returns:
- The prefix.
-
hasSuffix
public boolean hasSuffix()
`suffix` requires the field value to have the specified bytes at the end of the string. If the field value doesn't meet the requirement, an error message is generated. ```proto message MyBytes { // value does not have suffix \x03\x04 optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; } ```optional bytes suffix = 6 [(.buf.validate.priv.field) = { ... }- Specified by:
hasSuffixin interfaceBytesRulesOrBuilder- Returns:
- Whether the suffix field is set.
-
getSuffix
public com.google.protobuf.ByteString getSuffix()
`suffix` requires the field value to have the specified bytes at the end of the string. If the field value doesn't meet the requirement, an error message is generated. ```proto message MyBytes { // value does not have suffix \x03\x04 optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; } ```optional bytes suffix = 6 [(.buf.validate.priv.field) = { ... }- Specified by:
getSuffixin interfaceBytesRulesOrBuilder- Returns:
- The suffix.
-
hasContains
public boolean hasContains()
`contains` requires the field value to have the specified bytes anywhere in the string. If the field value doesn't meet the requirement, an error message is generated. ```protobuf message MyBytes { // value does not contain \x02\x03 optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; } ```optional bytes contains = 7 [(.buf.validate.priv.field) = { ... }- Specified by:
hasContainsin interfaceBytesRulesOrBuilder- Returns:
- Whether the contains field is set.
-
getContains
public com.google.protobuf.ByteString getContains()
`contains` requires the field value to have the specified bytes anywhere in the string. If the field value doesn't meet the requirement, an error message is generated. ```protobuf message MyBytes { // value does not contain \x02\x03 optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; } ```optional bytes contains = 7 [(.buf.validate.priv.field) = { ... }- Specified by:
getContainsin interfaceBytesRulesOrBuilder- Returns:
- The contains.
-
getInList
public java.util.List<com.google.protobuf.ByteString> getInList()
`in` requires the field value to be equal to one of the specified values. If the field value doesn't match any of the specified values, an error message is generated. ```protobuf message MyBytes { // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; } ```repeated bytes in = 8 [(.buf.validate.priv.field) = { ... }- Specified by:
getInListin interfaceBytesRulesOrBuilder- Returns:
- A list containing the in.
-
getInCount
public int getInCount()
`in` requires the field value to be equal to one of the specified values. If the field value doesn't match any of the specified values, an error message is generated. ```protobuf message MyBytes { // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; } ```repeated bytes in = 8 [(.buf.validate.priv.field) = { ... }- Specified by:
getInCountin interfaceBytesRulesOrBuilder- Returns:
- The count of in.
-
getIn
public com.google.protobuf.ByteString getIn(int index)
`in` requires the field value to be equal to one of the specified values. If the field value doesn't match any of the specified values, an error message is generated. ```protobuf message MyBytes { // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; } ```repeated bytes in = 8 [(.buf.validate.priv.field) = { ... }- Specified by:
getInin interfaceBytesRulesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The in at the given index.
-
getNotInList
public java.util.List<com.google.protobuf.ByteString> getNotInList()
`not_in` requires the field value to be not equal to any of the specified values. If the field value matches any of the specified values, an error message is generated. ```proto message MyBytes { // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; } ```repeated bytes not_in = 9 [(.buf.validate.priv.field) = { ... }- Specified by:
getNotInListin interfaceBytesRulesOrBuilder- Returns:
- A list containing the notIn.
-
getNotInCount
public int getNotInCount()
`not_in` requires the field value to be not equal to any of the specified values. If the field value matches any of the specified values, an error message is generated. ```proto message MyBytes { // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; } ```repeated bytes not_in = 9 [(.buf.validate.priv.field) = { ... }- Specified by:
getNotInCountin interfaceBytesRulesOrBuilder- Returns:
- The count of notIn.
-
getNotIn
public com.google.protobuf.ByteString getNotIn(int index)
`not_in` requires the field value to be not equal to any of the specified values. If the field value matches any of the specified values, an error message is generated. ```proto message MyBytes { // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; } ```repeated bytes not_in = 9 [(.buf.validate.priv.field) = { ... }- Specified by:
getNotInin interfaceBytesRulesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The notIn at the given index.
-
hasIp
public boolean hasIp()
`ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. If the field value doesn't meet this constraint, an error message is generated. ```proto message MyBytes { // value must be a valid IP address optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; } ```bool ip = 10 [(.buf.validate.priv.field) = { ... }- Specified by:
hasIpin interfaceBytesRulesOrBuilder- Returns:
- Whether the ip field is set.
-
getIp
public boolean getIp()
`ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. If the field value doesn't meet this constraint, an error message is generated. ```proto message MyBytes { // value must be a valid IP address optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; } ```bool ip = 10 [(.buf.validate.priv.field) = { ... }- Specified by:
getIpin interfaceBytesRulesOrBuilder- Returns:
- The ip.
-
hasIpv4
public boolean hasIpv4()
`ipv4` ensures that the field `value` is a valid IPv4 address in byte format. If the field value doesn't meet this constraint, an error message is generated. ```proto message MyBytes { // value must be a valid IPv4 address optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; } ```bool ipv4 = 11 [(.buf.validate.priv.field) = { ... }- Specified by:
hasIpv4in interfaceBytesRulesOrBuilder- Returns:
- Whether the ipv4 field is set.
-
getIpv4
public boolean getIpv4()
`ipv4` ensures that the field `value` is a valid IPv4 address in byte format. If the field value doesn't meet this constraint, an error message is generated. ```proto message MyBytes { // value must be a valid IPv4 address optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; } ```bool ipv4 = 11 [(.buf.validate.priv.field) = { ... }- Specified by:
getIpv4in interfaceBytesRulesOrBuilder- Returns:
- The ipv4.
-
hasIpv6
public boolean hasIpv6()
`ipv6` ensures that the field `value` is a valid IPv6 address in byte format. If the field value doesn't meet this constraint, an error message is generated. ```proto message MyBytes { // value must be a valid IPv6 address optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; } ```bool ipv6 = 12 [(.buf.validate.priv.field) = { ... }- Specified by:
hasIpv6in interfaceBytesRulesOrBuilder- Returns:
- Whether the ipv6 field is set.
-
getIpv6
public boolean getIpv6()
`ipv6` ensures that the field `value` is a valid IPv6 address in byte format. If the field value doesn't meet this constraint, an error message is generated. ```proto message MyBytes { // value must be a valid IPv6 address optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; } ```bool ipv6 = 12 [(.buf.validate.priv.field) = { ... }- Specified by:
getIpv6in interfaceBytesRulesOrBuilder- Returns:
- The ipv6.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.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 BytesRules parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static BytesRules parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static BytesRules parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static BytesRules parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static BytesRules parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static BytesRules parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static BytesRules parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static BytesRules parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static BytesRules parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static BytesRules parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static BytesRules parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static BytesRules parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public BytesRules.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static BytesRules.Builder newBuilder()
-
newBuilder
public static BytesRules.Builder newBuilder(BytesRules prototype)
-
toBuilder
public BytesRules.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected BytesRules.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
public static BytesRules getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<BytesRules> parser()
-
getParserForType
public com.google.protobuf.Parser<BytesRules> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public BytesRules getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-