// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: substrait/extensions/extensions.proto

#include "substrait/extensions/extensions.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 substrait {
namespace extensions {
constexpr SimpleExtensionURI::SimpleExtensionURI(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : uri_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , extension_uri_anchor_(0u){}
struct SimpleExtensionURIDefaultTypeInternal {
  constexpr SimpleExtensionURIDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SimpleExtensionURIDefaultTypeInternal() {}
  union {
    SimpleExtensionURI _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleExtensionURIDefaultTypeInternal _SimpleExtensionURI_default_instance_;
constexpr SimpleExtensionDeclaration_ExtensionType::SimpleExtensionDeclaration_ExtensionType(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , extension_uri_reference_(0u)
  , type_anchor_(0u){}
struct SimpleExtensionDeclaration_ExtensionTypeDefaultTypeInternal {
  constexpr SimpleExtensionDeclaration_ExtensionTypeDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SimpleExtensionDeclaration_ExtensionTypeDefaultTypeInternal() {}
  union {
    SimpleExtensionDeclaration_ExtensionType _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleExtensionDeclaration_ExtensionTypeDefaultTypeInternal _SimpleExtensionDeclaration_ExtensionType_default_instance_;
constexpr SimpleExtensionDeclaration_ExtensionTypeVariation::SimpleExtensionDeclaration_ExtensionTypeVariation(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , extension_uri_reference_(0u)
  , type_variation_anchor_(0u){}
struct SimpleExtensionDeclaration_ExtensionTypeVariationDefaultTypeInternal {
  constexpr SimpleExtensionDeclaration_ExtensionTypeVariationDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SimpleExtensionDeclaration_ExtensionTypeVariationDefaultTypeInternal() {}
  union {
    SimpleExtensionDeclaration_ExtensionTypeVariation _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleExtensionDeclaration_ExtensionTypeVariationDefaultTypeInternal _SimpleExtensionDeclaration_ExtensionTypeVariation_default_instance_;
constexpr SimpleExtensionDeclaration_ExtensionFunction::SimpleExtensionDeclaration_ExtensionFunction(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , extension_uri_reference_(0u)
  , function_anchor_(0u){}
struct SimpleExtensionDeclaration_ExtensionFunctionDefaultTypeInternal {
  constexpr SimpleExtensionDeclaration_ExtensionFunctionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SimpleExtensionDeclaration_ExtensionFunctionDefaultTypeInternal() {}
  union {
    SimpleExtensionDeclaration_ExtensionFunction _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleExtensionDeclaration_ExtensionFunctionDefaultTypeInternal _SimpleExtensionDeclaration_ExtensionFunction_default_instance_;
constexpr SimpleExtensionDeclaration::SimpleExtensionDeclaration(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : _oneof_case_{}{}
struct SimpleExtensionDeclarationDefaultTypeInternal {
  constexpr SimpleExtensionDeclarationDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SimpleExtensionDeclarationDefaultTypeInternal() {}
  union {
    SimpleExtensionDeclaration _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleExtensionDeclarationDefaultTypeInternal _SimpleExtensionDeclaration_default_instance_;
constexpr AdvancedExtension::AdvancedExtension(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : optimization_(nullptr)
  , enhancement_(nullptr){}
struct AdvancedExtensionDefaultTypeInternal {
  constexpr AdvancedExtensionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AdvancedExtensionDefaultTypeInternal() {}
  union {
    AdvancedExtension _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AdvancedExtensionDefaultTypeInternal _AdvancedExtension_default_instance_;
}  // namespace extensions
}  // namespace substrait
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_substrait_2fextensions_2fextensions_2eproto[6];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_substrait_2fextensions_2fextensions_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_substrait_2fextensions_2fextensions_2eproto = nullptr;

const uint32_t TableStruct_substrait_2fextensions_2fextensions_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionURI, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionURI, extension_uri_anchor_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionURI, uri_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionType, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionType, extension_uri_reference_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionType, type_anchor_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionType, name_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation, extension_uri_reference_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation, type_variation_anchor_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation, name_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction, extension_uri_reference_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction, function_anchor_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction, name_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::SimpleExtensionDeclaration, mapping_type_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::AdvancedExtension, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::AdvancedExtension, optimization_),
  PROTOBUF_FIELD_OFFSET(::substrait::extensions::AdvancedExtension, enhancement_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::substrait::extensions::SimpleExtensionURI)},
  { 8, -1, -1, sizeof(::substrait::extensions::SimpleExtensionDeclaration_ExtensionType)},
  { 17, -1, -1, sizeof(::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation)},
  { 26, -1, -1, sizeof(::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction)},
  { 35, -1, -1, sizeof(::substrait::extensions::SimpleExtensionDeclaration)},
  { 45, -1, -1, sizeof(::substrait::extensions::AdvancedExtension)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::substrait::extensions::_SimpleExtensionURI_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::substrait::extensions::_SimpleExtensionDeclaration_ExtensionType_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::substrait::extensions::_SimpleExtensionDeclaration_ExtensionTypeVariation_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::substrait::extensions::_SimpleExtensionDeclaration_ExtensionFunction_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::substrait::extensions::_SimpleExtensionDeclaration_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::substrait::extensions::_AdvancedExtension_default_instance_),
};

const char descriptor_table_protodef_substrait_2fextensions_2fextensions_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n%substrait/extensions/extensions.proto\022"
  "\024substrait.extensions\032\031google/protobuf/a"
  "ny.proto\"X\n\022SimpleExtensionURI\0220\n\024extens"
  "ion_uri_anchor\030\001 \001(\rR\022extensionUriAnchor"
  "\022\020\n\003uri\030\002 \001(\tR\003uri\"\264\006\n\032SimpleExtensionDe"
  "claration\022g\n\016extension_type\030\001 \001(\0132>.subs"
  "trait.extensions.SimpleExtensionDeclarat"
  "ion.ExtensionTypeH\000R\rextensionType\022\203\001\n\030e"
  "xtension_type_variation\030\002 \001(\0132G.substrai"
  "t.extensions.SimpleExtensionDeclaration."
  "ExtensionTypeVariationH\000R\026extensionTypeV"
  "ariation\022s\n\022extension_function\030\003 \001(\0132B.s"
  "ubstrait.extensions.SimpleExtensionDecla"
  "ration.ExtensionFunctionH\000R\021extensionFun"
  "ction\032|\n\rExtensionType\0226\n\027extension_uri_"
  "reference\030\001 \001(\rR\025extensionUriReference\022\037"
  "\n\013type_anchor\030\002 \001(\rR\ntypeAnchor\022\022\n\004name\030"
  "\003 \001(\tR\004name\032\230\001\n\026ExtensionTypeVariation\0226"
  "\n\027extension_uri_reference\030\001 \001(\rR\025extensi"
  "onUriReference\0222\n\025type_variation_anchor\030"
  "\002 \001(\rR\023typeVariationAnchor\022\022\n\004name\030\003 \001(\t"
  "R\004name\032\210\001\n\021ExtensionFunction\0226\n\027extensio"
  "n_uri_reference\030\001 \001(\rR\025extensionUriRefer"
  "ence\022\'\n\017function_anchor\030\002 \001(\rR\016functionA"
  "nchor\022\022\n\004name\030\003 \001(\tR\004nameB\016\n\014mapping_typ"
  "e\"\205\001\n\021AdvancedExtension\0228\n\014optimization\030"
  "\001 \001(\0132\024.google.protobuf.AnyR\014optimizatio"
  "n\0226\n\013enhancement\030\002 \001(\0132\024.google.protobuf"
  ".AnyR\013enhancementB+\n\022io.substrait.protoP"
  "\001\252\002\022Substrait.Protobufb\006proto3"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_substrait_2fextensions_2fextensions_2eproto_deps[1] = {
  &::descriptor_table_google_2fprotobuf_2fany_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_substrait_2fextensions_2fextensions_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_substrait_2fextensions_2fextensions_2eproto = {
  false, false, 1190, descriptor_table_protodef_substrait_2fextensions_2fextensions_2eproto, "substrait/extensions/extensions.proto", 
  &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once, descriptor_table_substrait_2fextensions_2fextensions_2eproto_deps, 1, 6,
  schemas, file_default_instances, TableStruct_substrait_2fextensions_2fextensions_2eproto::offsets,
  file_level_metadata_substrait_2fextensions_2fextensions_2eproto, file_level_enum_descriptors_substrait_2fextensions_2fextensions_2eproto, file_level_service_descriptors_substrait_2fextensions_2fextensions_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter() {
  return &descriptor_table_substrait_2fextensions_2fextensions_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_substrait_2fextensions_2fextensions_2eproto(&descriptor_table_substrait_2fextensions_2fextensions_2eproto);
namespace substrait {
namespace extensions {

// ===================================================================

class SimpleExtensionURI::_Internal {
 public:
};

SimpleExtensionURI::SimpleExtensionURI(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:substrait.extensions.SimpleExtensionURI)
}
SimpleExtensionURI::SimpleExtensionURI(const SimpleExtensionURI& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  uri_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    uri_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_uri().empty()) {
    uri_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_uri(), 
      GetArenaForAllocation());
  }
  extension_uri_anchor_ = from.extension_uri_anchor_;
  // @@protoc_insertion_point(copy_constructor:substrait.extensions.SimpleExtensionURI)
}

inline void SimpleExtensionURI::SharedCtor() {
uri_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  uri_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
extension_uri_anchor_ = 0u;
}

SimpleExtensionURI::~SimpleExtensionURI() {
  // @@protoc_insertion_point(destructor:substrait.extensions.SimpleExtensionURI)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SimpleExtensionURI::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  uri_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void SimpleExtensionURI::ArenaDtor(void* object) {
  SimpleExtensionURI* _this = reinterpret_cast< SimpleExtensionURI* >(object);
  (void)_this;
}
void SimpleExtensionURI::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SimpleExtensionURI::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SimpleExtensionURI::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.extensions.SimpleExtensionURI)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  uri_.ClearToEmpty();
  extension_uri_anchor_ = 0u;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SimpleExtensionURI::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // uint32 extension_uri_anchor = 1 [json_name = "extensionUriAnchor"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          extension_uri_anchor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string uri = 2 [json_name = "uri"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_uri();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "substrait.extensions.SimpleExtensionURI.uri"));
          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* SimpleExtensionURI::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait.extensions.SimpleExtensionURI)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // uint32 extension_uri_anchor = 1 [json_name = "extensionUriAnchor"];
  if (this->_internal_extension_uri_anchor() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_extension_uri_anchor(), target);
  }

  // string uri = 2 [json_name = "uri"];
  if (!this->_internal_uri().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_uri().data(), static_cast<int>(this->_internal_uri().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "substrait.extensions.SimpleExtensionURI.uri");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_uri(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:substrait.extensions.SimpleExtensionURI)
  return target;
}

size_t SimpleExtensionURI::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait.extensions.SimpleExtensionURI)
  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 uri = 2 [json_name = "uri"];
  if (!this->_internal_uri().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_uri());
  }

  // uint32 extension_uri_anchor = 1 [json_name = "extensionUriAnchor"];
  if (this->_internal_extension_uri_anchor() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_extension_uri_anchor());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SimpleExtensionURI::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    SimpleExtensionURI::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SimpleExtensionURI::GetClassData() const { return &_class_data_; }

void SimpleExtensionURI::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SimpleExtensionURI *>(to)->MergeFrom(
      static_cast<const SimpleExtensionURI &>(from));
}


void SimpleExtensionURI::MergeFrom(const SimpleExtensionURI& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:substrait.extensions.SimpleExtensionURI)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_uri().empty()) {
    _internal_set_uri(from._internal_uri());
  }
  if (from._internal_extension_uri_anchor() != 0) {
    _internal_set_extension_uri_anchor(from._internal_extension_uri_anchor());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SimpleExtensionURI::CopyFrom(const SimpleExtensionURI& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait.extensions.SimpleExtensionURI)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SimpleExtensionURI::IsInitialized() const {
  return true;
}

void SimpleExtensionURI::InternalSwap(SimpleExtensionURI* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &uri_, lhs_arena,
      &other->uri_, rhs_arena
  );
  swap(extension_uri_anchor_, other->extension_uri_anchor_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SimpleExtensionURI::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter, &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once,
      file_level_metadata_substrait_2fextensions_2fextensions_2eproto[0]);
}

// ===================================================================

class SimpleExtensionDeclaration_ExtensionType::_Internal {
 public:
};

SimpleExtensionDeclaration_ExtensionType::SimpleExtensionDeclaration_ExtensionType(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
}
SimpleExtensionDeclaration_ExtensionType::SimpleExtensionDeclaration_ExtensionType(const SimpleExtensionDeclaration_ExtensionType& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_name().empty()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  ::memcpy(&extension_uri_reference_, &from.extension_uri_reference_,
    static_cast<size_t>(reinterpret_cast<char*>(&type_anchor_) -
    reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(type_anchor_));
  // @@protoc_insertion_point(copy_constructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
}

inline void SimpleExtensionDeclaration_ExtensionType::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&extension_uri_reference_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&type_anchor_) -
    reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(type_anchor_));
}

SimpleExtensionDeclaration_ExtensionType::~SimpleExtensionDeclaration_ExtensionType() {
  // @@protoc_insertion_point(destructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SimpleExtensionDeclaration_ExtensionType::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void SimpleExtensionDeclaration_ExtensionType::ArenaDtor(void* object) {
  SimpleExtensionDeclaration_ExtensionType* _this = reinterpret_cast< SimpleExtensionDeclaration_ExtensionType* >(object);
  (void)_this;
}
void SimpleExtensionDeclaration_ExtensionType::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SimpleExtensionDeclaration_ExtensionType::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SimpleExtensionDeclaration_ExtensionType::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmpty();
  ::memset(&extension_uri_reference_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&type_anchor_) -
      reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(type_anchor_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SimpleExtensionDeclaration_ExtensionType::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          extension_uri_reference_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 type_anchor = 2 [json_name = "typeAnchor"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          type_anchor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string name = 3 [json_name = "name"];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "substrait.extensions.SimpleExtensionDeclaration.ExtensionType.name"));
          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* SimpleExtensionDeclaration_ExtensionType::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
  if (this->_internal_extension_uri_reference() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_extension_uri_reference(), target);
  }

  // uint32 type_anchor = 2 [json_name = "typeAnchor"];
  if (this->_internal_type_anchor() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_type_anchor(), target);
  }

  // string name = 3 [json_name = "name"];
  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,
      "substrait.extensions.SimpleExtensionDeclaration.ExtensionType.name");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  return target;
}

size_t SimpleExtensionDeclaration_ExtensionType::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  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 = 3 [json_name = "name"];
  if (!this->_internal_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
  if (this->_internal_extension_uri_reference() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_extension_uri_reference());
  }

  // uint32 type_anchor = 2 [json_name = "typeAnchor"];
  if (this->_internal_type_anchor() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_type_anchor());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SimpleExtensionDeclaration_ExtensionType::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    SimpleExtensionDeclaration_ExtensionType::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SimpleExtensionDeclaration_ExtensionType::GetClassData() const { return &_class_data_; }

void SimpleExtensionDeclaration_ExtensionType::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SimpleExtensionDeclaration_ExtensionType *>(to)->MergeFrom(
      static_cast<const SimpleExtensionDeclaration_ExtensionType &>(from));
}


void SimpleExtensionDeclaration_ExtensionType::MergeFrom(const SimpleExtensionDeclaration_ExtensionType& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_name().empty()) {
    _internal_set_name(from._internal_name());
  }
  if (from._internal_extension_uri_reference() != 0) {
    _internal_set_extension_uri_reference(from._internal_extension_uri_reference());
  }
  if (from._internal_type_anchor() != 0) {
    _internal_set_type_anchor(from._internal_type_anchor());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SimpleExtensionDeclaration_ExtensionType::CopyFrom(const SimpleExtensionDeclaration_ExtensionType& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionType)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SimpleExtensionDeclaration_ExtensionType::IsInitialized() const {
  return true;
}

void SimpleExtensionDeclaration_ExtensionType::InternalSwap(SimpleExtensionDeclaration_ExtensionType* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SimpleExtensionDeclaration_ExtensionType, type_anchor_)
      + sizeof(SimpleExtensionDeclaration_ExtensionType::type_anchor_)
      - PROTOBUF_FIELD_OFFSET(SimpleExtensionDeclaration_ExtensionType, extension_uri_reference_)>(
          reinterpret_cast<char*>(&extension_uri_reference_),
          reinterpret_cast<char*>(&other->extension_uri_reference_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SimpleExtensionDeclaration_ExtensionType::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter, &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once,
      file_level_metadata_substrait_2fextensions_2fextensions_2eproto[1]);
}

// ===================================================================

class SimpleExtensionDeclaration_ExtensionTypeVariation::_Internal {
 public:
};

SimpleExtensionDeclaration_ExtensionTypeVariation::SimpleExtensionDeclaration_ExtensionTypeVariation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
}
SimpleExtensionDeclaration_ExtensionTypeVariation::SimpleExtensionDeclaration_ExtensionTypeVariation(const SimpleExtensionDeclaration_ExtensionTypeVariation& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_name().empty()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  ::memcpy(&extension_uri_reference_, &from.extension_uri_reference_,
    static_cast<size_t>(reinterpret_cast<char*>(&type_variation_anchor_) -
    reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(type_variation_anchor_));
  // @@protoc_insertion_point(copy_constructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
}

inline void SimpleExtensionDeclaration_ExtensionTypeVariation::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&extension_uri_reference_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&type_variation_anchor_) -
    reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(type_variation_anchor_));
}

