// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: greptime/v1/database.proto

#include "greptime/v1/database.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;

namespace greptime {
namespace v1 {
PROTOBUF_CONSTEXPR GreptimeRequest::GreptimeRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.header_)*/nullptr
  , /*decltype(_impl_.request_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GreptimeRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GreptimeRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~GreptimeRequestDefaultTypeInternal() {}
  union {
    GreptimeRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GreptimeRequestDefaultTypeInternal _GreptimeRequest_default_instance_;
PROTOBUF_CONSTEXPR GreptimeResponse::GreptimeResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.header_)*/nullptr
  , /*decltype(_impl_.response_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GreptimeResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GreptimeResponseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~GreptimeResponseDefaultTypeInternal() {}
  union {
    GreptimeResponse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GreptimeResponseDefaultTypeInternal _GreptimeResponse_default_instance_;
PROTOBUF_CONSTEXPR QueryRequest::QueryRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.query_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct QueryRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR QueryRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~QueryRequestDefaultTypeInternal() {}
  union {
    QueryRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryRequestDefaultTypeInternal _QueryRequest_default_instance_;
PROTOBUF_CONSTEXPR InsertIntoPlan::InsertIntoPlan(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.logical_plan_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.table_name_)*/nullptr
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct InsertIntoPlanDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InsertIntoPlanDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InsertIntoPlanDefaultTypeInternal() {}
  union {
    InsertIntoPlan _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InsertIntoPlanDefaultTypeInternal _InsertIntoPlan_default_instance_;
PROTOBUF_CONSTEXPR InsertRequests::InsertRequests(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.inserts_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct InsertRequestsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InsertRequestsDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InsertRequestsDefaultTypeInternal() {}
  union {
    InsertRequests _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InsertRequestsDefaultTypeInternal _InsertRequests_default_instance_;
PROTOBUF_CONSTEXPR InsertRequest::InsertRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.columns_)*/{}
  , /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.row_count_)*/0u
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct InsertRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InsertRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InsertRequestDefaultTypeInternal() {}
  union {
    InsertRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InsertRequestDefaultTypeInternal _InsertRequest_default_instance_;
PROTOBUF_CONSTEXPR DeleteRequests::DeleteRequests(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.deletes_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct DeleteRequestsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteRequestsDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteRequestsDefaultTypeInternal() {}
  union {
    DeleteRequests _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteRequestsDefaultTypeInternal _DeleteRequests_default_instance_;
PROTOBUF_CONSTEXPR DeleteRequest::DeleteRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.key_columns_)*/{}
  , /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.row_count_)*/0u
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct DeleteRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteRequestDefaultTypeInternal() {}
  union {
    DeleteRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteRequestDefaultTypeInternal _DeleteRequest_default_instance_;
PROTOBUF_CONSTEXPR RowInsertRequests::RowInsertRequests(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.inserts_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct RowInsertRequestsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RowInsertRequestsDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RowInsertRequestsDefaultTypeInternal() {}
  union {
    RowInsertRequests _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowInsertRequestsDefaultTypeInternal _RowInsertRequests_default_instance_;
PROTOBUF_CONSTEXPR RowInsertRequest::RowInsertRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.rows_)*/nullptr
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct RowInsertRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RowInsertRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RowInsertRequestDefaultTypeInternal() {}
  union {
    RowInsertRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowInsertRequestDefaultTypeInternal _RowInsertRequest_default_instance_;
PROTOBUF_CONSTEXPR RowDeleteRequests::RowDeleteRequests(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.deletes_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct RowDeleteRequestsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RowDeleteRequestsDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RowDeleteRequestsDefaultTypeInternal() {}
  union {
    RowDeleteRequests _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowDeleteRequestsDefaultTypeInternal _RowDeleteRequests_default_instance_;
PROTOBUF_CONSTEXPR RowDeleteRequest::RowDeleteRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.rows_)*/nullptr
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct RowDeleteRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RowDeleteRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RowDeleteRequestDefaultTypeInternal() {}
  union {
    RowDeleteRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowDeleteRequestDefaultTypeInternal _RowDeleteRequest_default_instance_;
}  // namespace v1
}  // namespace greptime
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fdatabase_2eproto[12];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fdatabase_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fdatabase_2eproto = nullptr;

const uint32_t TableStruct_greptime_2fv1_2fdatabase_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _impl_.header_),
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeRequest, _impl_.request_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _impl_.header_),
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::greptime::v1::GreptimeResponse, _impl_.response_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::greptime::v1::QueryRequest, _impl_.query_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertIntoPlan, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertIntoPlan, _impl_.table_name_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertIntoPlan, _impl_.logical_plan_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequests, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequests, _impl_.inserts_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.table_name_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.columns_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::InsertRequest, _impl_.row_count_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequests, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequests, _impl_.deletes_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.table_name_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.key_columns_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::DeleteRequest, _impl_.row_count_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowInsertRequests, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowInsertRequests, _impl_.inserts_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowInsertRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowInsertRequest, _impl_.table_name_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowInsertRequest, _impl_.rows_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowDeleteRequests, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowDeleteRequests, _impl_.deletes_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowDeleteRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowDeleteRequest, _impl_.table_name_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::RowDeleteRequest, _impl_.rows_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::greptime::v1::GreptimeRequest)},
  { 14, -1, -1, sizeof(::greptime::v1::GreptimeResponse)},
  { 23, -1, -1, sizeof(::greptime::v1::QueryRequest)},
  { 34, -1, -1, sizeof(::greptime::v1::InsertIntoPlan)},
  { 42, -1, -1, sizeof(::greptime::v1::InsertRequests)},
  { 49, -1, -1, sizeof(::greptime::v1::InsertRequest)},
  { 58, -1, -1, sizeof(::greptime::v1::DeleteRequests)},
  { 65, -1, -1, sizeof(::greptime::v1::DeleteRequest)},
  { 74, -1, -1, sizeof(::greptime::v1::RowInsertRequests)},
  { 81, -1, -1, sizeof(::greptime::v1::RowInsertRequest)},
  { 89, -1, -1, sizeof(::greptime::v1::RowDeleteRequests)},
  { 96, -1, -1, sizeof(::greptime::v1::RowDeleteRequest)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::greptime::v1::_GreptimeRequest_default_instance_._instance,
  &::greptime::v1::_GreptimeResponse_default_instance_._instance,
  &::greptime::v1::_QueryRequest_default_instance_._instance,
  &::greptime::v1::_InsertIntoPlan_default_instance_._instance,
  &::greptime::v1::_InsertRequests_default_instance_._instance,
  &::greptime::v1::_InsertRequest_default_instance_._instance,
  &::greptime::v1::_DeleteRequests_default_instance_._instance,
  &::greptime::v1::_DeleteRequest_default_instance_._instance,
  &::greptime::v1::_RowInsertRequests_default_instance_._instance,
  &::greptime::v1::_RowInsertRequest_default_instance_._instance,
  &::greptime::v1::_RowDeleteRequests_default_instance_._instance,
  &::greptime::v1::_RowDeleteRequest_default_instance_._instance,
};

const char descriptor_table_protodef_greptime_2fv1_2fdatabase_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\032greptime/v1/database.proto\022\013greptime.v"
  "1\032\025greptime/v1/ddl.proto\032\030greptime/v1/co"
  "lumn.proto\032\025greptime/v1/row.proto\032\026grept"
  "ime/v1/prom.proto\032\030greptime/v1/common.pr"
  "oto\"\352\002\n\017GreptimeRequest\022*\n\006header\030\001 \001(\0132"
  "\032.greptime.v1.RequestHeader\022.\n\007inserts\030\002"
  " \001(\0132\033.greptime.v1.InsertRequestsH\000\022*\n\005q"
  "uery\030\003 \001(\0132\031.greptime.v1.QueryRequestH\000\022"
  "&\n\003ddl\030\004 \001(\0132\027.greptime.v1.DdlRequestH\000\022"
  ".\n\007deletes\030\005 \001(\0132\033.greptime.v1.DeleteReq"
  "uestsH\000\0225\n\013row_inserts\030\006 \001(\0132\036.greptime."
  "v1.RowInsertRequestsH\000\0225\n\013row_deletes\030\007 "
  "\001(\0132\036.greptime.v1.RowDeleteRequestsH\000B\t\n"
  "\007request\"\177\n\020GreptimeResponse\022+\n\006header\030\001"
  " \001(\0132\033.greptime.v1.ResponseHeader\0222\n\raff"
  "ected_rows\030\002 \001(\0132\031.greptime.v1.AffectedR"
  "owsH\000B\n\n\010response\"\260\001\n\014QueryRequest\022\r\n\003sq"
  "l\030\001 \001(\tH\000\022\026\n\014logical_plan\030\002 \001(\014H\000\0227\n\020pro"
  "m_range_query\030\003 \001(\0132\033.greptime.v1.PromRa"
  "ngeQueryH\000\0227\n\020insert_into_plan\030\004 \001(\0132\033.g"
  "reptime.v1.InsertIntoPlanH\000B\007\n\005query\"R\n\016"
  "InsertIntoPlan\022*\n\ntable_name\030\001 \001(\0132\026.gre"
  "ptime.v1.TableName\022\024\n\014logical_plan\030\002 \001(\014"
  "\"=\n\016InsertRequests\022+\n\007inserts\030\001 \003(\0132\032.gr"
  "eptime.v1.InsertRequest\"\\\n\rInsertRequest"
  "\022\022\n\ntable_name\030\001 \001(\t\022$\n\007columns\030\003 \003(\0132\023."
  "greptime.v1.Column\022\021\n\trow_count\030\004 \001(\r\"=\n"
  "\016DeleteRequests\022+\n\007deletes\030\001 \003(\0132\032.grept"
  "ime.v1.DeleteRequest\"`\n\rDeleteRequest\022\022\n"
  "\ntable_name\030\001 \001(\t\022(\n\013key_columns\030\003 \003(\0132\023"
  ".greptime.v1.Column\022\021\n\trow_count\030\004 \001(\r\"C"
  "\n\021RowInsertRequests\022.\n\007inserts\030\001 \003(\0132\035.g"
  "reptime.v1.RowInsertRequest\"G\n\020RowInsert"
  "Request\022\022\n\ntable_name\030\001 \001(\t\022\037\n\004rows\030\002 \001("
  "\0132\021.greptime.v1.Rows\"C\n\021RowDeleteRequest"
  "s\022.\n\007deletes\030\001 \003(\0132\035.greptime.v1.RowDele"
  "teRequest\"G\n\020RowDeleteRequest\022\022\n\ntable_n"
  "ame\030\001 \001(\t\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Ro"
  "ws2\252\001\n\020GreptimeDatabase\022E\n\006Handle\022\034.grep"
  "time.v1.GreptimeRequest\032\035.greptime.v1.Gr"
  "eptimeResponse\022O\n\016HandleRequests\022\034.grept"
  "ime.v1.GreptimeRequest\032\035.greptime.v1.Gre"
  "ptimeResponse(\001BQ\n\016io.greptime.v1B\010Datab"
  "aseZ5github.com/GreptimeTeam/greptime-pr"
  "oto/go/greptime/v1b\006proto3"
  ;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fdatabase_2eproto_deps[5] = {
  &::descriptor_table_greptime_2fv1_2fcolumn_2eproto,
  &::descriptor_table_greptime_2fv1_2fcommon_2eproto,
  &::descriptor_table_greptime_2fv1_2fddl_2eproto,
  &::descriptor_table_greptime_2fv1_2fprom_2eproto,
  &::descriptor_table_greptime_2fv1_2frow_2eproto,
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fdatabase_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fdatabase_2eproto = {
    false, false, 1786, descriptor_table_protodef_greptime_2fv1_2fdatabase_2eproto,
    "greptime/v1/database.proto",
    &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once, descriptor_table_greptime_2fv1_2fdatabase_2eproto_deps, 5, 12,
    schemas, file_default_instances, TableStruct_greptime_2fv1_2fdatabase_2eproto::offsets,
    file_level_metadata_greptime_2fv1_2fdatabase_2eproto, file_level_enum_descriptors_greptime_2fv1_2fdatabase_2eproto,
    file_level_service_descriptors_greptime_2fv1_2fdatabase_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter() {
  return &descriptor_table_greptime_2fv1_2fdatabase_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2fdatabase_2eproto(&descriptor_table_greptime_2fv1_2fdatabase_2eproto);
namespace greptime {
namespace v1 {

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

class GreptimeRequest::_Internal {
 public:
  static const ::greptime::v1::RequestHeader& header(const GreptimeRequest* msg);
  static const ::greptime::v1::InsertRequests& inserts(const GreptimeRequest* msg);
  static const ::greptime::v1::QueryRequest& query(const GreptimeRequest* msg);
  static const ::greptime::v1::DdlRequest& ddl(const GreptimeRequest* msg);
  static const ::greptime::v1::DeleteRequests& deletes(const GreptimeRequest* msg);
  static const ::greptime::v1::RowInsertRequests& row_inserts(const GreptimeRequest* msg);
  static const ::greptime::v1::RowDeleteRequests& row_deletes(const GreptimeRequest* msg);
};

const ::greptime::v1::RequestHeader&
GreptimeRequest::_Internal::header(const GreptimeRequest* msg) {
  return *msg->_impl_.header_;
}
const ::greptime::v1::InsertRequests&
GreptimeRequest::_Internal::inserts(const GreptimeRequest* msg) {
  return *msg->_impl_.request_.inserts_;
}
const ::greptime::v1::QueryRequest&
GreptimeRequest::_Internal::query(const GreptimeRequest* msg) {
  return *msg->_impl_.request_.query_;
}
const ::greptime::v1::DdlRequest&
GreptimeRequest::_Internal::ddl(const GreptimeRequest* msg) {
  return *msg->_impl_.request_.ddl_;
}
const ::greptime::v1::DeleteRequests&
GreptimeRequest::_Internal::deletes(const GreptimeRequest* msg) {
  return *msg->_impl_.request_.deletes_;
}
const ::greptime::v1::RowInsertRequests&
GreptimeRequest::_Internal::row_inserts(const GreptimeRequest* msg) {
  return *msg->_impl_.request_.row_inserts_;
}
const ::greptime::v1::RowDeleteRequests&
GreptimeRequest::_Internal::row_deletes(const GreptimeRequest* msg) {
  return *msg->_impl_.request_.row_deletes_;
}
void GreptimeRequest::clear_header() {
  if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
    delete _impl_.header_;
  }
  _impl_.header_ = nullptr;
}
void GreptimeRequest::set_allocated_inserts(::greptime::v1::InsertRequests* inserts) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_request();
  if (inserts) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(inserts);
    if (message_arena != submessage_arena) {
      inserts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, inserts, submessage_arena);
    }
    set_has_inserts();
    _impl_.request_.inserts_ = inserts;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.inserts)
}
void GreptimeRequest::set_allocated_query(::greptime::v1::QueryRequest* query) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_request();
  if (query) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(query);
    if (message_arena != submessage_arena) {
      query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, query, submessage_arena);
    }
    set_has_query();
    _impl_.request_.query_ = query;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.query)
}
void GreptimeRequest::set_allocated_ddl(::greptime::v1::DdlRequest* ddl) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_request();
  if (ddl) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ddl));
    if (message_arena != submessage_arena) {
      ddl = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, ddl, submessage_arena);
    }
    set_has_ddl();
    _impl_.request_.ddl_ = ddl;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.ddl)
}
void GreptimeRequest::clear_ddl() {
  if (_internal_has_ddl()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.request_.ddl_;
    }
    clear_has_request();
  }
}
void GreptimeRequest::set_allocated_deletes(::greptime::v1::DeleteRequests* deletes) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_request();
  if (deletes) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(deletes);
    if (message_arena != submessage_arena) {
      deletes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, deletes, submessage_arena);
    }
    set_has_deletes();
    _impl_.request_.deletes_ = deletes;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.deletes)
}
void GreptimeRequest::set_allocated_row_inserts(::greptime::v1::RowInsertRequests* row_inserts) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_request();
  if (row_inserts) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(row_inserts);
    if (message_arena != submessage_arena) {
      row_inserts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, row_inserts, submessage_arena);
    }
    set_has_row_inserts();
    _impl_.request_.row_inserts_ = row_inserts;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.row_inserts)
}
void GreptimeRequest::set_allocated_row_deletes(::greptime::v1::RowDeleteRequests* row_deletes) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_request();
  if (row_deletes) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(row_deletes);
    if (message_arena != submessage_arena) {
      row_deletes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, row_deletes, submessage_arena);
    }
    set_has_row_deletes();
    _impl_.request_.row_deletes_ = row_deletes;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeRequest.row_deletes)
}
GreptimeRequest::GreptimeRequest(::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:greptime.v1.GreptimeRequest)
}
GreptimeRequest::GreptimeRequest(const GreptimeRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  GreptimeRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.header_){nullptr}
    , decltype(_impl_.request_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_header()) {
    _this->_impl_.header_ = new ::greptime::v1::RequestHeader(*from._impl_.header_);
  }
  clear_has_request();
  switch (from.request_case()) {
    case kInserts: {
      _this->_internal_mutable_inserts()->::greptime::v1::InsertRequests::MergeFrom(
          from._internal_inserts());
      break;
    }
    case kQuery: {
      _this->_internal_mutable_query()->::greptime::v1::QueryRequest::MergeFrom(
          from._internal_query());
      break;
    }
    case kDdl: {
      _this->_internal_mutable_ddl()->::greptime::v1::DdlRequest::MergeFrom(
          from._internal_ddl());
      break;
    }
    case kDeletes: {
      _this->_internal_mutable_deletes()->::greptime::v1::DeleteRequests::MergeFrom(
          from._internal_deletes());
      break;
    }
    case kRowInserts: {
      _this->_internal_mutable_row_inserts()->::greptime::v1::RowInsertRequests::MergeFrom(
          from._internal_row_inserts());
      break;
    }
    case kRowDeletes: {
      _this->_internal_mutable_row_deletes()->::greptime::v1::RowDeleteRequests::MergeFrom(
          from._internal_row_deletes());
      break;
    }
    case REQUEST_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:greptime.v1.GreptimeRequest)
}

