Package build.buf.validate
Interface ViolationOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Violation,Violation.Builder
public interface ViolationOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetConstraintId()`constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.com.google.protobuf.ByteStringgetConstraintIdBytes()`constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.java.lang.StringgetFieldPath()`field_path` is a machine-readable identifier that points to the specific field that failed the validation.com.google.protobuf.ByteStringgetFieldPathBytes()`field_path` is a machine-readable identifier that points to the specific field that failed the validation.booleangetForKey()`for_key` indicates whether the violation was caused by a map key, rather than a value.java.lang.StringgetMessage()`message` is a human-readable error message that describes the nature of the violation.com.google.protobuf.ByteStringgetMessageBytes()`message` is a human-readable error message that describes the nature of the violation.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getFieldPath
java.lang.String getFieldPath()
`field_path` is a machine-readable identifier that points to the specific field that failed the validation. This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
string field_path = 1;- Returns:
- The fieldPath.
-
getFieldPathBytes
com.google.protobuf.ByteString getFieldPathBytes()
`field_path` is a machine-readable identifier that points to the specific field that failed the validation. This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
string field_path = 1;- Returns:
- The bytes for fieldPath.
-
getConstraintId
java.lang.String getConstraintId()
`constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
string constraint_id = 2;- Returns:
- The constraintId.
-
getConstraintIdBytes
com.google.protobuf.ByteString getConstraintIdBytes()
`constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
string constraint_id = 2;- Returns:
- The bytes for constraintId.
-
getMessage
java.lang.String getMessage()
`message` is a human-readable error message that describes the nature of the violation. This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
string message = 3;- Returns:
- The message.
-
getMessageBytes
com.google.protobuf.ByteString getMessageBytes()
`message` is a human-readable error message that describes the nature of the violation. This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
string message = 3;- Returns:
- The bytes for message.
-
getForKey
boolean getForKey()
`for_key` indicates whether the violation was caused by a map key, rather than a value.
bool for_key = 4;- Returns:
- The forKey.
-
-