SimpleExtensionDeclaration_ExtensionTypeVariation::~SimpleExtensionDeclaration_ExtensionTypeVariation() {
  // @@protoc_insertion_point(destructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SimpleExtensionDeclaration_ExtensionTypeVariation::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void SimpleExtensionDeclaration_ExtensionTypeVariation::ArenaDtor(void* object) {
  SimpleExtensionDeclaration_ExtensionTypeVariation* _this = reinterpret_cast< SimpleExtensionDeclaration_ExtensionTypeVariation* >(object);
  (void)_this;
}
void SimpleExtensionDeclaration_ExtensionTypeVariation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SimpleExtensionDeclaration_ExtensionTypeVariation::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SimpleExtensionDeclaration_ExtensionTypeVariation::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmpty();
  ::memset(&extension_uri_reference_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&type_variation_anchor_) -
      reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(type_variation_anchor_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SimpleExtensionDeclaration_ExtensionTypeVariation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          extension_uri_reference_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 type_variation_anchor = 2 [json_name = "typeVariationAnchor"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          type_variation_anchor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string name = 3 [json_name = "name"];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation.name"));
          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* SimpleExtensionDeclaration_ExtensionTypeVariation::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
  if (this->_internal_extension_uri_reference() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_extension_uri_reference(), target);
  }

  // uint32 type_variation_anchor = 2 [json_name = "typeVariationAnchor"];
  if (this->_internal_type_variation_anchor() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_type_variation_anchor(), target);
  }

  // string name = 3 [json_name = "name"];
  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,
      "substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation.name");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  return target;
}