inline void GreptimeRequest::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.header_){nullptr}
    , decltype(_impl_.request_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_request();
}

GreptimeRequest::~GreptimeRequest() {
  // @@protoc_insertion_point(destructor:greptime.v1.GreptimeRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GreptimeRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.header_;
  if (has_request()) {
    clear_request();
  }
}

void GreptimeRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GreptimeRequest::clear_request() {
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.GreptimeRequest)
  switch (request_case()) {
    case kInserts: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.request_.inserts_;
      }
      break;
    }
    case kQuery: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.request_.query_;
      }
      break;
    }
    case kDdl: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.request_.ddl_;
      }
      break;
    }
    case kDeletes: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.request_.deletes_;
      }
      break;
    }
    case kRowInserts: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.request_.row_inserts_;
      }
      break;
    }
    case kRowDeletes: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.request_.row_deletes_;
      }
      break;
    }
    case REQUEST_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REQUEST_NOT_SET;
}


void GreptimeRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.GreptimeRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GreptimeRequest::_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) {
      // .greptime.v1.RequestHeader header = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.InsertRequests inserts = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_inserts(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.QueryRequest query = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_query(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.DdlRequest ddl = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_ddl(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.DeleteRequests deletes = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_deletes(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.RowInsertRequests row_inserts = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_row_inserts(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.RowDeleteRequests row_deletes = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_row_deletes(), 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* GreptimeRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.GreptimeRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .greptime.v1.RequestHeader header = 1;
  if (this->_internal_has_header()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::header(this),
        _Internal::header(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.InsertRequests inserts = 2;
  if (_internal_has_inserts()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::inserts(this),
        _Internal::inserts(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.QueryRequest query = 3;
  if (_internal_has_query()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::query(this),
        _Internal::query(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.DdlRequest ddl = 4;
  if (_internal_has_ddl()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::ddl(this),
        _Internal::ddl(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.DeleteRequests deletes = 5;
  if (_internal_has_deletes()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::deletes(this),
        _Internal::deletes(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.RowInsertRequests row_inserts = 6;
  if (_internal_has_row_inserts()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::row_inserts(this),
        _Internal::row_inserts(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.RowDeleteRequests row_deletes = 7;
  if (_internal_has_row_deletes()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::row_deletes(this),
        _Internal::row_deletes(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:greptime.v1.GreptimeRequest)
  return target;
}

size_t GreptimeRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.GreptimeRequest)
  size_t total_size = 0;

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

  // .greptime.v1.RequestHeader header = 1;
  if (this->_internal_has_header()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.header_);
  }

  switch (request_case()) {
    // .greptime.v1.InsertRequests inserts = 2;
    case kInserts: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_.inserts_);
      break;
    }
    // .greptime.v1.QueryRequest query = 3;
    case kQuery: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_.query_);
      break;
    }
    // .greptime.v1.DdlRequest ddl = 4;
    case kDdl: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_.ddl_);
      break;
    }
    // .greptime.v1.DeleteRequests deletes = 5;
    case kDeletes: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_.deletes_);
      break;
    }
    // .greptime.v1.RowInsertRequests row_inserts = 6;
    case kRowInserts: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_.row_inserts_);
      break;
    }
    // .greptime.v1.RowDeleteRequests row_deletes = 7;
    case kRowDeletes: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_.row_deletes_);
      break;
    }
    case REQUEST_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void GreptimeRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<GreptimeRequest*>(&to_msg);
  auto& from = static_cast<const GreptimeRequest&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.GreptimeRequest)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_header()) {
    _this->_internal_mutable_header()->::greptime::v1::RequestHeader::MergeFrom(
        from._internal_header());
  }
  switch (from.request_case()) {
    case kInserts: {
      _this->_internal_mutable_inserts()->::greptime::v1::InsertRequests::MergeFrom(
          from._internal_inserts());
      break;
    }
    case kQuery: {
      _this->_internal_mutable_query()->::greptime::v1::QueryRequest::MergeFrom(
          from._internal_query());
      break;
    }
    case kDdl: {
      _this->_internal_mutable_ddl()->::greptime::v1::DdlRequest::MergeFrom(
          from._internal_ddl());
      break;
    }
    case kDeletes: {
      _this->_internal_mutable_deletes()->::greptime::v1::DeleteRequests::MergeFrom(
          from._internal_deletes());
      break;
    }
    case kRowInserts: {
      _this->_internal_mutable_row_inserts()->::greptime::v1::RowInsertRequests::MergeFrom(
          from._internal_row_inserts());
      break;
    }
    case kRowDeletes: {
      _this->_internal_mutable_row_deletes()->::greptime::v1::RowDeleteRequests::MergeFrom(
          from._internal_row_deletes());
      break;
    }
    case REQUEST_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void GreptimeRequest::CopyFrom(const GreptimeRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.GreptimeRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void GreptimeRequest::InternalSwap(GreptimeRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.header_, other->_impl_.header_);
  swap(_impl_.request_, other->_impl_.request_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata GreptimeRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[0]);
}

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

class GreptimeResponse::_Internal {
 public:
  static const ::greptime::v1::ResponseHeader& header(const GreptimeResponse* msg);
  static const ::greptime::v1::AffectedRows& affected_rows(const GreptimeResponse* msg);
};

const ::greptime::v1::ResponseHeader&
GreptimeResponse::_Internal::header(const GreptimeResponse* msg) {
  return *msg->_impl_.header_;
}
const ::greptime::v1::AffectedRows&
GreptimeResponse::_Internal::affected_rows(const GreptimeResponse* msg) {
  return *msg->_impl_.response_.affected_rows_;
}
void GreptimeResponse::clear_header() {
  if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
    delete _impl_.header_;
  }
  _impl_.header_ = nullptr;
}
void GreptimeResponse::set_allocated_affected_rows(::greptime::v1::AffectedRows* affected_rows) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_response();
  if (affected_rows) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(affected_rows));
    if (message_arena != submessage_arena) {
      affected_rows = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, affected_rows, submessage_arena);
    }
    set_has_affected_rows();
    _impl_.response_.affected_rows_ = affected_rows;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.GreptimeResponse.affected_rows)
}
void GreptimeResponse::clear_affected_rows() {
  if (_internal_has_affected_rows()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.response_.affected_rows_;
    }
    clear_has_response();
  }
}
GreptimeResponse::GreptimeResponse(::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:greptime.v1.GreptimeResponse)
}
GreptimeResponse::GreptimeResponse(const GreptimeResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  GreptimeResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.header_){nullptr}
    , decltype(_impl_.response_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_header()) {
    _this->_impl_.header_ = new ::greptime::v1::ResponseHeader(*from._impl_.header_);
  }
  clear_has_response();
  switch (from.response_case()) {
    case kAffectedRows: {
      _this->_internal_mutable_affected_rows()->::greptime::v1::AffectedRows::MergeFrom(
          from._internal_affected_rows());
      break;
    }
    case RESPONSE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:greptime.v1.GreptimeResponse)
}

