ets.phenopacket-schema.1.0.0-RC3.source-code.phenopackets.pb.cc 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: phenopackets.proto
#include "phenopackets.pb.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
// @@protoc_insertion_point(includes)
#include
extern PROTOBUF_INTERNAL_EXPORT_phenopackets_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<8> scc_info_Phenopacket_phenopackets_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<7> scc_info_Biosample_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Disease_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Gene_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_HtsFile_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_Individual_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_MetaData_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Pedigree_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_PhenotypicFeature_base_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_base_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Variant_base_2eproto;
namespace org {
namespace phenopackets {
namespace schema {
namespace v1 {
class PhenopacketDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance;
} _Phenopacket_default_instance_;
class FamilyDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance;
} _Family_default_instance_;
class CohortDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance;
} _Cohort_default_instance_;
} // namespace v1
} // namespace schema
} // namespace phenopackets
} // namespace org
static void InitDefaultsscc_info_Cohort_phenopackets_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::org::phenopackets::schema::v1::_Cohort_default_instance_;
new (ptr) ::org::phenopackets::schema::v1::Cohort();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::org::phenopackets::schema::v1::Cohort::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Cohort_phenopackets_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Cohort_phenopackets_2eproto}, {
&scc_info_Phenopacket_phenopackets_2eproto.base,
&scc_info_HtsFile_base_2eproto.base,
&scc_info_MetaData_base_2eproto.base,}};
static void InitDefaultsscc_info_Family_phenopackets_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::org::phenopackets::schema::v1::_Family_default_instance_;
new (ptr) ::org::phenopackets::schema::v1::Family();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::org::phenopackets::schema::v1::Family::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_Family_phenopackets_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsscc_info_Family_phenopackets_2eproto}, {
&scc_info_Phenopacket_phenopackets_2eproto.base,
&scc_info_Pedigree_base_2eproto.base,
&scc_info_HtsFile_base_2eproto.base,
&scc_info_MetaData_base_2eproto.base,}};
static void InitDefaultsscc_info_Phenopacket_phenopackets_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::org::phenopackets::schema::v1::_Phenopacket_default_instance_;
new (ptr) ::org::phenopackets::schema::v1::Phenopacket();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::org::phenopackets::schema::v1::Phenopacket::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<8> scc_info_Phenopacket_phenopackets_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 8, InitDefaultsscc_info_Phenopacket_phenopackets_2eproto}, {
&scc_info_Individual_base_2eproto.base,
&scc_info_PhenotypicFeature_base_2eproto.base,
&scc_info_Biosample_base_2eproto.base,
&scc_info_Gene_base_2eproto.base,
&scc_info_Variant_base_2eproto.base,
&scc_info_Disease_base_2eproto.base,
&scc_info_HtsFile_base_2eproto.base,
&scc_info_MetaData_base_2eproto.base,}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_phenopackets_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_phenopackets_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_phenopackets_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_phenopackets_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, id_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, subject_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, phenotypic_features_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, biosamples_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, genes_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, variants_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, diseases_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, hts_files_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Phenopacket, meta_data_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, id_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, proband_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, relatives_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, pedigree_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, hts_files_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Family, meta_data_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Cohort, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Cohort, id_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Cohort, description_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Cohort, members_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Cohort, hts_files_),
PROTOBUF_FIELD_OFFSET(::org::phenopackets::schema::v1::Cohort, meta_data_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::org::phenopackets::schema::v1::Phenopacket)},
{ 14, -1, sizeof(::org::phenopackets::schema::v1::Family)},
{ 25, -1, sizeof(::org::phenopackets::schema::v1::Cohort)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast(&::org::phenopackets::schema::v1::_Phenopacket_default_instance_),
reinterpret_cast(&::org::phenopackets::schema::v1::_Family_default_instance_),
reinterpret_cast(&::org::phenopackets::schema::v1::_Cohort_default_instance_),
};
const char descriptor_table_protodef_phenopackets_2eproto[] =
"\n\022phenopackets.proto\022\032org.phenopackets.s"
"chema.v1\032\nbase.proto\"\221\004\n\013Phenopacket\022\n\n\002"
"id\030\001 \001(\t\022<\n\007subject\030\002 \001(\0132+.org.phenopac"
"kets.schema.v1.core.Individual\022O\n\023phenot"
"ypic_features\030\003 \003(\01322.org.phenopackets.s"
"chema.v1.core.PhenotypicFeature\022>\n\nbiosa"
"mples\030\004 \003(\0132*.org.phenopackets.schema.v1"
".core.Biosample\0224\n\005genes\030\005 \003(\0132%.org.phe"
"nopackets.schema.v1.core.Gene\022:\n\010variant"
"s\030\006 \003(\0132(.org.phenopackets.schema.v1.cor"
"e.Variant\022:\n\010diseases\030\007 \003(\0132(.org.phenop"
"ackets.schema.v1.core.Disease\022;\n\thts_fil"
"es\030\010 \003(\0132(.org.phenopackets.schema.v1.co"
"re.HtsFile\022<\n\tmeta_data\030\t \001(\0132).org.phen"
"opackets.schema.v1.core.MetaData\"\302\002\n\006Fam"
"ily\022\n\n\002id\030\001 \001(\t\0228\n\007proband\030\002 \001(\0132\'.org.p"
"henopackets.schema.v1.Phenopacket\022:\n\trel"
"atives\030\003 \003(\0132\'.org.phenopackets.schema.v"
"1.Phenopacket\022;\n\010pedigree\030\004 \001(\0132).org.ph"
"enopackets.schema.v1.core.Pedigree\022;\n\tht"
"s_files\030\005 \003(\0132(.org.phenopackets.schema."
"v1.core.HtsFile\022<\n\tmeta_data\030\006 \001(\0132).org"
".phenopackets.schema.v1.core.MetaData\"\336\001"
"\n\006Cohort\022\n\n\002id\030\001 \001(\t\022\023\n\013description\030\002 \001("
"\t\0228\n\007members\030\003 \003(\0132\'.org.phenopackets.sc"
"hema.v1.Phenopacket\022;\n\thts_files\030\004 \003(\0132("
".org.phenopackets.schema.v1.core.HtsFile"
"\022<\n\tmeta_data\030\005 \001(\0132).org.phenopackets.s"
"chema.v1.core.MetaDataB\036\n\032org.phenopacke"
"ts.schema.v1P\001b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_phenopackets_2eproto_deps[1] = {
&::descriptor_table_base_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_phenopackets_2eproto_sccs[3] = {
&scc_info_Cohort_phenopackets_2eproto.base,
&scc_info_Family_phenopackets_2eproto.base,
&scc_info_Phenopacket_phenopackets_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_phenopackets_2eproto_once;
static bool descriptor_table_phenopackets_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_phenopackets_2eproto = {
&descriptor_table_phenopackets_2eproto_initialized, descriptor_table_protodef_phenopackets_2eproto, "phenopackets.proto", 1182,
&descriptor_table_phenopackets_2eproto_once, descriptor_table_phenopackets_2eproto_sccs, descriptor_table_phenopackets_2eproto_deps, 3, 1,
schemas, file_default_instances, TableStruct_phenopackets_2eproto::offsets,
file_level_metadata_phenopackets_2eproto, 3, file_level_enum_descriptors_phenopackets_2eproto, file_level_service_descriptors_phenopackets_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_phenopackets_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_phenopackets_2eproto), true);
namespace org {
namespace phenopackets {
namespace schema {
namespace v1 {
// ===================================================================
void Phenopacket::InitAsDefaultInstance() {
::org::phenopackets::schema::v1::_Phenopacket_default_instance_._instance.get_mutable()->subject_ = const_cast< ::org::phenopackets::schema::v1::core::Individual*>(
::org::phenopackets::schema::v1::core::Individual::internal_default_instance());
::org::phenopackets::schema::v1::_Phenopacket_default_instance_._instance.get_mutable()->meta_data_ = const_cast< ::org::phenopackets::schema::v1::core::MetaData*>(
::org::phenopackets::schema::v1::core::MetaData::internal_default_instance());
}
class Phenopacket::HasBitSetters {
public:
static const ::org::phenopackets::schema::v1::core::Individual& subject(const Phenopacket* msg);
static const ::org::phenopackets::schema::v1::core::MetaData& meta_data(const Phenopacket* msg);
};
const ::org::phenopackets::schema::v1::core::Individual&
Phenopacket::HasBitSetters::subject(const Phenopacket* msg) {
return *msg->subject_;
}
const ::org::phenopackets::schema::v1::core::MetaData&
Phenopacket::HasBitSetters::meta_data(const Phenopacket* msg) {
return *msg->meta_data_;
}
void Phenopacket::clear_subject() {
if (GetArenaNoVirtual() == nullptr && subject_ != nullptr) {
delete subject_;
}
subject_ = nullptr;
}
void Phenopacket::clear_phenotypic_features() {
phenotypic_features_.Clear();
}
void Phenopacket::clear_biosamples() {
biosamples_.Clear();
}
void Phenopacket::clear_genes() {
genes_.Clear();
}
void Phenopacket::clear_variants() {
variants_.Clear();
}
void Phenopacket::clear_diseases() {
diseases_.Clear();
}
void Phenopacket::clear_hts_files() {
hts_files_.Clear();
}
void Phenopacket::clear_meta_data() {
if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
delete meta_data_;
}
meta_data_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Phenopacket::kIdFieldNumber;
const int Phenopacket::kSubjectFieldNumber;
const int Phenopacket::kPhenotypicFeaturesFieldNumber;
const int Phenopacket::kBiosamplesFieldNumber;
const int Phenopacket::kGenesFieldNumber;
const int Phenopacket::kVariantsFieldNumber;
const int Phenopacket::kDiseasesFieldNumber;
const int Phenopacket::kHtsFilesFieldNumber;
const int Phenopacket::kMetaDataFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Phenopacket::Phenopacket()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:org.phenopackets.schema.v1.Phenopacket)
}
Phenopacket::Phenopacket(const Phenopacket& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
phenotypic_features_(from.phenotypic_features_),
biosamples_(from.biosamples_),
genes_(from.genes_),
variants_(from.variants_),
diseases_(from.diseases_),
hts_files_(from.hts_files_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from.id().size() > 0) {
id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
}
if (from.has_subject()) {
subject_ = new ::org::phenopackets::schema::v1::core::Individual(*from.subject_);
} else {
subject_ = nullptr;
}
if (from.has_meta_data()) {
meta_data_ = new ::org::phenopackets::schema::v1::core::MetaData(*from.meta_data_);
} else {
meta_data_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:org.phenopackets.schema.v1.Phenopacket)
}
void Phenopacket::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Phenopacket_phenopackets_2eproto.base);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&subject_, 0, static_cast(
reinterpret_cast(&meta_data_) -
reinterpret_cast(&subject_)) + sizeof(meta_data_));
}
Phenopacket::~Phenopacket() {
// @@protoc_insertion_point(destructor:org.phenopackets.schema.v1.Phenopacket)
SharedDtor();
}
void Phenopacket::SharedDtor() {
id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete subject_;
if (this != internal_default_instance()) delete meta_data_;
}
void Phenopacket::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Phenopacket& Phenopacket::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Phenopacket_phenopackets_2eproto.base);
return *internal_default_instance();
}
void Phenopacket::Clear() {
// @@protoc_insertion_point(message_clear_start:org.phenopackets.schema.v1.Phenopacket)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
phenotypic_features_.Clear();
biosamples_.Clear();
genes_.Clear();
variants_.Clear();
diseases_.Clear();
hts_files_.Clear();
id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (GetArenaNoVirtual() == nullptr && subject_ != nullptr) {
delete subject_;
}
subject_ = nullptr;
if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
delete meta_data_;
}
meta_data_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Phenopacket::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// string id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_id(), ptr, ctx, "org.phenopackets.schema.v1.Phenopacket.id");
CHK_(ptr);
} else goto handle_unusual;
continue;
// .org.phenopackets.schema.v1.core.Individual subject = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(mutable_subject(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.PhenotypicFeature phenotypic_features = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_phenotypic_features(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.Biosample biosamples = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_biosamples(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_genes(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_variants(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_diseases(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_hts_files(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66);
} else goto handle_unusual;
continue;
// .org.phenopackets.schema.v1.core.MetaData meta_data = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
ptr = ctx->ParseMessage(mutable_meta_data(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Phenopacket::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:org.phenopackets.schema.v1.Phenopacket)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string id = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_id()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"org.phenopackets.schema.v1.Phenopacket.id"));
} else {
goto handle_unusual;
}
break;
}
// .org.phenopackets.schema.v1.core.Individual subject = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_subject()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.PhenotypicFeature phenotypic_features = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_phenotypic_features()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.Biosample biosamples = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_biosamples()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_genes()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_variants()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
case 7: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_diseases()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 8;
case 8: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_hts_files()));
} else {
goto handle_unusual;
}
break;
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 9;
case 9: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_meta_data()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:org.phenopackets.schema.v1.Phenopacket)
return true;
failure:
// @@protoc_insertion_point(parse_failure:org.phenopackets.schema.v1.Phenopacket)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Phenopacket::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:org.phenopackets.schema.v1.Phenopacket)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1;
if (this->id().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Phenopacket.id");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->id(), output);
}
// .org.phenopackets.schema.v1.core.Individual subject = 2;
if (this->has_subject()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2, HasBitSetters::subject(this), output);
}
// repeated .org.phenopackets.schema.v1.core.PhenotypicFeature phenotypic_features = 3;
for (unsigned int i = 0,
n = static_cast(this->phenotypic_features_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
3,
this->phenotypic_features(static_cast(i)),
output);
}
// repeated .org.phenopackets.schema.v1.core.Biosample biosamples = 4;
for (unsigned int i = 0,
n = static_cast(this->biosamples_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
4,
this->biosamples(static_cast(i)),
output);
}
// repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
for (unsigned int i = 0,
n = static_cast(this->genes_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
5,
this->genes(static_cast(i)),
output);
}
// repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
for (unsigned int i = 0,
n = static_cast(this->variants_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
6,
this->variants(static_cast(i)),
output);
}
// repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
for (unsigned int i = 0,
n = static_cast(this->diseases_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
7,
this->diseases(static_cast(i)),
output);
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 8;
for (unsigned int i = 0,
n = static_cast(this->hts_files_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
8,
this->hts_files(static_cast(i)),
output);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 9;
if (this->has_meta_data()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
9, HasBitSetters::meta_data(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:org.phenopackets.schema.v1.Phenopacket)
}
::PROTOBUF_NAMESPACE_ID::uint8* Phenopacket::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:org.phenopackets.schema.v1.Phenopacket)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1;
if (this->id().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Phenopacket.id");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1, this->id(), target);
}
// .org.phenopackets.schema.v1.core.Individual subject = 2;
if (this->has_subject()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, HasBitSetters::subject(this), target);
}
// repeated .org.phenopackets.schema.v1.core.PhenotypicFeature phenotypic_features = 3;
for (unsigned int i = 0,
n = static_cast(this->phenotypic_features_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
3, this->phenotypic_features(static_cast(i)), target);
}
// repeated .org.phenopackets.schema.v1.core.Biosample biosamples = 4;
for (unsigned int i = 0,
n = static_cast(this->biosamples_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
4, this->biosamples(static_cast(i)), target);
}
// repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
for (unsigned int i = 0,
n = static_cast(this->genes_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->genes(static_cast(i)), target);
}
// repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
for (unsigned int i = 0,
n = static_cast(this->variants_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
6, this->variants(static_cast(i)), target);
}
// repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
for (unsigned int i = 0,
n = static_cast(this->diseases_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
7, this->diseases(static_cast(i)), target);
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 8;
for (unsigned int i = 0,
n = static_cast(this->hts_files_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
8, this->hts_files(static_cast(i)), target);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 9;
if (this->has_meta_data()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
9, HasBitSetters::meta_data(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:org.phenopackets.schema.v1.Phenopacket)
return target;
}
size_t Phenopacket::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:org.phenopackets.schema.v1.Phenopacket)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .org.phenopackets.schema.v1.core.PhenotypicFeature phenotypic_features = 3;
{
unsigned int count = static_cast(this->phenotypic_features_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->phenotypic_features(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.Biosample biosamples = 4;
{
unsigned int count = static_cast(this->biosamples_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->biosamples(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.Gene genes = 5;
{
unsigned int count = static_cast(this->genes_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->genes(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.Variant variants = 6;
{
unsigned int count = static_cast(this->variants_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->variants(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.Disease diseases = 7;
{
unsigned int count = static_cast(this->diseases_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->diseases(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 8;
{
unsigned int count = static_cast(this->hts_files_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->hts_files(static_cast(i)));
}
}
// string id = 1;
if (this->id().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->id());
}
// .org.phenopackets.schema.v1.core.Individual subject = 2;
if (this->has_subject()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*subject_);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 9;
if (this->has_meta_data()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*meta_data_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Phenopacket::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:org.phenopackets.schema.v1.Phenopacket)
GOOGLE_DCHECK_NE(&from, this);
const Phenopacket* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:org.phenopackets.schema.v1.Phenopacket)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:org.phenopackets.schema.v1.Phenopacket)
MergeFrom(*source);
}
}
void Phenopacket::MergeFrom(const Phenopacket& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:org.phenopackets.schema.v1.Phenopacket)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
phenotypic_features_.MergeFrom(from.phenotypic_features_);
biosamples_.MergeFrom(from.biosamples_);
genes_.MergeFrom(from.genes_);
variants_.MergeFrom(from.variants_);
diseases_.MergeFrom(from.diseases_);
hts_files_.MergeFrom(from.hts_files_);
if (from.id().size() > 0) {
id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
}
if (from.has_subject()) {
mutable_subject()->::org::phenopackets::schema::v1::core::Individual::MergeFrom(from.subject());
}
if (from.has_meta_data()) {
mutable_meta_data()->::org::phenopackets::schema::v1::core::MetaData::MergeFrom(from.meta_data());
}
}
void Phenopacket::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:org.phenopackets.schema.v1.Phenopacket)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Phenopacket::CopyFrom(const Phenopacket& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:org.phenopackets.schema.v1.Phenopacket)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Phenopacket::IsInitialized() const {
return true;
}
void Phenopacket::Swap(Phenopacket* other) {
if (other == this) return;
InternalSwap(other);
}
void Phenopacket::InternalSwap(Phenopacket* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&phenotypic_features_)->InternalSwap(CastToBase(&other->phenotypic_features_));
CastToBase(&biosamples_)->InternalSwap(CastToBase(&other->biosamples_));
CastToBase(&genes_)->InternalSwap(CastToBase(&other->genes_));
CastToBase(&variants_)->InternalSwap(CastToBase(&other->variants_));
CastToBase(&diseases_)->InternalSwap(CastToBase(&other->diseases_));
CastToBase(&hts_files_)->InternalSwap(CastToBase(&other->hts_files_));
id_.Swap(&other->id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(subject_, other->subject_);
swap(meta_data_, other->meta_data_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Phenopacket::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void Family::InitAsDefaultInstance() {
::org::phenopackets::schema::v1::_Family_default_instance_._instance.get_mutable()->proband_ = const_cast< ::org::phenopackets::schema::v1::Phenopacket*>(
::org::phenopackets::schema::v1::Phenopacket::internal_default_instance());
::org::phenopackets::schema::v1::_Family_default_instance_._instance.get_mutable()->pedigree_ = const_cast< ::org::phenopackets::schema::v1::core::Pedigree*>(
::org::phenopackets::schema::v1::core::Pedigree::internal_default_instance());
::org::phenopackets::schema::v1::_Family_default_instance_._instance.get_mutable()->meta_data_ = const_cast< ::org::phenopackets::schema::v1::core::MetaData*>(
::org::phenopackets::schema::v1::core::MetaData::internal_default_instance());
}
class Family::HasBitSetters {
public:
static const ::org::phenopackets::schema::v1::Phenopacket& proband(const Family* msg);
static const ::org::phenopackets::schema::v1::core::Pedigree& pedigree(const Family* msg);
static const ::org::phenopackets::schema::v1::core::MetaData& meta_data(const Family* msg);
};
const ::org::phenopackets::schema::v1::Phenopacket&
Family::HasBitSetters::proband(const Family* msg) {
return *msg->proband_;
}
const ::org::phenopackets::schema::v1::core::Pedigree&
Family::HasBitSetters::pedigree(const Family* msg) {
return *msg->pedigree_;
}
const ::org::phenopackets::schema::v1::core::MetaData&
Family::HasBitSetters::meta_data(const Family* msg) {
return *msg->meta_data_;
}
void Family::clear_pedigree() {
if (GetArenaNoVirtual() == nullptr && pedigree_ != nullptr) {
delete pedigree_;
}
pedigree_ = nullptr;
}
void Family::clear_hts_files() {
hts_files_.Clear();
}
void Family::clear_meta_data() {
if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
delete meta_data_;
}
meta_data_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Family::kIdFieldNumber;
const int Family::kProbandFieldNumber;
const int Family::kRelativesFieldNumber;
const int Family::kPedigreeFieldNumber;
const int Family::kHtsFilesFieldNumber;
const int Family::kMetaDataFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Family::Family()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:org.phenopackets.schema.v1.Family)
}
Family::Family(const Family& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
relatives_(from.relatives_),
hts_files_(from.hts_files_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from.id().size() > 0) {
id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
}
if (from.has_proband()) {
proband_ = new ::org::phenopackets::schema::v1::Phenopacket(*from.proband_);
} else {
proband_ = nullptr;
}
if (from.has_pedigree()) {
pedigree_ = new ::org::phenopackets::schema::v1::core::Pedigree(*from.pedigree_);
} else {
pedigree_ = nullptr;
}
if (from.has_meta_data()) {
meta_data_ = new ::org::phenopackets::schema::v1::core::MetaData(*from.meta_data_);
} else {
meta_data_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:org.phenopackets.schema.v1.Family)
}
void Family::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Family_phenopackets_2eproto.base);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&proband_, 0, static_cast(
reinterpret_cast(&meta_data_) -
reinterpret_cast(&proband_)) + sizeof(meta_data_));
}
Family::~Family() {
// @@protoc_insertion_point(destructor:org.phenopackets.schema.v1.Family)
SharedDtor();
}
void Family::SharedDtor() {
id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete proband_;
if (this != internal_default_instance()) delete pedigree_;
if (this != internal_default_instance()) delete meta_data_;
}
void Family::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Family& Family::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Family_phenopackets_2eproto.base);
return *internal_default_instance();
}
void Family::Clear() {
// @@protoc_insertion_point(message_clear_start:org.phenopackets.schema.v1.Family)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
relatives_.Clear();
hts_files_.Clear();
id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (GetArenaNoVirtual() == nullptr && proband_ != nullptr) {
delete proband_;
}
proband_ = nullptr;
if (GetArenaNoVirtual() == nullptr && pedigree_ != nullptr) {
delete pedigree_;
}
pedigree_ = nullptr;
if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
delete meta_data_;
}
meta_data_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Family::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// string id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_id(), ptr, ctx, "org.phenopackets.schema.v1.Family.id");
CHK_(ptr);
} else goto handle_unusual;
continue;
// .org.phenopackets.schema.v1.Phenopacket proband = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(mutable_proband(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.Phenopacket relatives = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_relatives(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
} else goto handle_unusual;
continue;
// .org.phenopackets.schema.v1.core.Pedigree pedigree = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
ptr = ctx->ParseMessage(mutable_pedigree(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_hts_files(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42);
} else goto handle_unusual;
continue;
// .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
ptr = ctx->ParseMessage(mutable_meta_data(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Family::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:org.phenopackets.schema.v1.Family)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string id = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_id()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"org.phenopackets.schema.v1.Family.id"));
} else {
goto handle_unusual;
}
break;
}
// .org.phenopackets.schema.v1.Phenopacket proband = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_proband()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.Phenopacket relatives = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_relatives()));
} else {
goto handle_unusual;
}
break;
}
// .org.phenopackets.schema.v1.core.Pedigree pedigree = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_pedigree()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_hts_files()));
} else {
goto handle_unusual;
}
break;
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_meta_data()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:org.phenopackets.schema.v1.Family)
return true;
failure:
// @@protoc_insertion_point(parse_failure:org.phenopackets.schema.v1.Family)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Family::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:org.phenopackets.schema.v1.Family)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1;
if (this->id().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Family.id");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->id(), output);
}
// .org.phenopackets.schema.v1.Phenopacket proband = 2;
if (this->has_proband()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2, HasBitSetters::proband(this), output);
}
// repeated .org.phenopackets.schema.v1.Phenopacket relatives = 3;
for (unsigned int i = 0,
n = static_cast(this->relatives_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
3,
this->relatives(static_cast(i)),
output);
}
// .org.phenopackets.schema.v1.core.Pedigree pedigree = 4;
if (this->has_pedigree()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
4, HasBitSetters::pedigree(this), output);
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 5;
for (unsigned int i = 0,
n = static_cast(this->hts_files_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
5,
this->hts_files(static_cast(i)),
output);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
if (this->has_meta_data()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
6, HasBitSetters::meta_data(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:org.phenopackets.schema.v1.Family)
}
::PROTOBUF_NAMESPACE_ID::uint8* Family::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:org.phenopackets.schema.v1.Family)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1;
if (this->id().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Family.id");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1, this->id(), target);
}
// .org.phenopackets.schema.v1.Phenopacket proband = 2;
if (this->has_proband()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, HasBitSetters::proband(this), target);
}
// repeated .org.phenopackets.schema.v1.Phenopacket relatives = 3;
for (unsigned int i = 0,
n = static_cast(this->relatives_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
3, this->relatives(static_cast(i)), target);
}
// .org.phenopackets.schema.v1.core.Pedigree pedigree = 4;
if (this->has_pedigree()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
4, HasBitSetters::pedigree(this), target);
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 5;
for (unsigned int i = 0,
n = static_cast(this->hts_files_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->hts_files(static_cast(i)), target);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
if (this->has_meta_data()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
6, HasBitSetters::meta_data(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:org.phenopackets.schema.v1.Family)
return target;
}
size_t Family::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:org.phenopackets.schema.v1.Family)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .org.phenopackets.schema.v1.Phenopacket relatives = 3;
{
unsigned int count = static_cast(this->relatives_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->relatives(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 5;
{
unsigned int count = static_cast(this->hts_files_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->hts_files(static_cast(i)));
}
}
// string id = 1;
if (this->id().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->id());
}
// .org.phenopackets.schema.v1.Phenopacket proband = 2;
if (this->has_proband()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*proband_);
}
// .org.phenopackets.schema.v1.core.Pedigree pedigree = 4;
if (this->has_pedigree()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*pedigree_);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 6;
if (this->has_meta_data()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*meta_data_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Family::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:org.phenopackets.schema.v1.Family)
GOOGLE_DCHECK_NE(&from, this);
const Family* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:org.phenopackets.schema.v1.Family)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:org.phenopackets.schema.v1.Family)
MergeFrom(*source);
}
}
void Family::MergeFrom(const Family& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:org.phenopackets.schema.v1.Family)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
relatives_.MergeFrom(from.relatives_);
hts_files_.MergeFrom(from.hts_files_);
if (from.id().size() > 0) {
id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
}
if (from.has_proband()) {
mutable_proband()->::org::phenopackets::schema::v1::Phenopacket::MergeFrom(from.proband());
}
if (from.has_pedigree()) {
mutable_pedigree()->::org::phenopackets::schema::v1::core::Pedigree::MergeFrom(from.pedigree());
}
if (from.has_meta_data()) {
mutable_meta_data()->::org::phenopackets::schema::v1::core::MetaData::MergeFrom(from.meta_data());
}
}
void Family::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:org.phenopackets.schema.v1.Family)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Family::CopyFrom(const Family& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:org.phenopackets.schema.v1.Family)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Family::IsInitialized() const {
return true;
}
void Family::Swap(Family* other) {
if (other == this) return;
InternalSwap(other);
}
void Family::InternalSwap(Family* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&relatives_)->InternalSwap(CastToBase(&other->relatives_));
CastToBase(&hts_files_)->InternalSwap(CastToBase(&other->hts_files_));
id_.Swap(&other->id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(proband_, other->proband_);
swap(pedigree_, other->pedigree_);
swap(meta_data_, other->meta_data_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Family::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void Cohort::InitAsDefaultInstance() {
::org::phenopackets::schema::v1::_Cohort_default_instance_._instance.get_mutable()->meta_data_ = const_cast< ::org::phenopackets::schema::v1::core::MetaData*>(
::org::phenopackets::schema::v1::core::MetaData::internal_default_instance());
}
class Cohort::HasBitSetters {
public:
static const ::org::phenopackets::schema::v1::core::MetaData& meta_data(const Cohort* msg);
};
const ::org::phenopackets::schema::v1::core::MetaData&
Cohort::HasBitSetters::meta_data(const Cohort* msg) {
return *msg->meta_data_;
}
void Cohort::clear_hts_files() {
hts_files_.Clear();
}
void Cohort::clear_meta_data() {
if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
delete meta_data_;
}
meta_data_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Cohort::kIdFieldNumber;
const int Cohort::kDescriptionFieldNumber;
const int Cohort::kMembersFieldNumber;
const int Cohort::kHtsFilesFieldNumber;
const int Cohort::kMetaDataFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Cohort::Cohort()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:org.phenopackets.schema.v1.Cohort)
}
Cohort::Cohort(const Cohort& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
members_(from.members_),
hts_files_(from.hts_files_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from.id().size() > 0) {
id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
}
description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (from.description().size() > 0) {
description_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.description_);
}
if (from.has_meta_data()) {
meta_data_ = new ::org::phenopackets::schema::v1::core::MetaData(*from.meta_data_);
} else {
meta_data_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:org.phenopackets.schema.v1.Cohort)
}
void Cohort::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Cohort_phenopackets_2eproto.base);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
meta_data_ = nullptr;
}
Cohort::~Cohort() {
// @@protoc_insertion_point(destructor:org.phenopackets.schema.v1.Cohort)
SharedDtor();
}
void Cohort::SharedDtor() {
id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete meta_data_;
}
void Cohort::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Cohort& Cohort::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Cohort_phenopackets_2eproto.base);
return *internal_default_instance();
}
void Cohort::Clear() {
// @@protoc_insertion_point(message_clear_start:org.phenopackets.schema.v1.Cohort)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
members_.Clear();
hts_files_.Clear();
id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
description_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
delete meta_data_;
}
meta_data_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Cohort::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// string id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_id(), ptr, ctx, "org.phenopackets.schema.v1.Cohort.id");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string description = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_description(), ptr, ctx, "org.phenopackets.schema.v1.Cohort.description");
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.Phenopacket members = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_members(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
} else goto handle_unusual;
continue;
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_hts_files(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
} else goto handle_unusual;
continue;
// .org.phenopackets.schema.v1.core.MetaData meta_data = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ctx->ParseMessage(mutable_meta_data(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Cohort::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:org.phenopackets.schema.v1.Cohort)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string id = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_id()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"org.phenopackets.schema.v1.Cohort.id"));
} else {
goto handle_unusual;
}
break;
}
// string description = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_description()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->description().data(), static_cast(this->description().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"org.phenopackets.schema.v1.Cohort.description"));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.Phenopacket members = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_members()));
} else {
goto handle_unusual;
}
break;
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_hts_files()));
} else {
goto handle_unusual;
}
break;
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_meta_data()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:org.phenopackets.schema.v1.Cohort)
return true;
failure:
// @@protoc_insertion_point(parse_failure:org.phenopackets.schema.v1.Cohort)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Cohort::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:org.phenopackets.schema.v1.Cohort)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1;
if (this->id().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Cohort.id");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->id(), output);
}
// string description = 2;
if (this->description().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->description().data(), static_cast(this->description().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Cohort.description");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->description(), output);
}
// repeated .org.phenopackets.schema.v1.Phenopacket members = 3;
for (unsigned int i = 0,
n = static_cast(this->members_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
3,
this->members(static_cast(i)),
output);
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 4;
for (unsigned int i = 0,
n = static_cast(this->hts_files_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
4,
this->hts_files(static_cast(i)),
output);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 5;
if (this->has_meta_data()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
5, HasBitSetters::meta_data(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:org.phenopackets.schema.v1.Cohort)
}
::PROTOBUF_NAMESPACE_ID::uint8* Cohort::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:org.phenopackets.schema.v1.Cohort)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1;
if (this->id().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->id().data(), static_cast(this->id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Cohort.id");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1, this->id(), target);
}
// string description = 2;
if (this->description().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->description().data(), static_cast(this->description().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"org.phenopackets.schema.v1.Cohort.description");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2, this->description(), target);
}
// repeated .org.phenopackets.schema.v1.Phenopacket members = 3;
for (unsigned int i = 0,
n = static_cast(this->members_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
3, this->members(static_cast(i)), target);
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 4;
for (unsigned int i = 0,
n = static_cast(this->hts_files_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
4, this->hts_files(static_cast(i)), target);
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 5;
if (this->has_meta_data()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
5, HasBitSetters::meta_data(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:org.phenopackets.schema.v1.Cohort)
return target;
}
size_t Cohort::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:org.phenopackets.schema.v1.Cohort)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .org.phenopackets.schema.v1.Phenopacket members = 3;
{
unsigned int count = static_cast(this->members_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->members(static_cast(i)));
}
}
// repeated .org.phenopackets.schema.v1.core.HtsFile hts_files = 4;
{
unsigned int count = static_cast(this->hts_files_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->hts_files(static_cast(i)));
}
}
// string id = 1;
if (this->id().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->id());
}
// string description = 2;
if (this->description().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->description());
}
// .org.phenopackets.schema.v1.core.MetaData meta_data = 5;
if (this->has_meta_data()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*meta_data_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Cohort::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:org.phenopackets.schema.v1.Cohort)
GOOGLE_DCHECK_NE(&from, this);
const Cohort* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:org.phenopackets.schema.v1.Cohort)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:org.phenopackets.schema.v1.Cohort)
MergeFrom(*source);
}
}
void Cohort::MergeFrom(const Cohort& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:org.phenopackets.schema.v1.Cohort)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
members_.MergeFrom(from.members_);
hts_files_.MergeFrom(from.hts_files_);
if (from.id().size() > 0) {
id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
}
if (from.description().size() > 0) {
description_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.description_);
}
if (from.has_meta_data()) {
mutable_meta_data()->::org::phenopackets::schema::v1::core::MetaData::MergeFrom(from.meta_data());
}
}
void Cohort::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:org.phenopackets.schema.v1.Cohort)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Cohort::CopyFrom(const Cohort& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:org.phenopackets.schema.v1.Cohort)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Cohort::IsInitialized() const {
return true;
}
void Cohort::Swap(Cohort* other) {
if (other == this) return;
InternalSwap(other);
}
void Cohort::InternalSwap(Cohort* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&members_)->InternalSwap(CastToBase(&other->members_));
CastToBase(&hts_files_)->InternalSwap(CastToBase(&other->hts_files_));
id_.Swap(&other->id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
description_.Swap(&other->description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(meta_data_, other->meta_data_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Cohort::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace v1
} // namespace schema
} // namespace phenopackets
} // namespace org
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::org::phenopackets::schema::v1::Phenopacket* Arena::CreateMaybeMessage< ::org::phenopackets::schema::v1::Phenopacket >(Arena* arena) {
return Arena::CreateInternal< ::org::phenopackets::schema::v1::Phenopacket >(arena);
}
template<> PROTOBUF_NOINLINE ::org::phenopackets::schema::v1::Family* Arena::CreateMaybeMessage< ::org::phenopackets::schema::v1::Family >(Arena* arena) {
return Arena::CreateInternal< ::org::phenopackets::schema::v1::Family >(arena);
}
template<> PROTOBUF_NOINLINE ::org::phenopackets::schema::v1::Cohort* Arena::CreateMaybeMessage< ::org::phenopackets::schema::v1::Cohort >(Arena* arena) {
return Arena::CreateInternal< ::org::phenopackets::schema::v1::Cohort >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include