size_t SimpleExtensionDeclaration_ExtensionTypeVariation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  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 = 3 [json_name = "name"];
  if (!this->_internal_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
  if (this->_internal_extension_uri_reference() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_extension_uri_reference());
  }

  // uint32 type_variation_anchor = 2 [json_name = "typeVariationAnchor"];
  if (this->_internal_type_variation_anchor() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_type_variation_anchor());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SimpleExtensionDeclaration_ExtensionTypeVariation::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    SimpleExtensionDeclaration_ExtensionTypeVariation::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SimpleExtensionDeclaration_ExtensionTypeVariation::GetClassData() const { return &_class_data_; }

void SimpleExtensionDeclaration_ExtensionTypeVariation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SimpleExtensionDeclaration_ExtensionTypeVariation *>(to)->MergeFrom(
      static_cast<const SimpleExtensionDeclaration_ExtensionTypeVariation &>(from));
}


void SimpleExtensionDeclaration_ExtensionTypeVariation::MergeFrom(const SimpleExtensionDeclaration_ExtensionTypeVariation& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_name().empty()) {
    _internal_set_name(from._internal_name());
  }
  if (from._internal_extension_uri_reference() != 0) {
    _internal_set_extension_uri_reference(from._internal_extension_uri_reference());
  }
  if (from._internal_type_variation_anchor() != 0) {
    _internal_set_type_variation_anchor(from._internal_type_variation_anchor());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SimpleExtensionDeclaration_ExtensionTypeVariation::CopyFrom(const SimpleExtensionDeclaration_ExtensionTypeVariation& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SimpleExtensionDeclaration_ExtensionTypeVariation::IsInitialized() const {
  return true;
}

void SimpleExtensionDeclaration_ExtensionTypeVariation::InternalSwap(SimpleExtensionDeclaration_ExtensionTypeVariation* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SimpleExtensionDeclaration_ExtensionTypeVariation, type_variation_anchor_)
      + sizeof(SimpleExtensionDeclaration_ExtensionTypeVariation::type_variation_anchor_)
      - PROTOBUF_FIELD_OFFSET(SimpleExtensionDeclaration_ExtensionTypeVariation, extension_uri_reference_)>(
          reinterpret_cast<char*>(&extension_uri_reference_),
          reinterpret_cast<char*>(&other->extension_uri_reference_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SimpleExtensionDeclaration_ExtensionTypeVariation::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter, &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once,
      file_level_metadata_substrait_2fextensions_2fextensions_2eproto[2]);
}

// ===================================================================

class SimpleExtensionDeclaration_ExtensionFunction::_Internal {
 public:
};

SimpleExtensionDeclaration_ExtensionFunction::SimpleExtensionDeclaration_ExtensionFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
}
SimpleExtensionDeclaration_ExtensionFunction::SimpleExtensionDeclaration_ExtensionFunction(const SimpleExtensionDeclaration_ExtensionFunction& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_name().empty()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  ::memcpy(&extension_uri_reference_, &from.extension_uri_reference_,
    static_cast<size_t>(reinterpret_cast<char*>(&function_anchor_) -
    reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(function_anchor_));
  // @@protoc_insertion_point(copy_constructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
}

inline void SimpleExtensionDeclaration_ExtensionFunction::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&extension_uri_reference_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&function_anchor_) -
    reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(function_anchor_));
}