inline void GreptimeResponse::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.header_){nullptr}
    , decltype(_impl_.response_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_response();
}

GreptimeResponse::~GreptimeResponse() {
  // @@protoc_insertion_point(destructor:greptime.v1.GreptimeResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GreptimeResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.header_;
  if (has_response()) {
    clear_response();
  }
}

void GreptimeResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GreptimeResponse::clear_response() {
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.GreptimeResponse)
  switch (response_case()) {
    case kAffectedRows: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.response_.affected_rows_;
      }
      break;
    }
    case RESPONSE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = RESPONSE_NOT_SET;
}


void GreptimeResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.GreptimeResponse)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* GreptimeResponse::_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) {
      // .greptime.v1.ResponseHeader header = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.AffectedRows affected_rows = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_affected_rows(), 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* GreptimeResponse::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.GreptimeResponse)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .greptime.v1.ResponseHeader header = 1;
  if (this->_internal_has_header()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::header(this),
        _Internal::header(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.AffectedRows affected_rows = 2;
  if (_internal_has_affected_rows()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::affected_rows(this),
        _Internal::affected_rows(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:greptime.v1.GreptimeResponse)
  return target;
}

size_t GreptimeResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.GreptimeResponse)
  size_t total_size = 0;

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

  // .greptime.v1.ResponseHeader header = 1;
  if (this->_internal_has_header()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.header_);
  }

  switch (response_case()) {
    // .greptime.v1.AffectedRows affected_rows = 2;
    case kAffectedRows: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.response_.affected_rows_);
      break;
    }
    case RESPONSE_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void GreptimeResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<GreptimeResponse*>(&to_msg);
  auto& from = static_cast<const GreptimeResponse&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.GreptimeResponse)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_header()) {
    _this->_internal_mutable_header()->::greptime::v1::ResponseHeader::MergeFrom(
        from._internal_header());
  }
  switch (from.response_case()) {
    case kAffectedRows: {
      _this->_internal_mutable_affected_rows()->::greptime::v1::AffectedRows::MergeFrom(
          from._internal_affected_rows());
      break;
    }
    case RESPONSE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void GreptimeResponse::CopyFrom(const GreptimeResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.GreptimeResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void GreptimeResponse::InternalSwap(GreptimeResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.header_, other->_impl_.header_);
  swap(_impl_.response_, other->_impl_.response_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata GreptimeResponse::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[1]);
}

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

class QueryRequest::_Internal {
 public:
  static const ::greptime::v1::PromRangeQuery& prom_range_query(const QueryRequest* msg);
  static const ::greptime::v1::InsertIntoPlan& insert_into_plan(const QueryRequest* msg);
};

const ::greptime::v1::PromRangeQuery&
QueryRequest::_Internal::prom_range_query(const QueryRequest* msg) {
  return *msg->_impl_.query_.prom_range_query_;
}
const ::greptime::v1::InsertIntoPlan&
QueryRequest::_Internal::insert_into_plan(const QueryRequest* msg) {
  return *msg->_impl_.query_.insert_into_plan_;
}
void QueryRequest::set_allocated_prom_range_query(::greptime::v1::PromRangeQuery* prom_range_query) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_query();
  if (prom_range_query) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(prom_range_query));
    if (message_arena != submessage_arena) {
      prom_range_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, prom_range_query, submessage_arena);
    }
    set_has_prom_range_query();
    _impl_.query_.prom_range_query_ = prom_range_query;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.QueryRequest.prom_range_query)
}
void QueryRequest::clear_prom_range_query() {
  if (_internal_has_prom_range_query()) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.query_.prom_range_query_;
    }
    clear_has_query();
  }
}
void QueryRequest::set_allocated_insert_into_plan(::greptime::v1::InsertIntoPlan* insert_into_plan) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_query();
  if (insert_into_plan) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(insert_into_plan);
    if (message_arena != submessage_arena) {
      insert_into_plan = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, insert_into_plan, submessage_arena);
    }
    set_has_insert_into_plan();
    _impl_.query_.insert_into_plan_ = insert_into_plan;
  }
  // @@protoc_insertion_point(field_set_allocated:greptime.v1.QueryRequest.insert_into_plan)
}
QueryRequest::QueryRequest(::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:greptime.v1.QueryRequest)
}
QueryRequest::QueryRequest(const QueryRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  QueryRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.query_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_query();
  switch (from.query_case()) {
    case kSql: {
      _this->_internal_set_sql(from._internal_sql());
      break;
    }
    case kLogicalPlan: {
      _this->_internal_set_logical_plan(from._internal_logical_plan());
      break;
    }
    case kPromRangeQuery: {
      _this->_internal_mutable_prom_range_query()->::greptime::v1::PromRangeQuery::MergeFrom(
          from._internal_prom_range_query());
      break;
    }
    case kInsertIntoPlan: {
      _this->_internal_mutable_insert_into_plan()->::greptime::v1::InsertIntoPlan::MergeFrom(
          from._internal_insert_into_plan());
      break;
    }
    case QUERY_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:greptime.v1.QueryRequest)
}

