Package build.buf.validate
Interface AnyRulesOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
AnyRules,AnyRules.Builder
public interface AnyRulesOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiongetIn(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.`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.requires the field's type_url to be not equal to any of the specified values.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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"];- Returns:
- A list containing the in.
-
getInCount
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"];- 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"];- Parameters:
index- The index of the element to return.- Returns:
- The in at the given index.
-
getInBytes
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"];- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the in at the given index.
-
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"];- Returns:
- A list containing the notIn.
-
getNotInCount
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"];- 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"];- Parameters:
index- The index of the element to return.- Returns:
- The notIn at the given index.
-
getNotInBytes
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"];- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the notIn at the given index.
-