blob: e29bbb83a13c8580c6302f2df542c6bc17d7c4b1 [file] [log] [blame]
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/type.proto
#include <google/protobuf/type.pb.h>
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_CONSTEXPR Type::Type(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.fields_)*/{}
, /*decltype(_impl_.oneofs_)*/{}
, /*decltype(_impl_.options_)*/{}
, /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.source_context_)*/nullptr
, /*decltype(_impl_.syntax_)*/0
, /*decltype(_impl_._cached_size_)*/{}} {}
struct TypeDefaultTypeInternal {
PROTOBUF_CONSTEXPR TypeDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~TypeDefaultTypeInternal() {}
union {
Type _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_;
PROTOBUF_CONSTEXPR Field::Field(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.options_)*/{}
, /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.type_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.json_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.default_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.kind_)*/0
, /*decltype(_impl_.cardinality_)*/0
, /*decltype(_impl_.number_)*/0
, /*decltype(_impl_.oneof_index_)*/0
, /*decltype(_impl_.packed_)*/false
, /*decltype(_impl_._cached_size_)*/{}} {}
struct FieldDefaultTypeInternal {
PROTOBUF_CONSTEXPR FieldDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~FieldDefaultTypeInternal() {}
union {
Field _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDefaultTypeInternal _Field_default_instance_;
PROTOBUF_CONSTEXPR Enum::Enum(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.enumvalue_)*/{}
, /*decltype(_impl_.options_)*/{}
, /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.source_context_)*/nullptr
, /*decltype(_impl_.syntax_)*/0
, /*decltype(_impl_._cached_size_)*/{}} {}
struct EnumDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~EnumDefaultTypeInternal() {}
union {
Enum _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDefaultTypeInternal _Enum_default_instance_;
PROTOBUF_CONSTEXPR EnumValue::EnumValue(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.options_)*/{}
, /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.number_)*/0
, /*decltype(_impl_._cached_size_)*/{}} {}
struct EnumValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR EnumValueDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~EnumValueDefaultTypeInternal() {}
union {
EnumValue _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDefaultTypeInternal _EnumValue_default_instance_;
PROTOBUF_CONSTEXPR Option::Option(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.value_)*/nullptr
, /*decltype(_impl_._cached_size_)*/{}} {}
struct OptionDefaultTypeInternal {
PROTOBUF_CONSTEXPR OptionDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~OptionDefaultTypeInternal() {}
union {
Option _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionDefaultTypeInternal _Option_default_instance_;
PROTOBUF_NAMESPACE_CLOSE
static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ftype_2eproto[5];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[3];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto = nullptr;
const uint32_t TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.fields_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.oneofs_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.options_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.source_context_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.syntax_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.kind_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.cardinality_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.number_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.type_url_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.oneof_index_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.packed_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.options_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.json_name_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _impl_.default_value_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.enumvalue_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.options_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.source_context_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.syntax_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _impl_.number_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _impl_.options_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Option, _impl_.value_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Type)},
{ 12, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Field)},
{ 28, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Enum)},
{ 39, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumValue)},
{ 48, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Option)},
};
static const ::_pb::Message* const file_default_instances[] = {
&::PROTOBUF_NAMESPACE_ID::_Type_default_instance_._instance,
&::PROTOBUF_NAMESPACE_ID::_Field_default_instance_._instance,
&::PROTOBUF_NAMESPACE_ID::_Enum_default_instance_._instance,
&::PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_._instance,
&::PROTOBUF_NAMESPACE_ID::_Option_default_instance_._instance,
};
const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\032google/protobuf/type.proto\022\017google.pro"
"tobuf\032\031google/protobuf/any.proto\032$google"
"/protobuf/source_context.proto\"\327\001\n\004Type\022"
"\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
"rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
"\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
"e_context\030\005 \001(\0132\036.google.protobuf.Source"
"Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
"f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl"
"e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001"
"(\0162\".google.protobuf.Field.Cardinality\022\016"
"\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url"
"\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 "
"\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O"
"ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu"
"e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY"
"PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6"
"4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014"
"TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE"
"_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n"
"\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY"
"PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE"
"D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020"
"\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR"
"DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION"
"AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN"
"ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022"
"-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu"
"mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu"
"f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl"
"e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016"
"2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014"
"\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030"
"\003 \003(\0132\027.google.protobuf.Option\";\n\006Option"
"\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p"
"rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000"
"\022\021\n\rSYNTAX_PROTO3\020\001B{\n\023com.google.protob"
"ufB\tTypeProtoP\001Z-google.golang.org/proto"
"buf/types/known/typepb\370\001\001\242\002\003GPB\252\002\036Google"
".Protobuf.WellKnownTypesb\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2ftype_2eproto_deps[2] = {
&::descriptor_table_google_2fprotobuf_2fany_2eproto,
&::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto,
};
static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = {
false, false, 1592, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto,
"google/protobuf/type.proto",
&descriptor_table_google_2fprotobuf_2ftype_2eproto_once, descriptor_table_google_2fprotobuf_2ftype_2eproto_deps, 2, 5,
schemas, file_default_instances, TableStruct_google_2fprotobuf_2ftype_2eproto::offsets,
file_level_metadata_google_2fprotobuf_2ftype_2eproto, file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto,
file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2ftype_2eproto_getter() {
return &descriptor_table_google_2fprotobuf_2ftype_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
PROTOBUF_NAMESPACE_OPEN
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Kind_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[0];
}
bool Field_Kind_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Field_Kind Field::TYPE_UNKNOWN;
constexpr Field_Kind Field::TYPE_DOUBLE;
constexpr Field_Kind Field::TYPE_FLOAT;
constexpr Field_Kind Field::TYPE_INT64;
constexpr Field_Kind Field::TYPE_UINT64;
constexpr Field_Kind Field::TYPE_INT32;
constexpr Field_Kind Field::TYPE_FIXED64;
constexpr Field_Kind Field::TYPE_FIXED32;
constexpr Field_Kind Field::TYPE_BOOL;
constexpr Field_Kind Field::TYPE_STRING;
constexpr Field_Kind Field::TYPE_GROUP;
constexpr Field_Kind Field::TYPE_MESSAGE;
constexpr Field_Kind Field::TYPE_BYTES;
constexpr Field_Kind Field::TYPE_UINT32;
constexpr Field_Kind Field::TYPE_ENUM;
constexpr Field_Kind Field::TYPE_SFIXED32;
constexpr Field_Kind Field::TYPE_SFIXED64;
constexpr Field_Kind Field::TYPE_SINT32;
constexpr Field_Kind Field::TYPE_SINT64;
constexpr Field_Kind Field::Kind_MIN;
constexpr Field_Kind Field::Kind_MAX;
constexpr int Field::Kind_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Cardinality_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[1];
}
bool Field_Cardinality_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Field_Cardinality Field::CARDINALITY_UNKNOWN;
constexpr Field_Cardinality Field::CARDINALITY_OPTIONAL;
constexpr Field_Cardinality Field::CARDINALITY_REQUIRED;
constexpr Field_Cardinality Field::CARDINALITY_REPEATED;
constexpr Field_Cardinality Field::Cardinality_MIN;
constexpr Field_Cardinality Field::Cardinality_MAX;
constexpr int Field::Cardinality_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Syntax_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[2];
}
bool Syntax_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
// ===================================================================
class Type::_Internal {
public:
static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Type* msg);
};
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
Type::_Internal::source_context(const Type* msg) {
return *msg->_impl_.source_context_;
}
void Type::clear_source_context() {
if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
delete _impl_.source_context_;
}
_impl_.source_context_ = nullptr;
}
Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
}
Type::Type(const Type& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
Type* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.fields_){from._impl_.fields_}
, decltype(_impl_.oneofs_){from._impl_.oneofs_}
, decltype(_impl_.options_){from._impl_.options_}
, decltype(_impl_.name_){}
, decltype(_impl_.source_context_){nullptr}
, decltype(_impl_.syntax_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
_this->_impl_.name_.Set(from._internal_name(),
_this->GetArenaForAllocation());
}
if (from._internal_has_source_context()) {
_this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_);
}
_this->_impl_.syntax_ = from._impl_.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
}
inline void Type::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.fields_){arena}
, decltype(_impl_.oneofs_){arena}
, decltype(_impl_.options_){arena}
, decltype(_impl_.name_){}
, decltype(_impl_.source_context_){nullptr}
, decltype(_impl_.syntax_){0}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Type::~Type() {
// @@protoc_insertion_point(destructor:google.protobuf.Type)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void Type::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.fields_.~RepeatedPtrField();
_impl_.oneofs_.~RepeatedPtrField();
_impl_.options_.~RepeatedPtrField();
_impl_.name_.Destroy();
if (this != internal_default_instance()) delete _impl_.source_context_;
}
void Type::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void Type::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.fields_.Clear();
_impl_.oneofs_.Clear();
_impl_.options_.Clear();
_impl_.name_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
delete _impl_.source_context_;
}
_impl_.source_context_ = nullptr;
_impl_.syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* Type::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Type.name"));
} else
goto handle_unusual;
continue;
// repeated .google.protobuf.Field fields = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_fields(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// repeated string oneofs = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_oneofs();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Type.oneofs"));
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// repeated .google.protobuf.Option options = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_options(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
} else
goto handle_unusual;
continue;
// .google.protobuf.SourceContext source_context = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .google.protobuf.Syntax syntax = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* Type::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Type.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// repeated .google.protobuf.Field fields = 2;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_fields_size()); i < n; i++) {
const auto& repfield = this->_internal_fields(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
}
// repeated string oneofs = 3;
for (int i = 0, n = this->_internal_oneofs_size(); i < n; i++) {
const auto& s = this->_internal_oneofs(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Type.oneofs");
target = stream->WriteString(3, s, target);
}
// repeated .google.protobuf.Option options = 4;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
const auto& repfield = this->_internal_options(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
}
// .google.protobuf.SourceContext source_context = 5;
if (this->_internal_has_source_context()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(5, _Internal::source_context(this),
_Internal::source_context(this).GetCachedSize(), target, stream);
}
// .google.protobuf.Syntax syntax = 6;
if (this->_internal_syntax() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
6, this->_internal_syntax(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type)
return target;
}
size_t Type::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.Field fields = 2;
total_size += 1UL * this->_internal_fields_size();
for (const auto& msg : this->_impl_.fields_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated string oneofs = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.oneofs_.size());
for (int i = 0, n = _impl_.oneofs_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
_impl_.oneofs_.Get(i));
}
// repeated .google.protobuf.Option options = 4;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// .google.protobuf.SourceContext source_context = 5;
if (this->_internal_has_source_context()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.source_context_);
}
// .google.protobuf.Syntax syntax = 6;
if (this->_internal_syntax() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Type::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Type::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Type::GetClassData() const { return &_class_data_; }
void Type::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<Type*>(&to_msg);
auto& from = static_cast<const Type&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.fields_.MergeFrom(from._impl_.fields_);
_this->_impl_.oneofs_.MergeFrom(from._impl_.oneofs_);
_this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if (from._internal_has_source_context()) {
_this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(
from._internal_source_context());
}
if (from._internal_syntax() != 0) {
_this->_internal_set_syntax(from._internal_syntax());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Type::CopyFrom(const Type& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Type::IsInitialized() const {
return true;
}
void Type::InternalSwap(Type* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.fields_.InternalSwap(&other->_impl_.fields_);
_impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_);
_impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_)
+ sizeof(Type::_impl_.syntax_)
- PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_)>(
reinterpret_cast<char*>(&_impl_.source_context_),
reinterpret_cast<char*>(&other->_impl_.source_context_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Type::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2ftype_2eproto_getter, &descriptor_table_google_2fprotobuf_2ftype_2eproto_once,
file_level_metadata_google_2fprotobuf_2ftype_2eproto[0]);
}
// ===================================================================
class Field::_Internal {
public:
};
Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
}
Field::Field(const Field& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
Field* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.options_){from._impl_.options_}
, decltype(_impl_.name_){}
, decltype(_impl_.type_url_){}
, decltype(_impl_.json_name_){}
, decltype(_impl_.default_value_){}
, decltype(_impl_.kind_){}
, decltype(_impl_.cardinality_){}
, decltype(_impl_.number_){}
, decltype(_impl_.oneof_index_){}
, decltype(_impl_.packed_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
_this->_impl_.name_.Set(from._internal_name(),
_this->GetArenaForAllocation());
}
_impl_.type_url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.type_url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_type_url().empty()) {
_this->_impl_.type_url_.Set(from._internal_type_url(),
_this->GetArenaForAllocation());
}
_impl_.json_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.json_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_json_name().empty()) {
_this->_impl_.json_name_.Set(from._internal_json_name(),
_this->GetArenaForAllocation());
}
_impl_.default_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.default_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_default_value().empty()) {
_this->_impl_.default_value_.Set(from._internal_default_value(),
_this->GetArenaForAllocation());
}
::memcpy(&_impl_.kind_, &from._impl_.kind_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.packed_) -
reinterpret_cast<char*>(&_impl_.kind_)) + sizeof(_impl_.packed_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
}
inline void Field::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.options_){arena}
, decltype(_impl_.name_){}
, decltype(_impl_.type_url_){}
, decltype(_impl_.json_name_){}
, decltype(_impl_.default_value_){}
, decltype(_impl_.kind_){0}
, decltype(_impl_.cardinality_){0}
, decltype(_impl_.number_){0}
, decltype(_impl_.oneof_index_){0}
, decltype(_impl_.packed_){false}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.type_url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.type_url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.json_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.json_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.default_value_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.default_value_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Field::~Field() {
// @@protoc_insertion_point(destructor:google.protobuf.Field)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void Field::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.options_.~RepeatedPtrField();
_impl_.name_.Destroy();
_impl_.type_url_.Destroy();
_impl_.json_name_.Destroy();
_impl_.default_value_.Destroy();
}
void Field::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void Field::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.options_.Clear();
_impl_.name_.ClearToEmpty();
_impl_.type_url_.ClearToEmpty();
_impl_.json_name_.ClearToEmpty();
_impl_.default_value_.ClearToEmpty();
::memset(&_impl_.kind_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.packed_) -
reinterpret_cast<char*>(&_impl_.kind_)) + sizeof(_impl_.packed_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* Field::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .google.protobuf.Field.Kind kind = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_kind(static_cast<::PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
} else
goto handle_unusual;
continue;
// .google.protobuf.Field.Cardinality cardinality = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_cardinality(static_cast<::PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
} else
goto handle_unusual;
continue;
// int32 number = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string name = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Field.name"));
} else
goto handle_unusual;
continue;
// string type_url = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
auto str = _internal_mutable_type_url();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Field.type_url"));
} else
goto handle_unusual;
continue;
// int32 oneof_index = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_impl_.oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// bool packed = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_impl_.packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .google.protobuf.Option options = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_options(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
} else
goto handle_unusual;
continue;
// string json_name = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
auto str = _internal_mutable_json_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Field.json_name"));
} else
goto handle_unusual;
continue;
// string default_value = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
auto str = _internal_mutable_default_value();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Field.default_value"));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* Field::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .google.protobuf.Field.Kind kind = 1;
if (this->_internal_kind() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
1, this->_internal_kind(), target);
}
// .google.protobuf.Field.Cardinality cardinality = 2;
if (this->_internal_cardinality() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this->_internal_cardinality(), target);
}
// int32 number = 3;
if (this->_internal_number() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target);
}
// string name = 4;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.name");
target = stream->WriteStringMaybeAliased(
4, this->_internal_name(), target);
}
// string type_url = 6;
if (!this->_internal_type_url().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_type_url().data(), static_cast<int>(this->_internal_type_url().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.type_url");
target = stream->WriteStringMaybeAliased(
6, this->_internal_type_url(), target);
}
// int32 oneof_index = 7;
if (this->_internal_oneof_index() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_oneof_index(), target);
}
// bool packed = 8;
if (this->_internal_packed() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_packed(), target);
}
// repeated .google.protobuf.Option options = 9;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
const auto& repfield = this->_internal_options(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream);
}
// string json_name = 10;
if (!this->_internal_json_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_json_name().data(), static_cast<int>(this->_internal_json_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.json_name");
target = stream->WriteStringMaybeAliased(
10, this->_internal_json_name(), target);
}
// string default_value = 11;
if (!this->_internal_default_value().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_default_value().data(), static_cast<int>(this->_internal_default_value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Field.default_value");
target = stream->WriteStringMaybeAliased(
11, this->_internal_default_value(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field)
return target;
}
size_t Field::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.Option options = 9;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// string name = 4;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// string type_url = 6;
if (!this->_internal_type_url().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type_url());
}
// string json_name = 10;
if (!this->_internal_json_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_json_name());
}
// string default_value = 11;
if (!this->_internal_default_value().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_default_value());
}
// .google.protobuf.Field.Kind kind = 1;
if (this->_internal_kind() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_kind());
}
// .google.protobuf.Field.Cardinality cardinality = 2;
if (this->_internal_cardinality() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_cardinality());
}
// int32 number = 3;
if (this->_internal_number() != 0) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number());
}
// int32 oneof_index = 7;
if (this->_internal_oneof_index() != 0) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_oneof_index());
}
// bool packed = 8;
if (this->_internal_packed() != 0) {
total_size += 1 + 1;
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Field::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Field::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Field::GetClassData() const { return &_class_data_; }
void Field::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<Field*>(&to_msg);
auto& from = static_cast<const Field&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if (!from._internal_type_url().empty()) {
_this->_internal_set_type_url(from._internal_type_url());
}
if (!from._internal_json_name().empty()) {
_this->_internal_set_json_name(from._internal_json_name());
}
if (!from._internal_default_value().empty()) {
_this->_internal_set_default_value(from._internal_default_value());
}
if (from._internal_kind() != 0) {
_this->_internal_set_kind(from._internal_kind());
}
if (from._internal_cardinality() != 0) {
_this->_internal_set_cardinality(from._internal_cardinality());
}
if (from._internal_number() != 0) {
_this->_internal_set_number(from._internal_number());
}
if (from._internal_oneof_index() != 0) {
_this->_internal_set_oneof_index(from._internal_oneof_index());
}
if (from._internal_packed() != 0) {
_this->_internal_set_packed(from._internal_packed());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Field::CopyFrom(const Field& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Field::IsInitialized() const {
return true;
}
void Field::InternalSwap(Field* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.type_url_, lhs_arena,
&other->_impl_.type_url_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.json_name_, lhs_arena,
&other->_impl_.json_name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.default_value_, lhs_arena,
&other->_impl_.default_value_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_)
+ sizeof(Field::_impl_.packed_)
- PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_)>(
reinterpret_cast<char*>(&_impl_.kind_),
reinterpret_cast<char*>(&other->_impl_.kind_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Field::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2ftype_2eproto_getter, &descriptor_table_google_2fprotobuf_2ftype_2eproto_once,
file_level_metadata_google_2fprotobuf_2ftype_2eproto[1]);
}
// ===================================================================
class Enum::_Internal {
public:
static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Enum* msg);
};
const ::PROTOBUF_NAMESPACE_ID::SourceContext&
Enum::_Internal::source_context(const Enum* msg) {
return *msg->_impl_.source_context_;
}
void Enum::clear_source_context() {
if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
delete _impl_.source_context_;
}
_impl_.source_context_ = nullptr;
}
Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
}
Enum::Enum(const Enum& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
Enum* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.enumvalue_){from._impl_.enumvalue_}
, decltype(_impl_.options_){from._impl_.options_}
, decltype(_impl_.name_){}
, decltype(_impl_.source_context_){nullptr}
, decltype(_impl_.syntax_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
_this->_impl_.name_.Set(from._internal_name(),
_this->GetArenaForAllocation());
}
if (from._internal_has_source_context()) {
_this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_);
}
_this->_impl_.syntax_ = from._impl_.syntax_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
}
inline void Enum::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.enumvalue_){arena}
, decltype(_impl_.options_){arena}
, decltype(_impl_.name_){}
, decltype(_impl_.source_context_){nullptr}
, decltype(_impl_.syntax_){0}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Enum::~Enum() {
// @@protoc_insertion_point(destructor:google.protobuf.Enum)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void Enum::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.enumvalue_.~RepeatedPtrField();
_impl_.options_.~RepeatedPtrField();
_impl_.name_.Destroy();
if (this != internal_default_instance()) delete _impl_.source_context_;
}
void Enum::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void Enum::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.enumvalue_.Clear();
_impl_.options_.Clear();
_impl_.name_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) {
delete _impl_.source_context_;
}
_impl_.source_context_ = nullptr;
_impl_.syntax_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* Enum::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Enum.name"));
} else
goto handle_unusual;
continue;
// repeated .google.protobuf.EnumValue enumvalue = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_enumvalue(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// repeated .google.protobuf.Option options = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_options(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// .google.protobuf.SourceContext source_context = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .google.protobuf.Syntax syntax = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* Enum::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Enum.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// repeated .google.protobuf.EnumValue enumvalue = 2;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_enumvalue_size()); i < n; i++) {
const auto& repfield = this->_internal_enumvalue(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
}
// repeated .google.protobuf.Option options = 3;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
const auto& repfield = this->_internal_options(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
}
// .google.protobuf.SourceContext source_context = 4;
if (this->_internal_has_source_context()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, _Internal::source_context(this),
_Internal::source_context(this).GetCachedSize(), target, stream);
}
// .google.protobuf.Syntax syntax = 5;
if (this->_internal_syntax() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
5, this->_internal_syntax(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum)
return target;
}
size_t Enum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.EnumValue enumvalue = 2;
total_size += 1UL * this->_internal_enumvalue_size();
for (const auto& msg : this->_impl_.enumvalue_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// .google.protobuf.SourceContext source_context = 4;
if (this->_internal_has_source_context()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.source_context_);
}
// .google.protobuf.Syntax syntax = 5;
if (this->_internal_syntax() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Enum::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Enum::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Enum::GetClassData() const { return &_class_data_; }
void Enum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<Enum*>(&to_msg);
auto& from = static_cast<const Enum&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.enumvalue_.MergeFrom(from._impl_.enumvalue_);
_this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if (from._internal_has_source_context()) {
_this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(
from._internal_source_context());
}
if (from._internal_syntax() != 0) {
_this->_internal_set_syntax(from._internal_syntax());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Enum::CopyFrom(const Enum& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Enum::IsInitialized() const {
return true;
}
void Enum::InternalSwap(Enum* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.enumvalue_.InternalSwap(&other->_impl_.enumvalue_);
_impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_)
+ sizeof(Enum::_impl_.syntax_)
- PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_)>(
reinterpret_cast<char*>(&_impl_.source_context_),
reinterpret_cast<char*>(&other->_impl_.source_context_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Enum::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2ftype_2eproto_getter, &descriptor_table_google_2fprotobuf_2ftype_2eproto_once,
file_level_metadata_google_2fprotobuf_2ftype_2eproto[2]);
}
// ===================================================================
class EnumValue::_Internal {
public:
};
EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
}
EnumValue::EnumValue(const EnumValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
EnumValue* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.options_){from._impl_.options_}
, decltype(_impl_.name_){}
, decltype(_impl_.number_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
_this->_impl_.name_.Set(from._internal_name(),
_this->GetArenaForAllocation());
}
_this->_impl_.number_ = from._impl_.number_;
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
}
inline void EnumValue::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.options_){arena}
, decltype(_impl_.name_){}
, decltype(_impl_.number_){0}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
EnumValue::~EnumValue() {
// @@protoc_insertion_point(destructor:google.protobuf.EnumValue)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void EnumValue::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.options_.~RepeatedPtrField();
_impl_.name_.Destroy();
}
void EnumValue::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void EnumValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.options_.Clear();
_impl_.name_.ClearToEmpty();
_impl_.number_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* EnumValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.EnumValue.name"));
} else
goto handle_unusual;
continue;
// int32 number = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .google.protobuf.Option options = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_options(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* EnumValue::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.EnumValue.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// int32 number = 2;
if (this->_internal_number() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target);
}
// repeated .google.protobuf.Option options = 3;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
const auto& repfield = this->_internal_options(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
return target;
}
size_t EnumValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.Option options = 3;
total_size += 1UL * this->_internal_options_size();
for (const auto& msg : this->_impl_.options_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// int32 number = 2;
if (this->_internal_number() != 0) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EnumValue::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
EnumValue::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EnumValue::GetClassData() const { return &_class_data_; }
void EnumValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<EnumValue*>(&to_msg);
auto& from = static_cast<const EnumValue&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.options_.MergeFrom(from._impl_.options_);
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if (from._internal_number() != 0) {
_this->_internal_set_number(from._internal_number());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EnumValue::CopyFrom(const EnumValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValue)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool EnumValue::IsInitialized() const {
return true;
}
void EnumValue::InternalSwap(EnumValue* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.options_.InternalSwap(&other->_impl_.options_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
swap(_impl_.number_, other->_impl_.number_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EnumValue::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2ftype_2eproto_getter, &descriptor_table_google_2fprotobuf_2ftype_2eproto_once,
file_level_metadata_google_2fprotobuf_2ftype_2eproto[3]);
}
// ===================================================================
class Option::_Internal {
public:
static const ::PROTOBUF_NAMESPACE_ID::Any& value(const Option* msg);
};
const ::PROTOBUF_NAMESPACE_ID::Any&
Option::_Internal::value(const Option* msg) {
return *msg->_impl_.value_;
}
void Option::clear_value() {
if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) {
delete _impl_.value_;
}
_impl_.value_ = nullptr;
}
Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
}
Option::Option(const Option& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
Option* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.name_){}
, decltype(_impl_.value_){nullptr}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
_this->_impl_.name_.Set(from._internal_name(),
_this->GetArenaForAllocation());
}
if (from._internal_has_value()) {
_this->_impl_.value_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from._impl_.value_);
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
}
inline void Option::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.name_){}
, decltype(_impl_.value_){nullptr}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
Option::~Option() {
// @@protoc_insertion_point(destructor:google.protobuf.Option)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void Option::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
if (this != internal_default_instance()) delete _impl_.value_;
}
void Option::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void Option::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.name_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) {
delete _impl_.value_;
}
_impl_.value_ = nullptr;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* Option::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Option.name"));
} else
goto handle_unusual;
continue;
// .google.protobuf.Any value = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_value(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* Option::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Option.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// .google.protobuf.Any value = 2;
if (this->_internal_has_value()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, _Internal::value(this),
_Internal::value(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
return target;
}
size_t Option::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// .google.protobuf.Any value = 2;
if (this->_internal_has_value()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.value_);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Option::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
Option::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Option::GetClassData() const { return &_class_data_; }
void Option::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<Option*>(&to_msg);
auto& from = static_cast<const Option&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if (from._internal_has_value()) {
_this->_internal_mutable_value()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(
from._internal_value());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Option::CopyFrom(const Option& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Option)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Option::IsInitialized() const {
return true;
}
void Option::InternalSwap(Option* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
swap(_impl_.value_, other->_impl_.value_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Option::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_google_2fprotobuf_2ftype_2eproto_getter, &descriptor_table_google_2fprotobuf_2ftype_2eproto_once,
file_level_metadata_google_2fprotobuf_2ftype_2eproto[4]);
}
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_CLOSE
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Type*
Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Type >(Arena* arena) {
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Type >(arena);
}
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Field*
Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Field >(Arena* arena) {
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Field >(arena);
}
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Enum*
Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Enum >(Arena* arena) {
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Enum >(arena);
}
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::EnumValue*
Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::EnumValue >(Arena* arena) {
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::EnumValue >(arena);
}
template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Option*
Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Option >(Arena* arena) {
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Option >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>