inline void QueryRequest::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.query_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_query();
}

QueryRequest::~QueryRequest() {
  // @@protoc_insertion_point(destructor:greptime.v1.QueryRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void QueryRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_query()) {
    clear_query();
  }
}

void QueryRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void QueryRequest::clear_query() {
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.QueryRequest)
  switch (query_case()) {
    case kSql: {
      _impl_.query_.sql_.Destroy();
      break;
    }
    case kLogicalPlan: {
      _impl_.query_.logical_plan_.Destroy();
      break;
    }
    case kPromRangeQuery: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.query_.prom_range_query_;
      }
      break;
    }
    case kInsertIntoPlan: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.query_.insert_into_plan_;
      }
      break;
    }
    case QUERY_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = QUERY_NOT_SET;
}


void QueryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.QueryRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* QueryRequest::_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 sql = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_sql();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.QueryRequest.sql"));
        } else
          goto handle_unusual;
        continue;
      // bytes logical_plan = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_logical_plan();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.PromRangeQuery prom_range_query = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_prom_range_query(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.InsertIntoPlan insert_into_plan = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_insert_into_plan(), 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* QueryRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.QueryRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string sql = 1;
  if (_internal_has_sql()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_sql().data(), static_cast<int>(this->_internal_sql().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "greptime.v1.QueryRequest.sql");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_sql(), target);
  }

  // bytes logical_plan = 2;
  if (_internal_has_logical_plan()) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_logical_plan(), target);
  }

  // .greptime.v1.PromRangeQuery prom_range_query = 3;
  if (_internal_has_prom_range_query()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::prom_range_query(this),
        _Internal::prom_range_query(this).GetCachedSize(), target, stream);
  }

  // .greptime.v1.InsertIntoPlan insert_into_plan = 4;
  if (_internal_has_insert_into_plan()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::insert_into_plan(this),
        _Internal::insert_into_plan(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:greptime.v1.QueryRequest)
  return target;
}