SimpleExtensionDeclaration_ExtensionFunction::~SimpleExtensionDeclaration_ExtensionFunction() {
  // @@protoc_insertion_point(destructor:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SimpleExtensionDeclaration_ExtensionFunction::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void SimpleExtensionDeclaration_ExtensionFunction::ArenaDtor(void* object) {
  SimpleExtensionDeclaration_ExtensionFunction* _this = reinterpret_cast< SimpleExtensionDeclaration_ExtensionFunction* >(object);
  (void)_this;
}
void SimpleExtensionDeclaration_ExtensionFunction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SimpleExtensionDeclaration_ExtensionFunction::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SimpleExtensionDeclaration_ExtensionFunction::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmpty();
  ::memset(&extension_uri_reference_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&function_anchor_) -
      reinterpret_cast<char*>(&extension_uri_reference_)) + sizeof(function_anchor_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SimpleExtensionDeclaration_ExtensionFunction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          extension_uri_reference_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 function_anchor = 2 [json_name = "functionAnchor"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          function_anchor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string name = 3 [json_name = "name"];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction.name"));
          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* SimpleExtensionDeclaration_ExtensionFunction::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
  if (this->_internal_extension_uri_reference() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_extension_uri_reference(), target);
  }

  // uint32 function_anchor = 2 [json_name = "functionAnchor"];
  if (this->_internal_function_anchor() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_function_anchor(), target);
  }

  // string name = 3 [json_name = "name"];
  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,
      "substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction.name");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  return target;
}

