*/
@Override
protected Builder withCore(KeyVersionCore kvCore)
throws InvalidProtocolBufferException {
super.withCore(kvCore);
MockKeyVersionCore core =
kvCore.getExtension(MockKeyVersionCore.extension);
if (!core.hasMaterial()) {
// Material is required
throw new InvalidProtocolBufferException("Core material missing.");
}
this.material(core.getMaterial());
return this;
}