size_t QueryRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.QueryRequest)
  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 (query_case()) {
    // string sql = 1;
    case kSql: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_sql());
      break;
    }
    // bytes logical_plan = 2;
    case kLogicalPlan: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_logical_plan());
      break;
    }
    // .greptime.v1.PromRangeQuery prom_range_query = 3;
    case kPromRangeQuery: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.query_.prom_range_query_);
      break;
    }
    // .greptime.v1.InsertIntoPlan insert_into_plan = 4;
    case kInsertIntoPlan: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.query_.insert_into_plan_);
      break;
    }
    case QUERY_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void QueryRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<QueryRequest*>(&to_msg);
  auto& from = static_cast<const QueryRequest&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.QueryRequest)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.query_case()) {
    case kSql: {
      _this->_internal_set_sql(from._internal_sql());
      break;
    }
    case kLogicalPlan: {
      _this->_internal_set_logical_plan(from._internal_logical_plan());
      break;
    }
    case kPromRangeQuery: {
      _this->_internal_mutable_prom_range_query()->::greptime::v1::PromRangeQuery::MergeFrom(
          from._internal_prom_range_query());
      break;
    }
    case kInsertIntoPlan: {
      _this->_internal_mutable_insert_into_plan()->::greptime::v1::InsertIntoPlan::MergeFrom(
          from._internal_insert_into_plan());
      break;
    }
    case QUERY_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void QueryRequest::CopyFrom(const QueryRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.QueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

::PROTOBUF_NAMESPACE_ID::Metadata QueryRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[2]);
}

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

class InsertIntoPlan::_Internal {
 public:
  static const ::greptime::v1::TableName& table_name(const InsertIntoPlan* msg);
};

const ::greptime::v1::TableName&
InsertIntoPlan::_Internal::table_name(const InsertIntoPlan* msg) {
  return *msg->_impl_.table_name_;
}
void InsertIntoPlan::clear_table_name() {
  if (GetArenaForAllocation() == nullptr && _impl_.table_name_ != nullptr) {
    delete _impl_.table_name_;
  }
  _impl_.table_name_ = nullptr;
}
InsertIntoPlan::InsertIntoPlan(::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:greptime.v1.InsertIntoPlan)
}
InsertIntoPlan::InsertIntoPlan(const InsertIntoPlan& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InsertIntoPlan* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.logical_plan_){}
    , decltype(_impl_.table_name_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.logical_plan_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.logical_plan_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_logical_plan().empty()) {
    _this->_impl_.logical_plan_.Set(from._internal_logical_plan(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_table_name()) {
    _this->_impl_.table_name_ = new ::greptime::v1::TableName(*from._impl_.table_name_);
  }
  // @@protoc_insertion_point(copy_constructor:greptime.v1.InsertIntoPlan)
}

inline void InsertIntoPlan::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.logical_plan_){}
    , decltype(_impl_.table_name_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.logical_plan_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.logical_plan_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

InsertIntoPlan::~InsertIntoPlan() {
  // @@protoc_insertion_point(destructor:greptime.v1.InsertIntoPlan)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void InsertIntoPlan::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.logical_plan_.Destroy();
  if (this != internal_default_instance()) delete _impl_.table_name_;
}

void InsertIntoPlan::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void InsertIntoPlan::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.InsertIntoPlan)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.logical_plan_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && _impl_.table_name_ != nullptr) {
    delete _impl_.table_name_;
  }
  _impl_.table_name_ = nullptr;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InsertIntoPlan::_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) {
      // .greptime.v1.TableName table_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_table_name(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // bytes logical_plan = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_logical_plan();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          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* InsertIntoPlan::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.InsertIntoPlan)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .greptime.v1.TableName table_name = 1;
  if (this->_internal_has_table_name()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::table_name(this),
        _Internal::table_name(this).GetCachedSize(), target, stream);
  }

  // bytes logical_plan = 2;
  if (!this->_internal_logical_plan().empty()) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_logical_plan(), 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:greptime.v1.InsertIntoPlan)
  return target;
}

