org.phenopackets.schema.v1.core.MetaData 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: base.proto
package org.phenopackets.schema.v1.core;
/**
* Protobuf type {@code org.phenopackets.schema.v1.core.MetaData}
*/
public final class MetaData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.phenopackets.schema.v1.core.MetaData)
MetaDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetaData.newBuilder() to construct.
private MetaData(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private MetaData() {
createdBy_ = "";
submittedBy_ = "";
resources_ = java.util.Collections.emptyList();
updates_ = java.util.Collections.emptyList();
phenopacketSchemaVersion_ = "";
externalReferences_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MetaData();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MetaData(
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: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (created_ != null) {
subBuilder = created_.toBuilder();
}
created_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(created_);
created_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
createdBy_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
submittedBy_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
resources_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
resources_.add(
input.readMessage(org.phenopackets.schema.v1.core.Resource.parser(), extensionRegistry));
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
updates_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
updates_.add(
input.readMessage(org.phenopackets.schema.v1.core.Update.parser(), extensionRegistry));
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
phenopacketSchemaVersion_ = s;
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
externalReferences_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
externalReferences_.add(
input.readMessage(org.phenopackets.schema.v1.core.ExternalReference.parser(), extensionRegistry));
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)) {
resources_ = java.util.Collections.unmodifiableList(resources_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
updates_ = java.util.Collections.unmodifiableList(updates_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
externalReferences_ = java.util.Collections.unmodifiableList(externalReferences_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_MetaData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_MetaData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.core.MetaData.class, org.phenopackets.schema.v1.core.MetaData.Builder.class);
}
public static final int CREATED_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp created_;
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public boolean hasCreated() {
return created_ != null;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public com.google.protobuf.Timestamp getCreated() {
return created_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : created_;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder() {
return getCreated();
}
public static final int CREATED_BY_FIELD_NUMBER = 2;
private volatile java.lang.Object createdBy_;
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public java.lang.String getCreatedBy() {
java.lang.Object ref = createdBy_;
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();
createdBy_ = s;
return s;
}
}
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public com.google.protobuf.ByteString
getCreatedByBytes() {
java.lang.Object ref = createdBy_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
createdBy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBMITTED_BY_FIELD_NUMBER = 3;
private volatile java.lang.Object submittedBy_;
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public java.lang.String getSubmittedBy() {
java.lang.Object ref = submittedBy_;
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();
submittedBy_ = s;
return s;
}
}
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public com.google.protobuf.ByteString
getSubmittedByBytes() {
java.lang.Object ref = submittedBy_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
submittedBy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCES_FIELD_NUMBER = 4;
private java.util.List resources_;
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public java.util.List getResourcesList() {
return resources_;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public java.util.List
getResourcesOrBuilderList() {
return resources_;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public int getResourcesCount() {
return resources_.size();
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.Resource getResources(int index) {
return resources_.get(index);
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.ResourceOrBuilder getResourcesOrBuilder(
int index) {
return resources_.get(index);
}
public static final int UPDATES_FIELD_NUMBER = 5;
private java.util.List updates_;
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public java.util.List getUpdatesList() {
return updates_;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public java.util.List
getUpdatesOrBuilderList() {
return updates_;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public int getUpdatesCount() {
return updates_.size();
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.Update getUpdates(int index) {
return updates_.get(index);
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.UpdateOrBuilder getUpdatesOrBuilder(
int index) {
return updates_.get(index);
}
public static final int PHENOPACKET_SCHEMA_VERSION_FIELD_NUMBER = 6;
private volatile java.lang.Object phenopacketSchemaVersion_;
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public java.lang.String getPhenopacketSchemaVersion() {
java.lang.Object ref = phenopacketSchemaVersion_;
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();
phenopacketSchemaVersion_ = s;
return s;
}
}
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public com.google.protobuf.ByteString
getPhenopacketSchemaVersionBytes() {
java.lang.Object ref = phenopacketSchemaVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
phenopacketSchemaVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXTERNAL_REFERENCES_FIELD_NUMBER = 7;
private java.util.List externalReferences_;
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public java.util.List getExternalReferencesList() {
return externalReferences_;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public java.util.List
getExternalReferencesOrBuilderList() {
return externalReferences_;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public int getExternalReferencesCount() {
return externalReferences_.size();
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReference getExternalReferences(int index) {
return externalReferences_.get(index);
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReferenceOrBuilder getExternalReferencesOrBuilder(
int index) {
return externalReferences_.get(index);
}
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 (created_ != null) {
output.writeMessage(1, getCreated());
}
if (!getCreatedByBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, createdBy_);
}
if (!getSubmittedByBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, submittedBy_);
}
for (int i = 0; i < resources_.size(); i++) {
output.writeMessage(4, resources_.get(i));
}
for (int i = 0; i < updates_.size(); i++) {
output.writeMessage(5, updates_.get(i));
}
if (!getPhenopacketSchemaVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, phenopacketSchemaVersion_);
}
for (int i = 0; i < externalReferences_.size(); i++) {
output.writeMessage(7, externalReferences_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (created_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getCreated());
}
if (!getCreatedByBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, createdBy_);
}
if (!getSubmittedByBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, submittedBy_);
}
for (int i = 0; i < resources_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, resources_.get(i));
}
for (int i = 0; i < updates_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, updates_.get(i));
}
if (!getPhenopacketSchemaVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, phenopacketSchemaVersion_);
}
for (int i = 0; i < externalReferences_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, externalReferences_.get(i));
}
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.core.MetaData)) {
return super.equals(obj);
}
org.phenopackets.schema.v1.core.MetaData other = (org.phenopackets.schema.v1.core.MetaData) obj;
if (hasCreated() != other.hasCreated()) return false;
if (hasCreated()) {
if (!getCreated()
.equals(other.getCreated())) return false;
}
if (!getCreatedBy()
.equals(other.getCreatedBy())) return false;
if (!getSubmittedBy()
.equals(other.getSubmittedBy())) return false;
if (!getResourcesList()
.equals(other.getResourcesList())) return false;
if (!getUpdatesList()
.equals(other.getUpdatesList())) return false;
if (!getPhenopacketSchemaVersion()
.equals(other.getPhenopacketSchemaVersion())) return false;
if (!getExternalReferencesList()
.equals(other.getExternalReferencesList())) 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();
if (hasCreated()) {
hash = (37 * hash) + CREATED_FIELD_NUMBER;
hash = (53 * hash) + getCreated().hashCode();
}
hash = (37 * hash) + CREATED_BY_FIELD_NUMBER;
hash = (53 * hash) + getCreatedBy().hashCode();
hash = (37 * hash) + SUBMITTED_BY_FIELD_NUMBER;
hash = (53 * hash) + getSubmittedBy().hashCode();
if (getResourcesCount() > 0) {
hash = (37 * hash) + RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + getResourcesList().hashCode();
}
if (getUpdatesCount() > 0) {
hash = (37 * hash) + UPDATES_FIELD_NUMBER;
hash = (53 * hash) + getUpdatesList().hashCode();
}
hash = (37 * hash) + PHENOPACKET_SCHEMA_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getPhenopacketSchemaVersion().hashCode();
if (getExternalReferencesCount() > 0) {
hash = (37 * hash) + EXTERNAL_REFERENCES_FIELD_NUMBER;
hash = (53 * hash) + getExternalReferencesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.phenopackets.schema.v1.core.MetaData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.core.MetaData 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.core.MetaData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.core.MetaData 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.core.MetaData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.core.MetaData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.core.MetaData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.core.MetaData 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.core.MetaData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.core.MetaData 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.core.MetaData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.core.MetaData 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.core.MetaData 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.core.MetaData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:org.phenopackets.schema.v1.core.MetaData)
org.phenopackets.schema.v1.core.MetaDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_MetaData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_MetaData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.core.MetaData.class, org.phenopackets.schema.v1.core.MetaData.Builder.class);
}
// Construct using org.phenopackets.schema.v1.core.MetaData.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getResourcesFieldBuilder();
getUpdatesFieldBuilder();
getExternalReferencesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (createdBuilder_ == null) {
created_ = null;
} else {
created_ = null;
createdBuilder_ = null;
}
createdBy_ = "";
submittedBy_ = "";
if (resourcesBuilder_ == null) {
resources_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
resourcesBuilder_.clear();
}
if (updatesBuilder_ == null) {
updates_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
updatesBuilder_.clear();
}
phenopacketSchemaVersion_ = "";
if (externalReferencesBuilder_ == null) {
externalReferences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
externalReferencesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_MetaData_descriptor;
}
@java.lang.Override
public org.phenopackets.schema.v1.core.MetaData getDefaultInstanceForType() {
return org.phenopackets.schema.v1.core.MetaData.getDefaultInstance();
}
@java.lang.Override
public org.phenopackets.schema.v1.core.MetaData build() {
org.phenopackets.schema.v1.core.MetaData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.phenopackets.schema.v1.core.MetaData buildPartial() {
org.phenopackets.schema.v1.core.MetaData result = new org.phenopackets.schema.v1.core.MetaData(this);
int from_bitField0_ = bitField0_;
if (createdBuilder_ == null) {
result.created_ = created_;
} else {
result.created_ = createdBuilder_.build();
}
result.createdBy_ = createdBy_;
result.submittedBy_ = submittedBy_;
if (resourcesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
resources_ = java.util.Collections.unmodifiableList(resources_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.resources_ = resources_;
} else {
result.resources_ = resourcesBuilder_.build();
}
if (updatesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
updates_ = java.util.Collections.unmodifiableList(updates_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.updates_ = updates_;
} else {
result.updates_ = updatesBuilder_.build();
}
result.phenopacketSchemaVersion_ = phenopacketSchemaVersion_;
if (externalReferencesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
externalReferences_ = java.util.Collections.unmodifiableList(externalReferences_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.externalReferences_ = externalReferences_;
} else {
result.externalReferences_ = externalReferencesBuilder_.build();
}
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.core.MetaData) {
return mergeFrom((org.phenopackets.schema.v1.core.MetaData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.phenopackets.schema.v1.core.MetaData other) {
if (other == org.phenopackets.schema.v1.core.MetaData.getDefaultInstance()) return this;
if (other.hasCreated()) {
mergeCreated(other.getCreated());
}
if (!other.getCreatedBy().isEmpty()) {
createdBy_ = other.createdBy_;
onChanged();
}
if (!other.getSubmittedBy().isEmpty()) {
submittedBy_ = other.submittedBy_;
onChanged();
}
if (resourcesBuilder_ == null) {
if (!other.resources_.isEmpty()) {
if (resources_.isEmpty()) {
resources_ = other.resources_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureResourcesIsMutable();
resources_.addAll(other.resources_);
}
onChanged();
}
} else {
if (!other.resources_.isEmpty()) {
if (resourcesBuilder_.isEmpty()) {
resourcesBuilder_.dispose();
resourcesBuilder_ = null;
resources_ = other.resources_;
bitField0_ = (bitField0_ & ~0x00000001);
resourcesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getResourcesFieldBuilder() : null;
} else {
resourcesBuilder_.addAllMessages(other.resources_);
}
}
}
if (updatesBuilder_ == null) {
if (!other.updates_.isEmpty()) {
if (updates_.isEmpty()) {
updates_ = other.updates_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureUpdatesIsMutable();
updates_.addAll(other.updates_);
}
onChanged();
}
} else {
if (!other.updates_.isEmpty()) {
if (updatesBuilder_.isEmpty()) {
updatesBuilder_.dispose();
updatesBuilder_ = null;
updates_ = other.updates_;
bitField0_ = (bitField0_ & ~0x00000002);
updatesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getUpdatesFieldBuilder() : null;
} else {
updatesBuilder_.addAllMessages(other.updates_);
}
}
}
if (!other.getPhenopacketSchemaVersion().isEmpty()) {
phenopacketSchemaVersion_ = other.phenopacketSchemaVersion_;
onChanged();
}
if (externalReferencesBuilder_ == null) {
if (!other.externalReferences_.isEmpty()) {
if (externalReferences_.isEmpty()) {
externalReferences_ = other.externalReferences_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureExternalReferencesIsMutable();
externalReferences_.addAll(other.externalReferences_);
}
onChanged();
}
} else {
if (!other.externalReferences_.isEmpty()) {
if (externalReferencesBuilder_.isEmpty()) {
externalReferencesBuilder_.dispose();
externalReferencesBuilder_ = null;
externalReferences_ = other.externalReferences_;
bitField0_ = (bitField0_ & ~0x00000004);
externalReferencesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getExternalReferencesFieldBuilder() : null;
} else {
externalReferencesBuilder_.addAllMessages(other.externalReferences_);
}
}
}
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.core.MetaData parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.phenopackets.schema.v1.core.MetaData) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Timestamp created_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdBuilder_;
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public boolean hasCreated() {
return createdBuilder_ != null || created_ != null;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public com.google.protobuf.Timestamp getCreated() {
if (createdBuilder_ == null) {
return created_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : created_;
} else {
return createdBuilder_.getMessage();
}
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public Builder setCreated(com.google.protobuf.Timestamp value) {
if (createdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
created_ = value;
onChanged();
} else {
createdBuilder_.setMessage(value);
}
return this;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public Builder setCreated(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdBuilder_ == null) {
created_ = builderForValue.build();
onChanged();
} else {
createdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public Builder mergeCreated(com.google.protobuf.Timestamp value) {
if (createdBuilder_ == null) {
if (created_ != null) {
created_ =
com.google.protobuf.Timestamp.newBuilder(created_).mergeFrom(value).buildPartial();
} else {
created_ = value;
}
onChanged();
} else {
createdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public Builder clearCreated() {
if (createdBuilder_ == null) {
created_ = null;
onChanged();
} else {
created_ = null;
createdBuilder_ = null;
}
return this;
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public com.google.protobuf.Timestamp.Builder getCreatedBuilder() {
onChanged();
return getCreatedFieldBuilder().getBuilder();
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder() {
if (createdBuilder_ != null) {
return createdBuilder_.getMessageOrBuilder();
} else {
return created_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : created_;
}
}
/**
*
* ISO8601 UTC timestamp for when this phenopacket was created in ISO "2018-03-01T00:00:00Z"
*
*
* .google.protobuf.Timestamp created = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedFieldBuilder() {
if (createdBuilder_ == null) {
createdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreated(),
getParentForChildren(),
isClean());
created_ = null;
}
return createdBuilder_;
}
private java.lang.Object createdBy_ = "";
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public java.lang.String getCreatedBy() {
java.lang.Object ref = createdBy_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
createdBy_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public com.google.protobuf.ByteString
getCreatedByBytes() {
java.lang.Object ref = createdBy_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
createdBy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public Builder setCreatedBy(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
createdBy_ = value;
onChanged();
return this;
}
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public Builder clearCreatedBy() {
createdBy_ = getDefaultInstance().getCreatedBy();
onChanged();
return this;
}
/**
*
* some kind of identifier for the contributor/ program
*
*
* string created_by = 2;
*/
public Builder setCreatedByBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
createdBy_ = value;
onChanged();
return this;
}
private java.lang.Object submittedBy_ = "";
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public java.lang.String getSubmittedBy() {
java.lang.Object ref = submittedBy_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
submittedBy_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public com.google.protobuf.ByteString
getSubmittedByBytes() {
java.lang.Object ref = submittedBy_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
submittedBy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public Builder setSubmittedBy(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
submittedBy_ = value;
onChanged();
return this;
}
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public Builder clearSubmittedBy() {
submittedBy_ = getDefaultInstance().getSubmittedBy();
onChanged();
return this;
}
/**
*
* information about the person/organisation/network that has submitted this phenopacket
*
*
* string submitted_by = 3;
*/
public Builder setSubmittedByBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
submittedBy_ = value;
onChanged();
return this;
}
private java.util.List resources_ =
java.util.Collections.emptyList();
private void ensureResourcesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
resources_ = new java.util.ArrayList(resources_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.Resource, org.phenopackets.schema.v1.core.Resource.Builder, org.phenopackets.schema.v1.core.ResourceOrBuilder> resourcesBuilder_;
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public java.util.List getResourcesList() {
if (resourcesBuilder_ == null) {
return java.util.Collections.unmodifiableList(resources_);
} else {
return resourcesBuilder_.getMessageList();
}
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public int getResourcesCount() {
if (resourcesBuilder_ == null) {
return resources_.size();
} else {
return resourcesBuilder_.getCount();
}
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.Resource getResources(int index) {
if (resourcesBuilder_ == null) {
return resources_.get(index);
} else {
return resourcesBuilder_.getMessage(index);
}
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder setResources(
int index, org.phenopackets.schema.v1.core.Resource value) {
if (resourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourcesIsMutable();
resources_.set(index, value);
onChanged();
} else {
resourcesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder setResources(
int index, org.phenopackets.schema.v1.core.Resource.Builder builderForValue) {
if (resourcesBuilder_ == null) {
ensureResourcesIsMutable();
resources_.set(index, builderForValue.build());
onChanged();
} else {
resourcesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder addResources(org.phenopackets.schema.v1.core.Resource value) {
if (resourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourcesIsMutable();
resources_.add(value);
onChanged();
} else {
resourcesBuilder_.addMessage(value);
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder addResources(
int index, org.phenopackets.schema.v1.core.Resource value) {
if (resourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourcesIsMutable();
resources_.add(index, value);
onChanged();
} else {
resourcesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder addResources(
org.phenopackets.schema.v1.core.Resource.Builder builderForValue) {
if (resourcesBuilder_ == null) {
ensureResourcesIsMutable();
resources_.add(builderForValue.build());
onChanged();
} else {
resourcesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder addResources(
int index, org.phenopackets.schema.v1.core.Resource.Builder builderForValue) {
if (resourcesBuilder_ == null) {
ensureResourcesIsMutable();
resources_.add(index, builderForValue.build());
onChanged();
} else {
resourcesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder addAllResources(
java.lang.Iterable values) {
if (resourcesBuilder_ == null) {
ensureResourcesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, resources_);
onChanged();
} else {
resourcesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder clearResources() {
if (resourcesBuilder_ == null) {
resources_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
resourcesBuilder_.clear();
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public Builder removeResources(int index) {
if (resourcesBuilder_ == null) {
ensureResourcesIsMutable();
resources_.remove(index);
onChanged();
} else {
resourcesBuilder_.remove(index);
}
return this;
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.Resource.Builder getResourcesBuilder(
int index) {
return getResourcesFieldBuilder().getBuilder(index);
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.ResourceOrBuilder getResourcesOrBuilder(
int index) {
if (resourcesBuilder_ == null) {
return resources_.get(index); } else {
return resourcesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public java.util.List
getResourcesOrBuilderList() {
if (resourcesBuilder_ != null) {
return resourcesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(resources_);
}
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.Resource.Builder addResourcesBuilder() {
return getResourcesFieldBuilder().addBuilder(
org.phenopackets.schema.v1.core.Resource.getDefaultInstance());
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public org.phenopackets.schema.v1.core.Resource.Builder addResourcesBuilder(
int index) {
return getResourcesFieldBuilder().addBuilder(
index, org.phenopackets.schema.v1.core.Resource.getDefaultInstance());
}
/**
*
* a listing of the ontologies and resources referenced in the phenopacket
*
*
* repeated .org.phenopackets.schema.v1.core.Resource resources = 4;
*/
public java.util.List
getResourcesBuilderList() {
return getResourcesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.Resource, org.phenopackets.schema.v1.core.Resource.Builder, org.phenopackets.schema.v1.core.ResourceOrBuilder>
getResourcesFieldBuilder() {
if (resourcesBuilder_ == null) {
resourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.Resource, org.phenopackets.schema.v1.core.Resource.Builder, org.phenopackets.schema.v1.core.ResourceOrBuilder>(
resources_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
resources_ = null;
}
return resourcesBuilder_;
}
private java.util.List updates_ =
java.util.Collections.emptyList();
private void ensureUpdatesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
updates_ = new java.util.ArrayList(updates_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.Update, org.phenopackets.schema.v1.core.Update.Builder, org.phenopackets.schema.v1.core.UpdateOrBuilder> updatesBuilder_;
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public java.util.List getUpdatesList() {
if (updatesBuilder_ == null) {
return java.util.Collections.unmodifiableList(updates_);
} else {
return updatesBuilder_.getMessageList();
}
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public int getUpdatesCount() {
if (updatesBuilder_ == null) {
return updates_.size();
} else {
return updatesBuilder_.getCount();
}
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.Update getUpdates(int index) {
if (updatesBuilder_ == null) {
return updates_.get(index);
} else {
return updatesBuilder_.getMessage(index);
}
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder setUpdates(
int index, org.phenopackets.schema.v1.core.Update value) {
if (updatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpdatesIsMutable();
updates_.set(index, value);
onChanged();
} else {
updatesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder setUpdates(
int index, org.phenopackets.schema.v1.core.Update.Builder builderForValue) {
if (updatesBuilder_ == null) {
ensureUpdatesIsMutable();
updates_.set(index, builderForValue.build());
onChanged();
} else {
updatesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder addUpdates(org.phenopackets.schema.v1.core.Update value) {
if (updatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpdatesIsMutable();
updates_.add(value);
onChanged();
} else {
updatesBuilder_.addMessage(value);
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder addUpdates(
int index, org.phenopackets.schema.v1.core.Update value) {
if (updatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpdatesIsMutable();
updates_.add(index, value);
onChanged();
} else {
updatesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder addUpdates(
org.phenopackets.schema.v1.core.Update.Builder builderForValue) {
if (updatesBuilder_ == null) {
ensureUpdatesIsMutable();
updates_.add(builderForValue.build());
onChanged();
} else {
updatesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder addUpdates(
int index, org.phenopackets.schema.v1.core.Update.Builder builderForValue) {
if (updatesBuilder_ == null) {
ensureUpdatesIsMutable();
updates_.add(index, builderForValue.build());
onChanged();
} else {
updatesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder addAllUpdates(
java.lang.Iterable values) {
if (updatesBuilder_ == null) {
ensureUpdatesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, updates_);
onChanged();
} else {
updatesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder clearUpdates() {
if (updatesBuilder_ == null) {
updates_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
updatesBuilder_.clear();
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public Builder removeUpdates(int index) {
if (updatesBuilder_ == null) {
ensureUpdatesIsMutable();
updates_.remove(index);
onChanged();
} else {
updatesBuilder_.remove(index);
}
return this;
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.Update.Builder getUpdatesBuilder(
int index) {
return getUpdatesFieldBuilder().getBuilder(index);
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.UpdateOrBuilder getUpdatesOrBuilder(
int index) {
if (updatesBuilder_ == null) {
return updates_.get(index); } else {
return updatesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public java.util.List
getUpdatesOrBuilderList() {
if (updatesBuilder_ != null) {
return updatesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(updates_);
}
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.Update.Builder addUpdatesBuilder() {
return getUpdatesFieldBuilder().addBuilder(
org.phenopackets.schema.v1.core.Update.getDefaultInstance());
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public org.phenopackets.schema.v1.core.Update.Builder addUpdatesBuilder(
int index) {
return getUpdatesFieldBuilder().addBuilder(
index, org.phenopackets.schema.v1.core.Update.getDefaultInstance());
}
/**
*
* An OPTIONAL list of Updates to the phenopacket.
*
*
* repeated .org.phenopackets.schema.v1.core.Update updates = 5;
*/
public java.util.List
getUpdatesBuilderList() {
return getUpdatesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.Update, org.phenopackets.schema.v1.core.Update.Builder, org.phenopackets.schema.v1.core.UpdateOrBuilder>
getUpdatesFieldBuilder() {
if (updatesBuilder_ == null) {
updatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.Update, org.phenopackets.schema.v1.core.Update.Builder, org.phenopackets.schema.v1.core.UpdateOrBuilder>(
updates_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
updates_ = null;
}
return updatesBuilder_;
}
private java.lang.Object phenopacketSchemaVersion_ = "";
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public java.lang.String getPhenopacketSchemaVersion() {
java.lang.Object ref = phenopacketSchemaVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
phenopacketSchemaVersion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public com.google.protobuf.ByteString
getPhenopacketSchemaVersionBytes() {
java.lang.Object ref = phenopacketSchemaVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
phenopacketSchemaVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public Builder setPhenopacketSchemaVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
phenopacketSchemaVersion_ = value;
onChanged();
return this;
}
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public Builder clearPhenopacketSchemaVersion() {
phenopacketSchemaVersion_ = getDefaultInstance().getPhenopacketSchemaVersion();
onChanged();
return this;
}
/**
*
* phenopacket-schema-version used to create this phenopacket
*
*
* string phenopacket_schema_version = 6;
*/
public Builder setPhenopacketSchemaVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
phenopacketSchemaVersion_ = value;
onChanged();
return this;
}
private java.util.List externalReferences_ =
java.util.Collections.emptyList();
private void ensureExternalReferencesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
externalReferences_ = new java.util.ArrayList(externalReferences_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.ExternalReference, org.phenopackets.schema.v1.core.ExternalReference.Builder, org.phenopackets.schema.v1.core.ExternalReferenceOrBuilder> externalReferencesBuilder_;
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public java.util.List getExternalReferencesList() {
if (externalReferencesBuilder_ == null) {
return java.util.Collections.unmodifiableList(externalReferences_);
} else {
return externalReferencesBuilder_.getMessageList();
}
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public int getExternalReferencesCount() {
if (externalReferencesBuilder_ == null) {
return externalReferences_.size();
} else {
return externalReferencesBuilder_.getCount();
}
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReference getExternalReferences(int index) {
if (externalReferencesBuilder_ == null) {
return externalReferences_.get(index);
} else {
return externalReferencesBuilder_.getMessage(index);
}
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder setExternalReferences(
int index, org.phenopackets.schema.v1.core.ExternalReference value) {
if (externalReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExternalReferencesIsMutable();
externalReferences_.set(index, value);
onChanged();
} else {
externalReferencesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder setExternalReferences(
int index, org.phenopackets.schema.v1.core.ExternalReference.Builder builderForValue) {
if (externalReferencesBuilder_ == null) {
ensureExternalReferencesIsMutable();
externalReferences_.set(index, builderForValue.build());
onChanged();
} else {
externalReferencesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder addExternalReferences(org.phenopackets.schema.v1.core.ExternalReference value) {
if (externalReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExternalReferencesIsMutable();
externalReferences_.add(value);
onChanged();
} else {
externalReferencesBuilder_.addMessage(value);
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder addExternalReferences(
int index, org.phenopackets.schema.v1.core.ExternalReference value) {
if (externalReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExternalReferencesIsMutable();
externalReferences_.add(index, value);
onChanged();
} else {
externalReferencesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder addExternalReferences(
org.phenopackets.schema.v1.core.ExternalReference.Builder builderForValue) {
if (externalReferencesBuilder_ == null) {
ensureExternalReferencesIsMutable();
externalReferences_.add(builderForValue.build());
onChanged();
} else {
externalReferencesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder addExternalReferences(
int index, org.phenopackets.schema.v1.core.ExternalReference.Builder builderForValue) {
if (externalReferencesBuilder_ == null) {
ensureExternalReferencesIsMutable();
externalReferences_.add(index, builderForValue.build());
onChanged();
} else {
externalReferencesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder addAllExternalReferences(
java.lang.Iterable values) {
if (externalReferencesBuilder_ == null) {
ensureExternalReferencesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, externalReferences_);
onChanged();
} else {
externalReferencesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder clearExternalReferences() {
if (externalReferencesBuilder_ == null) {
externalReferences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
externalReferencesBuilder_.clear();
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public Builder removeExternalReferences(int index) {
if (externalReferencesBuilder_ == null) {
ensureExternalReferencesIsMutable();
externalReferences_.remove(index);
onChanged();
} else {
externalReferencesBuilder_.remove(index);
}
return this;
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReference.Builder getExternalReferencesBuilder(
int index) {
return getExternalReferencesFieldBuilder().getBuilder(index);
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReferenceOrBuilder getExternalReferencesOrBuilder(
int index) {
if (externalReferencesBuilder_ == null) {
return externalReferences_.get(index); } else {
return externalReferencesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public java.util.List
getExternalReferencesOrBuilderList() {
if (externalReferencesBuilder_ != null) {
return externalReferencesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(externalReferences_);
}
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReference.Builder addExternalReferencesBuilder() {
return getExternalReferencesFieldBuilder().addBuilder(
org.phenopackets.schema.v1.core.ExternalReference.getDefaultInstance());
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public org.phenopackets.schema.v1.core.ExternalReference.Builder addExternalReferencesBuilder(
int index) {
return getExternalReferencesFieldBuilder().addBuilder(
index, org.phenopackets.schema.v1.core.ExternalReference.getDefaultInstance());
}
/**
*
* External identifiers for this message. These are considered different representation of the same record, not
* records which are in some other relation with the record at hand. For example this might be a PubMed reference
* to a study in which the individuals are reported.
*
*
* repeated .org.phenopackets.schema.v1.core.ExternalReference external_references = 7;
*/
public java.util.List
getExternalReferencesBuilderList() {
return getExternalReferencesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.ExternalReference, org.phenopackets.schema.v1.core.ExternalReference.Builder, org.phenopackets.schema.v1.core.ExternalReferenceOrBuilder>
getExternalReferencesFieldBuilder() {
if (externalReferencesBuilder_ == null) {
externalReferencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.phenopackets.schema.v1.core.ExternalReference, org.phenopackets.schema.v1.core.ExternalReference.Builder, org.phenopackets.schema.v1.core.ExternalReferenceOrBuilder>(
externalReferences_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
externalReferences_ = null;
}
return externalReferencesBuilder_;
}
@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.core.MetaData)
}
// @@protoc_insertion_point(class_scope:org.phenopackets.schema.v1.core.MetaData)
private static final org.phenopackets.schema.v1.core.MetaData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.phenopackets.schema.v1.core.MetaData();
}
public static org.phenopackets.schema.v1.core.MetaData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MetaData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MetaData(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.core.MetaData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}