org.phenopackets.schema.v1.core.AgeRangeValidator 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 AgeRange} protobuf objects.
*/
public class AgeRangeValidator implements io.envoyproxy.pgv.ValidatorImpl{
public static io.envoyproxy.pgv.ValidatorImpl validatorFor(Class clazz) {
if (clazz.equals(org.phenopackets.schema.v1.core.AgeRange.class)) return new AgeRangeValidator();
return null;
}
public void assertValid(org.phenopackets.schema.v1.core.AgeRange proto, io.envoyproxy.pgv.ValidatorIndex index) throws io.envoyproxy.pgv.ValidationException {
// Validate start
if (proto.hasStart()) index.validatorFor(proto.getStart()).assertValid(proto.getStart());
// Validate end
if (proto.hasEnd()) index.validatorFor(proto.getEnd()).assertValid(proto.getEnd());
}
}