size_t InsertIntoPlan::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.InsertIntoPlan)
  size_t total_size = 0;

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

  // bytes logical_plan = 2;
  if (!this->_internal_logical_plan().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_logical_plan());
  }

  // .greptime.v1.TableName table_name = 1;
  if (this->_internal_has_table_name()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.table_name_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void InsertIntoPlan::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<InsertIntoPlan*>(&to_msg);
  auto& from = static_cast<const InsertIntoPlan&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.InsertIntoPlan)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_logical_plan().empty()) {
    _this->_internal_set_logical_plan(from._internal_logical_plan());
  }
  if (from._internal_has_table_name()) {
    _this->_internal_mutable_table_name()->::greptime::v1::TableName::MergeFrom(
        from._internal_table_name());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InsertIntoPlan::CopyFrom(const InsertIntoPlan& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.InsertIntoPlan)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void InsertIntoPlan::InternalSwap(InsertIntoPlan* 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_.logical_plan_, lhs_arena,
      &other->_impl_.logical_plan_, rhs_arena
  );
  swap(_impl_.table_name_, other->_impl_.table_name_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InsertIntoPlan::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[3]);
}

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

class InsertRequests::_Internal {
 public:
};

InsertRequests::InsertRequests(::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:greptime.v1.InsertRequests)
}
InsertRequests::InsertRequests(const InsertRequests& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InsertRequests* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.inserts_){from._impl_.inserts_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:greptime.v1.InsertRequests)
}

inline void InsertRequests::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.inserts_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

InsertRequests::~InsertRequests() {
  // @@protoc_insertion_point(destructor:greptime.v1.InsertRequests)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void InsertRequests::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.inserts_.~RepeatedPtrField();
}

void InsertRequests::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void InsertRequests::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.InsertRequests)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* InsertRequests::_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) {
      // repeated .greptime.v1.InsertRequest inserts = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_inserts(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* InsertRequests::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.InsertRequests)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .greptime.v1.InsertRequest inserts = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_inserts_size()); i < n; i++) {
    const auto& repfield = this->_internal_inserts(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:greptime.v1.InsertRequests)
  return target;
}

size_t InsertRequests::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.InsertRequests)
  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 .greptime.v1.InsertRequest inserts = 1;
  total_size += 1UL * this->_internal_inserts_size();
  for (const auto& msg : this->_impl_.inserts_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void InsertRequests::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<InsertRequests*>(&to_msg);
  auto& from = static_cast<const InsertRequests&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.InsertRequests)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.inserts_.MergeFrom(from._impl_.inserts_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InsertRequests::CopyFrom(const InsertRequests& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.InsertRequests)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void InsertRequests::InternalSwap(InsertRequests* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.inserts_.InternalSwap(&other->_impl_.inserts_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InsertRequests::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[4]);
}

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

class InsertRequest::_Internal {
 public:
};

void InsertRequest::clear_columns() {
  _impl_.columns_.Clear();
}
InsertRequest::InsertRequest(::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:greptime.v1.InsertRequest)
}
InsertRequest::InsertRequest(const InsertRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InsertRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.columns_){from._impl_.columns_}
    , decltype(_impl_.table_name_){}
    , decltype(_impl_.row_count_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_table_name().empty()) {
    _this->_impl_.table_name_.Set(from._internal_table_name(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.row_count_ = from._impl_.row_count_;
  // @@protoc_insertion_point(copy_constructor:greptime.v1.InsertRequest)
}

inline void InsertRequest::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.columns_){arena}
    , decltype(_impl_.table_name_){}
    , decltype(_impl_.row_count_){0u}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

InsertRequest::~InsertRequest() {
  // @@protoc_insertion_point(destructor:greptime.v1.InsertRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void InsertRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.columns_.~RepeatedPtrField();
  _impl_.table_name_.Destroy();
}

void InsertRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void InsertRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.InsertRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.columns_.Clear();
  _impl_.table_name_.ClearToEmpty();
  _impl_.row_count_ = 0u;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InsertRequest::_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 table_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_table_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.InsertRequest.table_name"));
        } else
          goto handle_unusual;
        continue;
      // repeated .greptime.v1.Column columns = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_columns(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // uint32 row_count = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _impl_.row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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* InsertRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.InsertRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string table_name = 1;
  if (!this->_internal_table_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_table_name().data(), static_cast<int>(this->_internal_table_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "greptime.v1.InsertRequest.table_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_table_name(), target);
  }

  // repeated .greptime.v1.Column columns = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_columns_size()); i < n; i++) {
    const auto& repfield = this->_internal_columns(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  // uint32 row_count = 4;
  if (this->_internal_row_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_row_count(), 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:greptime.v1.InsertRequest)
  return target;
}

size_t InsertRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.InsertRequest)
  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 .greptime.v1.Column columns = 3;
  total_size += 1UL * this->_internal_columns_size();
  for (const auto& msg : this->_impl_.columns_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string table_name = 1;
  if (!this->_internal_table_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_table_name());
  }

  // uint32 row_count = 4;
  if (this->_internal_row_count() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_row_count());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void InsertRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<InsertRequest*>(&to_msg);
  auto& from = static_cast<const InsertRequest&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.InsertRequest)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.columns_.MergeFrom(from._impl_.columns_);
  if (!from._internal_table_name().empty()) {
    _this->_internal_set_table_name(from._internal_table_name());
  }
  if (from._internal_row_count() != 0) {
    _this->_internal_set_row_count(from._internal_row_count());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InsertRequest::CopyFrom(const InsertRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.InsertRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void InsertRequest::InternalSwap(InsertRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.columns_.InternalSwap(&other->_impl_.columns_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.table_name_, lhs_arena,
      &other->_impl_.table_name_, rhs_arena
  );
  swap(_impl_.row_count_, other->_impl_.row_count_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InsertRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[5]);
}

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

class DeleteRequests::_Internal {
 public:
};

DeleteRequests::DeleteRequests(::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:greptime.v1.DeleteRequests)
}
DeleteRequests::DeleteRequests(const DeleteRequests& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  DeleteRequests* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.deletes_){from._impl_.deletes_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:greptime.v1.DeleteRequests)
}

inline void DeleteRequests::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.deletes_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

DeleteRequests::~DeleteRequests() {
  // @@protoc_insertion_point(destructor:greptime.v1.DeleteRequests)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeleteRequests::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.deletes_.~RepeatedPtrField();
}

void DeleteRequests::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeleteRequests::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.DeleteRequests)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* DeleteRequests::_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) {
      // repeated .greptime.v1.DeleteRequest deletes = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_deletes(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* DeleteRequests::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.DeleteRequests)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .greptime.v1.DeleteRequest deletes = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_deletes_size()); i < n; i++) {
    const auto& repfield = this->_internal_deletes(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:greptime.v1.DeleteRequests)
  return target;
}

