Package build.buf.validate
Class AnyRules.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<AnyRules.Builder>
-
- build.buf.validate.AnyRules.Builder
-
- All Implemented Interfaces:
AnyRulesOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- AnyRules
public static final class AnyRules.Builder extends com.google.protobuf.GeneratedMessage.Builder<AnyRules.Builder> implements AnyRulesOrBuilder
AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
Protobuf typebuf.validate.AnyRules
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnyRules.BuilderaddAllIn(java.lang.Iterable<java.lang.String> values)`in` requires the field's `type_url` to be equal to one of the specified values.AnyRules.BuilderaddAllNotIn(java.lang.Iterable<java.lang.String> values)requires the field's type_url to be not equal to any of the specified values.AnyRules.BuilderaddIn(java.lang.String value)`in` requires the field's `type_url` to be equal to one of the specified values.AnyRules.BuilderaddInBytes(com.google.protobuf.ByteString value)`in` requires the field's `type_url` to be equal to one of the specified values.AnyRules.BuilderaddNotIn(java.lang.String value)requires the field's type_url to be not equal to any of the specified values.AnyRules.BuilderaddNotInBytes(com.google.protobuf.ByteString value)requires the field's type_url to be not equal to any of the specified values.AnyRulesbuild()AnyRulesbuildPartial()AnyRules.Builderclear()AnyRules.BuilderclearIn()`in` requires the field's `type_url` to be equal to one of the specified values.AnyRules.BuilderclearNotIn()requires the field's type_url to be not equal to any of the specified values.AnyRulesgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()java.lang.StringgetIn(int index)`in` requires the field's `type_url` to be equal to one of the specified values.com.google.protobuf.ByteStringgetInBytes(int index)`in` requires the field's `type_url` to be equal to one of the specified values.intgetInCount()`in` requires the field's `type_url` to be equal to one of the specified values.com.google.protobuf.ProtocolStringListgetInList()`in` requires the field's `type_url` to be equal to one of the specified values.java.lang.StringgetNotIn(int index)requires the field's type_url to be not equal to any of the specified values.com.google.protobuf.ByteStringgetNotInBytes(int index)requires the field's type_url to be not equal to any of the specified values.intgetNotInCount()requires the field's type_url to be not equal to any of the specified values.com.google.protobuf.ProtocolStringListgetNotInList()requires the field's type_url to be not equal to any of the specified values.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()AnyRules.BuildermergeFrom(AnyRules other)AnyRules.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)AnyRules.BuildermergeFrom(com.google.protobuf.Message other)AnyRules.BuildersetIn(int index, java.lang.String value)`in` requires the field's `type_url` to be equal to one of the specified values.AnyRules.BuildersetNotIn(int index, java.lang.String value)requires the field's type_url to be not equal to any of the specified values.-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
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.Builder<AnyRules.Builder>
-
clear
public AnyRules.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<AnyRules.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<AnyRules.Builder>
-
getDefaultInstanceForType
public AnyRules getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public AnyRules build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AnyRules buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
public AnyRules.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnyRules.Builder>
-
mergeFrom
public AnyRules.Builder mergeFrom(AnyRules other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<AnyRules.Builder>
-
mergeFrom
public AnyRules.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnyRules.Builder>- Throws:
java.io.IOException
-
getInList
public com.google.protobuf.ProtocolStringList getInList()
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Specified by:
getInListin interfaceAnyRulesOrBuilder- Returns:
- A list containing the in.
-
getInCount
public int getInCount()
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Specified by:
getInCountin interfaceAnyRulesOrBuilder- Returns:
- The count of in.
-
getIn
public java.lang.String getIn(int index)
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Specified by:
getInin interfaceAnyRulesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The in at the given index.
-
getInBytes
public com.google.protobuf.ByteString getInBytes(int index)
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Specified by:
getInBytesin interfaceAnyRulesOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the in at the given index.
-
setIn
public AnyRules.Builder setIn(int index, java.lang.String value)
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Parameters:
index- The index to set the value at.value- The in to set.- Returns:
- This builder for chaining.
-
addIn
public AnyRules.Builder addIn(java.lang.String value)
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Parameters:
value- The in to add.- Returns:
- This builder for chaining.
-
addAllIn
public AnyRules.Builder addAllIn(java.lang.Iterable<java.lang.String> values)
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Parameters:
values- The in to add.- Returns:
- This builder for chaining.
-
clearIn
public AnyRules.Builder clearIn()
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Returns:
- This builder for chaining.
-
addInBytes
public AnyRules.Builder addInBytes(com.google.protobuf.ByteString value)
`in` requires the field's `type_url` to be equal to one of the specified values. If it doesn't match any of the specified values, an error message is generated. ```proto message MyAny { // The `value` field must have a `type_url` equal to one of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; } ```repeated string in = 2;- Parameters:
value- The bytes of the in to add.- Returns:
- This builder for chaining.
-
getNotInList
public com.google.protobuf.ProtocolStringList getNotInList()
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Specified by:
getNotInListin interfaceAnyRulesOrBuilder- Returns:
- A list containing the notIn.
-
getNotInCount
public int getNotInCount()
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Specified by:
getNotInCountin interfaceAnyRulesOrBuilder- Returns:
- The count of notIn.
-
getNotIn
public java.lang.String getNotIn(int index)
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Specified by:
getNotInin interfaceAnyRulesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The notIn at the given index.
-
getNotInBytes
public com.google.protobuf.ByteString getNotInBytes(int index)
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Specified by:
getNotInBytesin interfaceAnyRulesOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the notIn at the given index.
-
setNotIn
public AnyRules.Builder setNotIn(int index, java.lang.String value)
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Parameters:
index- The index to set the value at.value- The notIn to set.- Returns:
- This builder for chaining.
-
addNotIn
public AnyRules.Builder addNotIn(java.lang.String value)
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Parameters:
value- The notIn to add.- Returns:
- This builder for chaining.
-
addAllNotIn
public AnyRules.Builder addAllNotIn(java.lang.Iterable<java.lang.String> values)
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Parameters:
values- The notIn to add.- Returns:
- This builder for chaining.
-
clearNotIn
public AnyRules.Builder clearNotIn()
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Returns:
- This builder for chaining.
-
addNotInBytes
public AnyRules.Builder addNotInBytes(com.google.protobuf.ByteString value)
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. ```proto message MyAny { // The field `value` must not have a `type_url` equal to any of the specified values. google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; } ```repeated string not_in = 3;- Parameters:
value- The bytes of the notIn to add.- Returns:
- This builder for chaining.
-
-