Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: phenopackets/schema/v1/phenopackets.proto
package org.phenopackets.schema.v1;
/**
*
* An anonymous phenotypic description of an individual or biosample with potential genes of interest and/or diagnoses.
* This is a bundle of high-level concepts with no specifically defined relational concepts. It is expected that the
* resources sharing the phenopackets will define and enforce their own semantics and level of requirements for included
* fields.
*
*
* Protobuf type {@code org.phenopackets.schema.v1.Phenopacket}
*/
public final class Phenopacket extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.phenopackets.schema.v1.Phenopacket)
PhenopacketOrBuilder {
private static final long serialVersionUID = 0L;
// Use Phenopacket.newBuilder() to construct.
private Phenopacket(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Phenopacket() {
id_ = "";
phenotypicFeatures_ = java.util.Collections.emptyList();
biosamples_ = java.util.Collections.emptyList();
genes_ = java.util.Collections.emptyList();
variants_ = java.util.Collections.emptyList();
diseases_ = java.util.Collections.emptyList();
htsFiles_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Phenopacket();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Phenopacket(
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 18: {
org.phenopackets.schema.v1.core.Individual.Builder subBuilder = null;
if (subject_ != null) {
subBuilder = subject_.toBuilder();
}
subject_ = input.readMessage(org.phenopackets.schema.v1.core.Individual.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(subject_);
subject_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
phenotypicFeatures_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
phenotypicFeatures_.add(
input.readMessage(org.phenopackets.schema.v1.core.PhenotypicFeature.parser(), extensionRegistry));
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
biosamples_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
biosamples_.add(
input.readMessage(org.phenopackets.schema.v1.core.Biosample.parser(), extensionRegistry));
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
genes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
genes_.add(
input.readMessage(org.phenopackets.schema.v1.core.Gene.parser(), extensionRegistry));
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
variants_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
variants_.add(
input.readMessage(org.phenopackets.schema.v1.core.Variant.parser(), extensionRegistry));
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
diseases_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
diseases_.add(
input.readMessage(org.phenopackets.schema.v1.core.Disease.parser(), extensionRegistry));
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
htsFiles_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
htsFiles_.add(
input.readMessage(org.phenopackets.schema.v1.core.HtsFile.parser(), extensionRegistry));
break;
}
case 74: {
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 (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
phenotypicFeatures_ = java.util.Collections.unmodifiableList(phenotypicFeatures_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
biosamples_ = java.util.Collections.unmodifiableList(biosamples_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
genes_ = java.util.Collections.unmodifiableList(genes_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
variants_ = java.util.Collections.unmodifiableList(variants_);
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
diseases_ = java.util.Collections.unmodifiableList(diseases_);
}
if (((mutable_bitField0_ & 0x00000020) != 0)) {
htsFiles_ = java.util.Collections.unmodifiableList(htsFiles_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.Phenopackets.internal_static_org_phenopackets_schema_v1_Phenopacket_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.Phenopackets.internal_static_org_phenopackets_schema_v1_Phenopacket_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.Phenopacket.class, org.phenopackets.schema.v1.Phenopacket.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* An identifier specific for this phenopacket.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
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;
}
}
/**
*
* An identifier specific for this phenopacket.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
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 SUBJECT_FIELD_NUMBER = 2;
private org.phenopackets.schema.v1.core.Individual subject_;
/**
*
* The individual representing the focus of this packet - e.g. the proband in rare disease cases or cancer patient
*
*
* .org.phenopackets.schema.v1.core.Individual subject = 2;
* @return Whether the subject field is set.
*/
@java.lang.Override
public boolean hasSubject() {
return subject_ != null;
}
/**
*
* The individual representing the focus of this packet - e.g. the proband in rare disease cases or cancer patient
*
* Biosample(s) derived from the patient or a collection of biosamples in isolation
*
*
* repeated .org.phenopackets.schema.v1.core.Biosample biosamples = 4;
*/
@java.lang.Override
public org.phenopackets.schema.v1.core.BiosampleOrBuilder getBiosamplesOrBuilder(
int index) {
return biosamples_.get(index);
}
public static final int GENES_FIELD_NUMBER = 5;
private java.util.List genes_;
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
@java.lang.Override
public int getGenesCount() {
return genes_.size();
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
@java.lang.Override
public org.phenopackets.schema.v1.core.GeneOrBuilder getGenesOrBuilder(
int index) {
return genes_.get(index);
}
public static final int VARIANTS_FIELD_NUMBER = 6;
private java.util.List variants_;
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
@java.lang.Override
public int getVariantsCount() {
return variants_.size();
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
@java.lang.Override
public org.phenopackets.schema.v1.core.VariantOrBuilder getVariantsOrBuilder(
int index) {
return variants_.get(index);
}
public static final int DISEASES_FIELD_NUMBER = 7;
private java.util.List diseases_;
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
@java.lang.Override
public int getDiseasesCount() {
return diseases_.size();
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
@java.lang.Override
public org.phenopackets.schema.v1.core.DiseaseOrBuilder getDiseasesOrBuilder(
int index) {
return diseases_.get(index);
}
public static final int HTS_FILES_FIELD_NUMBER = 8;
private java.util.List htsFiles_;
/**
*
* Pointer to the relevant HTS file(s) for the patient
*
* Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
*
*
* .org.phenopackets.schema.v1.core.MetaData meta_data = 9;
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (subject_ != null) {
output.writeMessage(2, getSubject());
}
for (int i = 0; i < phenotypicFeatures_.size(); i++) {
output.writeMessage(3, phenotypicFeatures_.get(i));
}
for (int i = 0; i < biosamples_.size(); i++) {
output.writeMessage(4, biosamples_.get(i));
}
for (int i = 0; i < genes_.size(); i++) {
output.writeMessage(5, genes_.get(i));
}
for (int i = 0; i < variants_.size(); i++) {
output.writeMessage(6, variants_.get(i));
}
for (int i = 0; i < diseases_.size(); i++) {
output.writeMessage(7, diseases_.get(i));
}
for (int i = 0; i < htsFiles_.size(); i++) {
output.writeMessage(8, htsFiles_.get(i));
}
if (metaData_ != null) {
output.writeMessage(9, getMetaData());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (subject_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getSubject());
}
for (int i = 0; i < phenotypicFeatures_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, phenotypicFeatures_.get(i));
}
for (int i = 0; i < biosamples_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, biosamples_.get(i));
}
for (int i = 0; i < genes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, genes_.get(i));
}
for (int i = 0; i < variants_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, variants_.get(i));
}
for (int i = 0; i < diseases_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, diseases_.get(i));
}
for (int i = 0; i < htsFiles_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, htsFiles_.get(i));
}
if (metaData_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, 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.Phenopacket)) {
return super.equals(obj);
}
org.phenopackets.schema.v1.Phenopacket other = (org.phenopackets.schema.v1.Phenopacket) obj;
if (!getId()
.equals(other.getId())) return false;
if (hasSubject() != other.hasSubject()) return false;
if (hasSubject()) {
if (!getSubject()
.equals(other.getSubject())) return false;
}
if (!getPhenotypicFeaturesList()
.equals(other.getPhenotypicFeaturesList())) return false;
if (!getBiosamplesList()
.equals(other.getBiosamplesList())) return false;
if (!getGenesList()
.equals(other.getGenesList())) return false;
if (!getVariantsList()
.equals(other.getVariantsList())) return false;
if (!getDiseasesList()
.equals(other.getDiseasesList())) return false;
if (!getHtsFilesList()
.equals(other.getHtsFilesList())) return false;
if (hasMetaData() != other.hasMetaData()) return false;
if (hasMetaData()) {
if (!getMetaData()
.equals(other.getMetaData())) return false;
}
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();
if (hasSubject()) {
hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
hash = (53 * hash) + getSubject().hashCode();
}
if (getPhenotypicFeaturesCount() > 0) {
hash = (37 * hash) + PHENOTYPIC_FEATURES_FIELD_NUMBER;
hash = (53 * hash) + getPhenotypicFeaturesList().hashCode();
}
if (getBiosamplesCount() > 0) {
hash = (37 * hash) + BIOSAMPLES_FIELD_NUMBER;
hash = (53 * hash) + getBiosamplesList().hashCode();
}
if (getGenesCount() > 0) {
hash = (37 * hash) + GENES_FIELD_NUMBER;
hash = (53 * hash) + getGenesList().hashCode();
}
if (getVariantsCount() > 0) {
hash = (37 * hash) + VARIANTS_FIELD_NUMBER;
hash = (53 * hash) + getVariantsList().hashCode();
}
if (getDiseasesCount() > 0) {
hash = (37 * hash) + DISEASES_FIELD_NUMBER;
hash = (53 * hash) + getDiseasesList().hashCode();
}
if (getHtsFilesCount() > 0) {
hash = (37 * hash) + HTS_FILES_FIELD_NUMBER;
hash = (53 * hash) + getHtsFilesList().hashCode();
}
if (hasMetaData()) {
hash = (37 * hash) + META_DATA_FIELD_NUMBER;
hash = (53 * hash) + getMetaData().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.phenopackets.schema.v1.Phenopacket parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.Phenopacket 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.Phenopacket parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.Phenopacket 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.Phenopacket parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.Phenopacket parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.Phenopacket parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.Phenopacket 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.Phenopacket parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.Phenopacket 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.Phenopacket parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.Phenopacket 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.Phenopacket 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;
}
/**
*
* An anonymous phenotypic description of an individual or biosample with potential genes of interest and/or diagnoses.
* This is a bundle of high-level concepts with no specifically defined relational concepts. It is expected that the
* resources sharing the phenopackets will define and enforce their own semantics and level of requirements for included
* fields.
*
*
* string id = 1;
* @return The id.
*/
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;
}
}
/**
*
* An identifier specific for this phenopacket.
*
*
* string id = 1;
* @return The bytes for id.
*/
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;
}
}
/**
*
* An identifier specific for this phenopacket.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* An identifier specific for this phenopacket.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* An identifier specific for this phenopacket.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private org.phenopackets.schema.v1.core.Individual subject_;
private com.google.protobuf.SingleFieldBuilderV3<
org.phenopackets.schema.v1.core.Individual, org.phenopackets.schema.v1.core.Individual.Builder, org.phenopackets.schema.v1.core.IndividualOrBuilder> subjectBuilder_;
/**
*
* The individual representing the focus of this packet - e.g. the proband in rare disease cases or cancer patient
*
*
* .org.phenopackets.schema.v1.core.Individual subject = 2;
* @return Whether the subject field is set.
*/
public boolean hasSubject() {
return subjectBuilder_ != null || subject_ != null;
}
/**
*
* The individual representing the focus of this packet - e.g. the proband in rare disease cases or cancer patient
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
public int getGenesCount() {
if (genesBuilder_ == null) {
return genes_.size();
} else {
return genesBuilder_.getCount();
}
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
public Builder setGenes(
int index, org.phenopackets.schema.v1.core.Gene value) {
if (genesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGenesIsMutable();
genes_.set(index, value);
onChanged();
} else {
genesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
public Builder addGenes(org.phenopackets.schema.v1.core.Gene value) {
if (genesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGenesIsMutable();
genes_.add(value);
onChanged();
} else {
genesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
public Builder addGenes(
int index, org.phenopackets.schema.v1.core.Gene value) {
if (genesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGenesIsMutable();
genes_.add(index, value);
onChanged();
} else {
genesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
public org.phenopackets.schema.v1.core.Gene.Builder getGenesBuilder(
int index) {
return getGenesFieldBuilder().getBuilder(index);
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
*
* repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
*/
public org.phenopackets.schema.v1.core.GeneOrBuilder getGenesOrBuilder(
int index) {
if (genesBuilder_ == null) {
return genes_.get(index); } else {
return genesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for gene identifiers - could be used for listing either candidate genes or causative genes. The
* resources using these fields should define what this represents in their context. This could be used in order to
* obfuscate the specific causative/candidate variant.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
public int getVariantsCount() {
if (variantsBuilder_ == null) {
return variants_.size();
} else {
return variantsBuilder_.getCount();
}
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
public Builder setVariants(
int index, org.phenopackets.schema.v1.core.Variant value) {
if (variantsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVariantsIsMutable();
variants_.set(index, value);
onChanged();
} else {
variantsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
public Builder addVariants(org.phenopackets.schema.v1.core.Variant value) {
if (variantsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVariantsIsMutable();
variants_.add(value);
onChanged();
} else {
variantsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
public Builder addVariants(
int index, org.phenopackets.schema.v1.core.Variant value) {
if (variantsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVariantsIsMutable();
variants_.add(index, value);
onChanged();
} else {
variantsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
public org.phenopackets.schema.v1.core.Variant.Builder getVariantsBuilder(
int index) {
return getVariantsFieldBuilder().getBuilder(index);
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
*/
public org.phenopackets.schema.v1.core.VariantOrBuilder getVariantsOrBuilder(
int index) {
if (variantsBuilder_ == null) {
return variants_.get(index); } else {
return variantsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for genetic variants - could be used for listing either candidate variants or diagnosed causative
* variants. The resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
public int getDiseasesCount() {
if (diseasesBuilder_ == null) {
return diseases_.size();
} else {
return diseasesBuilder_.getCount();
}
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
public Builder setDiseases(
int index, org.phenopackets.schema.v1.core.Disease value) {
if (diseasesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDiseasesIsMutable();
diseases_.set(index, value);
onChanged();
} else {
diseasesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
public Builder addDiseases(org.phenopackets.schema.v1.core.Disease value) {
if (diseasesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDiseasesIsMutable();
diseases_.add(value);
onChanged();
} else {
diseasesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
public Builder addDiseases(
int index, org.phenopackets.schema.v1.core.Disease value) {
if (diseasesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDiseasesIsMutable();
diseases_.add(index, value);
onChanged();
} else {
diseasesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
public org.phenopackets.schema.v1.core.Disease.Builder getDiseasesBuilder(
int index) {
return getDiseasesFieldBuilder().getBuilder(index);
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
*
* repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
*/
public org.phenopackets.schema.v1.core.DiseaseOrBuilder getDiseasesOrBuilder(
int index) {
if (diseasesBuilder_ == null) {
return diseases_.get(index); } else {
return diseasesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*
* Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
* resources using these fields should define what this represents in their context.
*