size_t SimpleExtensionDeclaration_ExtensionFunction::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  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 = 3 [json_name = "name"];
  if (!this->_internal_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // uint32 extension_uri_reference = 1 [json_name = "extensionUriReference"];
  if (this->_internal_extension_uri_reference() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_extension_uri_reference());
  }

  // uint32 function_anchor = 2 [json_name = "functionAnchor"];
  if (this->_internal_function_anchor() != 0) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_function_anchor());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SimpleExtensionDeclaration_ExtensionFunction::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    SimpleExtensionDeclaration_ExtensionFunction::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SimpleExtensionDeclaration_ExtensionFunction::GetClassData() const { return &_class_data_; }

void SimpleExtensionDeclaration_ExtensionFunction::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SimpleExtensionDeclaration_ExtensionFunction *>(to)->MergeFrom(
      static_cast<const SimpleExtensionDeclaration_ExtensionFunction &>(from));
}


void SimpleExtensionDeclaration_ExtensionFunction::MergeFrom(const SimpleExtensionDeclaration_ExtensionFunction& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_name().empty()) {
    _internal_set_name(from._internal_name());
  }
  if (from._internal_extension_uri_reference() != 0) {
    _internal_set_extension_uri_reference(from._internal_extension_uri_reference());
  }
  if (from._internal_function_anchor() != 0) {
    _internal_set_function_anchor(from._internal_function_anchor());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SimpleExtensionDeclaration_ExtensionFunction::CopyFrom(const SimpleExtensionDeclaration_ExtensionFunction& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SimpleExtensionDeclaration_ExtensionFunction::IsInitialized() const {
  return true;
}

void SimpleExtensionDeclaration_ExtensionFunction::InternalSwap(SimpleExtensionDeclaration_ExtensionFunction* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SimpleExtensionDeclaration_ExtensionFunction, function_anchor_)
      + sizeof(SimpleExtensionDeclaration_ExtensionFunction::function_anchor_)
      - PROTOBUF_FIELD_OFFSET(SimpleExtensionDeclaration_ExtensionFunction, extension_uri_reference_)>(
          reinterpret_cast<char*>(&extension_uri_reference_),
          reinterpret_cast<char*>(&other->extension_uri_reference_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SimpleExtensionDeclaration_ExtensionFunction::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter, &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once,
      file_level_metadata_substrait_2fextensions_2fextensions_2eproto[3]);
}

// ===================================================================

class SimpleExtensionDeclaration::_Internal {
 public:
  static const ::substrait::extensions::SimpleExtensionDeclaration_ExtensionType& extension_type(const SimpleExtensionDeclaration* msg);
  static const ::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation& extension_type_variation(const SimpleExtensionDeclaration* msg);
  static const ::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction& extension_function(const SimpleExtensionDeclaration* msg);
};

const ::substrait::extensions::SimpleExtensionDeclaration_ExtensionType&
SimpleExtensionDeclaration::_Internal::extension_type(const SimpleExtensionDeclaration* msg) {
  return *msg->mapping_type_.extension_type_;
}
const ::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation&
SimpleExtensionDeclaration::_Internal::extension_type_variation(const SimpleExtensionDeclaration* msg) {
  return *msg->mapping_type_.extension_type_variation_;
}
const ::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction&
SimpleExtensionDeclaration::_Internal::extension_function(const SimpleExtensionDeclaration* msg) {
  return *msg->mapping_type_.extension_function_;
}
void SimpleExtensionDeclaration::set_allocated_extension_type(::substrait::extensions::SimpleExtensionDeclaration_ExtensionType* extension_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_mapping_type();
  if (extension_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::substrait::extensions::SimpleExtensionDeclaration_ExtensionType>::GetOwningArena(extension_type);
    if (message_arena != submessage_arena) {
      extension_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, extension_type, submessage_arena);
    }
    set_has_extension_type();
    mapping_type_.extension_type_ = extension_type;
  }
  // @@protoc_insertion_point(field_set_allocated:substrait.extensions.SimpleExtensionDeclaration.extension_type)
}
void SimpleExtensionDeclaration::set_allocated_extension_type_variation(::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation* extension_type_variation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_mapping_type();
  if (extension_type_variation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation>::GetOwningArena(extension_type_variation);
    if (message_arena != submessage_arena) {
      extension_type_variation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, extension_type_variation, submessage_arena);
    }
    set_has_extension_type_variation();
    mapping_type_.extension_type_variation_ = extension_type_variation;
  }
  // @@protoc_insertion_point(field_set_allocated:substrait.extensions.SimpleExtensionDeclaration.extension_type_variation)
}
void SimpleExtensionDeclaration::set_allocated_extension_function(::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction* extension_function) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_mapping_type();
  if (extension_function) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction>::GetOwningArena(extension_function);
    if (message_arena != submessage_arena) {
      extension_function = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, extension_function, submessage_arena);
    }
    set_has_extension_function();
    mapping_type_.extension_function_ = extension_function;
  }
  // @@protoc_insertion_point(field_set_allocated:substrait.extensions.SimpleExtensionDeclaration.extension_function)
}
SimpleExtensionDeclaration::SimpleExtensionDeclaration(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:substrait.extensions.SimpleExtensionDeclaration)
}
SimpleExtensionDeclaration::SimpleExtensionDeclaration(const SimpleExtensionDeclaration& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_mapping_type();
  switch (from.mapping_type_case()) {
    case kExtensionType: {
      _internal_mutable_extension_type()->::substrait::extensions::SimpleExtensionDeclaration_ExtensionType::MergeFrom(from._internal_extension_type());
      break;
    }
    case kExtensionTypeVariation: {
      _internal_mutable_extension_type_variation()->::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation::MergeFrom(from._internal_extension_type_variation());
      break;
    }
    case kExtensionFunction: {
      _internal_mutable_extension_function()->::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction::MergeFrom(from._internal_extension_function());
      break;
    }
    case MAPPING_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:substrait.extensions.SimpleExtensionDeclaration)
}

