org.phenopackets.schema.v1.Interpretation 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
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: interpretation.proto
package org.phenopackets.schema.v1;
/**
* Protobuf type {@code org.phenopackets.schema.v1.Interpretation}
*/
public final class Interpretation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.phenopackets.schema.v1.Interpretation)
InterpretationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Interpretation.newBuilder() to construct.
private Interpretation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Interpretation() {
id_ = "";
resolutionStatus_ = 0;
diagnosis_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Interpretation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Interpretation(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
resolutionStatus_ = rawValue;
break;
}
case 26: {
org.phenopackets.schema.v1.Phenopacket.Builder subBuilder = null;
if (phenopacketOrFamilyCase_ == 3) {
subBuilder = ((org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_).toBuilder();
}
phenopacketOrFamily_ =
input.readMessage(org.phenopackets.schema.v1.Phenopacket.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_);
phenopacketOrFamily_ = subBuilder.buildPartial();
}
phenopacketOrFamilyCase_ = 3;
break;
}
case 34: {
org.phenopackets.schema.v1.Family.Builder subBuilder = null;
if (phenopacketOrFamilyCase_ == 4) {
subBuilder = ((org.phenopackets.schema.v1.Family) phenopacketOrFamily_).toBuilder();
}
phenopacketOrFamily_ =
input.readMessage(org.phenopackets.schema.v1.Family.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.phenopackets.schema.v1.Family) phenopacketOrFamily_);
phenopacketOrFamily_ = subBuilder.buildPartial();
}
phenopacketOrFamilyCase_ = 4;
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
diagnosis_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
diagnosis_.add(
input.readMessage(org.phenopackets.schema.v1.Diagnosis.parser(), extensionRegistry));
break;
}
case 50: {
org.phenopackets.schema.v1.core.MetaData.Builder subBuilder = null;
if (metaData_ != null) {
subBuilder = metaData_.toBuilder();
}
metaData_ = input.readMessage(org.phenopackets.schema.v1.core.MetaData.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metaData_);
metaData_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
diagnosis_ = java.util.Collections.unmodifiableList(diagnosis_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.InterpretationOuterClass.internal_static_org_phenopackets_schema_v1_Interpretation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.InterpretationOuterClass.internal_static_org_phenopackets_schema_v1_Interpretation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.Interpretation.class, org.phenopackets.schema.v1.Interpretation.Builder.class);
}
/**
* Protobuf enum {@code org.phenopackets.schema.v1.Interpretation.ResolutionStatus}
*/
public enum ResolutionStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* SOLVED = 1;
*/
SOLVED(1),
/**
* UNSOLVED = 2;
*/
UNSOLVED(2),
/**
* IN_PROGRESS = 3;
*/
IN_PROGRESS(3),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* SOLVED = 1;
*/
public static final int SOLVED_VALUE = 1;
/**
* UNSOLVED = 2;
*/
public static final int UNSOLVED_VALUE = 2;
/**
* IN_PROGRESS = 3;
*/
public static final int IN_PROGRESS_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ResolutionStatus valueOf(int value) {
return forNumber(value);
}
public static ResolutionStatus forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return SOLVED;
case 2: return UNSOLVED;
case 3: return IN_PROGRESS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ResolutionStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ResolutionStatus findValueByNumber(int number) {
return ResolutionStatus.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.phenopackets.schema.v1.Interpretation.getDescriptor().getEnumTypes().get(0);
}
private static final ResolutionStatus[] VALUES = values();
public static ResolutionStatus valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ResolutionStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:org.phenopackets.schema.v1.Interpretation.ResolutionStatus)
}
private int phenopacketOrFamilyCase_ = 0;
private java.lang.Object phenopacketOrFamily_;
public enum PhenopacketOrFamilyCase
implements com.google.protobuf.Internal.EnumLite {
PHENOPACKET(3),
FAMILY(4),
PHENOPACKETORFAMILY_NOT_SET(0);
private final int value;
private PhenopacketOrFamilyCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PhenopacketOrFamilyCase valueOf(int value) {
return forNumber(value);
}
public static PhenopacketOrFamilyCase forNumber(int value) {
switch (value) {
case 3: return PHENOPACKET;
case 4: return FAMILY;
case 0: return PHENOPACKETORFAMILY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PhenopacketOrFamilyCase
getPhenopacketOrFamilyCase() {
return PhenopacketOrFamilyCase.forNumber(
phenopacketOrFamilyCase_);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOLUTION_STATUS_FIELD_NUMBER = 2;
private int resolutionStatus_;
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public int getResolutionStatusValue() {
return resolutionStatus_;
}
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public org.phenopackets.schema.v1.Interpretation.ResolutionStatus getResolutionStatus() {
@SuppressWarnings("deprecation")
org.phenopackets.schema.v1.Interpretation.ResolutionStatus result = org.phenopackets.schema.v1.Interpretation.ResolutionStatus.valueOf(resolutionStatus_);
return result == null ? org.phenopackets.schema.v1.Interpretation.ResolutionStatus.UNRECOGNIZED : result;
}
public static final int PHENOPACKET_FIELD_NUMBER = 3;
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public boolean hasPhenopacket() {
return phenopacketOrFamilyCase_ == 3;
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public org.phenopackets.schema.v1.Phenopacket getPhenopacket() {
if (phenopacketOrFamilyCase_ == 3) {
return (org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Phenopacket.getDefaultInstance();
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public org.phenopackets.schema.v1.PhenopacketOrBuilder getPhenopacketOrBuilder() {
if (phenopacketOrFamilyCase_ == 3) {
return (org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Phenopacket.getDefaultInstance();
}
public static final int FAMILY_FIELD_NUMBER = 4;
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public boolean hasFamily() {
return phenopacketOrFamilyCase_ == 4;
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public org.phenopackets.schema.v1.Family getFamily() {
if (phenopacketOrFamilyCase_ == 4) {
return (org.phenopackets.schema.v1.Family) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Family.getDefaultInstance();
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public org.phenopackets.schema.v1.FamilyOrBuilder getFamilyOrBuilder() {
if (phenopacketOrFamilyCase_ == 4) {
return (org.phenopackets.schema.v1.Family) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Family.getDefaultInstance();
}
public static final int DIAGNOSIS_FIELD_NUMBER = 5;
private java.util.List diagnosis_;
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public java.util.List getDiagnosisList() {
return diagnosis_;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public java.util.List
getDiagnosisOrBuilderList() {
return diagnosis_;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public int getDiagnosisCount() {
return diagnosis_.size();
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.Diagnosis getDiagnosis(int index) {
return diagnosis_.get(index);
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.DiagnosisOrBuilder getDiagnosisOrBuilder(
int index) {
return diagnosis_.get(index);
}
public static final int META_DATA_FIELD_NUMBER = 6;
private org.phenopackets.schema.v1.core.MetaData metaData_;
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public boolean hasMetaData() {
return metaData_ != null;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public org.phenopackets.schema.v1.core.MetaData getMetaData() {
return metaData_ == null ? org.phenopackets.schema.v1.core.MetaData.getDefaultInstance() : metaData_;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public org.phenopackets.schema.v1.core.MetaDataOrBuilder getMetaDataOrBuilder() {
return getMetaData();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (resolutionStatus_ != org.phenopackets.schema.v1.Interpretation.ResolutionStatus.UNKNOWN.getNumber()) {
output.writeEnum(2, resolutionStatus_);
}
if (phenopacketOrFamilyCase_ == 3) {
output.writeMessage(3, (org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_);
}
if (phenopacketOrFamilyCase_ == 4) {
output.writeMessage(4, (org.phenopackets.schema.v1.Family) phenopacketOrFamily_);
}
for (int i = 0; i < diagnosis_.size(); i++) {
output.writeMessage(5, diagnosis_.get(i));
}
if (metaData_ != null) {
output.writeMessage(6, getMetaData());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (resolutionStatus_ != org.phenopackets.schema.v1.Interpretation.ResolutionStatus.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, resolutionStatus_);
}
if (phenopacketOrFamilyCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_);
}
if (phenopacketOrFamilyCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.phenopackets.schema.v1.Family) phenopacketOrFamily_);
}
for (int i = 0; i < diagnosis_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, diagnosis_.get(i));
}
if (metaData_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getMetaData());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.phenopackets.schema.v1.Interpretation)) {
return super.equals(obj);
}
org.phenopackets.schema.v1.Interpretation other = (org.phenopackets.schema.v1.Interpretation) obj;
if (!getId()
.equals(other.getId())) return false;
if (resolutionStatus_ != other.resolutionStatus_) return false;
if (!getDiagnosisList()
.equals(other.getDiagnosisList())) return false;
if (hasMetaData() != other.hasMetaData()) return false;
if (hasMetaData()) {
if (!getMetaData()
.equals(other.getMetaData())) return false;
}
if (!getPhenopacketOrFamilyCase().equals(other.getPhenopacketOrFamilyCase())) return false;
switch (phenopacketOrFamilyCase_) {
case 3:
if (!getPhenopacket()
.equals(other.getPhenopacket())) return false;
break;
case 4:
if (!getFamily()
.equals(other.getFamily())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + RESOLUTION_STATUS_FIELD_NUMBER;
hash = (53 * hash) + resolutionStatus_;
if (getDiagnosisCount() > 0) {
hash = (37 * hash) + DIAGNOSIS_FIELD_NUMBER;
hash = (53 * hash) + getDiagnosisList().hashCode();
}
if (hasMetaData()) {
hash = (37 * hash) + META_DATA_FIELD_NUMBER;
hash = (53 * hash) + getMetaData().hashCode();
}
switch (phenopacketOrFamilyCase_) {
case 3:
hash = (37 * hash) + PHENOPACKET_FIELD_NUMBER;
hash = (53 * hash) + getPhenopacket().hashCode();
break;
case 4:
hash = (37 * hash) + FAMILY_FIELD_NUMBER;
hash = (53 * hash) + getFamily().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.phenopackets.schema.v1.Interpretation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.Interpretation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.Interpretation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.phenopackets.schema.v1.Interpretation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code org.phenopackets.schema.v1.Interpretation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:org.phenopackets.schema.v1.Interpretation)
org.phenopackets.schema.v1.InterpretationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.InterpretationOuterClass.internal_static_org_phenopackets_schema_v1_Interpretation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.InterpretationOuterClass.internal_static_org_phenopackets_schema_v1_Interpretation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.Interpretation.class, org.phenopackets.schema.v1.Interpretation.Builder.class);
}
// Construct using org.phenopackets.schema.v1.Interpretation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDiagnosisFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
resolutionStatus_ = 0;
if (diagnosisBuilder_ == null) {
diagnosis_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
diagnosisBuilder_.clear();
}
if (metaDataBuilder_ == null) {
metaData_ = null;
} else {
metaData_ = null;
metaDataBuilder_ = null;
}
phenopacketOrFamilyCase_ = 0;
phenopacketOrFamily_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.phenopackets.schema.v1.InterpretationOuterClass.internal_static_org_phenopackets_schema_v1_Interpretation_descriptor;
}
@java.lang.Override
public org.phenopackets.schema.v1.Interpretation getDefaultInstanceForType() {
return org.phenopackets.schema.v1.Interpretation.getDefaultInstance();
}
@java.lang.Override
public org.phenopackets.schema.v1.Interpretation build() {
org.phenopackets.schema.v1.Interpretation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.phenopackets.schema.v1.Interpretation buildPartial() {
org.phenopackets.schema.v1.Interpretation result = new org.phenopackets.schema.v1.Interpretation(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.resolutionStatus_ = resolutionStatus_;
if (phenopacketOrFamilyCase_ == 3) {
if (phenopacketBuilder_ == null) {
result.phenopacketOrFamily_ = phenopacketOrFamily_;
} else {
result.phenopacketOrFamily_ = phenopacketBuilder_.build();
}
}
if (phenopacketOrFamilyCase_ == 4) {
if (familyBuilder_ == null) {
result.phenopacketOrFamily_ = phenopacketOrFamily_;
} else {
result.phenopacketOrFamily_ = familyBuilder_.build();
}
}
if (diagnosisBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
diagnosis_ = java.util.Collections.unmodifiableList(diagnosis_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.diagnosis_ = diagnosis_;
} else {
result.diagnosis_ = diagnosisBuilder_.build();
}
if (metaDataBuilder_ == null) {
result.metaData_ = metaData_;
} else {
result.metaData_ = metaDataBuilder_.build();
}
result.phenopacketOrFamilyCase_ = phenopacketOrFamilyCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.phenopackets.schema.v1.Interpretation) {
return mergeFrom((org.phenopackets.schema.v1.Interpretation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.phenopackets.schema.v1.Interpretation other) {
if (other == org.phenopackets.schema.v1.Interpretation.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.resolutionStatus_ != 0) {
setResolutionStatusValue(other.getResolutionStatusValue());
}
if (diagnosisBuilder_ == null) {
if (!other.diagnosis_.isEmpty()) {
if (diagnosis_.isEmpty()) {
diagnosis_ = other.diagnosis_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDiagnosisIsMutable();
diagnosis_.addAll(other.diagnosis_);
}
onChanged();
}
} else {
if (!other.diagnosis_.isEmpty()) {
if (diagnosisBuilder_.isEmpty()) {
diagnosisBuilder_.dispose();
diagnosisBuilder_ = null;
diagnosis_ = other.diagnosis_;
bitField0_ = (bitField0_ & ~0x00000001);
diagnosisBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDiagnosisFieldBuilder() : null;
} else {
diagnosisBuilder_.addAllMessages(other.diagnosis_);
}
}
}
if (other.hasMetaData()) {
mergeMetaData(other.getMetaData());
}
switch (other.getPhenopacketOrFamilyCase()) {
case PHENOPACKET: {
mergePhenopacket(other.getPhenopacket());
break;
}
case FAMILY: {
mergeFamily(other.getFamily());
break;
}
case PHENOPACKETORFAMILY_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.phenopackets.schema.v1.Interpretation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.phenopackets.schema.v1.Interpretation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int phenopacketOrFamilyCase_ = 0;
private java.lang.Object phenopacketOrFamily_;
public PhenopacketOrFamilyCase
getPhenopacketOrFamilyCase() {
return PhenopacketOrFamilyCase.forNumber(
phenopacketOrFamilyCase_);
}
public Builder clearPhenopacketOrFamily() {
phenopacketOrFamilyCase_ = 0;
phenopacketOrFamily_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* id of the interpretation
*
*
* string id = 1;
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private int resolutionStatus_ = 0;
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public int getResolutionStatusValue() {
return resolutionStatus_;
}
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public Builder setResolutionStatusValue(int value) {
resolutionStatus_ = value;
onChanged();
return this;
}
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public org.phenopackets.schema.v1.Interpretation.ResolutionStatus getResolutionStatus() {
@SuppressWarnings("deprecation")
org.phenopackets.schema.v1.Interpretation.ResolutionStatus result = org.phenopackets.schema.v1.Interpretation.ResolutionStatus.valueOf(resolutionStatus_);
return result == null ? org.phenopackets.schema.v1.Interpretation.ResolutionStatus.UNRECOGNIZED : result;
}
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public Builder setResolutionStatus(org.phenopackets.schema.v1.Interpretation.ResolutionStatus value) {
if (value == null) {
throw new NullPointerException();
}
resolutionStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* status of the interpretation
*
*
* .org.phenopackets.schema.v1.Interpretation.ResolutionStatus resolution_status = 2;
*/
public Builder clearResolutionStatus() {
resolutionStatus_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.Phenopacket, org.phenopackets.schema.v1.Phenopacket.Builder, org.phenopackets.schema.v1.PhenopacketOrBuilder> phenopacketBuilder_;
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public boolean hasPhenopacket() {
return phenopacketOrFamilyCase_ == 3;
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public org.phenopackets.schema.v1.Phenopacket getPhenopacket() {
if (phenopacketBuilder_ == null) {
if (phenopacketOrFamilyCase_ == 3) {
return (org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Phenopacket.getDefaultInstance();
} else {
if (phenopacketOrFamilyCase_ == 3) {
return phenopacketBuilder_.getMessage();
}
return org.phenopackets.schema.v1.Phenopacket.getDefaultInstance();
}
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public Builder setPhenopacket(org.phenopackets.schema.v1.Phenopacket value) {
if (phenopacketBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
phenopacketOrFamily_ = value;
onChanged();
} else {
phenopacketBuilder_.setMessage(value);
}
phenopacketOrFamilyCase_ = 3;
return this;
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public Builder setPhenopacket(
org.phenopackets.schema.v1.Phenopacket.Builder builderForValue) {
if (phenopacketBuilder_ == null) {
phenopacketOrFamily_ = builderForValue.build();
onChanged();
} else {
phenopacketBuilder_.setMessage(builderForValue.build());
}
phenopacketOrFamilyCase_ = 3;
return this;
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public Builder mergePhenopacket(org.phenopackets.schema.v1.Phenopacket value) {
if (phenopacketBuilder_ == null) {
if (phenopacketOrFamilyCase_ == 3 &&
phenopacketOrFamily_ != org.phenopackets.schema.v1.Phenopacket.getDefaultInstance()) {
phenopacketOrFamily_ = org.phenopackets.schema.v1.Phenopacket.newBuilder((org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_)
.mergeFrom(value).buildPartial();
} else {
phenopacketOrFamily_ = value;
}
onChanged();
} else {
if (phenopacketOrFamilyCase_ == 3) {
phenopacketBuilder_.mergeFrom(value);
}
phenopacketBuilder_.setMessage(value);
}
phenopacketOrFamilyCase_ = 3;
return this;
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public Builder clearPhenopacket() {
if (phenopacketBuilder_ == null) {
if (phenopacketOrFamilyCase_ == 3) {
phenopacketOrFamilyCase_ = 0;
phenopacketOrFamily_ = null;
onChanged();
}
} else {
if (phenopacketOrFamilyCase_ == 3) {
phenopacketOrFamilyCase_ = 0;
phenopacketOrFamily_ = null;
}
phenopacketBuilder_.clear();
}
return this;
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public org.phenopackets.schema.v1.Phenopacket.Builder getPhenopacketBuilder() {
return getPhenopacketFieldBuilder().getBuilder();
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
public org.phenopackets.schema.v1.PhenopacketOrBuilder getPhenopacketOrBuilder() {
if ((phenopacketOrFamilyCase_ == 3) && (phenopacketBuilder_ != null)) {
return phenopacketBuilder_.getMessageOrBuilder();
} else {
if (phenopacketOrFamilyCase_ == 3) {
return (org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Phenopacket.getDefaultInstance();
}
}
/**
* .org.phenopackets.schema.v1.Phenopacket phenopacket = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.Phenopacket, org.phenopackets.schema.v1.Phenopacket.Builder, org.phenopackets.schema.v1.PhenopacketOrBuilder>
getPhenopacketFieldBuilder() {
if (phenopacketBuilder_ == null) {
if (!(phenopacketOrFamilyCase_ == 3)) {
phenopacketOrFamily_ = org.phenopackets.schema.v1.Phenopacket.getDefaultInstance();
}
phenopacketBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.Phenopacket, org.phenopackets.schema.v1.Phenopacket.Builder, org.phenopackets.schema.v1.PhenopacketOrBuilder>(
(org.phenopackets.schema.v1.Phenopacket) phenopacketOrFamily_,
getParentForChildren(),
isClean());
phenopacketOrFamily_ = null;
}
phenopacketOrFamilyCase_ = 3;
onChanged();;
return phenopacketBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.Family, org.phenopackets.schema.v1.Family.Builder, org.phenopackets.schema.v1.FamilyOrBuilder> familyBuilder_;
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public boolean hasFamily() {
return phenopacketOrFamilyCase_ == 4;
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public org.phenopackets.schema.v1.Family getFamily() {
if (familyBuilder_ == null) {
if (phenopacketOrFamilyCase_ == 4) {
return (org.phenopackets.schema.v1.Family) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Family.getDefaultInstance();
} else {
if (phenopacketOrFamilyCase_ == 4) {
return familyBuilder_.getMessage();
}
return org.phenopackets.schema.v1.Family.getDefaultInstance();
}
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public Builder setFamily(org.phenopackets.schema.v1.Family value) {
if (familyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
phenopacketOrFamily_ = value;
onChanged();
} else {
familyBuilder_.setMessage(value);
}
phenopacketOrFamilyCase_ = 4;
return this;
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public Builder setFamily(
org.phenopackets.schema.v1.Family.Builder builderForValue) {
if (familyBuilder_ == null) {
phenopacketOrFamily_ = builderForValue.build();
onChanged();
} else {
familyBuilder_.setMessage(builderForValue.build());
}
phenopacketOrFamilyCase_ = 4;
return this;
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public Builder mergeFamily(org.phenopackets.schema.v1.Family value) {
if (familyBuilder_ == null) {
if (phenopacketOrFamilyCase_ == 4 &&
phenopacketOrFamily_ != org.phenopackets.schema.v1.Family.getDefaultInstance()) {
phenopacketOrFamily_ = org.phenopackets.schema.v1.Family.newBuilder((org.phenopackets.schema.v1.Family) phenopacketOrFamily_)
.mergeFrom(value).buildPartial();
} else {
phenopacketOrFamily_ = value;
}
onChanged();
} else {
if (phenopacketOrFamilyCase_ == 4) {
familyBuilder_.mergeFrom(value);
}
familyBuilder_.setMessage(value);
}
phenopacketOrFamilyCase_ = 4;
return this;
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public Builder clearFamily() {
if (familyBuilder_ == null) {
if (phenopacketOrFamilyCase_ == 4) {
phenopacketOrFamilyCase_ = 0;
phenopacketOrFamily_ = null;
onChanged();
}
} else {
if (phenopacketOrFamilyCase_ == 4) {
phenopacketOrFamilyCase_ = 0;
phenopacketOrFamily_ = null;
}
familyBuilder_.clear();
}
return this;
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public org.phenopackets.schema.v1.Family.Builder getFamilyBuilder() {
return getFamilyFieldBuilder().getBuilder();
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
public org.phenopackets.schema.v1.FamilyOrBuilder getFamilyOrBuilder() {
if ((phenopacketOrFamilyCase_ == 4) && (familyBuilder_ != null)) {
return familyBuilder_.getMessageOrBuilder();
} else {
if (phenopacketOrFamilyCase_ == 4) {
return (org.phenopackets.schema.v1.Family) phenopacketOrFamily_;
}
return org.phenopackets.schema.v1.Family.getDefaultInstance();
}
}
/**
* .org.phenopackets.schema.v1.Family family = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.Family, org.phenopackets.schema.v1.Family.Builder, org.phenopackets.schema.v1.FamilyOrBuilder>
getFamilyFieldBuilder() {
if (familyBuilder_ == null) {
if (!(phenopacketOrFamilyCase_ == 4)) {
phenopacketOrFamily_ = org.phenopackets.schema.v1.Family.getDefaultInstance();
}
familyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.Family, org.phenopackets.schema.v1.Family.Builder, org.phenopackets.schema.v1.FamilyOrBuilder>(
(org.phenopackets.schema.v1.Family) phenopacketOrFamily_,
getParentForChildren(),
isClean());
phenopacketOrFamily_ = null;
}
phenopacketOrFamilyCase_ = 4;
onChanged();;
return familyBuilder_;
}
private java.util.List diagnosis_ =
java.util.Collections.emptyList();
private void ensureDiagnosisIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
diagnosis_ = new java.util.ArrayList(diagnosis_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.Diagnosis, org.phenopackets.schema.v1.Diagnosis.Builder, org.phenopackets.schema.v1.DiagnosisOrBuilder> diagnosisBuilder_;
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public java.util.List getDiagnosisList() {
if (diagnosisBuilder_ == null) {
return java.util.Collections.unmodifiableList(diagnosis_);
} else {
return diagnosisBuilder_.getMessageList();
}
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public int getDiagnosisCount() {
if (diagnosisBuilder_ == null) {
return diagnosis_.size();
} else {
return diagnosisBuilder_.getCount();
}
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.Diagnosis getDiagnosis(int index) {
if (diagnosisBuilder_ == null) {
return diagnosis_.get(index);
} else {
return diagnosisBuilder_.getMessage(index);
}
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder setDiagnosis(
int index, org.phenopackets.schema.v1.Diagnosis value) {
if (diagnosisBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDiagnosisIsMutable();
diagnosis_.set(index, value);
onChanged();
} else {
diagnosisBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder setDiagnosis(
int index, org.phenopackets.schema.v1.Diagnosis.Builder builderForValue) {
if (diagnosisBuilder_ == null) {
ensureDiagnosisIsMutable();
diagnosis_.set(index, builderForValue.build());
onChanged();
} else {
diagnosisBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder addDiagnosis(org.phenopackets.schema.v1.Diagnosis value) {
if (diagnosisBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDiagnosisIsMutable();
diagnosis_.add(value);
onChanged();
} else {
diagnosisBuilder_.addMessage(value);
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder addDiagnosis(
int index, org.phenopackets.schema.v1.Diagnosis value) {
if (diagnosisBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDiagnosisIsMutable();
diagnosis_.add(index, value);
onChanged();
} else {
diagnosisBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder addDiagnosis(
org.phenopackets.schema.v1.Diagnosis.Builder builderForValue) {
if (diagnosisBuilder_ == null) {
ensureDiagnosisIsMutable();
diagnosis_.add(builderForValue.build());
onChanged();
} else {
diagnosisBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder addDiagnosis(
int index, org.phenopackets.schema.v1.Diagnosis.Builder builderForValue) {
if (diagnosisBuilder_ == null) {
ensureDiagnosisIsMutable();
diagnosis_.add(index, builderForValue.build());
onChanged();
} else {
diagnosisBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder addAllDiagnosis(
java.lang.Iterable values) {
if (diagnosisBuilder_ == null) {
ensureDiagnosisIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, diagnosis_);
onChanged();
} else {
diagnosisBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder clearDiagnosis() {
if (diagnosisBuilder_ == null) {
diagnosis_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
diagnosisBuilder_.clear();
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public Builder removeDiagnosis(int index) {
if (diagnosisBuilder_ == null) {
ensureDiagnosisIsMutable();
diagnosis_.remove(index);
onChanged();
} else {
diagnosisBuilder_.remove(index);
}
return this;
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.Diagnosis.Builder getDiagnosisBuilder(
int index) {
return getDiagnosisFieldBuilder().getBuilder(index);
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.DiagnosisOrBuilder getDiagnosisOrBuilder(
int index) {
if (diagnosisBuilder_ == null) {
return diagnosis_.get(index); } else {
return diagnosisBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public java.util.List
getDiagnosisOrBuilderList() {
if (diagnosisBuilder_ != null) {
return diagnosisBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(diagnosis_);
}
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.Diagnosis.Builder addDiagnosisBuilder() {
return getDiagnosisFieldBuilder().addBuilder(
org.phenopackets.schema.v1.Diagnosis.getDefaultInstance());
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public org.phenopackets.schema.v1.Diagnosis.Builder addDiagnosisBuilder(
int index) {
return getDiagnosisFieldBuilder().addBuilder(
index, org.phenopackets.schema.v1.Diagnosis.getDefaultInstance());
}
/**
*
* The diagnosis made in this interpretation
*
*
* repeated .org.phenopackets.schema.v1.Diagnosis diagnosis = 5;
*/
public java.util.List
getDiagnosisBuilderList() {
return getDiagnosisFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.Diagnosis, org.phenopackets.schema.v1.Diagnosis.Builder, org.phenopackets.schema.v1.DiagnosisOrBuilder>
getDiagnosisFieldBuilder() {
if (diagnosisBuilder_ == null) {
diagnosisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.Diagnosis, org.phenopackets.schema.v1.Diagnosis.Builder, org.phenopackets.schema.v1.DiagnosisOrBuilder>(
diagnosis_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
diagnosis_ = null;
}
return diagnosisBuilder_;
}
private org.phenopackets.schema.v1.core.MetaData metaData_;
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.core.MetaData, org.phenopackets.schema.v1.core.MetaData.Builder, org.phenopackets.schema.v1.core.MetaDataOrBuilder> metaDataBuilder_;
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public boolean hasMetaData() {
return metaDataBuilder_ != null || metaData_ != null;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public org.phenopackets.schema.v1.core.MetaData getMetaData() {
if (metaDataBuilder_ == null) {
return metaData_ == null ? org.phenopackets.schema.v1.core.MetaData.getDefaultInstance() : metaData_;
} else {
return metaDataBuilder_.getMessage();
}
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public Builder setMetaData(org.phenopackets.schema.v1.core.MetaData value) {
if (metaDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metaData_ = value;
onChanged();
} else {
metaDataBuilder_.setMessage(value);
}
return this;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public Builder setMetaData(
org.phenopackets.schema.v1.core.MetaData.Builder builderForValue) {
if (metaDataBuilder_ == null) {
metaData_ = builderForValue.build();
onChanged();
} else {
metaDataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public Builder mergeMetaData(org.phenopackets.schema.v1.core.MetaData value) {
if (metaDataBuilder_ == null) {
if (metaData_ != null) {
metaData_ =
org.phenopackets.schema.v1.core.MetaData.newBuilder(metaData_).mergeFrom(value).buildPartial();
} else {
metaData_ = value;
}
onChanged();
} else {
metaDataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public Builder clearMetaData() {
if (metaDataBuilder_ == null) {
metaData_ = null;
onChanged();
} else {
metaData_ = null;
metaDataBuilder_ = null;
}
return this;
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public org.phenopackets.schema.v1.core.MetaData.Builder getMetaDataBuilder() {
onChanged();
return getMetaDataFieldBuilder().getBuilder();
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
public org.phenopackets.schema.v1.core.MetaDataOrBuilder getMetaDataOrBuilder() {
if (metaDataBuilder_ != null) {
return metaDataBuilder_.getMessageOrBuilder();
} else {
return metaData_ == null ?
org.phenopackets.schema.v1.core.MetaData.getDefaultInstance() : metaData_;
}
}
/**
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.core.MetaData, org.phenopackets.schema.v1.core.MetaData.Builder, org.phenopackets.schema.v1.core.MetaDataOrBuilder>
getMetaDataFieldBuilder() {
if (metaDataBuilder_ == null) {
metaDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.core.MetaData, org.phenopackets.schema.v1.core.MetaData.Builder, org.phenopackets.schema.v1.core.MetaDataOrBuilder>(
getMetaData(),
getParentForChildren(),
isClean());
metaData_ = null;
}
return metaDataBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:org.phenopackets.schema.v1.Interpretation)
}
// @@protoc_insertion_point(class_scope:org.phenopackets.schema.v1.Interpretation)
private static final org.phenopackets.schema.v1.Interpretation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.phenopackets.schema.v1.Interpretation();
}
public static org.phenopackets.schema.v1.Interpretation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Interpretation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Interpretation(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.phenopackets.schema.v1.Interpretation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}