org.phenopackets.schema.v1.core.UpdateValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phenopacket-schema Show documentation
Show all versions of phenopacket-schema Show documentation
A Protobuf schema for capturing clinical phenotypes
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: base.proto
package org.phenopackets.schema.v1.core;
/**
* Validates {@code Update} protobuf objects.
*/
public class UpdateValidator implements io.envoyproxy.pgv.ValidatorImpl{
public static io.envoyproxy.pgv.ValidatorImpl validatorFor(Class clazz) {
if (clazz.equals(org.phenopackets.schema.v1.core.Update.class)) return new UpdateValidator();
return null;
}
public void assertValid(org.phenopackets.schema.v1.core.Update proto, io.envoyproxy.pgv.ValidatorIndex index) throws io.envoyproxy.pgv.ValidationException {
if (proto.hasTimestamp()) {
io.envoyproxy.pgv.RequiredValidation.required(".org.phenopackets.schema.v1.core.Update.timestamp", proto.getTimestamp());
} else {
io.envoyproxy.pgv.RequiredValidation.required(".org.phenopackets.schema.v1.core.Update.timestamp", null);
};
// no validation rules for UpdatedBy
// no validation rules for Comment
}
}