inline void SimpleExtensionDeclaration::SharedCtor() {
clear_has_mapping_type();
}

SimpleExtensionDeclaration::~SimpleExtensionDeclaration() {
  // @@protoc_insertion_point(destructor:substrait.extensions.SimpleExtensionDeclaration)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SimpleExtensionDeclaration::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_mapping_type()) {
    clear_mapping_type();
  }
}

void SimpleExtensionDeclaration::ArenaDtor(void* object) {
  SimpleExtensionDeclaration* _this = reinterpret_cast< SimpleExtensionDeclaration* >(object);
  (void)_this;
}
void SimpleExtensionDeclaration::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SimpleExtensionDeclaration::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SimpleExtensionDeclaration::clear_mapping_type() {
// @@protoc_insertion_point(one_of_clear_start:substrait.extensions.SimpleExtensionDeclaration)
  switch (mapping_type_case()) {
    case kExtensionType: {
      if (GetArenaForAllocation() == nullptr) {
        delete mapping_type_.extension_type_;
      }
      break;
    }
    case kExtensionTypeVariation: {
      if (GetArenaForAllocation() == nullptr) {
        delete mapping_type_.extension_type_variation_;
      }
      break;
    }
    case kExtensionFunction: {
      if (GetArenaForAllocation() == nullptr) {
        delete mapping_type_.extension_function_;
      }
      break;
    }
    case MAPPING_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = MAPPING_TYPE_NOT_SET;
}


void SimpleExtensionDeclaration::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.extensions.SimpleExtensionDeclaration)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_mapping_type();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SimpleExtensionDeclaration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .substrait.extensions.SimpleExtensionDeclaration.ExtensionType extension_type = 1 [json_name = "extensionType"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_extension_type(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation extension_type_variation = 2 [json_name = "extensionTypeVariation"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_extension_type_variation(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction extension_function = 3 [json_name = "extensionFunction"];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_extension_function(), 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* SimpleExtensionDeclaration::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait.extensions.SimpleExtensionDeclaration)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .substrait.extensions.SimpleExtensionDeclaration.ExtensionType extension_type = 1 [json_name = "extensionType"];
  if (_internal_has_extension_type()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::extension_type(this), target, stream);
  }

  // .substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation extension_type_variation = 2 [json_name = "extensionTypeVariation"];
  if (_internal_has_extension_type_variation()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::extension_type_variation(this), target, stream);
  }

  // .substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction extension_function = 3 [json_name = "extensionFunction"];
  if (_internal_has_extension_function()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::extension_function(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:substrait.extensions.SimpleExtensionDeclaration)
  return target;
}

size_t SimpleExtensionDeclaration::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait.extensions.SimpleExtensionDeclaration)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  switch (mapping_type_case()) {
    // .substrait.extensions.SimpleExtensionDeclaration.ExtensionType extension_type = 1 [json_name = "extensionType"];
    case kExtensionType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *mapping_type_.extension_type_);
      break;
    }
    // .substrait.extensions.SimpleExtensionDeclaration.ExtensionTypeVariation extension_type_variation = 2 [json_name = "extensionTypeVariation"];
    case kExtensionTypeVariation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *mapping_type_.extension_type_variation_);
      break;
    }
    // .substrait.extensions.SimpleExtensionDeclaration.ExtensionFunction extension_function = 3 [json_name = "extensionFunction"];
    case kExtensionFunction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *mapping_type_.extension_function_);
      break;
    }
    case MAPPING_TYPE_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SimpleExtensionDeclaration::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    SimpleExtensionDeclaration::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SimpleExtensionDeclaration::GetClassData() const { return &_class_data_; }

