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
Modifier and TypeMethodDescription`constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.com.google.protobuf.ByteString`constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.`field_path` is a machine-readable identifier that points to the specific field that failed the validation.com.google.protobuf.ByteString`field_path` is a machine-readable identifier that points to the specific field that failed the validation.boolean`for_key` indicates whether the violation was caused by a map key, rather than a value.`message` is a human-readable error message that describes the nature of the violation.com.google.protobuf.ByteString`message` is a human-readable error message that describes the nature of the violation.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
-
getFieldPath
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 [json_name = "fieldPath"];- 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 [json_name = "fieldPath"];- Returns:
- The bytes for fieldPath.
-
getConstraintId
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 [json_name = "constraintId"];- 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 [json_name = "constraintId"];- Returns:
- The bytes for constraintId.
-
getMessage
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 [json_name = "message"];- 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 [json_name = "message"];- 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 [json_name = "forKey"];- Returns:
- The forKey.
-