diff --git a/c++/greptime/v1/row.pb.cc b/c++/greptime/v1/row.pb.cc index eca3a66..6832b50 100644 --- a/c++/greptime/v1/row.pb.cc +++ b/c++/greptime/v1/row.pb.cc @@ -106,9 +106,63 @@ struct StructValueDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructValueDefaultTypeInternal _StructValue_default_instance_; +PROTOBUF_CONSTEXPR JsonValue::JsonValue( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.value_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} +struct JsonValueDefaultTypeInternal { + PROTOBUF_CONSTEXPR JsonValueDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~JsonValueDefaultTypeInternal() {} + union { + JsonValue _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JsonValueDefaultTypeInternal _JsonValue_default_instance_; +PROTOBUF_CONSTEXPR JsonList::JsonList( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.items_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct JsonListDefaultTypeInternal { + PROTOBUF_CONSTEXPR JsonListDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~JsonListDefaultTypeInternal() {} + union { + JsonList _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JsonListDefaultTypeInternal _JsonList_default_instance_; +PROTOBUF_CONSTEXPR JsonObject_Entry::JsonObject_Entry( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.value_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct JsonObject_EntryDefaultTypeInternal { + PROTOBUF_CONSTEXPR JsonObject_EntryDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~JsonObject_EntryDefaultTypeInternal() {} + union { + JsonObject_Entry _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JsonObject_EntryDefaultTypeInternal _JsonObject_Entry_default_instance_; +PROTOBUF_CONSTEXPR JsonObject::JsonObject( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.entries_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct JsonObjectDefaultTypeInternal { + PROTOBUF_CONSTEXPR JsonObjectDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~JsonObjectDefaultTypeInternal() {} + union { + JsonObject _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JsonObjectDefaultTypeInternal _JsonObject_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2frow_2eproto[6]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2frow_2eproto[10]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2frow_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2frow_2eproto = nullptr; @@ -190,6 +244,42 @@ const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::StructValue, _impl_.items_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonValue, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonValue, _impl_._oneof_case_[0]), + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonValue, _impl_.value_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonList, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonList, _impl_.items_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonObject_Entry, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonObject_Entry, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonObject_Entry, _impl_.value_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonObject, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonObject, _impl_.entries_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::Rows)}, @@ -198,6 +288,10 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 26, -1, -1, sizeof(::greptime::v1::Value)}, { 63, -1, -1, sizeof(::greptime::v1::ListValue)}, { 70, -1, -1, sizeof(::greptime::v1::StructValue)}, + { 77, -1, -1, sizeof(::greptime::v1::JsonValue)}, + { 91, -1, -1, sizeof(::greptime::v1::JsonList)}, + { 98, -1, -1, sizeof(::greptime::v1::JsonObject_Entry)}, + { 106, -1, -1, sizeof(::greptime::v1::JsonObject)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -207,6 +301,10 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_Value_default_instance_._instance, &::greptime::v1::_ListValue_default_instance_._instance, &::greptime::v1::_StructValue_default_instance_._instance, + &::greptime::v1::_JsonValue_default_instance_._instance, + &::greptime::v1::_JsonList_default_instance_._instance, + &::greptime::v1::_JsonObject_Entry_default_instance_._instance, + &::greptime::v1::_JsonObject_default_instance_._instance, }; const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -220,7 +318,7 @@ const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECT "\022@\n\022datatype_extension\030\004 \001(\0132$.greptime." "v1.ColumnDataTypeExtension\022+\n\007options\030\005 " "\001(\0132\032.greptime.v1.ColumnOptions\")\n\003Row\022\"" - "\n\006values\030\001 \003(\0132\022.greptime.v1.Value\"\306\007\n\005V" + "\n\006values\030\001 \003(\0132\022.greptime.v1.Value\"\312\007\n\005V" "alue\022\022\n\010i8_value\030\001 \001(\005H\000\022\023\n\ti16_value\030\002 " "\001(\005H\000\022\023\n\ti32_value\030\003 \001(\005H\000\022\023\n\ti64_value\030" "\004 \001(\003H\000\022\022\n\010u8_value\030\005 \001(\rH\000\022\023\n\tu16_value" @@ -243,22 +341,31 @@ const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECT "\n\020decimal128_value\030\037 \001(\0132\027.greptime.v1.D" "ecimal128H\000\022,\n\nlist_value\030( \001(\0132\026.grepti" "me.v1.ListValueH\000\0220\n\014struct_value\030) \001(\0132" - "\030.greptime.v1.StructValueH\000\022(\n\njson_valu" - "e\030* \001(\0132\022.greptime.v1.ValueH\000B\014\n\nvalue_d" - "ata\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.grepti" - "me.v1.Value\"0\n\013StructValue\022!\n\005items\030\002 \003(" - "\0132\022.greptime.v1.ValueBP\n\016io.greptime.v1B" - "\007RowDataZ5github.com/GreptimeTeam/grepti" - "me-proto/go/greptime/v1b\006proto3" + "\030.greptime.v1.StructValueH\000\022,\n\njson_valu" + "e\030* \001(\0132\026.greptime.v1.JsonValueH\000B\014\n\nval" + "ue_data\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.gr" + "eptime.v1.Value\"0\n\013StructValue\022!\n\005items\030" + "\002 \003(\0132\022.greptime.v1.Value\"\271\001\n\tJsonValue\022" + "\021\n\007boolean\030\001 \001(\010H\000\022\r\n\003int\030\002 \001(\003H\000\022\016\n\004uin" + "t\030\003 \001(\004H\000\022\017\n\005float\030\004 \001(\001H\000\022\r\n\003str\030\005 \001(\tH" + "\000\022&\n\005array\030\006 \001(\0132\025.greptime.v1.JsonListH" + "\000\022)\n\006object\030\007 \001(\0132\027.greptime.v1.JsonObje" + "ctH\000B\007\n\005value\"1\n\010JsonList\022%\n\005items\030\001 \003(\013" + "2\026.greptime.v1.JsonValue\"y\n\nJsonObject\022." + "\n\007entries\030\001 \003(\0132\035.greptime.v1.JsonObject" + ".Entry\032;\n\005Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " + "\001(\0132\026.greptime.v1.JsonValueBP\n\016io.grepti" + "me.v1B\007RowDataZ5github.com/GreptimeTeam/" + "greptime-proto/go/greptime/v1b\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2frow_2eproto_deps[1] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2frow_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2frow_2eproto = { - false, false, 1591, descriptor_table_protodef_greptime_2fv1_2frow_2eproto, + false, false, 1957, descriptor_table_protodef_greptime_2fv1_2frow_2eproto, "greptime/v1/row.proto", - &descriptor_table_greptime_2fv1_2frow_2eproto_once, descriptor_table_greptime_2fv1_2frow_2eproto_deps, 1, 6, + &descriptor_table_greptime_2fv1_2frow_2eproto_once, descriptor_table_greptime_2fv1_2frow_2eproto_deps, 1, 10, schemas, file_default_instances, TableStruct_greptime_2fv1_2frow_2eproto::offsets, file_level_metadata_greptime_2fv1_2frow_2eproto, file_level_enum_descriptors_greptime_2fv1_2frow_2eproto, file_level_service_descriptors_greptime_2fv1_2frow_2eproto, @@ -1047,7 +1154,7 @@ class Value::_Internal { static const ::greptime::v1::Decimal128& decimal128_value(const Value* msg); static const ::greptime::v1::ListValue& list_value(const Value* msg); static const ::greptime::v1::StructValue& struct_value(const Value* msg); - static const ::greptime::v1::Value& json_value(const Value* msg); + static const ::greptime::v1::JsonValue& json_value(const Value* msg); }; const ::greptime::v1::IntervalMonthDayNano& @@ -1066,7 +1173,7 @@ const ::greptime::v1::StructValue& Value::_Internal::struct_value(const Value* msg) { return *msg->_impl_.value_data_.struct_value_; } -const ::greptime::v1::Value& +const ::greptime::v1::JsonValue& Value::_Internal::json_value(const Value* msg) { return *msg->_impl_.value_data_.json_value_; } @@ -1148,7 +1255,7 @@ void Value::set_allocated_struct_value(::greptime::v1::StructValue* struct_value } // @@protoc_insertion_point(field_set_allocated:greptime.v1.Value.struct_value) } -void Value::set_allocated_json_value(::greptime::v1::Value* json_value) { +void Value::set_allocated_json_value(::greptime::v1::JsonValue* json_value) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_value_data(); if (json_value) { @@ -1301,7 +1408,7 @@ Value::Value(const Value& from) break; } case kJsonValue: { - _this->_internal_mutable_json_value()->::greptime::v1::Value::MergeFrom( + _this->_internal_mutable_json_value()->::greptime::v1::JsonValue::MergeFrom( from._internal_json_value()); break; } @@ -1736,7 +1843,7 @@ const char* Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { } else goto handle_unusual; continue; - // .greptime.v1.Value json_value = 42; + // .greptime.v1.JsonValue json_value = 42; case 42: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { ptr = ctx->ParseMessage(_internal_mutable_json_value(), ptr); @@ -1955,7 +2062,7 @@ uint8_t* Value::_InternalSerialize( _Internal::struct_value(this).GetCachedSize(), target, stream); } - // .greptime.v1.Value json_value = 42; + // .greptime.v1.JsonValue json_value = 42; if (_internal_has_json_value()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(42, _Internal::json_value(this), @@ -2156,7 +2263,7 @@ size_t Value::ByteSizeLong() const { *_impl_.value_data_.struct_value_); break; } - // .greptime.v1.Value json_value = 42; + // .greptime.v1.JsonValue json_value = 42; case kJsonValue: { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -2307,7 +2414,7 @@ void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF break; } case kJsonValue: { - _this->_internal_mutable_json_value()->::greptime::v1::Value::MergeFrom( + _this->_internal_mutable_json_value()->::greptime::v1::JsonValue::MergeFrom( from._internal_json_value()); break; } @@ -2712,6 +2819,1089 @@ void StructValue::InternalSwap(StructValue* other) { file_level_metadata_greptime_2fv1_2frow_2eproto[5]); } +// =================================================================== + +class JsonValue::_Internal { + public: + static const ::greptime::v1::JsonList& array(const JsonValue* msg); + static const ::greptime::v1::JsonObject& object(const JsonValue* msg); +}; + +const ::greptime::v1::JsonList& +JsonValue::_Internal::array(const JsonValue* msg) { + return *msg->_impl_.value_.array_; +} +const ::greptime::v1::JsonObject& +JsonValue::_Internal::object(const JsonValue* msg) { + return *msg->_impl_.value_.object_; +} +void JsonValue::set_allocated_array(::greptime::v1::JsonList* array) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (array) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(array); + if (message_arena != submessage_arena) { + array = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, array, submessage_arena); + } + set_has_array(); + _impl_.value_.array_ = array; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonValue.array) +} +void JsonValue::set_allocated_object(::greptime::v1::JsonObject* object) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (object) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(object); + if (message_arena != submessage_arena) { + object = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, object, submessage_arena); + } + set_has_object(); + _impl_.value_.object_ = object; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonValue.object) +} +JsonValue::JsonValue(::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.JsonValue) +} +JsonValue::JsonValue(const JsonValue& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + JsonValue* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.value_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + clear_has_value(); + switch (from.value_case()) { + case kBoolean: { + _this->_internal_set_boolean(from._internal_boolean()); + break; + } + case kInt: { + _this->_internal_set_int_(from._internal_int_()); + break; + } + case kUint: { + _this->_internal_set_uint(from._internal_uint()); + break; + } + case kFloat: { + _this->_internal_set_float_(from._internal_float_()); + break; + } + case kStr: { + _this->_internal_set_str(from._internal_str()); + break; + } + case kArray: { + _this->_internal_mutable_array()->::greptime::v1::JsonList::MergeFrom( + from._internal_array()); + break; + } + case kObject: { + _this->_internal_mutable_object()->::greptime::v1::JsonObject::MergeFrom( + from._internal_object()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.JsonValue) +} + +inline void JsonValue::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.value_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; + clear_has_value(); +} + +JsonValue::~JsonValue() { + // @@protoc_insertion_point(destructor:greptime.v1.JsonValue) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void JsonValue::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_value()) { + clear_value(); + } +} + +void JsonValue::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void JsonValue::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:greptime.v1.JsonValue) + switch (value_case()) { + case kBoolean: { + // No need to clear + break; + } + case kInt: { + // No need to clear + break; + } + case kUint: { + // No need to clear + break; + } + case kFloat: { + // No need to clear + break; + } + case kStr: { + _impl_.value_.str_.Destroy(); + break; + } + case kArray: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.array_; + } + break; + } + case kObject: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.object_; + } + break; + } + case VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} + + +void JsonValue::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.JsonValue) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_value(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* JsonValue::_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) { + // bool boolean = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _internal_set_boolean(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int64 int = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _internal_set_int_(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 uint = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _internal_set_uint(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // double float = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 33)) { + _internal_set_float_(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(double); + } else + goto handle_unusual; + continue; + // string str = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_str(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.JsonValue.str")); + } else + goto handle_unusual; + continue; + // .greptime.v1.JsonList array = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_array(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .greptime.v1.JsonObject object = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_object(), 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* JsonValue::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.JsonValue) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bool boolean = 1; + if (_internal_has_boolean()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_boolean(), target); + } + + // int64 int = 2; + if (_internal_has_int_()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_int_(), target); + } + + // uint64 uint = 3; + if (_internal_has_uint()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_uint(), target); + } + + // double float = 4; + if (_internal_has_float_()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_float_(), target); + } + + // string str = 5; + if (_internal_has_str()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_str().data(), static_cast(this->_internal_str().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.JsonValue.str"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_str(), target); + } + + // .greptime.v1.JsonList array = 6; + if (_internal_has_array()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::array(this), + _Internal::array(this).GetCachedSize(), target, stream); + } + + // .greptime.v1.JsonObject object = 7; + if (_internal_has_object()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(7, _Internal::object(this), + _Internal::object(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.JsonValue) + return target; +} + +size_t JsonValue::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.JsonValue) + 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 (value_case()) { + // bool boolean = 1; + case kBoolean: { + total_size += 1 + 1; + break; + } + // int64 int = 2; + case kInt: { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_int_()); + break; + } + // uint64 uint = 3; + case kUint: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_uint()); + break; + } + // double float = 4; + case kFloat: { + total_size += 1 + 8; + break; + } + // string str = 5; + case kStr: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_str()); + break; + } + // .greptime.v1.JsonList array = 6; + case kArray: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.value_.array_); + break; + } + // .greptime.v1.JsonObject object = 7; + case kObject: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.value_.object_); + break; + } + case VALUE_NOT_SET: { + break; + } + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData JsonValue::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + JsonValue::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*JsonValue::GetClassData() const { return &_class_data_; } + + +void JsonValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.JsonValue) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + switch (from.value_case()) { + case kBoolean: { + _this->_internal_set_boolean(from._internal_boolean()); + break; + } + case kInt: { + _this->_internal_set_int_(from._internal_int_()); + break; + } + case kUint: { + _this->_internal_set_uint(from._internal_uint()); + break; + } + case kFloat: { + _this->_internal_set_float_(from._internal_float_()); + break; + } + case kStr: { + _this->_internal_set_str(from._internal_str()); + break; + } + case kArray: { + _this->_internal_mutable_array()->::greptime::v1::JsonList::MergeFrom( + from._internal_array()); + break; + } + case kObject: { + _this->_internal_mutable_object()->::greptime::v1::JsonObject::MergeFrom( + from._internal_object()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void JsonValue::CopyFrom(const JsonValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.JsonValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool JsonValue::IsInitialized() const { + return true; +} + +void JsonValue::InternalSwap(JsonValue* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.value_, other->_impl_.value_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +::PROTOBUF_NAMESPACE_ID::Metadata JsonValue::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, + file_level_metadata_greptime_2fv1_2frow_2eproto[6]); +} + +// =================================================================== + +class JsonList::_Internal { + public: +}; + +JsonList::JsonList(::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.JsonList) +} +JsonList::JsonList(const JsonList& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + JsonList* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.items_){from._impl_.items_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:greptime.v1.JsonList) +} + +inline void JsonList::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.items_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +JsonList::~JsonList() { + // @@protoc_insertion_point(destructor:greptime.v1.JsonList) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void JsonList::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.items_.~RepeatedPtrField(); +} + +void JsonList::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void JsonList::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.JsonList) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.items_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* JsonList::_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.JsonValue items = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_items(), 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* JsonList::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.JsonList) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .greptime.v1.JsonValue items = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_items_size()); i < n; i++) { + const auto& repfield = this->_internal_items(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.JsonList) + return target; +} + +size_t JsonList::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.JsonList) + 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.JsonValue items = 1; + total_size += 1UL * this->_internal_items_size(); + for (const auto& msg : this->_impl_.items_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData JsonList::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + JsonList::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*JsonList::GetClassData() const { return &_class_data_; } + + +void JsonList::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.JsonList) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.items_.MergeFrom(from._impl_.items_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void JsonList::CopyFrom(const JsonList& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.JsonList) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool JsonList::IsInitialized() const { + return true; +} + +void JsonList::InternalSwap(JsonList* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.items_.InternalSwap(&other->_impl_.items_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata JsonList::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, + file_level_metadata_greptime_2fv1_2frow_2eproto[7]); +} + +// =================================================================== + +class JsonObject_Entry::_Internal { + public: + static const ::greptime::v1::JsonValue& value(const JsonObject_Entry* msg); +}; + +const ::greptime::v1::JsonValue& +JsonObject_Entry::_Internal::value(const JsonObject_Entry* msg) { + return *msg->_impl_.value_; +} +JsonObject_Entry::JsonObject_Entry(::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.JsonObject.Entry) +} +JsonObject_Entry::JsonObject_Entry(const JsonObject_Entry& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + JsonObject_Entry* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.key_){} + , decltype(_impl_.value_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.key_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.key_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_key().empty()) { + _this->_impl_.key_.Set(from._internal_key(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_value()) { + _this->_impl_.value_ = new ::greptime::v1::JsonValue(*from._impl_.value_); + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.JsonObject.Entry) +} + +inline void JsonObject_Entry::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.key_){} + , decltype(_impl_.value_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.key_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.key_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +JsonObject_Entry::~JsonObject_Entry() { + // @@protoc_insertion_point(destructor:greptime.v1.JsonObject.Entry) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void JsonObject_Entry::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.key_.Destroy(); + if (this != internal_default_instance()) delete _impl_.value_; +} + +void JsonObject_Entry::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void JsonObject_Entry::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.JsonObject.Entry) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.key_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { + delete _impl_.value_; + } + _impl_.value_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* JsonObject_Entry::_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 key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_key(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.JsonObject.Entry.key")); + } else + goto handle_unusual; + continue; + // .greptime.v1.JsonValue value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_value(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* JsonObject_Entry::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.JsonObject.Entry) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string key = 1; + if (!this->_internal_key().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key().data(), static_cast(this->_internal_key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.JsonObject.Entry.key"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_key(), target); + } + + // .greptime.v1.JsonValue value = 2; + if (this->_internal_has_value()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::value(this), + _Internal::value(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.JsonObject.Entry) + return target; +} + +size_t JsonObject_Entry::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.JsonObject.Entry) + 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 key = 1; + if (!this->_internal_key().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key()); + } + + // .greptime.v1.JsonValue value = 2; + if (this->_internal_has_value()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.value_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData JsonObject_Entry::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + JsonObject_Entry::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*JsonObject_Entry::GetClassData() const { return &_class_data_; } + + +void JsonObject_Entry::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.JsonObject.Entry) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_key().empty()) { + _this->_internal_set_key(from._internal_key()); + } + if (from._internal_has_value()) { + _this->_internal_mutable_value()->::greptime::v1::JsonValue::MergeFrom( + from._internal_value()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void JsonObject_Entry::CopyFrom(const JsonObject_Entry& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.JsonObject.Entry) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool JsonObject_Entry::IsInitialized() const { + return true; +} + +void JsonObject_Entry::InternalSwap(JsonObject_Entry* 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_.key_, lhs_arena, + &other->_impl_.key_, rhs_arena + ); + swap(_impl_.value_, other->_impl_.value_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata JsonObject_Entry::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, + file_level_metadata_greptime_2fv1_2frow_2eproto[8]); +} + +// =================================================================== + +class JsonObject::_Internal { + public: +}; + +JsonObject::JsonObject(::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.JsonObject) +} +JsonObject::JsonObject(const JsonObject& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + JsonObject* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.entries_){from._impl_.entries_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:greptime.v1.JsonObject) +} + +inline void JsonObject::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.entries_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +JsonObject::~JsonObject() { + // @@protoc_insertion_point(destructor:greptime.v1.JsonObject) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void JsonObject::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.entries_.~RepeatedPtrField(); +} + +void JsonObject::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void JsonObject::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.JsonObject) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.entries_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* JsonObject::_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.JsonObject.Entry entries = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_entries(), 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* JsonObject::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.JsonObject) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .greptime.v1.JsonObject.Entry entries = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_entries_size()); i < n; i++) { + const auto& repfield = this->_internal_entries(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.JsonObject) + return target; +} + +size_t JsonObject::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.JsonObject) + 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.JsonObject.Entry entries = 1; + total_size += 1UL * this->_internal_entries_size(); + for (const auto& msg : this->_impl_.entries_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData JsonObject::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + JsonObject::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*JsonObject::GetClassData() const { return &_class_data_; } + + +void JsonObject::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.JsonObject) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.entries_.MergeFrom(from._impl_.entries_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void JsonObject::CopyFrom(const JsonObject& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.JsonObject) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool JsonObject::IsInitialized() const { + return true; +} + +void JsonObject::InternalSwap(JsonObject* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.entries_.InternalSwap(&other->_impl_.entries_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata JsonObject::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, + file_level_metadata_greptime_2fv1_2frow_2eproto[9]); +} + // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime @@ -2740,6 +3930,22 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::StructValue* Arena::CreateMaybeMessage< ::greptime::v1::StructValue >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::StructValue >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::JsonValue* +Arena::CreateMaybeMessage< ::greptime::v1::JsonValue >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::JsonValue >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::JsonList* +Arena::CreateMaybeMessage< ::greptime::v1::JsonList >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::JsonList >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::JsonObject_Entry* +Arena::CreateMaybeMessage< ::greptime::v1::JsonObject_Entry >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::JsonObject_Entry >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::JsonObject* +Arena::CreateMaybeMessage< ::greptime::v1::JsonObject >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::JsonObject >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/c++/greptime/v1/row.pb.h b/c++/greptime/v1/row.pb.h index acc3caf..ae10789 100644 --- a/c++/greptime/v1/row.pb.h +++ b/c++/greptime/v1/row.pb.h @@ -50,6 +50,18 @@ namespace v1 { class ColumnSchema; struct ColumnSchemaDefaultTypeInternal; extern ColumnSchemaDefaultTypeInternal _ColumnSchema_default_instance_; +class JsonList; +struct JsonListDefaultTypeInternal; +extern JsonListDefaultTypeInternal _JsonList_default_instance_; +class JsonObject; +struct JsonObjectDefaultTypeInternal; +extern JsonObjectDefaultTypeInternal _JsonObject_default_instance_; +class JsonObject_Entry; +struct JsonObject_EntryDefaultTypeInternal; +extern JsonObject_EntryDefaultTypeInternal _JsonObject_Entry_default_instance_; +class JsonValue; +struct JsonValueDefaultTypeInternal; +extern JsonValueDefaultTypeInternal _JsonValue_default_instance_; class ListValue; struct ListValueDefaultTypeInternal; extern ListValueDefaultTypeInternal _ListValue_default_instance_; @@ -69,6 +81,10 @@ extern ValueDefaultTypeInternal _Value_default_instance_; } // namespace greptime PROTOBUF_NAMESPACE_OPEN template<> ::greptime::v1::ColumnSchema* Arena::CreateMaybeMessage<::greptime::v1::ColumnSchema>(Arena*); +template<> ::greptime::v1::JsonList* Arena::CreateMaybeMessage<::greptime::v1::JsonList>(Arena*); +template<> ::greptime::v1::JsonObject* Arena::CreateMaybeMessage<::greptime::v1::JsonObject>(Arena*); +template<> ::greptime::v1::JsonObject_Entry* Arena::CreateMaybeMessage<::greptime::v1::JsonObject_Entry>(Arena*); +template<> ::greptime::v1::JsonValue* Arena::CreateMaybeMessage<::greptime::v1::JsonValue>(Arena*); template<> ::greptime::v1::ListValue* Arena::CreateMaybeMessage<::greptime::v1::ListValue>(Arena*); template<> ::greptime::v1::Row* Arena::CreateMaybeMessage<::greptime::v1::Row>(Arena*); template<> ::greptime::v1::Rows* Arena::CreateMaybeMessage<::greptime::v1::Rows>(Arena*); @@ -1222,23 +1238,23 @@ class Value final : ::greptime::v1::StructValue* struct_value); ::greptime::v1::StructValue* unsafe_arena_release_struct_value(); - // .greptime.v1.Value json_value = 42; + // .greptime.v1.JsonValue json_value = 42; bool has_json_value() const; private: bool _internal_has_json_value() const; public: void clear_json_value(); - const ::greptime::v1::Value& json_value() const; - PROTOBUF_NODISCARD ::greptime::v1::Value* release_json_value(); - ::greptime::v1::Value* mutable_json_value(); - void set_allocated_json_value(::greptime::v1::Value* json_value); + const ::greptime::v1::JsonValue& json_value() const; + PROTOBUF_NODISCARD ::greptime::v1::JsonValue* release_json_value(); + ::greptime::v1::JsonValue* mutable_json_value(); + void set_allocated_json_value(::greptime::v1::JsonValue* json_value); private: - const ::greptime::v1::Value& _internal_json_value() const; - ::greptime::v1::Value* _internal_mutable_json_value(); + const ::greptime::v1::JsonValue& _internal_json_value() const; + ::greptime::v1::JsonValue* _internal_mutable_json_value(); public: void unsafe_arena_set_allocated_json_value( - ::greptime::v1::Value* json_value); - ::greptime::v1::Value* unsafe_arena_release_json_value(); + ::greptime::v1::JsonValue* json_value); + ::greptime::v1::JsonValue* unsafe_arena_release_json_value(); void clear_value_data(); ValueDataCase value_data_case() const; @@ -1315,7 +1331,7 @@ class Value final : ::greptime::v1::Decimal128* decimal128_value_; ::greptime::v1::ListValue* list_value_; ::greptime::v1::StructValue* struct_value_; - ::greptime::v1::Value* json_value_; + ::greptime::v1::JsonValue* json_value_; } value_data_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -1638,6 +1654,781 @@ class StructValue final : union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2frow_2eproto; }; +// ------------------------------------------------------------------- + +class JsonValue final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.JsonValue) */ { + public: + inline JsonValue() : JsonValue(nullptr) {} + ~JsonValue() override; + explicit PROTOBUF_CONSTEXPR JsonValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JsonValue(const JsonValue& from); + JsonValue(JsonValue&& from) noexcept + : JsonValue() { + *this = ::std::move(from); + } + + inline JsonValue& operator=(const JsonValue& from) { + CopyFrom(from); + return *this; + } + inline JsonValue& operator=(JsonValue&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JsonValue& default_instance() { + return *internal_default_instance(); + } + enum ValueCase { + kBoolean = 1, + kInt = 2, + kUint = 3, + kFloat = 4, + kStr = 5, + kArray = 6, + kObject = 7, + VALUE_NOT_SET = 0, + }; + + static inline const JsonValue* internal_default_instance() { + return reinterpret_cast( + &_JsonValue_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(JsonValue& a, JsonValue& b) { + a.Swap(&b); + } + inline void Swap(JsonValue* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JsonValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JsonValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JsonValue& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JsonValue& from) { + JsonValue::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JsonValue* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.JsonValue"; + } + protected: + explicit JsonValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBooleanFieldNumber = 1, + kIntFieldNumber = 2, + kUintFieldNumber = 3, + kFloatFieldNumber = 4, + kStrFieldNumber = 5, + kArrayFieldNumber = 6, + kObjectFieldNumber = 7, + }; + // bool boolean = 1; + bool has_boolean() const; + private: + bool _internal_has_boolean() const; + public: + void clear_boolean(); + bool boolean() const; + void set_boolean(bool value); + private: + bool _internal_boolean() const; + void _internal_set_boolean(bool value); + public: + + // int64 int = 2; + bool has_int_() const; + private: + bool _internal_has_int_() const; + public: + void clear_int_(); + int64_t int_() const; + void set_int_(int64_t value); + private: + int64_t _internal_int_() const; + void _internal_set_int_(int64_t value); + public: + + // uint64 uint = 3; + bool has_uint() const; + private: + bool _internal_has_uint() const; + public: + void clear_uint(); + uint64_t uint() const; + void set_uint(uint64_t value); + private: + uint64_t _internal_uint() const; + void _internal_set_uint(uint64_t value); + public: + + // double float = 4; + bool has_float_() const; + private: + bool _internal_has_float_() const; + public: + void clear_float_(); + double float_() const; + void set_float_(double value); + private: + double _internal_float_() const; + void _internal_set_float_(double value); + public: + + // string str = 5; + bool has_str() const; + private: + bool _internal_has_str() const; + public: + void clear_str(); + const std::string& str() const; + template + void set_str(ArgT0&& arg0, ArgT... args); + std::string* mutable_str(); + PROTOBUF_NODISCARD std::string* release_str(); + void set_allocated_str(std::string* str); + private: + const std::string& _internal_str() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_str(const std::string& value); + std::string* _internal_mutable_str(); + public: + + // .greptime.v1.JsonList array = 6; + bool has_array() const; + private: + bool _internal_has_array() const; + public: + void clear_array(); + const ::greptime::v1::JsonList& array() const; + PROTOBUF_NODISCARD ::greptime::v1::JsonList* release_array(); + ::greptime::v1::JsonList* mutable_array(); + void set_allocated_array(::greptime::v1::JsonList* array); + private: + const ::greptime::v1::JsonList& _internal_array() const; + ::greptime::v1::JsonList* _internal_mutable_array(); + public: + void unsafe_arena_set_allocated_array( + ::greptime::v1::JsonList* array); + ::greptime::v1::JsonList* unsafe_arena_release_array(); + + // .greptime.v1.JsonObject object = 7; + bool has_object() const; + private: + bool _internal_has_object() const; + public: + void clear_object(); + const ::greptime::v1::JsonObject& object() const; + PROTOBUF_NODISCARD ::greptime::v1::JsonObject* release_object(); + ::greptime::v1::JsonObject* mutable_object(); + void set_allocated_object(::greptime::v1::JsonObject* object); + private: + const ::greptime::v1::JsonObject& _internal_object() const; + ::greptime::v1::JsonObject* _internal_mutable_object(); + public: + void unsafe_arena_set_allocated_object( + ::greptime::v1::JsonObject* object); + ::greptime::v1::JsonObject* unsafe_arena_release_object(); + + void clear_value(); + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:greptime.v1.JsonValue) + private: + class _Internal; + void set_has_boolean(); + void set_has_int_(); + void set_has_uint(); + void set_has_float_(); + void set_has_str(); + void set_has_array(); + void set_has_object(); + + inline bool has_value() const; + inline void clear_has_value(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union ValueUnion { + constexpr ValueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool boolean_; + int64_t int__; + uint64_t uint_; + double float__; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr str_; + ::greptime::v1::JsonList* array_; + ::greptime::v1::JsonObject* object_; + } value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2frow_2eproto; +}; +// ------------------------------------------------------------------- + +class JsonList final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.JsonList) */ { + public: + inline JsonList() : JsonList(nullptr) {} + ~JsonList() override; + explicit PROTOBUF_CONSTEXPR JsonList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JsonList(const JsonList& from); + JsonList(JsonList&& from) noexcept + : JsonList() { + *this = ::std::move(from); + } + + inline JsonList& operator=(const JsonList& from) { + CopyFrom(from); + return *this; + } + inline JsonList& operator=(JsonList&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JsonList& default_instance() { + return *internal_default_instance(); + } + static inline const JsonList* internal_default_instance() { + return reinterpret_cast( + &_JsonList_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(JsonList& a, JsonList& b) { + a.Swap(&b); + } + inline void Swap(JsonList* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JsonList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JsonList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JsonList& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JsonList& from) { + JsonList::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JsonList* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.JsonList"; + } + protected: + explicit JsonList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kItemsFieldNumber = 1, + }; + // repeated .greptime.v1.JsonValue items = 1; + int items_size() const; + private: + int _internal_items_size() const; + public: + void clear_items(); + ::greptime::v1::JsonValue* mutable_items(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonValue >* + mutable_items(); + private: + const ::greptime::v1::JsonValue& _internal_items(int index) const; + ::greptime::v1::JsonValue* _internal_add_items(); + public: + const ::greptime::v1::JsonValue& items(int index) const; + ::greptime::v1::JsonValue* add_items(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonValue >& + items() const; + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonList) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonValue > items_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2frow_2eproto; +}; +// ------------------------------------------------------------------- + +class JsonObject_Entry final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.JsonObject.Entry) */ { + public: + inline JsonObject_Entry() : JsonObject_Entry(nullptr) {} + ~JsonObject_Entry() override; + explicit PROTOBUF_CONSTEXPR JsonObject_Entry(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JsonObject_Entry(const JsonObject_Entry& from); + JsonObject_Entry(JsonObject_Entry&& from) noexcept + : JsonObject_Entry() { + *this = ::std::move(from); + } + + inline JsonObject_Entry& operator=(const JsonObject_Entry& from) { + CopyFrom(from); + return *this; + } + inline JsonObject_Entry& operator=(JsonObject_Entry&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JsonObject_Entry& default_instance() { + return *internal_default_instance(); + } + static inline const JsonObject_Entry* internal_default_instance() { + return reinterpret_cast( + &_JsonObject_Entry_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(JsonObject_Entry& a, JsonObject_Entry& b) { + a.Swap(&b); + } + inline void Swap(JsonObject_Entry* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JsonObject_Entry* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JsonObject_Entry* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JsonObject_Entry& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JsonObject_Entry& from) { + JsonObject_Entry::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JsonObject_Entry* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.JsonObject.Entry"; + } + protected: + explicit JsonObject_Entry(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyFieldNumber = 1, + kValueFieldNumber = 2, + }; + // string key = 1; + void clear_key(); + const std::string& key() const; + template + void set_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* key); + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); + std::string* _internal_mutable_key(); + public: + + // .greptime.v1.JsonValue value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const ::greptime::v1::JsonValue& value() const; + PROTOBUF_NODISCARD ::greptime::v1::JsonValue* release_value(); + ::greptime::v1::JsonValue* mutable_value(); + void set_allocated_value(::greptime::v1::JsonValue* value); + private: + const ::greptime::v1::JsonValue& _internal_value() const; + ::greptime::v1::JsonValue* _internal_mutable_value(); + public: + void unsafe_arena_set_allocated_value( + ::greptime::v1::JsonValue* value); + ::greptime::v1::JsonValue* unsafe_arena_release_value(); + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonObject.Entry) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; + ::greptime::v1::JsonValue* value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2frow_2eproto; +}; +// ------------------------------------------------------------------- + +class JsonObject final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.JsonObject) */ { + public: + inline JsonObject() : JsonObject(nullptr) {} + ~JsonObject() override; + explicit PROTOBUF_CONSTEXPR JsonObject(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JsonObject(const JsonObject& from); + JsonObject(JsonObject&& from) noexcept + : JsonObject() { + *this = ::std::move(from); + } + + inline JsonObject& operator=(const JsonObject& from) { + CopyFrom(from); + return *this; + } + inline JsonObject& operator=(JsonObject&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JsonObject& default_instance() { + return *internal_default_instance(); + } + static inline const JsonObject* internal_default_instance() { + return reinterpret_cast( + &_JsonObject_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(JsonObject& a, JsonObject& b) { + a.Swap(&b); + } + inline void Swap(JsonObject* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JsonObject* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JsonObject* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JsonObject& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JsonObject& from) { + JsonObject::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JsonObject* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.JsonObject"; + } + protected: + explicit JsonObject(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef JsonObject_Entry Entry; + + // accessors ------------------------------------------------------- + + enum : int { + kEntriesFieldNumber = 1, + }; + // repeated .greptime.v1.JsonObject.Entry entries = 1; + int entries_size() const; + private: + int _internal_entries_size() const; + public: + void clear_entries(); + ::greptime::v1::JsonObject_Entry* mutable_entries(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonObject_Entry >* + mutable_entries(); + private: + const ::greptime::v1::JsonObject_Entry& _internal_entries(int index) const; + ::greptime::v1::JsonObject_Entry* _internal_add_entries(); + public: + const ::greptime::v1::JsonObject_Entry& entries(int index) const; + ::greptime::v1::JsonObject_Entry* add_entries(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonObject_Entry >& + entries() const; + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonObject) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonObject_Entry > entries_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2frow_2eproto; +}; // =================================================================== @@ -3349,7 +4140,7 @@ inline ::greptime::v1::StructValue* Value::mutable_struct_value() { return _msg; } -// .greptime.v1.Value json_value = 42; +// .greptime.v1.JsonValue json_value = 42; inline bool Value::_internal_has_json_value() const { return value_data_case() == kJsonValue; } @@ -3367,11 +4158,11 @@ inline void Value::clear_json_value() { clear_has_value_data(); } } -inline ::greptime::v1::Value* Value::release_json_value() { +inline ::greptime::v1::JsonValue* Value::release_json_value() { // @@protoc_insertion_point(field_release:greptime.v1.Value.json_value) if (_internal_has_json_value()) { clear_has_value_data(); - ::greptime::v1::Value* temp = _impl_.value_data_.json_value_; + ::greptime::v1::JsonValue* temp = _impl_.value_data_.json_value_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } @@ -3381,27 +4172,27 @@ inline ::greptime::v1::Value* Value::release_json_value() { return nullptr; } } -inline const ::greptime::v1::Value& Value::_internal_json_value() const { +inline const ::greptime::v1::JsonValue& Value::_internal_json_value() const { return _internal_has_json_value() ? *_impl_.value_data_.json_value_ - : reinterpret_cast< ::greptime::v1::Value&>(::greptime::v1::_Value_default_instance_); + : reinterpret_cast< ::greptime::v1::JsonValue&>(::greptime::v1::_JsonValue_default_instance_); } -inline const ::greptime::v1::Value& Value::json_value() const { +inline const ::greptime::v1::JsonValue& Value::json_value() const { // @@protoc_insertion_point(field_get:greptime.v1.Value.json_value) return _internal_json_value(); } -inline ::greptime::v1::Value* Value::unsafe_arena_release_json_value() { +inline ::greptime::v1::JsonValue* Value::unsafe_arena_release_json_value() { // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.Value.json_value) if (_internal_has_json_value()) { clear_has_value_data(); - ::greptime::v1::Value* temp = _impl_.value_data_.json_value_; + ::greptime::v1::JsonValue* temp = _impl_.value_data_.json_value_; _impl_.value_data_.json_value_ = nullptr; return temp; } else { return nullptr; } } -inline void Value::unsafe_arena_set_allocated_json_value(::greptime::v1::Value* json_value) { +inline void Value::unsafe_arena_set_allocated_json_value(::greptime::v1::JsonValue* json_value) { clear_value_data(); if (json_value) { set_has_json_value(); @@ -3409,16 +4200,16 @@ inline void Value::unsafe_arena_set_allocated_json_value(::greptime::v1::Value* } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.Value.json_value) } -inline ::greptime::v1::Value* Value::_internal_mutable_json_value() { +inline ::greptime::v1::JsonValue* Value::_internal_mutable_json_value() { if (!_internal_has_json_value()) { clear_value_data(); set_has_json_value(); - _impl_.value_data_.json_value_ = CreateMaybeMessage< ::greptime::v1::Value >(GetArenaForAllocation()); + _impl_.value_data_.json_value_ = CreateMaybeMessage< ::greptime::v1::JsonValue >(GetArenaForAllocation()); } return _impl_.value_data_.json_value_; } -inline ::greptime::v1::Value* Value::mutable_json_value() { - ::greptime::v1::Value* _msg = _internal_mutable_json_value(); +inline ::greptime::v1::JsonValue* Value::mutable_json_value() { + ::greptime::v1::JsonValue* _msg = _internal_mutable_json_value(); // @@protoc_insertion_point(field_mutable:greptime.v1.Value.json_value) return _msg; } @@ -3520,6 +4311,628 @@ StructValue::items() const { return _impl_.items_; } +// ------------------------------------------------------------------- + +// JsonValue + +// bool boolean = 1; +inline bool JsonValue::_internal_has_boolean() const { + return value_case() == kBoolean; +} +inline bool JsonValue::has_boolean() const { + return _internal_has_boolean(); +} +inline void JsonValue::set_has_boolean() { + _impl_._oneof_case_[0] = kBoolean; +} +inline void JsonValue::clear_boolean() { + if (_internal_has_boolean()) { + _impl_.value_.boolean_ = false; + clear_has_value(); + } +} +inline bool JsonValue::_internal_boolean() const { + if (_internal_has_boolean()) { + return _impl_.value_.boolean_; + } + return false; +} +inline void JsonValue::_internal_set_boolean(bool value) { + if (!_internal_has_boolean()) { + clear_value(); + set_has_boolean(); + } + _impl_.value_.boolean_ = value; +} +inline bool JsonValue::boolean() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.boolean) + return _internal_boolean(); +} +inline void JsonValue::set_boolean(bool value) { + _internal_set_boolean(value); + // @@protoc_insertion_point(field_set:greptime.v1.JsonValue.boolean) +} + +// int64 int = 2; +inline bool JsonValue::_internal_has_int_() const { + return value_case() == kInt; +} +inline bool JsonValue::has_int_() const { + return _internal_has_int_(); +} +inline void JsonValue::set_has_int_() { + _impl_._oneof_case_[0] = kInt; +} +inline void JsonValue::clear_int_() { + if (_internal_has_int_()) { + _impl_.value_.int__ = int64_t{0}; + clear_has_value(); + } +} +inline int64_t JsonValue::_internal_int_() const { + if (_internal_has_int_()) { + return _impl_.value_.int__; + } + return int64_t{0}; +} +inline void JsonValue::_internal_set_int_(int64_t value) { + if (!_internal_has_int_()) { + clear_value(); + set_has_int_(); + } + _impl_.value_.int__ = value; +} +inline int64_t JsonValue::int_() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.int) + return _internal_int_(); +} +inline void JsonValue::set_int_(int64_t value) { + _internal_set_int_(value); + // @@protoc_insertion_point(field_set:greptime.v1.JsonValue.int) +} + +// uint64 uint = 3; +inline bool JsonValue::_internal_has_uint() const { + return value_case() == kUint; +} +inline bool JsonValue::has_uint() const { + return _internal_has_uint(); +} +inline void JsonValue::set_has_uint() { + _impl_._oneof_case_[0] = kUint; +} +inline void JsonValue::clear_uint() { + if (_internal_has_uint()) { + _impl_.value_.uint_ = uint64_t{0u}; + clear_has_value(); + } +} +inline uint64_t JsonValue::_internal_uint() const { + if (_internal_has_uint()) { + return _impl_.value_.uint_; + } + return uint64_t{0u}; +} +inline void JsonValue::_internal_set_uint(uint64_t value) { + if (!_internal_has_uint()) { + clear_value(); + set_has_uint(); + } + _impl_.value_.uint_ = value; +} +inline uint64_t JsonValue::uint() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.uint) + return _internal_uint(); +} +inline void JsonValue::set_uint(uint64_t value) { + _internal_set_uint(value); + // @@protoc_insertion_point(field_set:greptime.v1.JsonValue.uint) +} + +// double float = 4; +inline bool JsonValue::_internal_has_float_() const { + return value_case() == kFloat; +} +inline bool JsonValue::has_float_() const { + return _internal_has_float_(); +} +inline void JsonValue::set_has_float_() { + _impl_._oneof_case_[0] = kFloat; +} +inline void JsonValue::clear_float_() { + if (_internal_has_float_()) { + _impl_.value_.float__ = 0; + clear_has_value(); + } +} +inline double JsonValue::_internal_float_() const { + if (_internal_has_float_()) { + return _impl_.value_.float__; + } + return 0; +} +inline void JsonValue::_internal_set_float_(double value) { + if (!_internal_has_float_()) { + clear_value(); + set_has_float_(); + } + _impl_.value_.float__ = value; +} +inline double JsonValue::float_() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.float) + return _internal_float_(); +} +inline void JsonValue::set_float_(double value) { + _internal_set_float_(value); + // @@protoc_insertion_point(field_set:greptime.v1.JsonValue.float) +} + +// string str = 5; +inline bool JsonValue::_internal_has_str() const { + return value_case() == kStr; +} +inline bool JsonValue::has_str() const { + return _internal_has_str(); +} +inline void JsonValue::set_has_str() { + _impl_._oneof_case_[0] = kStr; +} +inline void JsonValue::clear_str() { + if (_internal_has_str()) { + _impl_.value_.str_.Destroy(); + clear_has_value(); + } +} +inline const std::string& JsonValue::str() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.str) + return _internal_str(); +} +template +inline void JsonValue::set_str(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_str()) { + clear_value(); + set_has_str(); + _impl_.value_.str_.InitDefault(); + } + _impl_.value_.str_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.JsonValue.str) +} +inline std::string* JsonValue::mutable_str() { + std::string* _s = _internal_mutable_str(); + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonValue.str) + return _s; +} +inline const std::string& JsonValue::_internal_str() const { + if (_internal_has_str()) { + return _impl_.value_.str_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void JsonValue::_internal_set_str(const std::string& value) { + if (!_internal_has_str()) { + clear_value(); + set_has_str(); + _impl_.value_.str_.InitDefault(); + } + _impl_.value_.str_.Set(value, GetArenaForAllocation()); +} +inline std::string* JsonValue::_internal_mutable_str() { + if (!_internal_has_str()) { + clear_value(); + set_has_str(); + _impl_.value_.str_.InitDefault(); + } + return _impl_.value_.str_.Mutable( GetArenaForAllocation()); +} +inline std::string* JsonValue::release_str() { + // @@protoc_insertion_point(field_release:greptime.v1.JsonValue.str) + if (_internal_has_str()) { + clear_has_value(); + return _impl_.value_.str_.Release(); + } else { + return nullptr; + } +} +inline void JsonValue::set_allocated_str(std::string* str) { + if (has_value()) { + clear_value(); + } + if (str != nullptr) { + set_has_str(); + _impl_.value_.str_.InitAllocated(str, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonValue.str) +} + +// .greptime.v1.JsonList array = 6; +inline bool JsonValue::_internal_has_array() const { + return value_case() == kArray; +} +inline bool JsonValue::has_array() const { + return _internal_has_array(); +} +inline void JsonValue::set_has_array() { + _impl_._oneof_case_[0] = kArray; +} +inline void JsonValue::clear_array() { + if (_internal_has_array()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.array_; + } + clear_has_value(); + } +} +inline ::greptime::v1::JsonList* JsonValue::release_array() { + // @@protoc_insertion_point(field_release:greptime.v1.JsonValue.array) + if (_internal_has_array()) { + clear_has_value(); + ::greptime::v1::JsonList* temp = _impl_.value_.array_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.array_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::JsonList& JsonValue::_internal_array() const { + return _internal_has_array() + ? *_impl_.value_.array_ + : reinterpret_cast< ::greptime::v1::JsonList&>(::greptime::v1::_JsonList_default_instance_); +} +inline const ::greptime::v1::JsonList& JsonValue::array() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.array) + return _internal_array(); +} +inline ::greptime::v1::JsonList* JsonValue::unsafe_arena_release_array() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.JsonValue.array) + if (_internal_has_array()) { + clear_has_value(); + ::greptime::v1::JsonList* temp = _impl_.value_.array_; + _impl_.value_.array_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void JsonValue::unsafe_arena_set_allocated_array(::greptime::v1::JsonList* array) { + clear_value(); + if (array) { + set_has_array(); + _impl_.value_.array_ = array; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.JsonValue.array) +} +inline ::greptime::v1::JsonList* JsonValue::_internal_mutable_array() { + if (!_internal_has_array()) { + clear_value(); + set_has_array(); + _impl_.value_.array_ = CreateMaybeMessage< ::greptime::v1::JsonList >(GetArenaForAllocation()); + } + return _impl_.value_.array_; +} +inline ::greptime::v1::JsonList* JsonValue::mutable_array() { + ::greptime::v1::JsonList* _msg = _internal_mutable_array(); + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonValue.array) + return _msg; +} + +// .greptime.v1.JsonObject object = 7; +inline bool JsonValue::_internal_has_object() const { + return value_case() == kObject; +} +inline bool JsonValue::has_object() const { + return _internal_has_object(); +} +inline void JsonValue::set_has_object() { + _impl_._oneof_case_[0] = kObject; +} +inline void JsonValue::clear_object() { + if (_internal_has_object()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.value_.object_; + } + clear_has_value(); + } +} +inline ::greptime::v1::JsonObject* JsonValue::release_object() { + // @@protoc_insertion_point(field_release:greptime.v1.JsonValue.object) + if (_internal_has_object()) { + clear_has_value(); + ::greptime::v1::JsonObject* temp = _impl_.value_.object_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.object_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::JsonObject& JsonValue::_internal_object() const { + return _internal_has_object() + ? *_impl_.value_.object_ + : reinterpret_cast< ::greptime::v1::JsonObject&>(::greptime::v1::_JsonObject_default_instance_); +} +inline const ::greptime::v1::JsonObject& JsonValue::object() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.object) + return _internal_object(); +} +inline ::greptime::v1::JsonObject* JsonValue::unsafe_arena_release_object() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.JsonValue.object) + if (_internal_has_object()) { + clear_has_value(); + ::greptime::v1::JsonObject* temp = _impl_.value_.object_; + _impl_.value_.object_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void JsonValue::unsafe_arena_set_allocated_object(::greptime::v1::JsonObject* object) { + clear_value(); + if (object) { + set_has_object(); + _impl_.value_.object_ = object; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.JsonValue.object) +} +inline ::greptime::v1::JsonObject* JsonValue::_internal_mutable_object() { + if (!_internal_has_object()) { + clear_value(); + set_has_object(); + _impl_.value_.object_ = CreateMaybeMessage< ::greptime::v1::JsonObject >(GetArenaForAllocation()); + } + return _impl_.value_.object_; +} +inline ::greptime::v1::JsonObject* JsonValue::mutable_object() { + ::greptime::v1::JsonObject* _msg = _internal_mutable_object(); + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonValue.object) + return _msg; +} + +inline bool JsonValue::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void JsonValue::clear_has_value() { + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} +inline JsonValue::ValueCase JsonValue::value_case() const { + return JsonValue::ValueCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// JsonList + +// repeated .greptime.v1.JsonValue items = 1; +inline int JsonList::_internal_items_size() const { + return _impl_.items_.size(); +} +inline int JsonList::items_size() const { + return _internal_items_size(); +} +inline void JsonList::clear_items() { + _impl_.items_.Clear(); +} +inline ::greptime::v1::JsonValue* JsonList::mutable_items(int index) { + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonList.items) + return _impl_.items_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonValue >* +JsonList::mutable_items() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.JsonList.items) + return &_impl_.items_; +} +inline const ::greptime::v1::JsonValue& JsonList::_internal_items(int index) const { + return _impl_.items_.Get(index); +} +inline const ::greptime::v1::JsonValue& JsonList::items(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonList.items) + return _internal_items(index); +} +inline ::greptime::v1::JsonValue* JsonList::_internal_add_items() { + return _impl_.items_.Add(); +} +inline ::greptime::v1::JsonValue* JsonList::add_items() { + ::greptime::v1::JsonValue* _add = _internal_add_items(); + // @@protoc_insertion_point(field_add:greptime.v1.JsonList.items) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonValue >& +JsonList::items() const { + // @@protoc_insertion_point(field_list:greptime.v1.JsonList.items) + return _impl_.items_; +} + +// ------------------------------------------------------------------- + +// JsonObject_Entry + +// string key = 1; +inline void JsonObject_Entry::clear_key() { + _impl_.key_.ClearToEmpty(); +} +inline const std::string& JsonObject_Entry::key() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonObject.Entry.key) + return _internal_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void JsonObject_Entry::set_key(ArgT0&& arg0, ArgT... args) { + + _impl_.key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.JsonObject.Entry.key) +} +inline std::string* JsonObject_Entry::mutable_key() { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonObject.Entry.key) + return _s; +} +inline const std::string& JsonObject_Entry::_internal_key() const { + return _impl_.key_.Get(); +} +inline void JsonObject_Entry::_internal_set_key(const std::string& value) { + + _impl_.key_.Set(value, GetArenaForAllocation()); +} +inline std::string* JsonObject_Entry::_internal_mutable_key() { + + return _impl_.key_.Mutable(GetArenaForAllocation()); +} +inline std::string* JsonObject_Entry::release_key() { + // @@protoc_insertion_point(field_release:greptime.v1.JsonObject.Entry.key) + return _impl_.key_.Release(); +} +inline void JsonObject_Entry::set_allocated_key(std::string* key) { + if (key != nullptr) { + + } else { + + } + _impl_.key_.SetAllocated(key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonObject.Entry.key) +} + +// .greptime.v1.JsonValue value = 2; +inline bool JsonObject_Entry::_internal_has_value() const { + return this != internal_default_instance() && _impl_.value_ != nullptr; +} +inline bool JsonObject_Entry::has_value() const { + return _internal_has_value(); +} +inline void JsonObject_Entry::clear_value() { + if (GetArenaForAllocation() == nullptr && _impl_.value_ != nullptr) { + delete _impl_.value_; + } + _impl_.value_ = nullptr; +} +inline const ::greptime::v1::JsonValue& JsonObject_Entry::_internal_value() const { + const ::greptime::v1::JsonValue* p = _impl_.value_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::_JsonValue_default_instance_); +} +inline const ::greptime::v1::JsonValue& JsonObject_Entry::value() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonObject.Entry.value) + return _internal_value(); +} +inline void JsonObject_Entry::unsafe_arena_set_allocated_value( + ::greptime::v1::JsonValue* value) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.value_); + } + _impl_.value_ = value; + if (value) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.JsonObject.Entry.value) +} +inline ::greptime::v1::JsonValue* JsonObject_Entry::release_value() { + + ::greptime::v1::JsonValue* temp = _impl_.value_; + _impl_.value_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::greptime::v1::JsonValue* JsonObject_Entry::unsafe_arena_release_value() { + // @@protoc_insertion_point(field_release:greptime.v1.JsonObject.Entry.value) + + ::greptime::v1::JsonValue* temp = _impl_.value_; + _impl_.value_ = nullptr; + return temp; +} +inline ::greptime::v1::JsonValue* JsonObject_Entry::_internal_mutable_value() { + + if (_impl_.value_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::JsonValue>(GetArenaForAllocation()); + _impl_.value_ = p; + } + return _impl_.value_; +} +inline ::greptime::v1::JsonValue* JsonObject_Entry::mutable_value() { + ::greptime::v1::JsonValue* _msg = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonObject.Entry.value) + return _msg; +} +inline void JsonObject_Entry::set_allocated_value(::greptime::v1::JsonValue* value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.value_; + } + if (value) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(value); + if (message_arena != submessage_arena) { + value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, value, submessage_arena); + } + + } else { + + } + _impl_.value_ = value; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonObject.Entry.value) +} + +// ------------------------------------------------------------------- + +// JsonObject + +// repeated .greptime.v1.JsonObject.Entry entries = 1; +inline int JsonObject::_internal_entries_size() const { + return _impl_.entries_.size(); +} +inline int JsonObject::entries_size() const { + return _internal_entries_size(); +} +inline void JsonObject::clear_entries() { + _impl_.entries_.Clear(); +} +inline ::greptime::v1::JsonObject_Entry* JsonObject::mutable_entries(int index) { + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonObject.entries) + return _impl_.entries_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonObject_Entry >* +JsonObject::mutable_entries() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.JsonObject.entries) + return &_impl_.entries_; +} +inline const ::greptime::v1::JsonObject_Entry& JsonObject::_internal_entries(int index) const { + return _impl_.entries_.Get(index); +} +inline const ::greptime::v1::JsonObject_Entry& JsonObject::entries(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonObject.entries) + return _internal_entries(index); +} +inline ::greptime::v1::JsonObject_Entry* JsonObject::_internal_add_entries() { + return _impl_.entries_.Add(); +} +inline ::greptime::v1::JsonObject_Entry* JsonObject::add_entries() { + ::greptime::v1::JsonObject_Entry* _add = _internal_add_entries(); + // @@protoc_insertion_point(field_add:greptime.v1.JsonObject.entries) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::JsonObject_Entry >& +JsonObject::entries() const { + // @@protoc_insertion_point(field_list:greptime.v1.JsonObject.entries) + return _impl_.entries_; +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -3533,6 +4946,14 @@ StructValue::items() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/row.pb.go b/go/greptime/v1/row.pb.go index 2cd9e40..1d0a97e 100644 --- a/go/greptime/v1/row.pb.go +++ b/go/greptime/v1/row.pb.go @@ -499,7 +499,7 @@ func (x *Value) GetStructValue() *StructValue { return nil } -func (x *Value) GetJsonValue() *Value { +func (x *Value) GetJsonValue() *JsonValue { if x, ok := x.GetValueData().(*Value_JsonValue); ok { return x.JsonValue } @@ -627,7 +627,7 @@ type Value_StructValue struct { } type Value_JsonValue struct { - JsonValue *Value `protobuf:"bytes,42,opt,name=json_value,json=jsonValue,proto3,oneof"` + JsonValue *JsonValue `protobuf:"bytes,42,opt,name=json_value,json=jsonValue,proto3,oneof"` } func (*Value_I8Value) isValue_ValueData() {} @@ -784,6 +784,306 @@ func (x *StructValue) GetItems() []*Value { return nil } +type JsonValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Value: + // + // *JsonValue_Boolean + // *JsonValue_Int + // *JsonValue_Uint + // *JsonValue_Float + // *JsonValue_Str + // *JsonValue_Array + // *JsonValue_Object + Value isJsonValue_Value `protobuf_oneof:"value"` +} + +func (x *JsonValue) Reset() { + *x = JsonValue{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_row_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JsonValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JsonValue) ProtoMessage() {} + +func (x *JsonValue) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_row_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JsonValue.ProtoReflect.Descriptor instead. +func (*JsonValue) Descriptor() ([]byte, []int) { + return file_greptime_v1_row_proto_rawDescGZIP(), []int{6} +} + +func (m *JsonValue) GetValue() isJsonValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *JsonValue) GetBoolean() bool { + if x, ok := x.GetValue().(*JsonValue_Boolean); ok { + return x.Boolean + } + return false +} + +func (x *JsonValue) GetInt() int64 { + if x, ok := x.GetValue().(*JsonValue_Int); ok { + return x.Int + } + return 0 +} + +func (x *JsonValue) GetUint() uint64 { + if x, ok := x.GetValue().(*JsonValue_Uint); ok { + return x.Uint + } + return 0 +} + +func (x *JsonValue) GetFloat() float64 { + if x, ok := x.GetValue().(*JsonValue_Float); ok { + return x.Float + } + return 0 +} + +func (x *JsonValue) GetStr() string { + if x, ok := x.GetValue().(*JsonValue_Str); ok { + return x.Str + } + return "" +} + +func (x *JsonValue) GetArray() *JsonList { + if x, ok := x.GetValue().(*JsonValue_Array); ok { + return x.Array + } + return nil +} + +func (x *JsonValue) GetObject() *JsonObject { + if x, ok := x.GetValue().(*JsonValue_Object); ok { + return x.Object + } + return nil +} + +type isJsonValue_Value interface { + isJsonValue_Value() +} + +type JsonValue_Boolean struct { + Boolean bool `protobuf:"varint,1,opt,name=boolean,proto3,oneof"` +} + +type JsonValue_Int struct { + Int int64 `protobuf:"varint,2,opt,name=int,proto3,oneof"` +} + +type JsonValue_Uint struct { + Uint uint64 `protobuf:"varint,3,opt,name=uint,proto3,oneof"` +} + +type JsonValue_Float struct { + Float float64 `protobuf:"fixed64,4,opt,name=float,proto3,oneof"` +} + +type JsonValue_Str struct { + Str string `protobuf:"bytes,5,opt,name=str,proto3,oneof"` +} + +type JsonValue_Array struct { + Array *JsonList `protobuf:"bytes,6,opt,name=array,proto3,oneof"` +} + +type JsonValue_Object struct { + Object *JsonObject `protobuf:"bytes,7,opt,name=object,proto3,oneof"` +} + +func (*JsonValue_Boolean) isJsonValue_Value() {} + +func (*JsonValue_Int) isJsonValue_Value() {} + +func (*JsonValue_Uint) isJsonValue_Value() {} + +func (*JsonValue_Float) isJsonValue_Value() {} + +func (*JsonValue_Str) isJsonValue_Value() {} + +func (*JsonValue_Array) isJsonValue_Value() {} + +func (*JsonValue_Object) isJsonValue_Value() {} + +type JsonList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*JsonValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *JsonList) Reset() { + *x = JsonList{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_row_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JsonList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JsonList) ProtoMessage() {} + +func (x *JsonList) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_row_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JsonList.ProtoReflect.Descriptor instead. +func (*JsonList) Descriptor() ([]byte, []int) { + return file_greptime_v1_row_proto_rawDescGZIP(), []int{7} +} + +func (x *JsonList) GetItems() []*JsonValue { + if x != nil { + return x.Items + } + return nil +} + +type JsonObject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*JsonObject_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *JsonObject) Reset() { + *x = JsonObject{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_row_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JsonObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JsonObject) ProtoMessage() {} + +func (x *JsonObject) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_row_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JsonObject.ProtoReflect.Descriptor instead. +func (*JsonObject) Descriptor() ([]byte, []int) { + return file_greptime_v1_row_proto_rawDescGZIP(), []int{8} +} + +func (x *JsonObject) GetEntries() []*JsonObject_Entry { + if x != nil { + return x.Entries + } + return nil +} + +type JsonObject_Entry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *JsonValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *JsonObject_Entry) Reset() { + *x = JsonObject_Entry{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_row_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JsonObject_Entry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JsonObject_Entry) ProtoMessage() {} + +func (x *JsonObject_Entry) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_row_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JsonObject_Entry.ProtoReflect.Descriptor instead. +func (*JsonObject_Entry) Descriptor() ([]byte, []int) { + return file_greptime_v1_row_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *JsonObject_Entry) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *JsonObject_Entry) GetValue() *JsonValue { + if x != nil { + return x.Value + } + return nil +} + var File_greptime_v1_row_proto protoreflect.FileDescriptor var file_greptime_v1_row_proto_rawDesc = []byte{ @@ -819,7 +1119,7 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x31, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x9c, 0x0b, 0x0a, 0x05, 0x56, 0x61, 0x6c, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xa0, 0x0b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, @@ -905,24 +1205,51 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, - 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x37, - 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, - 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, - 0x74, 0x61, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x48, 0x00, 0x52, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, + 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x22, 0x37, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x09, + 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, 0x6f, + 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6f, + 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x12, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x69, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x75, 0x69, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, + 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x61, + 0x72, 0x72, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x38, 0x0a, 0x08, 0x4a, 0x73, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x22, 0x8e, 0x01, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x37, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, + 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x47, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x5a, 0x35, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -937,7 +1264,7 @@ func file_greptime_v1_row_proto_rawDescGZIP() []byte { return file_greptime_v1_row_proto_rawDescData } -var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_greptime_v1_row_proto_goTypes = []interface{}{ (*Rows)(nil), // 0: greptime.v1.Rows (*ColumnSchema)(nil), // 1: greptime.v1.ColumnSchema @@ -945,33 +1272,42 @@ var file_greptime_v1_row_proto_goTypes = []interface{}{ (*Value)(nil), // 3: greptime.v1.Value (*ListValue)(nil), // 4: greptime.v1.ListValue (*StructValue)(nil), // 5: greptime.v1.StructValue - (ColumnDataType)(0), // 6: greptime.v1.ColumnDataType - (SemanticType)(0), // 7: greptime.v1.SemanticType - (*ColumnDataTypeExtension)(nil), // 8: greptime.v1.ColumnDataTypeExtension - (*ColumnOptions)(nil), // 9: greptime.v1.ColumnOptions - (*IntervalMonthDayNano)(nil), // 10: greptime.v1.IntervalMonthDayNano - (*Decimal128)(nil), // 11: greptime.v1.Decimal128 + (*JsonValue)(nil), // 6: greptime.v1.JsonValue + (*JsonList)(nil), // 7: greptime.v1.JsonList + (*JsonObject)(nil), // 8: greptime.v1.JsonObject + (*JsonObject_Entry)(nil), // 9: greptime.v1.JsonObject.Entry + (ColumnDataType)(0), // 10: greptime.v1.ColumnDataType + (SemanticType)(0), // 11: greptime.v1.SemanticType + (*ColumnDataTypeExtension)(nil), // 12: greptime.v1.ColumnDataTypeExtension + (*ColumnOptions)(nil), // 13: greptime.v1.ColumnOptions + (*IntervalMonthDayNano)(nil), // 14: greptime.v1.IntervalMonthDayNano + (*Decimal128)(nil), // 15: greptime.v1.Decimal128 } var file_greptime_v1_row_proto_depIdxs = []int32{ 1, // 0: greptime.v1.Rows.schema:type_name -> greptime.v1.ColumnSchema 2, // 1: greptime.v1.Rows.rows:type_name -> greptime.v1.Row - 6, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType - 7, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType - 8, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension - 9, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnOptions + 10, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType + 11, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType + 12, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension + 13, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnOptions 3, // 6: greptime.v1.Row.values:type_name -> greptime.v1.Value - 10, // 7: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano - 11, // 8: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128 + 14, // 7: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano + 15, // 8: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128 4, // 9: greptime.v1.Value.list_value:type_name -> greptime.v1.ListValue 5, // 10: greptime.v1.Value.struct_value:type_name -> greptime.v1.StructValue - 3, // 11: greptime.v1.Value.json_value:type_name -> greptime.v1.Value + 6, // 11: greptime.v1.Value.json_value:type_name -> greptime.v1.JsonValue 3, // 12: greptime.v1.ListValue.items:type_name -> greptime.v1.Value 3, // 13: greptime.v1.StructValue.items:type_name -> greptime.v1.Value - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 7, // 14: greptime.v1.JsonValue.array:type_name -> greptime.v1.JsonList + 8, // 15: greptime.v1.JsonValue.object:type_name -> greptime.v1.JsonObject + 6, // 16: greptime.v1.JsonList.items:type_name -> greptime.v1.JsonValue + 9, // 17: greptime.v1.JsonObject.entries:type_name -> greptime.v1.JsonObject.Entry + 6, // 18: greptime.v1.JsonObject.Entry.value:type_name -> greptime.v1.JsonValue + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_greptime_v1_row_proto_init() } @@ -1053,6 +1389,54 @@ func file_greptime_v1_row_proto_init() { return nil } } + file_greptime_v1_row_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_row_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_row_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_row_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonObject_Entry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_greptime_v1_row_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Value_I8Value)(nil), @@ -1086,13 +1470,22 @@ func file_greptime_v1_row_proto_init() { (*Value_StructValue)(nil), (*Value_JsonValue)(nil), } + file_greptime_v1_row_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*JsonValue_Boolean)(nil), + (*JsonValue_Int)(nil), + (*JsonValue_Uint)(nil), + (*JsonValue_Float)(nil), + (*JsonValue_Str)(nil), + (*JsonValue_Array)(nil), + (*JsonValue_Object)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_row_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/io/greptime/v1/RowData.java b/java/src/main/java/io/greptime/v1/RowData.java index 189e29d..99cc0e8 100644 --- a/java/src/main/java/io/greptime/v1/RowData.java +++ b/java/src/main/java/io/greptime/v1/RowData.java @@ -3632,19 +3632,19 @@ public final class RowData { io.greptime.v1.RowData.StructValueOrBuilder getStructValueOrBuilder(); /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; * @return Whether the jsonValue field is set. */ boolean hasJsonValue(); /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; * @return The jsonValue. */ - io.greptime.v1.RowData.Value getJsonValue(); + io.greptime.v1.RowData.JsonValue getJsonValue(); /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ - io.greptime.v1.RowData.ValueOrBuilder getJsonValueOrBuilder(); + io.greptime.v1.RowData.JsonValueOrBuilder getJsonValueOrBuilder(); public io.greptime.v1.RowData.Value.ValueDataCase getValueDataCase(); } @@ -3876,14 +3876,14 @@ public final class RowData { break; } case 338: { - io.greptime.v1.RowData.Value.Builder subBuilder = null; + io.greptime.v1.RowData.JsonValue.Builder subBuilder = null; if (valueDataCase_ == 42) { - subBuilder = ((io.greptime.v1.RowData.Value) valueData_).toBuilder(); + subBuilder = ((io.greptime.v1.RowData.JsonValue) valueData_).toBuilder(); } valueData_ = - input.readMessage(io.greptime.v1.RowData.Value.parser(), extensionRegistry); + input.readMessage(io.greptime.v1.RowData.JsonValue.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((io.greptime.v1.RowData.Value) valueData_); + subBuilder.mergeFrom((io.greptime.v1.RowData.JsonValue) valueData_); valueData_ = subBuilder.buildPartial(); } valueDataCase_ = 42; @@ -4702,7 +4702,7 @@ public final class RowData { public static final int JSON_VALUE_FIELD_NUMBER = 42; /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; * @return Whether the jsonValue field is set. */ @java.lang.Override @@ -4710,25 +4710,25 @@ public final class RowData { return valueDataCase_ == 42; } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; * @return The jsonValue. */ @java.lang.Override - public io.greptime.v1.RowData.Value getJsonValue() { + public io.greptime.v1.RowData.JsonValue getJsonValue() { if (valueDataCase_ == 42) { - return (io.greptime.v1.RowData.Value) valueData_; + return (io.greptime.v1.RowData.JsonValue) valueData_; } - return io.greptime.v1.RowData.Value.getDefaultInstance(); + return io.greptime.v1.RowData.JsonValue.getDefaultInstance(); } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ @java.lang.Override - public io.greptime.v1.RowData.ValueOrBuilder getJsonValueOrBuilder() { + public io.greptime.v1.RowData.JsonValueOrBuilder getJsonValueOrBuilder() { if (valueDataCase_ == 42) { - return (io.greptime.v1.RowData.Value) valueData_; + return (io.greptime.v1.RowData.JsonValue) valueData_; } - return io.greptime.v1.RowData.Value.getDefaultInstance(); + return io.greptime.v1.RowData.JsonValue.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -4857,7 +4857,7 @@ public final class RowData { output.writeMessage(41, (io.greptime.v1.RowData.StructValue) valueData_); } if (valueDataCase_ == 42) { - output.writeMessage(42, (io.greptime.v1.RowData.Value) valueData_); + output.writeMessage(42, (io.greptime.v1.RowData.JsonValue) valueData_); } unknownFields.writeTo(output); } @@ -5009,7 +5009,7 @@ public final class RowData { } if (valueDataCase_ == 42) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(42, (io.greptime.v1.RowData.Value) valueData_); + .computeMessageSize(42, (io.greptime.v1.RowData.JsonValue) valueData_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -7447,9 +7447,9 @@ public final class RowData { } private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.RowData.Value, io.greptime.v1.RowData.Value.Builder, io.greptime.v1.RowData.ValueOrBuilder> jsonValueBuilder_; + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder> jsonValueBuilder_; /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; * @return Whether the jsonValue field is set. */ @java.lang.Override @@ -7457,27 +7457,27 @@ public final class RowData { return valueDataCase_ == 42; } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; * @return The jsonValue. */ @java.lang.Override - public io.greptime.v1.RowData.Value getJsonValue() { + public io.greptime.v1.RowData.JsonValue getJsonValue() { if (jsonValueBuilder_ == null) { if (valueDataCase_ == 42) { - return (io.greptime.v1.RowData.Value) valueData_; + return (io.greptime.v1.RowData.JsonValue) valueData_; } - return io.greptime.v1.RowData.Value.getDefaultInstance(); + return io.greptime.v1.RowData.JsonValue.getDefaultInstance(); } else { if (valueDataCase_ == 42) { return jsonValueBuilder_.getMessage(); } - return io.greptime.v1.RowData.Value.getDefaultInstance(); + return io.greptime.v1.RowData.JsonValue.getDefaultInstance(); } } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ - public Builder setJsonValue(io.greptime.v1.RowData.Value value) { + public Builder setJsonValue(io.greptime.v1.RowData.JsonValue value) { if (jsonValueBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7491,10 +7491,10 @@ public final class RowData { return this; } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ public Builder setJsonValue( - io.greptime.v1.RowData.Value.Builder builderForValue) { + io.greptime.v1.RowData.JsonValue.Builder builderForValue) { if (jsonValueBuilder_ == null) { valueData_ = builderForValue.build(); onChanged(); @@ -7505,13 +7505,13 @@ public final class RowData { return this; } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ - public Builder mergeJsonValue(io.greptime.v1.RowData.Value value) { + public Builder mergeJsonValue(io.greptime.v1.RowData.JsonValue value) { if (jsonValueBuilder_ == null) { if (valueDataCase_ == 42 && - valueData_ != io.greptime.v1.RowData.Value.getDefaultInstance()) { - valueData_ = io.greptime.v1.RowData.Value.newBuilder((io.greptime.v1.RowData.Value) valueData_) + valueData_ != io.greptime.v1.RowData.JsonValue.getDefaultInstance()) { + valueData_ = io.greptime.v1.RowData.JsonValue.newBuilder((io.greptime.v1.RowData.JsonValue) valueData_) .mergeFrom(value).buildPartial(); } else { valueData_ = value; @@ -7528,7 +7528,7 @@ public final class RowData { return this; } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ public Builder clearJsonValue() { if (jsonValueBuilder_ == null) { @@ -7547,38 +7547,38 @@ public final class RowData { return this; } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ - public io.greptime.v1.RowData.Value.Builder getJsonValueBuilder() { + public io.greptime.v1.RowData.JsonValue.Builder getJsonValueBuilder() { return getJsonValueFieldBuilder().getBuilder(); } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ @java.lang.Override - public io.greptime.v1.RowData.ValueOrBuilder getJsonValueOrBuilder() { + public io.greptime.v1.RowData.JsonValueOrBuilder getJsonValueOrBuilder() { if ((valueDataCase_ == 42) && (jsonValueBuilder_ != null)) { return jsonValueBuilder_.getMessageOrBuilder(); } else { if (valueDataCase_ == 42) { - return (io.greptime.v1.RowData.Value) valueData_; + return (io.greptime.v1.RowData.JsonValue) valueData_; } - return io.greptime.v1.RowData.Value.getDefaultInstance(); + return io.greptime.v1.RowData.JsonValue.getDefaultInstance(); } } /** - * .greptime.v1.Value json_value = 42; + * .greptime.v1.JsonValue json_value = 42; */ private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.RowData.Value, io.greptime.v1.RowData.Value.Builder, io.greptime.v1.RowData.ValueOrBuilder> + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder> getJsonValueFieldBuilder() { if (jsonValueBuilder_ == null) { if (!(valueDataCase_ == 42)) { - valueData_ = io.greptime.v1.RowData.Value.getDefaultInstance(); + valueData_ = io.greptime.v1.RowData.JsonValue.getDefaultInstance(); } jsonValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.RowData.Value, io.greptime.v1.RowData.Value.Builder, io.greptime.v1.RowData.ValueOrBuilder>( - (io.greptime.v1.RowData.Value) valueData_, + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder>( + (io.greptime.v1.RowData.JsonValue) valueData_, getParentForChildren(), isClean()); valueData_ = null; @@ -9230,6 +9230,3938 @@ public final class RowData { } + public interface JsonValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.JsonValue) + com.google.protobuf.MessageOrBuilder { + + /** + * bool boolean = 1; + * @return Whether the boolean field is set. + */ + boolean hasBoolean(); + /** + * bool boolean = 1; + * @return The boolean. + */ + boolean getBoolean(); + + /** + * int64 int = 2; + * @return Whether the int field is set. + */ + boolean hasInt(); + /** + * int64 int = 2; + * @return The int. + */ + long getInt(); + + /** + * uint64 uint = 3; + * @return Whether the uint field is set. + */ + boolean hasUint(); + /** + * uint64 uint = 3; + * @return The uint. + */ + long getUint(); + + /** + * double float = 4; + * @return Whether the float field is set. + */ + boolean hasFloat(); + /** + * double float = 4; + * @return The float. + */ + double getFloat(); + + /** + * string str = 5; + * @return Whether the str field is set. + */ + boolean hasStr(); + /** + * string str = 5; + * @return The str. + */ + java.lang.String getStr(); + /** + * string str = 5; + * @return The bytes for str. + */ + com.google.protobuf.ByteString + getStrBytes(); + + /** + * .greptime.v1.JsonList array = 6; + * @return Whether the array field is set. + */ + boolean hasArray(); + /** + * .greptime.v1.JsonList array = 6; + * @return The array. + */ + io.greptime.v1.RowData.JsonList getArray(); + /** + * .greptime.v1.JsonList array = 6; + */ + io.greptime.v1.RowData.JsonListOrBuilder getArrayOrBuilder(); + + /** + * .greptime.v1.JsonObject object = 7; + * @return Whether the object field is set. + */ + boolean hasObject(); + /** + * .greptime.v1.JsonObject object = 7; + * @return The object. + */ + io.greptime.v1.RowData.JsonObject getObject(); + /** + * .greptime.v1.JsonObject object = 7; + */ + io.greptime.v1.RowData.JsonObjectOrBuilder getObjectOrBuilder(); + + public io.greptime.v1.RowData.JsonValue.ValueCase getValueCase(); + } + /** + * Protobuf type {@code greptime.v1.JsonValue} + */ + public static final class JsonValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.JsonValue) + JsonValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use JsonValue.newBuilder() to construct. + private JsonValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JsonValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JsonValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JsonValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readBool(); + valueCase_ = 1; + break; + } + case 16: { + value_ = input.readInt64(); + valueCase_ = 2; + break; + } + case 24: { + value_ = input.readUInt64(); + valueCase_ = 3; + break; + } + case 33: { + value_ = input.readDouble(); + valueCase_ = 4; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 5; + value_ = s; + break; + } + case 50: { + io.greptime.v1.RowData.JsonList.Builder subBuilder = null; + if (valueCase_ == 6) { + subBuilder = ((io.greptime.v1.RowData.JsonList) value_).toBuilder(); + } + value_ = + input.readMessage(io.greptime.v1.RowData.JsonList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.RowData.JsonList) value_); + value_ = subBuilder.buildPartial(); + } + valueCase_ = 6; + break; + } + case 58: { + io.greptime.v1.RowData.JsonObject.Builder subBuilder = null; + if (valueCase_ == 7) { + subBuilder = ((io.greptime.v1.RowData.JsonObject) value_).toBuilder(); + } + value_ = + input.readMessage(io.greptime.v1.RowData.JsonObject.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.RowData.JsonObject) value_); + value_ = subBuilder.buildPartial(); + } + valueCase_ = 7; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonValue.class, io.greptime.v1.RowData.JsonValue.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BOOLEAN(1), + INT(2), + UINT(3), + FLOAT(4), + STR(5), + ARRAY(6), + OBJECT(7), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: return BOOLEAN; + case 2: return INT; + case 3: return UINT; + case 4: return FLOAT; + case 5: return STR; + case 6: return ARRAY; + case 7: return OBJECT; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int BOOLEAN_FIELD_NUMBER = 1; + /** + * bool boolean = 1; + * @return Whether the boolean field is set. + */ + @java.lang.Override + public boolean hasBoolean() { + return valueCase_ == 1; + } + /** + * bool boolean = 1; + * @return The boolean. + */ + @java.lang.Override + public boolean getBoolean() { + if (valueCase_ == 1) { + return (java.lang.Boolean) value_; + } + return false; + } + + public static final int INT_FIELD_NUMBER = 2; + /** + * int64 int = 2; + * @return Whether the int field is set. + */ + @java.lang.Override + public boolean hasInt() { + return valueCase_ == 2; + } + /** + * int64 int = 2; + * @return The int. + */ + @java.lang.Override + public long getInt() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int UINT_FIELD_NUMBER = 3; + /** + * uint64 uint = 3; + * @return Whether the uint field is set. + */ + @java.lang.Override + public boolean hasUint() { + return valueCase_ == 3; + } + /** + * uint64 uint = 3; + * @return The uint. + */ + @java.lang.Override + public long getUint() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int FLOAT_FIELD_NUMBER = 4; + /** + * double float = 4; + * @return Whether the float field is set. + */ + @java.lang.Override + public boolean hasFloat() { + return valueCase_ == 4; + } + /** + * double float = 4; + * @return The float. + */ + @java.lang.Override + public double getFloat() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + + public static final int STR_FIELD_NUMBER = 5; + /** + * string str = 5; + * @return Whether the str field is set. + */ + public boolean hasStr() { + return valueCase_ == 5; + } + /** + * string str = 5; + * @return The str. + */ + public java.lang.String getStr() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 5) { + value_ = s; + } + return s; + } + } + /** + * string str = 5; + * @return The bytes for str. + */ + public com.google.protobuf.ByteString + getStrBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 5) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARRAY_FIELD_NUMBER = 6; + /** + * .greptime.v1.JsonList array = 6; + * @return Whether the array field is set. + */ + @java.lang.Override + public boolean hasArray() { + return valueCase_ == 6; + } + /** + * .greptime.v1.JsonList array = 6; + * @return The array. + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonList getArray() { + if (valueCase_ == 6) { + return (io.greptime.v1.RowData.JsonList) value_; + } + return io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } + /** + * .greptime.v1.JsonList array = 6; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonListOrBuilder getArrayOrBuilder() { + if (valueCase_ == 6) { + return (io.greptime.v1.RowData.JsonList) value_; + } + return io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } + + public static final int OBJECT_FIELD_NUMBER = 7; + /** + * .greptime.v1.JsonObject object = 7; + * @return Whether the object field is set. + */ + @java.lang.Override + public boolean hasObject() { + return valueCase_ == 7; + } + /** + * .greptime.v1.JsonObject object = 7; + * @return The object. + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonObject getObject() { + if (valueCase_ == 7) { + return (io.greptime.v1.RowData.JsonObject) value_; + } + return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } + /** + * .greptime.v1.JsonObject object = 7; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonObjectOrBuilder getObjectOrBuilder() { + if (valueCase_ == 7) { + return (io.greptime.v1.RowData.JsonObject) value_; + } + return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 1) { + output.writeBool( + 1, (boolean)((java.lang.Boolean) value_)); + } + if (valueCase_ == 2) { + output.writeInt64( + 2, (long)((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + output.writeUInt64( + 3, (long)((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + output.writeDouble( + 4, (double)((java.lang.Double) value_)); + } + if (valueCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, value_); + } + if (valueCase_ == 6) { + output.writeMessage(6, (io.greptime.v1.RowData.JsonList) value_); + } + if (valueCase_ == 7) { + output.writeMessage(7, (io.greptime.v1.RowData.JsonObject) value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 1, (boolean)((java.lang.Boolean) value_)); + } + if (valueCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 2, (long)((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size( + 3, (long)((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize( + 4, (double)((java.lang.Double) value_)); + } + if (valueCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, value_); + } + if (valueCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (io.greptime.v1.RowData.JsonList) value_); + } + if (valueCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (io.greptime.v1.RowData.JsonObject) value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.RowData.JsonValue)) { + return super.equals(obj); + } + io.greptime.v1.RowData.JsonValue other = (io.greptime.v1.RowData.JsonValue) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (getBoolean() + != other.getBoolean()) return false; + break; + case 2: + if (getInt() + != other.getInt()) return false; + break; + case 3: + if (getUint() + != other.getUint()) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getFloat()) + != java.lang.Double.doubleToLongBits( + other.getFloat())) return false; + break; + case 5: + if (!getStr() + .equals(other.getStr())) return false; + break; + case 6: + if (!getArray() + .equals(other.getArray())) return false; + break; + case 7: + if (!getObject() + .equals(other.getObject())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + BOOLEAN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBoolean()); + break; + case 2: + hash = (37 * hash) + INT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInt()); + break; + case 3: + hash = (37 * hash) + UINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUint()); + break; + case 4: + hash = (37 * hash) + FLOAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getFloat())); + break; + case 5: + hash = (37 * hash) + STR_FIELD_NUMBER; + hash = (53 * hash) + getStr().hashCode(); + break; + case 6: + hash = (37 * hash) + ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getArray().hashCode(); + break; + case 7: + hash = (37 * hash) + OBJECT_FIELD_NUMBER; + hash = (53 * hash) + getObject().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.RowData.JsonValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.RowData.JsonValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.JsonValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.JsonValue) + io.greptime.v1.RowData.JsonValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonValue.class, io.greptime.v1.RowData.JsonValue.Builder.class); + } + + // Construct using io.greptime.v1.RowData.JsonValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonValue_descriptor; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonValue getDefaultInstanceForType() { + return io.greptime.v1.RowData.JsonValue.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonValue build() { + io.greptime.v1.RowData.JsonValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonValue buildPartial() { + io.greptime.v1.RowData.JsonValue result = new io.greptime.v1.RowData.JsonValue(this); + if (valueCase_ == 1) { + result.value_ = value_; + } + if (valueCase_ == 2) { + result.value_ = value_; + } + if (valueCase_ == 3) { + result.value_ = value_; + } + if (valueCase_ == 4) { + result.value_ = value_; + } + if (valueCase_ == 5) { + result.value_ = value_; + } + if (valueCase_ == 6) { + if (arrayBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = arrayBuilder_.build(); + } + } + if (valueCase_ == 7) { + if (objectBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = objectBuilder_.build(); + } + } + result.valueCase_ = valueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.RowData.JsonValue) { + return mergeFrom((io.greptime.v1.RowData.JsonValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.RowData.JsonValue other) { + if (other == io.greptime.v1.RowData.JsonValue.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case BOOLEAN: { + setBoolean(other.getBoolean()); + break; + } + case INT: { + setInt(other.getInt()); + break; + } + case UINT: { + setUint(other.getUint()); + break; + } + case FLOAT: { + setFloat(other.getFloat()); + break; + } + case STR: { + valueCase_ = 5; + value_ = other.value_; + onChanged(); + break; + } + case ARRAY: { + mergeArray(other.getArray()); + break; + } + case OBJECT: { + mergeObject(other.getObject()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.RowData.JsonValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.RowData.JsonValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + + /** + * bool boolean = 1; + * @return Whether the boolean field is set. + */ + public boolean hasBoolean() { + return valueCase_ == 1; + } + /** + * bool boolean = 1; + * @return The boolean. + */ + public boolean getBoolean() { + if (valueCase_ == 1) { + return (java.lang.Boolean) value_; + } + return false; + } + /** + * bool boolean = 1; + * @param value The boolean to set. + * @return This builder for chaining. + */ + public Builder setBoolean(boolean value) { + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + * bool boolean = 1; + * @return This builder for chaining. + */ + public Builder clearBoolean() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * int64 int = 2; + * @return Whether the int field is set. + */ + public boolean hasInt() { + return valueCase_ == 2; + } + /** + * int64 int = 2; + * @return The int. + */ + public long getInt() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * int64 int = 2; + * @param value The int to set. + * @return This builder for chaining. + */ + public Builder setInt(long value) { + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * int64 int = 2; + * @return This builder for chaining. + */ + public Builder clearInt() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * uint64 uint = 3; + * @return Whether the uint field is set. + */ + public boolean hasUint() { + return valueCase_ == 3; + } + /** + * uint64 uint = 3; + * @return The uint. + */ + public long getUint() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * uint64 uint = 3; + * @param value The uint to set. + * @return This builder for chaining. + */ + public Builder setUint(long value) { + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + * uint64 uint = 3; + * @return This builder for chaining. + */ + public Builder clearUint() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * double float = 4; + * @return Whether the float field is set. + */ + public boolean hasFloat() { + return valueCase_ == 4; + } + /** + * double float = 4; + * @return The float. + */ + public double getFloat() { + if (valueCase_ == 4) { + return (java.lang.Double) value_; + } + return 0D; + } + /** + * double float = 4; + * @param value The float to set. + * @return This builder for chaining. + */ + public Builder setFloat(double value) { + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + * double float = 4; + * @return This builder for chaining. + */ + public Builder clearFloat() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * string str = 5; + * @return Whether the str field is set. + */ + @java.lang.Override + public boolean hasStr() { + return valueCase_ == 5; + } + /** + * string str = 5; + * @return The str. + */ + @java.lang.Override + public java.lang.String getStr() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 5) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string str = 5; + * @return The bytes for str. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStrBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 5) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string str = 5; + * @param value The str to set. + * @return This builder for chaining. + */ + public Builder setStr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + /** + * string str = 5; + * @return This builder for chaining. + */ + public Builder clearStr() { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + * string str = 5; + * @param value The bytes for str to set. + * @return This builder for chaining. + */ + public Builder setStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonList, io.greptime.v1.RowData.JsonList.Builder, io.greptime.v1.RowData.JsonListOrBuilder> arrayBuilder_; + /** + * .greptime.v1.JsonList array = 6; + * @return Whether the array field is set. + */ + @java.lang.Override + public boolean hasArray() { + return valueCase_ == 6; + } + /** + * .greptime.v1.JsonList array = 6; + * @return The array. + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonList getArray() { + if (arrayBuilder_ == null) { + if (valueCase_ == 6) { + return (io.greptime.v1.RowData.JsonList) value_; + } + return io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } else { + if (valueCase_ == 6) { + return arrayBuilder_.getMessage(); + } + return io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } + } + /** + * .greptime.v1.JsonList array = 6; + */ + public Builder setArray(io.greptime.v1.RowData.JsonList value) { + if (arrayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + arrayBuilder_.setMessage(value); + } + valueCase_ = 6; + return this; + } + /** + * .greptime.v1.JsonList array = 6; + */ + public Builder setArray( + io.greptime.v1.RowData.JsonList.Builder builderForValue) { + if (arrayBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + arrayBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 6; + return this; + } + /** + * .greptime.v1.JsonList array = 6; + */ + public Builder mergeArray(io.greptime.v1.RowData.JsonList value) { + if (arrayBuilder_ == null) { + if (valueCase_ == 6 && + value_ != io.greptime.v1.RowData.JsonList.getDefaultInstance()) { + value_ = io.greptime.v1.RowData.JsonList.newBuilder((io.greptime.v1.RowData.JsonList) value_) + .mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 6) { + arrayBuilder_.mergeFrom(value); + } else { + arrayBuilder_.setMessage(value); + } + } + valueCase_ = 6; + return this; + } + /** + * .greptime.v1.JsonList array = 6; + */ + public Builder clearArray() { + if (arrayBuilder_ == null) { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + } + arrayBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.JsonList array = 6; + */ + public io.greptime.v1.RowData.JsonList.Builder getArrayBuilder() { + return getArrayFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.JsonList array = 6; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonListOrBuilder getArrayOrBuilder() { + if ((valueCase_ == 6) && (arrayBuilder_ != null)) { + return arrayBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 6) { + return (io.greptime.v1.RowData.JsonList) value_; + } + return io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } + } + /** + * .greptime.v1.JsonList array = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonList, io.greptime.v1.RowData.JsonList.Builder, io.greptime.v1.RowData.JsonListOrBuilder> + getArrayFieldBuilder() { + if (arrayBuilder_ == null) { + if (!(valueCase_ == 6)) { + value_ = io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } + arrayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonList, io.greptime.v1.RowData.JsonList.Builder, io.greptime.v1.RowData.JsonListOrBuilder>( + (io.greptime.v1.RowData.JsonList) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 6; + onChanged();; + return arrayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonObject, io.greptime.v1.RowData.JsonObject.Builder, io.greptime.v1.RowData.JsonObjectOrBuilder> objectBuilder_; + /** + * .greptime.v1.JsonObject object = 7; + * @return Whether the object field is set. + */ + @java.lang.Override + public boolean hasObject() { + return valueCase_ == 7; + } + /** + * .greptime.v1.JsonObject object = 7; + * @return The object. + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonObject getObject() { + if (objectBuilder_ == null) { + if (valueCase_ == 7) { + return (io.greptime.v1.RowData.JsonObject) value_; + } + return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return objectBuilder_.getMessage(); + } + return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } + } + /** + * .greptime.v1.JsonObject object = 7; + */ + public Builder setObject(io.greptime.v1.RowData.JsonObject value) { + if (objectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + objectBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + /** + * .greptime.v1.JsonObject object = 7; + */ + public Builder setObject( + io.greptime.v1.RowData.JsonObject.Builder builderForValue) { + if (objectBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + objectBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + /** + * .greptime.v1.JsonObject object = 7; + */ + public Builder mergeObject(io.greptime.v1.RowData.JsonObject value) { + if (objectBuilder_ == null) { + if (valueCase_ == 7 && + value_ != io.greptime.v1.RowData.JsonObject.getDefaultInstance()) { + value_ = io.greptime.v1.RowData.JsonObject.newBuilder((io.greptime.v1.RowData.JsonObject) value_) + .mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + objectBuilder_.mergeFrom(value); + } else { + objectBuilder_.setMessage(value); + } + } + valueCase_ = 7; + return this; + } + /** + * .greptime.v1.JsonObject object = 7; + */ + public Builder clearObject() { + if (objectBuilder_ == null) { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + } + objectBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.JsonObject object = 7; + */ + public io.greptime.v1.RowData.JsonObject.Builder getObjectBuilder() { + return getObjectFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.JsonObject object = 7; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonObjectOrBuilder getObjectOrBuilder() { + if ((valueCase_ == 7) && (objectBuilder_ != null)) { + return objectBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (io.greptime.v1.RowData.JsonObject) value_; + } + return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } + } + /** + * .greptime.v1.JsonObject object = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonObject, io.greptime.v1.RowData.JsonObject.Builder, io.greptime.v1.RowData.JsonObjectOrBuilder> + getObjectFieldBuilder() { + if (objectBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } + objectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonObject, io.greptime.v1.RowData.JsonObject.Builder, io.greptime.v1.RowData.JsonObjectOrBuilder>( + (io.greptime.v1.RowData.JsonObject) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged();; + return objectBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.JsonValue) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonValue) + private static final io.greptime.v1.RowData.JsonValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.RowData.JsonValue(); + } + + public static io.greptime.v1.RowData.JsonValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JsonValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JsonValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface JsonListOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.JsonList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + java.util.List + getItemsList(); + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + io.greptime.v1.RowData.JsonValue getItems(int index); + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + int getItemsCount(); + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + java.util.List + getItemsOrBuilderList(); + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + io.greptime.v1.RowData.JsonValueOrBuilder getItemsOrBuilder( + int index); + } + /** + * Protobuf type {@code greptime.v1.JsonList} + */ + public static final class JsonList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.JsonList) + JsonListOrBuilder { + private static final long serialVersionUID = 0L; + // Use JsonList.newBuilder() to construct. + private JsonList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JsonList() { + items_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JsonList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JsonList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + items_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + items_.add( + input.readMessage(io.greptime.v1.RowData.JsonValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonList.class, io.greptime.v1.RowData.JsonList.Builder.class); + } + + public static final int ITEMS_FIELD_NUMBER = 1; + private java.util.List items_; + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + @java.lang.Override + public java.util.List getItemsList() { + return items_; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + @java.lang.Override + public java.util.List + getItemsOrBuilderList() { + return items_; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + @java.lang.Override + public int getItemsCount() { + return items_.size(); + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonValue getItems(int index) { + return items_.get(index); + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonValueOrBuilder getItemsOrBuilder( + int index) { + return items_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(1, items_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, items_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.RowData.JsonList)) { + return super.equals(obj); + } + io.greptime.v1.RowData.JsonList other = (io.greptime.v1.RowData.JsonList) obj; + + if (!getItemsList() + .equals(other.getItemsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.RowData.JsonList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.RowData.JsonList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.JsonList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.JsonList) + io.greptime.v1.RowData.JsonListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonList.class, io.greptime.v1.RowData.JsonList.Builder.class); + } + + // Construct using io.greptime.v1.RowData.JsonList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getItemsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + itemsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonList_descriptor; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonList getDefaultInstanceForType() { + return io.greptime.v1.RowData.JsonList.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonList build() { + io.greptime.v1.RowData.JsonList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonList buildPartial() { + io.greptime.v1.RowData.JsonList result = new io.greptime.v1.RowData.JsonList(this); + int from_bitField0_ = bitField0_; + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.RowData.JsonList) { + return mergeFrom((io.greptime.v1.RowData.JsonList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.RowData.JsonList other) { + if (other == io.greptime.v1.RowData.JsonList.getDefaultInstance()) return this; + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemsFieldBuilder() : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.RowData.JsonList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.RowData.JsonList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List items_ = + java.util.Collections.emptyList(); + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + items_ = new java.util.ArrayList(items_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder> itemsBuilder_; + + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public io.greptime.v1.RowData.JsonValue getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder setItems( + int index, io.greptime.v1.RowData.JsonValue value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder setItems( + int index, io.greptime.v1.RowData.JsonValue.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder addItems(io.greptime.v1.RowData.JsonValue value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder addItems( + int index, io.greptime.v1.RowData.JsonValue value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder addItems( + io.greptime.v1.RowData.JsonValue.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder addItems( + int index, io.greptime.v1.RowData.JsonValue.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder addAllItems( + java.lang.Iterable values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public io.greptime.v1.RowData.JsonValue.Builder getItemsBuilder( + int index) { + return getItemsFieldBuilder().getBuilder(index); + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public io.greptime.v1.RowData.JsonValueOrBuilder getItemsOrBuilder( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public java.util.List + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public io.greptime.v1.RowData.JsonValue.Builder addItemsBuilder() { + return getItemsFieldBuilder().addBuilder( + io.greptime.v1.RowData.JsonValue.getDefaultInstance()); + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public io.greptime.v1.RowData.JsonValue.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder().addBuilder( + index, io.greptime.v1.RowData.JsonValue.getDefaultInstance()); + } + /** + * repeated .greptime.v1.JsonValue items = 1; + */ + public java.util.List + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder>( + items_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + items_ = null; + } + return itemsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.JsonList) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonList) + private static final io.greptime.v1.RowData.JsonList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.RowData.JsonList(); + } + + public static io.greptime.v1.RowData.JsonList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JsonList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JsonList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface JsonObjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.JsonObject) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + java.util.List + getEntriesList(); + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + io.greptime.v1.RowData.JsonObject.Entry getEntries(int index); + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + int getEntriesCount(); + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + io.greptime.v1.RowData.JsonObject.EntryOrBuilder getEntriesOrBuilder( + int index); + } + /** + * Protobuf type {@code greptime.v1.JsonObject} + */ + public static final class JsonObject extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.JsonObject) + JsonObjectOrBuilder { + private static final long serialVersionUID = 0L; + // Use JsonObject.newBuilder() to construct. + private JsonObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JsonObject() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JsonObject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JsonObject( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entries_.add( + input.readMessage(io.greptime.v1.RowData.JsonObject.Entry.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonObject.class, io.greptime.v1.RowData.JsonObject.Builder.class); + } + + public interface EntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.JsonObject.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * .greptime.v1.JsonValue value = 2; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * .greptime.v1.JsonValue value = 2; + * @return The value. + */ + io.greptime.v1.RowData.JsonValue getValue(); + /** + * .greptime.v1.JsonValue value = 2; + */ + io.greptime.v1.RowData.JsonValueOrBuilder getValueOrBuilder(); + } + /** + * Protobuf type {@code greptime.v1.JsonObject.Entry} + */ + public static final class Entry extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.JsonObject.Entry) + EntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entry.newBuilder() to construct. + private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Entry() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Entry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Entry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: { + io.greptime.v1.RowData.JsonValue.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(io.greptime.v1.RowData.JsonValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonObject.Entry.class, io.greptime.v1.RowData.JsonObject.Entry.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private io.greptime.v1.RowData.JsonValue value_; + /** + * .greptime.v1.JsonValue value = 2; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * .greptime.v1.JsonValue value = 2; + * @return The value. + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonValue getValue() { + return value_ == null ? io.greptime.v1.RowData.JsonValue.getDefaultInstance() : value_; + } + /** + * .greptime.v1.JsonValue value = 2; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.RowData.JsonObject.Entry)) { + return super.equals(obj); + } + io.greptime.v1.RowData.JsonObject.Entry other = (io.greptime.v1.RowData.JsonObject.Entry) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonObject.Entry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.RowData.JsonObject.Entry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.JsonObject.Entry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.JsonObject.Entry) + io.greptime.v1.RowData.JsonObject.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonObject.Entry.class, io.greptime.v1.RowData.JsonObject.Entry.Builder.class); + } + + // Construct using io.greptime.v1.RowData.JsonObject.Entry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_Entry_descriptor; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject.Entry getDefaultInstanceForType() { + return io.greptime.v1.RowData.JsonObject.Entry.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject.Entry build() { + io.greptime.v1.RowData.JsonObject.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject.Entry buildPartial() { + io.greptime.v1.RowData.JsonObject.Entry result = new io.greptime.v1.RowData.JsonObject.Entry(this); + result.key_ = key_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.RowData.JsonObject.Entry) { + return mergeFrom((io.greptime.v1.RowData.JsonObject.Entry)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.RowData.JsonObject.Entry other) { + if (other == io.greptime.v1.RowData.JsonObject.Entry.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.RowData.JsonObject.Entry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.RowData.JsonObject.Entry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private io.greptime.v1.RowData.JsonValue value_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder> valueBuilder_; + /** + * .greptime.v1.JsonValue value = 2; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * .greptime.v1.JsonValue value = 2; + * @return The value. + */ + public io.greptime.v1.RowData.JsonValue getValue() { + if (valueBuilder_ == null) { + return value_ == null ? io.greptime.v1.RowData.JsonValue.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .greptime.v1.JsonValue value = 2; + */ + public Builder setValue(io.greptime.v1.RowData.JsonValue value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.JsonValue value = 2; + */ + public Builder setValue( + io.greptime.v1.RowData.JsonValue.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.JsonValue value = 2; + */ + public Builder mergeValue(io.greptime.v1.RowData.JsonValue value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + io.greptime.v1.RowData.JsonValue.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.JsonValue value = 2; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.JsonValue value = 2; + */ + public io.greptime.v1.RowData.JsonValue.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.JsonValue value = 2; + */ + public io.greptime.v1.RowData.JsonValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + io.greptime.v1.RowData.JsonValue.getDefaultInstance() : value_; + } + } + /** + * .greptime.v1.JsonValue value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.JsonValue, io.greptime.v1.RowData.JsonValue.Builder, io.greptime.v1.RowData.JsonValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.JsonObject.Entry) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonObject.Entry) + private static final io.greptime.v1.RowData.JsonObject.Entry DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.RowData.JsonObject.Entry(); + } + + public static io.greptime.v1.RowData.JsonObject.Entry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entry(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject.Entry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + private java.util.List entries_; + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonObject.Entry getEntries(int index) { + return entries_.get(index); + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + @java.lang.Override + public io.greptime.v1.RowData.JsonObject.EntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, entries_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.RowData.JsonObject)) { + return super.equals(obj); + } + io.greptime.v1.RowData.JsonObject other = (io.greptime.v1.RowData.JsonObject) obj; + + if (!getEntriesList() + .equals(other.getEntriesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.RowData.JsonObject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonObject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.JsonObject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.RowData.JsonObject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.JsonObject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.JsonObject) + io.greptime.v1.RowData.JsonObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.JsonObject.class, io.greptime.v1.RowData.JsonObject.Builder.class); + } + + // Construct using io.greptime.v1.RowData.JsonObject.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEntriesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.RowData.internal_static_greptime_v1_JsonObject_descriptor; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject getDefaultInstanceForType() { + return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject build() { + io.greptime.v1.RowData.JsonObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject buildPartial() { + io.greptime.v1.RowData.JsonObject result = new io.greptime.v1.RowData.JsonObject(this); + int from_bitField0_ = bitField0_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.RowData.JsonObject) { + return mergeFrom((io.greptime.v1.RowData.JsonObject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.RowData.JsonObject other) { + if (other == io.greptime.v1.RowData.JsonObject.getDefaultInstance()) return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEntriesFieldBuilder() : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.RowData.JsonObject parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.RowData.JsonObject) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.RowData.JsonObject.Entry, io.greptime.v1.RowData.JsonObject.Entry.Builder, io.greptime.v1.RowData.JsonObject.EntryOrBuilder> entriesBuilder_; + + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public io.greptime.v1.RowData.JsonObject.Entry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder setEntries( + int index, io.greptime.v1.RowData.JsonObject.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder setEntries( + int index, io.greptime.v1.RowData.JsonObject.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder addEntries(io.greptime.v1.RowData.JsonObject.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder addEntries( + int index, io.greptime.v1.RowData.JsonObject.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder addEntries( + io.greptime.v1.RowData.JsonObject.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder addEntries( + int index, io.greptime.v1.RowData.JsonObject.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public io.greptime.v1.RowData.JsonObject.Entry.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public io.greptime.v1.RowData.JsonObject.EntryOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public io.greptime.v1.RowData.JsonObject.Entry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder().addBuilder( + io.greptime.v1.RowData.JsonObject.Entry.getDefaultInstance()); + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public io.greptime.v1.RowData.JsonObject.Entry.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder().addBuilder( + index, io.greptime.v1.RowData.JsonObject.Entry.getDefaultInstance()); + } + /** + * repeated .greptime.v1.JsonObject.Entry entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.RowData.JsonObject.Entry, io.greptime.v1.RowData.JsonObject.Entry.Builder, io.greptime.v1.RowData.JsonObject.EntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.RowData.JsonObject.Entry, io.greptime.v1.RowData.JsonObject.Entry.Builder, io.greptime.v1.RowData.JsonObject.EntryOrBuilder>( + entries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + entries_ = null; + } + return entriesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.JsonObject) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.JsonObject) + private static final io.greptime.v1.RowData.JsonObject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.RowData.JsonObject(); + } + + public static io.greptime.v1.RowData.JsonObject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JsonObject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JsonObject(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.RowData.JsonObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_Rows_descriptor; private static final @@ -9260,6 +13192,26 @@ public final class RowData { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_StructValue_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_JsonValue_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_JsonValue_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_JsonList_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_JsonList_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_JsonObject_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_JsonObject_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_JsonObject_Entry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_JsonObject_Entry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -9279,7 +13231,7 @@ public final class RowData { "\022@\n\022datatype_extension\030\004 \001(\0132$.greptime." + "v1.ColumnDataTypeExtension\022+\n\007options\030\005 " + "\001(\0132\032.greptime.v1.ColumnOptions\")\n\003Row\022\"" + - "\n\006values\030\001 \003(\0132\022.greptime.v1.Value\"\306\007\n\005V" + + "\n\006values\030\001 \003(\0132\022.greptime.v1.Value\"\312\007\n\005V" + "alue\022\022\n\010i8_value\030\001 \001(\005H\000\022\023\n\ti16_value\030\002 " + "\001(\005H\000\022\023\n\ti32_value\030\003 \001(\005H\000\022\023\n\ti64_value\030" + "\004 \001(\003H\000\022\022\n\010u8_value\030\005 \001(\rH\000\022\023\n\tu16_value" + @@ -9302,13 +13254,22 @@ public final class RowData { "\n\020decimal128_value\030\037 \001(\0132\027.greptime.v1.D" + "ecimal128H\000\022,\n\nlist_value\030( \001(\0132\026.grepti" + "me.v1.ListValueH\000\0220\n\014struct_value\030) \001(\0132" + - "\030.greptime.v1.StructValueH\000\022(\n\njson_valu" + - "e\030* \001(\0132\022.greptime.v1.ValueH\000B\014\n\nvalue_d" + - "ata\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.grepti" + - "me.v1.Value\"0\n\013StructValue\022!\n\005items\030\002 \003(" + - "\0132\022.greptime.v1.ValueBP\n\016io.greptime.v1B" + - "\007RowDataZ5github.com/GreptimeTeam/grepti" + - "me-proto/go/greptime/v1b\006proto3" + "\030.greptime.v1.StructValueH\000\022,\n\njson_valu" + + "e\030* \001(\0132\026.greptime.v1.JsonValueH\000B\014\n\nval" + + "ue_data\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.gr" + + "eptime.v1.Value\"0\n\013StructValue\022!\n\005items\030" + + "\002 \003(\0132\022.greptime.v1.Value\"\271\001\n\tJsonValue\022" + + "\021\n\007boolean\030\001 \001(\010H\000\022\r\n\003int\030\002 \001(\003H\000\022\016\n\004uin" + + "t\030\003 \001(\004H\000\022\017\n\005float\030\004 \001(\001H\000\022\r\n\003str\030\005 \001(\tH" + + "\000\022&\n\005array\030\006 \001(\0132\025.greptime.v1.JsonListH" + + "\000\022)\n\006object\030\007 \001(\0132\027.greptime.v1.JsonObje" + + "ctH\000B\007\n\005value\"1\n\010JsonList\022%\n\005items\030\001 \003(\013" + + "2\026.greptime.v1.JsonValue\"y\n\nJsonObject\022." + + "\n\007entries\030\001 \003(\0132\035.greptime.v1.JsonObject" + + ".Entry\032;\n\005Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " + + "\001(\0132\026.greptime.v1.JsonValueBP\n\016io.grepti" + + "me.v1B\007RowDataZ5github.com/GreptimeTeam/" + + "greptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -9351,6 +13312,30 @@ public final class RowData { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_StructValue_descriptor, new java.lang.String[] { "Items", }); + internal_static_greptime_v1_JsonValue_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_greptime_v1_JsonValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_JsonValue_descriptor, + new java.lang.String[] { "Boolean", "Int", "Uint", "Float", "Str", "Array", "Object", "Value", }); + internal_static_greptime_v1_JsonList_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_greptime_v1_JsonList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_JsonList_descriptor, + new java.lang.String[] { "Items", }); + internal_static_greptime_v1_JsonObject_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_greptime_v1_JsonObject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_JsonObject_descriptor, + new java.lang.String[] { "Entries", }); + internal_static_greptime_v1_JsonObject_Entry_descriptor = + internal_static_greptime_v1_JsonObject_descriptor.getNestedTypes().get(0); + internal_static_greptime_v1_JsonObject_Entry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_JsonObject_Entry_descriptor, + new java.lang.String[] { "Key", "Value", }); io.greptime.v1.Common.getDescriptor(); } diff --git a/proto/greptime/v1/row.proto b/proto/greptime/v1/row.proto index a9c8664..baf5b74 100644 --- a/proto/greptime/v1/row.proto +++ b/proto/greptime/v1/row.proto @@ -79,7 +79,7 @@ message Value { ListValue list_value = 40; StructValue struct_value = 41; - Value json_value = 42; + JsonValue json_value = 42; } } @@ -90,3 +90,27 @@ message ListValue { message StructValue { repeated Value items = 2; } + +message JsonValue { + oneof value { + bool boolean = 1; + int64 int = 2; + uint64 uint = 3; + double float = 4; + string str = 5; + JsonList array = 6; + JsonObject object = 7; + } +} + +message JsonList { + repeated JsonValue items = 1; +} + +message JsonObject { + message Entry { + string key = 1; + JsonValue value = 2; + } + repeated Entry entries = 1; +}