void SimpleExtensionDeclaration::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SimpleExtensionDeclaration *>(to)->MergeFrom(
      static_cast<const SimpleExtensionDeclaration &>(from));
}


void SimpleExtensionDeclaration::MergeFrom(const SimpleExtensionDeclaration& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:substrait.extensions.SimpleExtensionDeclaration)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.mapping_type_case()) {
    case kExtensionType: {
      _internal_mutable_extension_type()->::substrait::extensions::SimpleExtensionDeclaration_ExtensionType::MergeFrom(from._internal_extension_type());
      break;
    }
    case kExtensionTypeVariation: {
      _internal_mutable_extension_type_variation()->::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation::MergeFrom(from._internal_extension_type_variation());
      break;
    }
    case kExtensionFunction: {
      _internal_mutable_extension_function()->::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction::MergeFrom(from._internal_extension_function());
      break;
    }
    case MAPPING_TYPE_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SimpleExtensionDeclaration::CopyFrom(const SimpleExtensionDeclaration& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait.extensions.SimpleExtensionDeclaration)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SimpleExtensionDeclaration::IsInitialized() const {
  return true;
}

void SimpleExtensionDeclaration::InternalSwap(SimpleExtensionDeclaration* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(mapping_type_, other->mapping_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata SimpleExtensionDeclaration::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter, &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once,
      file_level_metadata_substrait_2fextensions_2fextensions_2eproto[4]);
}

// ===================================================================

class AdvancedExtension::_Internal {
 public:
  static const ::PROTOBUF_NAMESPACE_ID::Any& optimization(const AdvancedExtension* msg);
  static const ::PROTOBUF_NAMESPACE_ID::Any& enhancement(const AdvancedExtension* msg);
};

const ::PROTOBUF_NAMESPACE_ID::Any&
AdvancedExtension::_Internal::optimization(const AdvancedExtension* msg) {
  return *msg->optimization_;
}
const ::PROTOBUF_NAMESPACE_ID::Any&
AdvancedExtension::_Internal::enhancement(const AdvancedExtension* msg) {
  return *msg->enhancement_;
}
void AdvancedExtension::clear_optimization() {
  if (GetArenaForAllocation() == nullptr && optimization_ != nullptr) {
    delete optimization_;
  }
  optimization_ = nullptr;
}
void AdvancedExtension::clear_enhancement() {
  if (GetArenaForAllocation() == nullptr && enhancement_ != nullptr) {
    delete enhancement_;
  }
  enhancement_ = nullptr;
}
AdvancedExtension::AdvancedExtension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:substrait.extensions.AdvancedExtension)
}
AdvancedExtension::AdvancedExtension(const AdvancedExtension& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_optimization()) {
    optimization_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from.optimization_);
  } else {
    optimization_ = nullptr;
  }
  if (from._internal_has_enhancement()) {
    enhancement_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from.enhancement_);
  } else {
    enhancement_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:substrait.extensions.AdvancedExtension)
}