size_t DeleteRequests::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.DeleteRequests)
  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 .greptime.v1.DeleteRequest deletes = 1;
  total_size += 1UL * this->_internal_deletes_size();
  for (const auto& msg : this->_impl_.deletes_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void DeleteRequests::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<DeleteRequests*>(&to_msg);
  auto& from = static_cast<const DeleteRequests&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.DeleteRequests)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.deletes_.MergeFrom(from._impl_.deletes_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void DeleteRequests::CopyFrom(const DeleteRequests& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.DeleteRequests)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void DeleteRequests::InternalSwap(DeleteRequests* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.deletes_.InternalSwap(&other->_impl_.deletes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DeleteRequests::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[6]);
}

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

class DeleteRequest::_Internal {
 public:
};

void DeleteRequest::clear_key_columns() {
  _impl_.key_columns_.Clear();
}
DeleteRequest::DeleteRequest(::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:greptime.v1.DeleteRequest)
}
DeleteRequest::DeleteRequest(const DeleteRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  DeleteRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.key_columns_){from._impl_.key_columns_}
    , decltype(_impl_.table_name_){}
    , decltype(_impl_.row_count_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_table_name().empty()) {
    _this->_impl_.table_name_.Set(from._internal_table_name(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.row_count_ = from._impl_.row_count_;
  // @@protoc_insertion_point(copy_constructor:greptime.v1.DeleteRequest)
}

inline void DeleteRequest::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.key_columns_){arena}
    , decltype(_impl_.table_name_){}
    , decltype(_impl_.row_count_){0u}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

DeleteRequest::~DeleteRequest() {
  // @@protoc_insertion_point(destructor:greptime.v1.DeleteRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void DeleteRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.key_columns_.~RepeatedPtrField();
  _impl_.table_name_.Destroy();
}

void DeleteRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void DeleteRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.DeleteRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.key_columns_.Clear();
  _impl_.table_name_.ClearToEmpty();
  _impl_.row_count_ = 0u;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DeleteRequest::_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 table_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_table_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.DeleteRequest.table_name"));
        } else
          goto handle_unusual;
        continue;
      // repeated .greptime.v1.Column key_columns = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_key_columns(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // uint32 row_count = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _impl_.row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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* DeleteRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.DeleteRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string table_name = 1;
  if (!this->_internal_table_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_table_name().data(), static_cast<int>(this->_internal_table_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "greptime.v1.DeleteRequest.table_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_table_name(), target);
  }

  // repeated .greptime.v1.Column key_columns = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_key_columns_size()); i < n; i++) {
    const auto& repfield = this->_internal_key_columns(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  // uint32 row_count = 4;
  if (this->_internal_row_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_row_count(), 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:greptime.v1.DeleteRequest)
  return target;
}

size_t DeleteRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.DeleteRequest)
  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 .greptime.v1.Column key_columns = 3;
  total_size += 1UL * this->_internal_key_columns_size();
  for (const auto& msg : this->_impl_.key_columns_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string table_name = 1;
  if (!this->_internal_table_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_table_name());
  }

  // uint32 row_count = 4;
  if (this->_internal_row_count() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_row_count());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void DeleteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<DeleteRequest*>(&to_msg);
  auto& from = static_cast<const DeleteRequest&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.DeleteRequest)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.key_columns_.MergeFrom(from._impl_.key_columns_);
  if (!from._internal_table_name().empty()) {
    _this->_internal_set_table_name(from._internal_table_name());
  }
  if (from._internal_row_count() != 0) {
    _this->_internal_set_row_count(from._internal_row_count());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void DeleteRequest::CopyFrom(const DeleteRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.DeleteRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void DeleteRequest::InternalSwap(DeleteRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.key_columns_.InternalSwap(&other->_impl_.key_columns_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.table_name_, lhs_arena,
      &other->_impl_.table_name_, rhs_arena
  );
  swap(_impl_.row_count_, other->_impl_.row_count_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DeleteRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[7]);
}

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

class RowInsertRequests::_Internal {
 public:
};

RowInsertRequests::RowInsertRequests(::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:greptime.v1.RowInsertRequests)
}
RowInsertRequests::RowInsertRequests(const RowInsertRequests& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RowInsertRequests* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.inserts_){from._impl_.inserts_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:greptime.v1.RowInsertRequests)
}

inline void RowInsertRequests::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.inserts_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

RowInsertRequests::~RowInsertRequests() {
  // @@protoc_insertion_point(destructor:greptime.v1.RowInsertRequests)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void RowInsertRequests::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.inserts_.~RepeatedPtrField();
}

void RowInsertRequests::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void RowInsertRequests::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.RowInsertRequests)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* RowInsertRequests::_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) {
      // repeated .greptime.v1.RowInsertRequest inserts = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_inserts(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* RowInsertRequests::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.RowInsertRequests)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .greptime.v1.RowInsertRequest inserts = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_inserts_size()); i < n; i++) {
    const auto& repfield = this->_internal_inserts(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:greptime.v1.RowInsertRequests)
  return target;
}

size_t RowInsertRequests::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.RowInsertRequests)
  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 .greptime.v1.RowInsertRequest inserts = 1;
  total_size += 1UL * this->_internal_inserts_size();
  for (const auto& msg : this->_impl_.inserts_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void RowInsertRequests::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RowInsertRequests*>(&to_msg);
  auto& from = static_cast<const RowInsertRequests&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.RowInsertRequests)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.inserts_.MergeFrom(from._impl_.inserts_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RowInsertRequests::CopyFrom(const RowInsertRequests& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.RowInsertRequests)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RowInsertRequests::InternalSwap(RowInsertRequests* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.inserts_.InternalSwap(&other->_impl_.inserts_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RowInsertRequests::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[8]);
}

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

class RowInsertRequest::_Internal {
 public:
  static const ::greptime::v1::Rows& rows(const RowInsertRequest* msg);
};

const ::greptime::v1::Rows&
RowInsertRequest::_Internal::rows(const RowInsertRequest* msg) {
  return *msg->_impl_.rows_;
}
void RowInsertRequest::clear_rows() {
  if (GetArenaForAllocation() == nullptr && _impl_.rows_ != nullptr) {
    delete _impl_.rows_;
  }
  _impl_.rows_ = nullptr;
}
RowInsertRequest::RowInsertRequest(::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:greptime.v1.RowInsertRequest)
}
RowInsertRequest::RowInsertRequest(const RowInsertRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RowInsertRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.table_name_){}
    , decltype(_impl_.rows_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_table_name().empty()) {
    _this->_impl_.table_name_.Set(from._internal_table_name(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_rows()) {
    _this->_impl_.rows_ = new ::greptime::v1::Rows(*from._impl_.rows_);
  }
  // @@protoc_insertion_point(copy_constructor:greptime.v1.RowInsertRequest)
}

inline void RowInsertRequest::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.table_name_){}
    , decltype(_impl_.rows_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

RowInsertRequest::~RowInsertRequest() {
  // @@protoc_insertion_point(destructor:greptime.v1.RowInsertRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void RowInsertRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.table_name_.Destroy();
  if (this != internal_default_instance()) delete _impl_.rows_;
}

void RowInsertRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void RowInsertRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.RowInsertRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.table_name_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && _impl_.rows_ != nullptr) {
    delete _impl_.rows_;
  }
  _impl_.rows_ = nullptr;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RowInsertRequest::_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 table_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_table_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.RowInsertRequest.table_name"));
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.Rows rows = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_rows(), 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* RowInsertRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.RowInsertRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string table_name = 1;
  if (!this->_internal_table_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_table_name().data(), static_cast<int>(this->_internal_table_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "greptime.v1.RowInsertRequest.table_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_table_name(), target);
  }

  // .greptime.v1.Rows rows = 2;
  if (this->_internal_has_rows()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::rows(this),
        _Internal::rows(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:greptime.v1.RowInsertRequest)
  return target;
}

size_t RowInsertRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.RowInsertRequest)
  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 table_name = 1;
  if (!this->_internal_table_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_table_name());
  }

  // .greptime.v1.Rows rows = 2;
  if (this->_internal_has_rows()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.rows_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void RowInsertRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RowInsertRequest*>(&to_msg);
  auto& from = static_cast<const RowInsertRequest&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.RowInsertRequest)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_table_name().empty()) {
    _this->_internal_set_table_name(from._internal_table_name());
  }
  if (from._internal_has_rows()) {
    _this->_internal_mutable_rows()->::greptime::v1::Rows::MergeFrom(
        from._internal_rows());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RowInsertRequest::CopyFrom(const RowInsertRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.RowInsertRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RowInsertRequest::InternalSwap(RowInsertRequest* 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_.table_name_, lhs_arena,
      &other->_impl_.table_name_, rhs_arena
  );
  swap(_impl_.rows_, other->_impl_.rows_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RowInsertRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[9]);
}

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

class RowDeleteRequests::_Internal {
 public:
};

RowDeleteRequests::RowDeleteRequests(::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:greptime.v1.RowDeleteRequests)
}
RowDeleteRequests::RowDeleteRequests(const RowDeleteRequests& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RowDeleteRequests* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.deletes_){from._impl_.deletes_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:greptime.v1.RowDeleteRequests)
}

