Package build.buf.validate
Class AnyRules.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.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,Cloneable
- Enclosing class:
- AnyRules
public static final class AnyRules.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
implements AnyRulesOrBuilder
AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.Protobuf type
buf.validate.AnyRules-
Method Summary
Modifier and TypeMethodDescription`in` requires the field's `type_url` to be equal to one of the specified values.addAllNotIn(Iterable<String> values) requires the field's type_url to be not equal to any of the specified values.`in` requires the field's `type_url` to be equal to one of the specified values.addInBytes(com.google.protobuf.ByteString value) `in` requires the field's `type_url` to be equal to one of the specified values.requires the field's type_url to be not equal to any of the specified values.addNotInBytes(com.google.protobuf.ByteString value) requires the field's type_url to be not equal to any of the specified values.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearIn()`in` requires the field's `type_url` to be equal to one of the specified values.requires the field's type_url to be not equal to any of the specified values.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetIn(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.int`in` requires the field's `type_url` to be equal to one of the specified values.com.google.protobuf.ProtocolStringList`in` requires the field's `type_url` to be equal to one of the specified values.getNotIn(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.intrequires the field's type_url to be not equal to any of the specified values.com.google.protobuf.ProtocolStringListrequires the field's type_url to be not equal to any of the specified values.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) final AnyRules.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) `in` requires the field's `type_url` to be equal to one of the specified values.requires the field's type_url to be not equal to any of the specified values.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final AnyRules.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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.Builder<AnyRules.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<AnyRules.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
setField
public AnyRules.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
setRepeatedField
public AnyRules.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
addRepeatedField
public AnyRules.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnyRules.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
mergeFrom
public AnyRules.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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:
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 [json_name = "in"];- 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 [json_name = "in"];- Specified by:
getInCountin interfaceAnyRulesOrBuilder- Returns:
- The count of in.
-
getIn
`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 [json_name = "in"];- 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 [json_name = "in"];- Specified by:
getInBytesin interfaceAnyRulesOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the in at the given index.
-
setIn
`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 [json_name = "in"];- Parameters:
index- The index to set the value at.value- The in to set.- Returns:
- This builder for chaining.
-
addIn
`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 [json_name = "in"];- Parameters:
value- The in to add.- Returns:
- This builder for chaining.
-
addAllIn
`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 [json_name = "in"];- Parameters:
values- The in to add.- Returns:
- This builder for chaining.
-
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 [json_name = "in"];- Returns:
- This builder for chaining.
-
addInBytes
`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 [json_name = "in"];- 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 [json_name = "notIn"];- 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 [json_name = "notIn"];- Specified by:
getNotInCountin interfaceAnyRulesOrBuilder- Returns:
- The count of notIn.
-
getNotIn
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 [json_name = "notIn"];- 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 [json_name = "notIn"];- Specified by:
getNotInBytesin interfaceAnyRulesOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the notIn at the given index.
-
setNotIn
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 [json_name = "notIn"];- Parameters:
index- The index to set the value at.value- The notIn to set.- Returns:
- This builder for chaining.
-
addNotIn
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 [json_name = "notIn"];- Parameters:
value- The notIn to add.- Returns:
- This builder for chaining.
-
addAllNotIn
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 [json_name = "notIn"];- Parameters:
values- The notIn to add.- Returns:
- This builder for chaining.
-
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 [json_name = "notIn"];- Returns:
- This builder for chaining.
-
addNotInBytes
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 [json_name = "notIn"];- Parameters:
value- The bytes of the notIn to add.- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder>
-