inline void AdvancedExtension::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&optimization_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&enhancement_) -
    reinterpret_cast<char*>(&optimization_)) + sizeof(enhancement_));
}

AdvancedExtension::~AdvancedExtension() {
  // @@protoc_insertion_point(destructor:substrait.extensions.AdvancedExtension)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void AdvancedExtension::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete optimization_;
  if (this != internal_default_instance()) delete enhancement_;
}

void AdvancedExtension::ArenaDtor(void* object) {
  AdvancedExtension* _this = reinterpret_cast< AdvancedExtension* >(object);
  (void)_this;
}
void AdvancedExtension::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AdvancedExtension::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void AdvancedExtension::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.extensions.AdvancedExtension)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaForAllocation() == nullptr && optimization_ != nullptr) {
    delete optimization_;
  }
  optimization_ = nullptr;
  if (GetArenaForAllocation() == nullptr && enhancement_ != nullptr) {
    delete enhancement_;
  }
  enhancement_ = nullptr;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AdvancedExtension::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .google.protobuf.Any optimization = 1 [json_name = "optimization"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_optimization(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .google.protobuf.Any enhancement = 2 [json_name = "enhancement"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_enhancement(), 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* AdvancedExtension::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait.extensions.AdvancedExtension)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Any optimization = 1 [json_name = "optimization"];
  if (this->_internal_has_optimization()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::optimization(this), target, stream);
  }

  // .google.protobuf.Any enhancement = 2 [json_name = "enhancement"];
  if (this->_internal_has_enhancement()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::enhancement(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:substrait.extensions.AdvancedExtension)
  return target;
}

size_t AdvancedExtension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait.extensions.AdvancedExtension)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // .google.protobuf.Any optimization = 1 [json_name = "optimization"];
  if (this->_internal_has_optimization()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *optimization_);
  }

  // .google.protobuf.Any enhancement = 2 [json_name = "enhancement"];
  if (this->_internal_has_enhancement()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *enhancement_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AdvancedExtension::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    AdvancedExtension::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AdvancedExtension::GetClassData() const { return &_class_data_; }

void AdvancedExtension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<AdvancedExtension *>(to)->MergeFrom(
      static_cast<const AdvancedExtension &>(from));
}


void AdvancedExtension::MergeFrom(const AdvancedExtension& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:substrait.extensions.AdvancedExtension)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_optimization()) {
    _internal_mutable_optimization()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_optimization());
  }
  if (from._internal_has_enhancement()) {
    _internal_mutable_enhancement()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_enhancement());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void AdvancedExtension::CopyFrom(const AdvancedExtension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait.extensions.AdvancedExtension)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AdvancedExtension::IsInitialized() const {
  return true;
}

void AdvancedExtension::InternalSwap(AdvancedExtension* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(AdvancedExtension, enhancement_)
      + sizeof(AdvancedExtension::enhancement_)
      - PROTOBUF_FIELD_OFFSET(AdvancedExtension, optimization_)>(
          reinterpret_cast<char*>(&optimization_),
          reinterpret_cast<char*>(&other->optimization_));
}

::PROTOBUF_NAMESPACE_ID::Metadata AdvancedExtension::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_substrait_2fextensions_2fextensions_2eproto_getter, &descriptor_table_substrait_2fextensions_2fextensions_2eproto_once,
      file_level_metadata_substrait_2fextensions_2fextensions_2eproto[5]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace extensions
}  // namespace substrait
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::substrait::extensions::SimpleExtensionURI* Arena::CreateMaybeMessage< ::substrait::extensions::SimpleExtensionURI >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait::extensions::SimpleExtensionURI >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait::extensions::SimpleExtensionDeclaration_ExtensionType* Arena::CreateMaybeMessage< ::substrait::extensions::SimpleExtensionDeclaration_ExtensionType >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait::extensions::SimpleExtensionDeclaration_ExtensionType >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation* Arena::CreateMaybeMessage< ::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait::extensions::SimpleExtensionDeclaration_ExtensionTypeVariation >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction* Arena::CreateMaybeMessage< ::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait::extensions::SimpleExtensionDeclaration_ExtensionFunction >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait::extensions::SimpleExtensionDeclaration* Arena::CreateMaybeMessage< ::substrait::extensions::SimpleExtensionDeclaration >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait::extensions::SimpleExtensionDeclaration >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait::extensions::AdvancedExtension* Arena::CreateMaybeMessage< ::substrait::extensions::AdvancedExtension >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait::extensions::AdvancedExtension >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