inline void RowDeleteRequests::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.deletes_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

RowDeleteRequests::~RowDeleteRequests() {
  // @@protoc_insertion_point(destructor:greptime.v1.RowDeleteRequests)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void RowDeleteRequests::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.deletes_.~RepeatedPtrField();
}

void RowDeleteRequests::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void RowDeleteRequests::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.RowDeleteRequests)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* RowDeleteRequests::_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) {
      // repeated .greptime.v1.RowDeleteRequest deletes = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_deletes(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* RowDeleteRequests::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.RowDeleteRequests)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .greptime.v1.RowDeleteRequest deletes = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_deletes_size()); i < n; i++) {
    const auto& repfield = this->_internal_deletes(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, 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:greptime.v1.RowDeleteRequests)
  return target;
}

size_t RowDeleteRequests::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.RowDeleteRequests)
  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 .greptime.v1.RowDeleteRequest deletes = 1;
  total_size += 1UL * this->_internal_deletes_size();
  for (const auto& msg : this->_impl_.deletes_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void RowDeleteRequests::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RowDeleteRequests*>(&to_msg);
  auto& from = static_cast<const RowDeleteRequests&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.RowDeleteRequests)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.deletes_.MergeFrom(from._impl_.deletes_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RowDeleteRequests::CopyFrom(const RowDeleteRequests& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.RowDeleteRequests)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RowDeleteRequests::InternalSwap(RowDeleteRequests* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.deletes_.InternalSwap(&other->_impl_.deletes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RowDeleteRequests::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[10]);
}

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

class RowDeleteRequest::_Internal {
 public:
  static const ::greptime::v1::Rows& rows(const RowDeleteRequest* msg);
};

const ::greptime::v1::Rows&
RowDeleteRequest::_Internal::rows(const RowDeleteRequest* msg) {
  return *msg->_impl_.rows_;
}
void RowDeleteRequest::clear_rows() {
  if (GetArenaForAllocation() == nullptr && _impl_.rows_ != nullptr) {
    delete _impl_.rows_;
  }
  _impl_.rows_ = nullptr;
}
RowDeleteRequest::RowDeleteRequest(::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:greptime.v1.RowDeleteRequest)
}
RowDeleteRequest::RowDeleteRequest(const RowDeleteRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RowDeleteRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.table_name_){}
    , decltype(_impl_.rows_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_table_name().empty()) {
    _this->_impl_.table_name_.Set(from._internal_table_name(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_rows()) {
    _this->_impl_.rows_ = new ::greptime::v1::Rows(*from._impl_.rows_);
  }
  // @@protoc_insertion_point(copy_constructor:greptime.v1.RowDeleteRequest)
}

inline void RowDeleteRequest::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.table_name_){}
    , decltype(_impl_.rows_){nullptr}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.table_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.table_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

RowDeleteRequest::~RowDeleteRequest() {
  // @@protoc_insertion_point(destructor:greptime.v1.RowDeleteRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void RowDeleteRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.table_name_.Destroy();
  if (this != internal_default_instance()) delete _impl_.rows_;
}

void RowDeleteRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void RowDeleteRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.RowDeleteRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.table_name_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && _impl_.rows_ != nullptr) {
    delete _impl_.rows_;
  }
  _impl_.rows_ = nullptr;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RowDeleteRequest::_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 table_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_table_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.RowDeleteRequest.table_name"));
        } else
          goto handle_unusual;
        continue;
      // .greptime.v1.Rows rows = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_rows(), 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* RowDeleteRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.RowDeleteRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string table_name = 1;
  if (!this->_internal_table_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_table_name().data(), static_cast<int>(this->_internal_table_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "greptime.v1.RowDeleteRequest.table_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_table_name(), target);
  }

  // .greptime.v1.Rows rows = 2;
  if (this->_internal_has_rows()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::rows(this),
        _Internal::rows(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:greptime.v1.RowDeleteRequest)
  return target;
}

size_t RowDeleteRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.RowDeleteRequest)
  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 table_name = 1;
  if (!this->_internal_table_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_table_name());
  }

  // .greptime.v1.Rows rows = 2;
  if (this->_internal_has_rows()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.rows_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


void RowDeleteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RowDeleteRequest*>(&to_msg);
  auto& from = static_cast<const RowDeleteRequest&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.RowDeleteRequest)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_table_name().empty()) {
    _this->_internal_set_table_name(from._internal_table_name());
  }
  if (from._internal_has_rows()) {
    _this->_internal_mutable_rows()->::greptime::v1::Rows::MergeFrom(
        from._internal_rows());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RowDeleteRequest::CopyFrom(const RowDeleteRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.RowDeleteRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RowDeleteRequest::InternalSwap(RowDeleteRequest* 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_.table_name_, lhs_arena,
      &other->_impl_.table_name_, rhs_arena
  );
  swap(_impl_.rows_, other->_impl_.rows_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RowDeleteRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2fdatabase_2eproto_getter, &descriptor_table_greptime_2fv1_2fdatabase_2eproto_once,
      file_level_metadata_greptime_2fv1_2fdatabase_2eproto[11]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace greptime
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::greptime::v1::GreptimeRequest*
Arena::CreateMaybeMessage< ::greptime::v1::GreptimeRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::GreptimeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::GreptimeResponse*
Arena::CreateMaybeMessage< ::greptime::v1::GreptimeResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::GreptimeResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::QueryRequest*
Arena::CreateMaybeMessage< ::greptime::v1::QueryRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::QueryRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::InsertIntoPlan*
Arena::CreateMaybeMessage< ::greptime::v1::InsertIntoPlan >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::InsertIntoPlan >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::InsertRequests*
Arena::CreateMaybeMessage< ::greptime::v1::InsertRequests >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::InsertRequests >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::InsertRequest*
Arena::CreateMaybeMessage< ::greptime::v1::InsertRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::InsertRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::DeleteRequests*
Arena::CreateMaybeMessage< ::greptime::v1::DeleteRequests >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::DeleteRequests >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::DeleteRequest*
Arena::CreateMaybeMessage< ::greptime::v1::DeleteRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::DeleteRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::RowInsertRequests*
Arena::CreateMaybeMessage< ::greptime::v1::RowInsertRequests >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::RowInsertRequests >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::RowInsertRequest*
Arena::CreateMaybeMessage< ::greptime::v1::RowInsertRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::RowInsertRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::RowDeleteRequests*
Arena::CreateMaybeMessage< ::greptime::v1::RowDeleteRequests >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::RowDeleteRequests >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::RowDeleteRequest*
Arena::CreateMaybeMessage< ::greptime::v1::RowDeleteRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::RowDeleteRequest >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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