From 69a6089933daa573c96808ec4bbc48f447ec6e8c Mon Sep 17 00:00:00 2001 From: fys <40801205+fengys1996@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:07:43 +0800 Subject: [PATCH] feat: support-for-and-keep-firing-for-trigger (#282) --- c++/greptime/v1/ddl.pb.cc | 253 +++++- c++/greptime/v1/ddl.pb.h | 342 ++++++++ go/greptime/v1/ddl.pb.go | 161 ++-- java/src/main/java/io/greptime/v1/Ddl.java | 965 ++++++++++++++++++++- proto/greptime/v1/ddl.proto | 10 + 5 files changed, 1633 insertions(+), 98 deletions(-) diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index 13db655..820f3e8 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -715,7 +715,11 @@ PROTOBUF_CONSTEXPR CreateTriggerExpr::CreateTriggerExpr( , /*decltype(_impl_.trigger_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.sql_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.raw_interval_expr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.for_raw_expr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.keep_firing_for_raw_expr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.interval_)*/nullptr + , /*decltype(_impl_.for__)*/nullptr + , /*decltype(_impl_.keep_firing_for_)*/nullptr , /*decltype(_impl_.create_if_not_exists_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct CreateTriggerExprDefaultTypeInternal { @@ -1256,6 +1260,10 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.annotations_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.interval_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.raw_interval_expr_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.for__), + PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.for_raw_expr_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.keep_firing_for_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateTriggerExpr, _impl_.keep_firing_for_raw_expr_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::NotifyChannel, _internal_metadata_), ~0u, // no _extensions_ @@ -1342,10 +1350,10 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 432, 440, -1, sizeof(::greptime::v1::CreateTriggerExpr_LabelsEntry_DoNotUse)}, { 442, 450, -1, sizeof(::greptime::v1::CreateTriggerExpr_AnnotationsEntry_DoNotUse)}, { 452, -1, -1, sizeof(::greptime::v1::CreateTriggerExpr)}, - { 467, -1, -1, sizeof(::greptime::v1::NotifyChannel)}, - { 476, 484, -1, sizeof(::greptime::v1::WebhookOptions_OptsEntry_DoNotUse)}, - { 486, -1, -1, sizeof(::greptime::v1::WebhookOptions)}, - { 494, -1, -1, sizeof(::greptime::v1::DropTriggerExpr)}, + { 471, -1, -1, sizeof(::greptime::v1::NotifyChannel)}, + { 480, 488, -1, sizeof(::greptime::v1::WebhookOptions_OptsEntry_DoNotUse)}, + { 490, -1, -1, sizeof(::greptime::v1::WebhookOptions)}, + { 498, -1, -1, sizeof(::greptime::v1::DropTriggerExpr)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -1555,8 +1563,8 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "(\0132!.greptime.v1.UnsetDatabaseOptionsH\000B" "\006\n\004kind\"G\n\022SetDatabaseOptions\0221\n\024set_dat" "abase_options\030\001 \003(\0132\023.greptime.v1.Option" - "\"$\n\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t\"\305" - "\003\n\021CreateTriggerExpr\022\024\n\014catalog_name\030\001 \001" + "\"$\n\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t\"\331" + "\004\n\021CreateTriggerExpr\022\024\n\014catalog_name\030\001 \001" "(\t\022\024\n\014trigger_name\030\002 \001(\t\022\034\n\024create_if_no" "t_exists\030\003 \001(\010\022\013\n\003sql\030\004 \001(\t\022,\n\010channels\030" "\005 \003(\0132\032.greptime.v1.NotifyChannel\022:\n\006lab" @@ -1564,23 +1572,26 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "r.LabelsEntry\022D\n\013annotations\030\007 \003(\0132/.gre" "ptime.v1.CreateTriggerExpr.AnnotationsEn" "try\022+\n\010interval\030\010 \001(\0132\031.google.protobuf." - "Duration\022\031\n\021raw_interval_expr\030\t \001(\t\032-\n\013L" - "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - "8\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - "alue\030\002 \001(\t:\0028\001\"]\n\rNotifyChannel\022\014\n\004name\030" - "\001 \001(\t\022.\n\007webhook\030\002 \001(\0132\033.greptime.v1.Web" - "hookOptionsH\000B\016\n\014channel_type\"\177\n\016Webhook" - "Options\022\013\n\003url\030\001 \001(\t\0223\n\004opts\030\002 \003(\0132%.gre" - "ptime.v1.WebhookOptions.OptsEntry\032+\n\tOpt" - "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"U" - "\n\017DropTriggerExpr\022\024\n\014catalog_name\030\001 \001(\t\022" - "\024\n\014trigger_name\030\002 \001(\t\022\026\n\016drop_if_exists\030" - "\003 \001(\010*$\n\010Analyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINES" - "E\020\001*)\n\017FulltextBackend\022\013\n\007TANTIVY\020\000\022\t\n\005B" - "LOOM\020\001*%\n\021SkippingIndexType\022\020\n\014BLOOM_FIL" - "TER\020\000BL\n\016io.greptime.v1B\003DdlZ5github.com" - "/GreptimeTeam/greptime-proto/go/greptime" - "/v1b\006proto3" + "Duration\022\031\n\021raw_interval_expr\030\t \001(\t\022&\n\003f" + "or\030\n \001(\0132\031.google.protobuf.Duration\022\024\n\014f" + "or_raw_expr\030\013 \001(\t\0222\n\017keep_firing_for\030\014 \001" + "(\0132\031.google.protobuf.Duration\022 \n\030keep_fi" + "ring_for_raw_expr\030\r \001(\t\032-\n\013LabelsEntry\022\013" + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020Annota" + "tionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + "8\001\"]\n\rNotifyChannel\022\014\n\004name\030\001 \001(\t\022.\n\007web" + "hook\030\002 \001(\0132\033.greptime.v1.WebhookOptionsH" + "\000B\016\n\014channel_type\"\177\n\016WebhookOptions\022\013\n\003u" + "rl\030\001 \001(\t\0223\n\004opts\030\002 \003(\0132%.greptime.v1.Web" + "hookOptions.OptsEntry\032+\n\tOptsEntry\022\013\n\003ke" + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"U\n\017DropTrigge" + "rExpr\022\024\n\014catalog_name\030\001 \001(\t\022\024\n\014trigger_n" + "ame\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010*$\n\010Ana" + "lyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001*)\n\017Fullt" + "extBackend\022\013\n\007TANTIVY\020\000\022\t\n\005BLOOM\020\001*%\n\021Sk" + "ippingIndexType\022\020\n\014BLOOM_FILTER\020\000BL\n\016io." + "greptime.v1B\003DdlZ5github.com/GreptimeTea" + "m/greptime-proto/go/greptime/v1b\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[2] = { &::descriptor_table_google_2fprotobuf_2fduration_2eproto, @@ -1588,7 +1599,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = { - false, false, 7051, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, + false, false, 7199, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, "greptime/v1/ddl.proto", &descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 2, 52, schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets, @@ -14973,18 +14984,40 @@ void CreateTriggerExpr_AnnotationsEntry_DoNotUse::MergeFrom(const CreateTriggerE class CreateTriggerExpr::_Internal { public: static const ::PROTOBUF_NAMESPACE_ID::Duration& interval(const CreateTriggerExpr* msg); + static const ::PROTOBUF_NAMESPACE_ID::Duration& for_(const CreateTriggerExpr* msg); + static const ::PROTOBUF_NAMESPACE_ID::Duration& keep_firing_for(const CreateTriggerExpr* msg); }; const ::PROTOBUF_NAMESPACE_ID::Duration& CreateTriggerExpr::_Internal::interval(const CreateTriggerExpr* msg) { return *msg->_impl_.interval_; } +const ::PROTOBUF_NAMESPACE_ID::Duration& +CreateTriggerExpr::_Internal::for_(const CreateTriggerExpr* msg) { + return *msg->_impl_.for__; +} +const ::PROTOBUF_NAMESPACE_ID::Duration& +CreateTriggerExpr::_Internal::keep_firing_for(const CreateTriggerExpr* msg) { + return *msg->_impl_.keep_firing_for_; +} void CreateTriggerExpr::clear_interval() { if (GetArenaForAllocation() == nullptr && _impl_.interval_ != nullptr) { delete _impl_.interval_; } _impl_.interval_ = nullptr; } +void CreateTriggerExpr::clear_for_() { + if (GetArenaForAllocation() == nullptr && _impl_.for__ != nullptr) { + delete _impl_.for__; + } + _impl_.for__ = nullptr; +} +void CreateTriggerExpr::clear_keep_firing_for() { + if (GetArenaForAllocation() == nullptr && _impl_.keep_firing_for_ != nullptr) { + delete _impl_.keep_firing_for_; + } + _impl_.keep_firing_for_ = nullptr; +} CreateTriggerExpr::CreateTriggerExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -15005,7 +15038,11 @@ CreateTriggerExpr::CreateTriggerExpr(const CreateTriggerExpr& from) , decltype(_impl_.trigger_name_){} , decltype(_impl_.sql_){} , decltype(_impl_.raw_interval_expr_){} + , decltype(_impl_.for_raw_expr_){} + , decltype(_impl_.keep_firing_for_raw_expr_){} , decltype(_impl_.interval_){nullptr} + , decltype(_impl_.for__){nullptr} + , decltype(_impl_.keep_firing_for_){nullptr} , decltype(_impl_.create_if_not_exists_){} , /*decltype(_impl_._cached_size_)*/{}}; @@ -15044,9 +15081,31 @@ CreateTriggerExpr::CreateTriggerExpr(const CreateTriggerExpr& from) _this->_impl_.raw_interval_expr_.Set(from._internal_raw_interval_expr(), _this->GetArenaForAllocation()); } + _impl_.for_raw_expr_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.for_raw_expr_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_for_raw_expr().empty()) { + _this->_impl_.for_raw_expr_.Set(from._internal_for_raw_expr(), + _this->GetArenaForAllocation()); + } + _impl_.keep_firing_for_raw_expr_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.keep_firing_for_raw_expr_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_keep_firing_for_raw_expr().empty()) { + _this->_impl_.keep_firing_for_raw_expr_.Set(from._internal_keep_firing_for_raw_expr(), + _this->GetArenaForAllocation()); + } if (from._internal_has_interval()) { _this->_impl_.interval_ = new ::PROTOBUF_NAMESPACE_ID::Duration(*from._impl_.interval_); } + if (from._internal_has_for_()) { + _this->_impl_.for__ = new ::PROTOBUF_NAMESPACE_ID::Duration(*from._impl_.for__); + } + if (from._internal_has_keep_firing_for()) { + _this->_impl_.keep_firing_for_ = new ::PROTOBUF_NAMESPACE_ID::Duration(*from._impl_.keep_firing_for_); + } _this->_impl_.create_if_not_exists_ = from._impl_.create_if_not_exists_; // @@protoc_insertion_point(copy_constructor:greptime.v1.CreateTriggerExpr) } @@ -15063,7 +15122,11 @@ inline void CreateTriggerExpr::SharedCtor( , decltype(_impl_.trigger_name_){} , decltype(_impl_.sql_){} , decltype(_impl_.raw_interval_expr_){} + , decltype(_impl_.for_raw_expr_){} + , decltype(_impl_.keep_firing_for_raw_expr_){} , decltype(_impl_.interval_){nullptr} + , decltype(_impl_.for__){nullptr} + , decltype(_impl_.keep_firing_for_){nullptr} , decltype(_impl_.create_if_not_exists_){false} , /*decltype(_impl_._cached_size_)*/{} }; @@ -15083,6 +15146,14 @@ inline void CreateTriggerExpr::SharedCtor( #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.raw_interval_expr_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.for_raw_expr_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.for_raw_expr_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.keep_firing_for_raw_expr_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.keep_firing_for_raw_expr_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } CreateTriggerExpr::~CreateTriggerExpr() { @@ -15106,7 +15177,11 @@ inline void CreateTriggerExpr::SharedDtor() { _impl_.trigger_name_.Destroy(); _impl_.sql_.Destroy(); _impl_.raw_interval_expr_.Destroy(); + _impl_.for_raw_expr_.Destroy(); + _impl_.keep_firing_for_raw_expr_.Destroy(); if (this != internal_default_instance()) delete _impl_.interval_; + if (this != internal_default_instance()) delete _impl_.for__; + if (this != internal_default_instance()) delete _impl_.keep_firing_for_; } void CreateTriggerExpr::ArenaDtor(void* object) { @@ -15131,10 +15206,20 @@ void CreateTriggerExpr::Clear() { _impl_.trigger_name_.ClearToEmpty(); _impl_.sql_.ClearToEmpty(); _impl_.raw_interval_expr_.ClearToEmpty(); + _impl_.for_raw_expr_.ClearToEmpty(); + _impl_.keep_firing_for_raw_expr_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.interval_ != nullptr) { delete _impl_.interval_; } _impl_.interval_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.for__ != nullptr) { + delete _impl_.for__; + } + _impl_.for__ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.keep_firing_for_ != nullptr) { + delete _impl_.keep_firing_for_; + } + _impl_.keep_firing_for_ = nullptr; _impl_.create_if_not_exists_ = false; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -15240,6 +15325,42 @@ const char* CreateTriggerExpr::_InternalParse(const char* ptr, ::_pbi::ParseCont } else goto handle_unusual; continue; + // .google.protobuf.Duration for = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr = ctx->ParseMessage(_internal_mutable_for_(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string for_raw_expr = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + auto str = _internal_mutable_for_raw_expr(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.CreateTriggerExpr.for_raw_expr")); + } else + goto handle_unusual; + continue; + // .google.protobuf.Duration keep_firing_for = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) { + ptr = ctx->ParseMessage(_internal_mutable_keep_firing_for(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string keep_firing_for_raw_expr = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { + auto str = _internal_mutable_keep_firing_for_raw_expr(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr")); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -15390,6 +15511,40 @@ uint8_t* CreateTriggerExpr::_InternalSerialize( 9, this->_internal_raw_interval_expr(), target); } + // .google.protobuf.Duration for = 10; + if (this->_internal_has_for_()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, _Internal::for_(this), + _Internal::for_(this).GetCachedSize(), target, stream); + } + + // string for_raw_expr = 11; + if (!this->_internal_for_raw_expr().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_for_raw_expr().data(), static_cast(this->_internal_for_raw_expr().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.CreateTriggerExpr.for_raw_expr"); + target = stream->WriteStringMaybeAliased( + 11, this->_internal_for_raw_expr(), target); + } + + // .google.protobuf.Duration keep_firing_for = 12; + if (this->_internal_has_keep_firing_for()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(12, _Internal::keep_firing_for(this), + _Internal::keep_firing_for(this).GetCachedSize(), target, stream); + } + + // string keep_firing_for_raw_expr = 13; + if (!this->_internal_keep_firing_for_raw_expr().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_keep_firing_for_raw_expr().data(), static_cast(this->_internal_keep_firing_for_raw_expr().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr"); + target = stream->WriteStringMaybeAliased( + 13, this->_internal_keep_firing_for_raw_expr(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -15459,6 +15614,20 @@ size_t CreateTriggerExpr::ByteSizeLong() const { this->_internal_raw_interval_expr()); } + // string for_raw_expr = 11; + if (!this->_internal_for_raw_expr().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_for_raw_expr()); + } + + // string keep_firing_for_raw_expr = 13; + if (!this->_internal_keep_firing_for_raw_expr().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_keep_firing_for_raw_expr()); + } + // .google.protobuf.Duration interval = 8; if (this->_internal_has_interval()) { total_size += 1 + @@ -15466,6 +15635,20 @@ size_t CreateTriggerExpr::ByteSizeLong() const { *_impl_.interval_); } + // .google.protobuf.Duration for = 10; + if (this->_internal_has_for_()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.for__); + } + + // .google.protobuf.Duration keep_firing_for = 12; + if (this->_internal_has_keep_firing_for()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.keep_firing_for_); + } + // bool create_if_not_exists = 3; if (this->_internal_create_if_not_exists() != 0) { total_size += 1 + 1; @@ -15504,10 +15687,24 @@ void CreateTriggerExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons if (!from._internal_raw_interval_expr().empty()) { _this->_internal_set_raw_interval_expr(from._internal_raw_interval_expr()); } + if (!from._internal_for_raw_expr().empty()) { + _this->_internal_set_for_raw_expr(from._internal_for_raw_expr()); + } + if (!from._internal_keep_firing_for_raw_expr().empty()) { + _this->_internal_set_keep_firing_for_raw_expr(from._internal_keep_firing_for_raw_expr()); + } if (from._internal_has_interval()) { _this->_internal_mutable_interval()->::PROTOBUF_NAMESPACE_ID::Duration::MergeFrom( from._internal_interval()); } + if (from._internal_has_for_()) { + _this->_internal_mutable_for_()->::PROTOBUF_NAMESPACE_ID::Duration::MergeFrom( + from._internal_for_()); + } + if (from._internal_has_keep_firing_for()) { + _this->_internal_mutable_keep_firing_for()->::PROTOBUF_NAMESPACE_ID::Duration::MergeFrom( + from._internal_keep_firing_for()); + } if (from._internal_create_if_not_exists() != 0) { _this->_internal_set_create_if_not_exists(from._internal_create_if_not_exists()); } @@ -15549,6 +15746,14 @@ void CreateTriggerExpr::InternalSwap(CreateTriggerExpr* other) { &_impl_.raw_interval_expr_, lhs_arena, &other->_impl_.raw_interval_expr_, rhs_arena ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.for_raw_expr_, lhs_arena, + &other->_impl_.for_raw_expr_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.keep_firing_for_raw_expr_, lhs_arena, + &other->_impl_.keep_firing_for_raw_expr_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(CreateTriggerExpr, _impl_.create_if_not_exists_) + sizeof(CreateTriggerExpr::_impl_.create_if_not_exists_) diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index 22a59e3..f563df1 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -9042,7 +9042,11 @@ class CreateTriggerExpr final : kTriggerNameFieldNumber = 2, kSqlFieldNumber = 4, kRawIntervalExprFieldNumber = 9, + kForRawExprFieldNumber = 11, + kKeepFiringForRawExprFieldNumber = 13, kIntervalFieldNumber = 8, + kForFieldNumber = 10, + kKeepFiringForFieldNumber = 12, kCreateIfNotExistsFieldNumber = 3, }; // repeated .greptime.v1.NotifyChannel channels = 5; @@ -9153,6 +9157,34 @@ class CreateTriggerExpr final : std::string* _internal_mutable_raw_interval_expr(); public: + // string for_raw_expr = 11; + void clear_for_raw_expr(); + const std::string& for_raw_expr() const; + template + void set_for_raw_expr(ArgT0&& arg0, ArgT... args); + std::string* mutable_for_raw_expr(); + PROTOBUF_NODISCARD std::string* release_for_raw_expr(); + void set_allocated_for_raw_expr(std::string* for_raw_expr); + private: + const std::string& _internal_for_raw_expr() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_for_raw_expr(const std::string& value); + std::string* _internal_mutable_for_raw_expr(); + public: + + // string keep_firing_for_raw_expr = 13; + void clear_keep_firing_for_raw_expr(); + const std::string& keep_firing_for_raw_expr() const; + template + void set_keep_firing_for_raw_expr(ArgT0&& arg0, ArgT... args); + std::string* mutable_keep_firing_for_raw_expr(); + PROTOBUF_NODISCARD std::string* release_keep_firing_for_raw_expr(); + void set_allocated_keep_firing_for_raw_expr(std::string* keep_firing_for_raw_expr); + private: + const std::string& _internal_keep_firing_for_raw_expr() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keep_firing_for_raw_expr(const std::string& value); + std::string* _internal_mutable_keep_firing_for_raw_expr(); + public: + // .google.protobuf.Duration interval = 8; bool has_interval() const; private: @@ -9171,6 +9203,42 @@ class CreateTriggerExpr final : ::PROTOBUF_NAMESPACE_ID::Duration* interval); ::PROTOBUF_NAMESPACE_ID::Duration* unsafe_arena_release_interval(); + // .google.protobuf.Duration for = 10; + bool has_for_() const; + private: + bool _internal_has_for_() const; + public: + void clear_for_(); + const ::PROTOBUF_NAMESPACE_ID::Duration& for_() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Duration* release_for_(); + ::PROTOBUF_NAMESPACE_ID::Duration* mutable_for_(); + void set_allocated_for_(::PROTOBUF_NAMESPACE_ID::Duration* for_); + private: + const ::PROTOBUF_NAMESPACE_ID::Duration& _internal_for_() const; + ::PROTOBUF_NAMESPACE_ID::Duration* _internal_mutable_for_(); + public: + void unsafe_arena_set_allocated_for_( + ::PROTOBUF_NAMESPACE_ID::Duration* for_); + ::PROTOBUF_NAMESPACE_ID::Duration* unsafe_arena_release_for_(); + + // .google.protobuf.Duration keep_firing_for = 12; + bool has_keep_firing_for() const; + private: + bool _internal_has_keep_firing_for() const; + public: + void clear_keep_firing_for(); + const ::PROTOBUF_NAMESPACE_ID::Duration& keep_firing_for() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Duration* release_keep_firing_for(); + ::PROTOBUF_NAMESPACE_ID::Duration* mutable_keep_firing_for(); + void set_allocated_keep_firing_for(::PROTOBUF_NAMESPACE_ID::Duration* keep_firing_for); + private: + const ::PROTOBUF_NAMESPACE_ID::Duration& _internal_keep_firing_for() const; + ::PROTOBUF_NAMESPACE_ID::Duration* _internal_mutable_keep_firing_for(); + public: + void unsafe_arena_set_allocated_keep_firing_for( + ::PROTOBUF_NAMESPACE_ID::Duration* keep_firing_for); + ::PROTOBUF_NAMESPACE_ID::Duration* unsafe_arena_release_keep_firing_for(); + // bool create_if_not_exists = 3; void clear_create_if_not_exists(); bool create_if_not_exists() const; @@ -9203,7 +9271,11 @@ class CreateTriggerExpr final : ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trigger_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sql_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr raw_interval_expr_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr for_raw_expr_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keep_firing_for_raw_expr_; ::PROTOBUF_NAMESPACE_ID::Duration* interval_; + ::PROTOBUF_NAMESPACE_ID::Duration* for__; + ::PROTOBUF_NAMESPACE_ID::Duration* keep_firing_for_; bool create_if_not_exists_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; @@ -18015,6 +18087,276 @@ inline void CreateTriggerExpr::set_allocated_raw_interval_expr(std::string* raw_ // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateTriggerExpr.raw_interval_expr) } +// .google.protobuf.Duration for = 10; +inline bool CreateTriggerExpr::_internal_has_for_() const { + return this != internal_default_instance() && _impl_.for__ != nullptr; +} +inline bool CreateTriggerExpr::has_for_() const { + return _internal_has_for_(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Duration& CreateTriggerExpr::_internal_for_() const { + const ::PROTOBUF_NAMESPACE_ID::Duration* p = _impl_.for__; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Duration_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Duration& CreateTriggerExpr::for_() const { + // @@protoc_insertion_point(field_get:greptime.v1.CreateTriggerExpr.for) + return _internal_for_(); +} +inline void CreateTriggerExpr::unsafe_arena_set_allocated_for_( + ::PROTOBUF_NAMESPACE_ID::Duration* for_) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.for__); + } + _impl_.for__ = for_; + if (for_) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.CreateTriggerExpr.for) +} +inline ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::release_for_() { + + ::PROTOBUF_NAMESPACE_ID::Duration* temp = _impl_.for__; + _impl_.for__ = 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 ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::unsafe_arena_release_for_() { + // @@protoc_insertion_point(field_release:greptime.v1.CreateTriggerExpr.for) + + ::PROTOBUF_NAMESPACE_ID::Duration* temp = _impl_.for__; + _impl_.for__ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::_internal_mutable_for_() { + + if (_impl_.for__ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Duration>(GetArenaForAllocation()); + _impl_.for__ = p; + } + return _impl_.for__; +} +inline ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::mutable_for_() { + ::PROTOBUF_NAMESPACE_ID::Duration* _msg = _internal_mutable_for_(); + // @@protoc_insertion_point(field_mutable:greptime.v1.CreateTriggerExpr.for) + return _msg; +} +inline void CreateTriggerExpr::set_allocated_for_(::PROTOBUF_NAMESPACE_ID::Duration* for_) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.for__); + } + if (for_) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(for_)); + if (message_arena != submessage_arena) { + for_ = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, for_, submessage_arena); + } + + } else { + + } + _impl_.for__ = for_; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateTriggerExpr.for) +} + +// string for_raw_expr = 11; +inline void CreateTriggerExpr::clear_for_raw_expr() { + _impl_.for_raw_expr_.ClearToEmpty(); +} +inline const std::string& CreateTriggerExpr::for_raw_expr() const { + // @@protoc_insertion_point(field_get:greptime.v1.CreateTriggerExpr.for_raw_expr) + return _internal_for_raw_expr(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateTriggerExpr::set_for_raw_expr(ArgT0&& arg0, ArgT... args) { + + _impl_.for_raw_expr_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.CreateTriggerExpr.for_raw_expr) +} +inline std::string* CreateTriggerExpr::mutable_for_raw_expr() { + std::string* _s = _internal_mutable_for_raw_expr(); + // @@protoc_insertion_point(field_mutable:greptime.v1.CreateTriggerExpr.for_raw_expr) + return _s; +} +inline const std::string& CreateTriggerExpr::_internal_for_raw_expr() const { + return _impl_.for_raw_expr_.Get(); +} +inline void CreateTriggerExpr::_internal_set_for_raw_expr(const std::string& value) { + + _impl_.for_raw_expr_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateTriggerExpr::_internal_mutable_for_raw_expr() { + + return _impl_.for_raw_expr_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateTriggerExpr::release_for_raw_expr() { + // @@protoc_insertion_point(field_release:greptime.v1.CreateTriggerExpr.for_raw_expr) + return _impl_.for_raw_expr_.Release(); +} +inline void CreateTriggerExpr::set_allocated_for_raw_expr(std::string* for_raw_expr) { + if (for_raw_expr != nullptr) { + + } else { + + } + _impl_.for_raw_expr_.SetAllocated(for_raw_expr, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.for_raw_expr_.IsDefault()) { + _impl_.for_raw_expr_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateTriggerExpr.for_raw_expr) +} + +// .google.protobuf.Duration keep_firing_for = 12; +inline bool CreateTriggerExpr::_internal_has_keep_firing_for() const { + return this != internal_default_instance() && _impl_.keep_firing_for_ != nullptr; +} +inline bool CreateTriggerExpr::has_keep_firing_for() const { + return _internal_has_keep_firing_for(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Duration& CreateTriggerExpr::_internal_keep_firing_for() const { + const ::PROTOBUF_NAMESPACE_ID::Duration* p = _impl_.keep_firing_for_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Duration_default_instance_); +} +inline const ::PROTOBUF_NAMESPACE_ID::Duration& CreateTriggerExpr::keep_firing_for() const { + // @@protoc_insertion_point(field_get:greptime.v1.CreateTriggerExpr.keep_firing_for) + return _internal_keep_firing_for(); +} +inline void CreateTriggerExpr::unsafe_arena_set_allocated_keep_firing_for( + ::PROTOBUF_NAMESPACE_ID::Duration* keep_firing_for) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.keep_firing_for_); + } + _impl_.keep_firing_for_ = keep_firing_for; + if (keep_firing_for) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.CreateTriggerExpr.keep_firing_for) +} +inline ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::release_keep_firing_for() { + + ::PROTOBUF_NAMESPACE_ID::Duration* temp = _impl_.keep_firing_for_; + _impl_.keep_firing_for_ = 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 ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::unsafe_arena_release_keep_firing_for() { + // @@protoc_insertion_point(field_release:greptime.v1.CreateTriggerExpr.keep_firing_for) + + ::PROTOBUF_NAMESPACE_ID::Duration* temp = _impl_.keep_firing_for_; + _impl_.keep_firing_for_ = nullptr; + return temp; +} +inline ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::_internal_mutable_keep_firing_for() { + + if (_impl_.keep_firing_for_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Duration>(GetArenaForAllocation()); + _impl_.keep_firing_for_ = p; + } + return _impl_.keep_firing_for_; +} +inline ::PROTOBUF_NAMESPACE_ID::Duration* CreateTriggerExpr::mutable_keep_firing_for() { + ::PROTOBUF_NAMESPACE_ID::Duration* _msg = _internal_mutable_keep_firing_for(); + // @@protoc_insertion_point(field_mutable:greptime.v1.CreateTriggerExpr.keep_firing_for) + return _msg; +} +inline void CreateTriggerExpr::set_allocated_keep_firing_for(::PROTOBUF_NAMESPACE_ID::Duration* keep_firing_for) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.keep_firing_for_); + } + if (keep_firing_for) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(keep_firing_for)); + if (message_arena != submessage_arena) { + keep_firing_for = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, keep_firing_for, submessage_arena); + } + + } else { + + } + _impl_.keep_firing_for_ = keep_firing_for; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateTriggerExpr.keep_firing_for) +} + +// string keep_firing_for_raw_expr = 13; +inline void CreateTriggerExpr::clear_keep_firing_for_raw_expr() { + _impl_.keep_firing_for_raw_expr_.ClearToEmpty(); +} +inline const std::string& CreateTriggerExpr::keep_firing_for_raw_expr() const { + // @@protoc_insertion_point(field_get:greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr) + return _internal_keep_firing_for_raw_expr(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateTriggerExpr::set_keep_firing_for_raw_expr(ArgT0&& arg0, ArgT... args) { + + _impl_.keep_firing_for_raw_expr_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr) +} +inline std::string* CreateTriggerExpr::mutable_keep_firing_for_raw_expr() { + std::string* _s = _internal_mutable_keep_firing_for_raw_expr(); + // @@protoc_insertion_point(field_mutable:greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr) + return _s; +} +inline const std::string& CreateTriggerExpr::_internal_keep_firing_for_raw_expr() const { + return _impl_.keep_firing_for_raw_expr_.Get(); +} +inline void CreateTriggerExpr::_internal_set_keep_firing_for_raw_expr(const std::string& value) { + + _impl_.keep_firing_for_raw_expr_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateTriggerExpr::_internal_mutable_keep_firing_for_raw_expr() { + + return _impl_.keep_firing_for_raw_expr_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateTriggerExpr::release_keep_firing_for_raw_expr() { + // @@protoc_insertion_point(field_release:greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr) + return _impl_.keep_firing_for_raw_expr_.Release(); +} +inline void CreateTriggerExpr::set_allocated_keep_firing_for_raw_expr(std::string* keep_firing_for_raw_expr) { + if (keep_firing_for_raw_expr != nullptr) { + + } else { + + } + _impl_.keep_firing_for_raw_expr_.SetAllocated(keep_firing_for_raw_expr, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.keep_firing_for_raw_expr_.IsDefault()) { + _impl_.keep_firing_for_raw_expr_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateTriggerExpr.keep_firing_for_raw_expr) +} + // ------------------------------------------------------------------- // NotifyChannel diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index b37c3ff..de305e8 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -3301,6 +3301,16 @@ type CreateTriggerExpr struct { Interval *durationpb.Duration `protobuf:"bytes,8,opt,name=interval,proto3" json:"interval,omitempty"` // The raw interval expression, e.g., '1 minute'::INTERVAL. RawIntervalExpr string `protobuf:"bytes,9,opt,name=raw_interval_expr,json=rawIntervalExpr,proto3" json:"raw_interval_expr,omitempty"` + // The duration that the condition must be met continuously before firing the + // trigger. + For *durationpb.Duration `protobuf:"bytes,10,opt,name=for,proto3" json:"for,omitempty"` + // The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL. + ForRawExpr string `protobuf:"bytes,11,opt,name=for_raw_expr,json=forRawExpr,proto3" json:"for_raw_expr,omitempty"` + // The duration to keep firing after the condition is no longer met. + KeepFiringFor *durationpb.Duration `protobuf:"bytes,12,opt,name=keep_firing_for,json=keepFiringFor,proto3" json:"keep_firing_for,omitempty"` + // The raw SQL expression for 'keep_firing_for' duration, e.g., + // '10 minutes'::INTERVAL. + KeepFiringForRawExpr string `protobuf:"bytes,13,opt,name=keep_firing_for_raw_expr,json=keepFiringForRawExpr,proto3" json:"keep_firing_for_raw_expr,omitempty"` } func (x *CreateTriggerExpr) Reset() { @@ -3398,6 +3408,34 @@ func (x *CreateTriggerExpr) GetRawIntervalExpr() string { return "" } +func (x *CreateTriggerExpr) GetFor() *durationpb.Duration { + if x != nil { + return x.For + } + return nil +} + +func (x *CreateTriggerExpr) GetForRawExpr() string { + if x != nil { + return x.ForRawExpr + } + return "" +} + +func (x *CreateTriggerExpr) GetKeepFiringFor() *durationpb.Duration { + if x != nil { + return x.KeepFiringFor + } + return nil +} + +func (x *CreateTriggerExpr) GetKeepFiringForRawExpr() string { + if x != nil { + return x.KeepFiringForRawExpr + } + return "" +} + // The notification channel for trigger. type NotifyChannel struct { state protoimpl.MessageState @@ -4090,7 +4128,7 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xc9, 0x04, 0x0a, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x93, 0x06, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, @@ -4119,52 +4157,65 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x61, - 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x1a, 0x39, 0x0a, - 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, - 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, - 0x68, 0x6f, 0x6f, 0x6b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x07, 0x77, - 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x68, 0x6f, - 0x6f, 0x6b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x39, 0x0a, 0x04, 0x6f, - 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x7d, 0x0a, 0x0f, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, - 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, - 0x5f, 0x69, 0x66, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x66, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2a, 0x24, - 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, - 0x47, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x48, 0x49, 0x4e, 0x45, - 0x53, 0x45, 0x10, 0x01, 0x2a, 0x29, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x74, 0x65, 0x78, 0x74, - 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x41, 0x4e, 0x54, 0x49, - 0x56, 0x59, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x4c, 0x4f, 0x4f, 0x4d, 0x10, 0x01, 0x2a, - 0x25, 0x0a, 0x11, 0x53, 0x6b, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4c, 0x4f, 0x4f, 0x4d, 0x5f, 0x46, 0x49, - 0x4c, 0x54, 0x45, 0x52, 0x10, 0x00, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 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, + 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x2b, 0x0a, + 0x03, 0x66, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x66, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x6f, + 0x72, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x52, 0x61, 0x77, 0x45, 0x78, 0x70, 0x72, 0x12, 0x41, 0x0a, 0x0f, + 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x66, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x12, + 0x36, 0x0a, 0x18, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x66, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x6b, 0x65, 0x65, 0x70, 0x46, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, + 0x52, 0x61, 0x77, 0x45, 0x78, 0x70, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x42, 0x0e, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x39, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, + 0x1a, 0x37, 0x0a, 0x09, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7d, 0x0a, 0x0f, 0x44, 0x72, 0x6f, + 0x70, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, + 0x49, 0x66, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2a, 0x24, 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, + 0x79, 0x7a, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x47, 0x4c, 0x49, 0x53, 0x48, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x48, 0x49, 0x4e, 0x45, 0x53, 0x45, 0x10, 0x01, 0x2a, 0x29, + 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x74, 0x65, 0x78, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x41, 0x4e, 0x54, 0x49, 0x56, 0x59, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x42, 0x4c, 0x4f, 0x4f, 0x4d, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x11, 0x53, 0x6b, 0x69, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, + 0x0a, 0x0c, 0x42, 0x4c, 0x4f, 0x4f, 0x4d, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x10, 0x00, + 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 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 ( @@ -4319,13 +4370,15 @@ var file_greptime_v1_ddl_proto_depIdxs = []int32{ 53, // 67: greptime.v1.CreateTriggerExpr.labels:type_name -> greptime.v1.CreateTriggerExpr.LabelsEntry 54, // 68: greptime.v1.CreateTriggerExpr.annotations:type_name -> greptime.v1.CreateTriggerExpr.AnnotationsEntry 64, // 69: greptime.v1.CreateTriggerExpr.interval:type_name -> google.protobuf.Duration - 48, // 70: greptime.v1.NotifyChannel.webhook:type_name -> greptime.v1.WebhookOptions - 55, // 71: greptime.v1.WebhookOptions.opts:type_name -> greptime.v1.WebhookOptions.OptsEntry - 72, // [72:72] is the sub-list for method output_type - 72, // [72:72] is the sub-list for method input_type - 72, // [72:72] is the sub-list for extension type_name - 72, // [72:72] is the sub-list for extension extendee - 0, // [0:72] is the sub-list for field type_name + 64, // 70: greptime.v1.CreateTriggerExpr.for:type_name -> google.protobuf.Duration + 64, // 71: greptime.v1.CreateTriggerExpr.keep_firing_for:type_name -> google.protobuf.Duration + 48, // 72: greptime.v1.NotifyChannel.webhook:type_name -> greptime.v1.WebhookOptions + 55, // 73: greptime.v1.WebhookOptions.opts:type_name -> greptime.v1.WebhookOptions.OptsEntry + 74, // [74:74] is the sub-list for method output_type + 74, // [74:74] is the sub-list for method input_type + 74, // [74:74] is the sub-list for extension type_name + 74, // [74:74] is the sub-list for extension extendee + 0, // [0:74] is the sub-list for field type_name } func init() { file_greptime_v1_ddl_proto_init() } diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index d2dca36..a465d30 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -45406,6 +45406,105 @@ java.lang.String defaultValue); */ com.google.protobuf.ByteString getRawIntervalExprBytes(); + + /** + *
+     * The duration that the condition must be met continuously before firing the
+     * trigger.
+     * 
+ * + * .google.protobuf.Duration for = 10; + * @return Whether the for field is set. + */ + boolean hasFor(); + /** + *
+     * The duration that the condition must be met continuously before firing the
+     * trigger.
+     * 
+ * + * .google.protobuf.Duration for = 10; + * @return The for. + */ + com.google.protobuf.Duration getFor(); + /** + *
+     * The duration that the condition must be met continuously before firing the
+     * trigger.
+     * 
+ * + * .google.protobuf.Duration for = 10; + */ + com.google.protobuf.DurationOrBuilder getForOrBuilder(); + + /** + *
+     * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+     * 
+ * + * string for_raw_expr = 11; + * @return The forRawExpr. + */ + java.lang.String getForRawExpr(); + /** + *
+     * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+     * 
+ * + * string for_raw_expr = 11; + * @return The bytes for forRawExpr. + */ + com.google.protobuf.ByteString + getForRawExprBytes(); + + /** + *
+     * The duration to keep firing after the condition is no longer met.
+     * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + * @return Whether the keepFiringFor field is set. + */ + boolean hasKeepFiringFor(); + /** + *
+     * The duration to keep firing after the condition is no longer met.
+     * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + * @return The keepFiringFor. + */ + com.google.protobuf.Duration getKeepFiringFor(); + /** + *
+     * The duration to keep firing after the condition is no longer met.
+     * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + com.google.protobuf.DurationOrBuilder getKeepFiringForOrBuilder(); + + /** + *
+     * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+     * '10 minutes'::INTERVAL.
+     * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return The keepFiringForRawExpr. + */ + java.lang.String getKeepFiringForRawExpr(); + /** + *
+     * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+     * '10 minutes'::INTERVAL.
+     * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return The bytes for keepFiringForRawExpr. + */ + com.google.protobuf.ByteString + getKeepFiringForRawExprBytes(); } /** *
@@ -45429,6 +45528,8 @@ java.lang.String defaultValue);
       sql_ = "";
       channels_ = java.util.Collections.emptyList();
       rawIntervalExpr_ = "";
+      forRawExpr_ = "";
+      keepFiringForRawExpr_ = "";
     }
 
     @java.lang.Override
@@ -45539,6 +45640,44 @@ java.lang.String defaultValue);
               rawIntervalExpr_ = s;
               break;
             }
+            case 82: {
+              com.google.protobuf.Duration.Builder subBuilder = null;
+              if (for_ != null) {
+                subBuilder = for_.toBuilder();
+              }
+              for_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(for_);
+                for_ = subBuilder.buildPartial();
+              }
+
+              break;
+            }
+            case 90: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              forRawExpr_ = s;
+              break;
+            }
+            case 98: {
+              com.google.protobuf.Duration.Builder subBuilder = null;
+              if (keepFiringFor_ != null) {
+                subBuilder = keepFiringFor_.toBuilder();
+              }
+              keepFiringFor_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(keepFiringFor_);
+                keepFiringFor_ = subBuilder.buildPartial();
+              }
+
+              break;
+            }
+            case 106: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              keepFiringForRawExpr_ = s;
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -46049,6 +46188,179 @@ java.lang.String defaultValue);
       }
     }
 
+    public static final int FOR_FIELD_NUMBER = 10;
+    private com.google.protobuf.Duration for_;
+    /**
+     * 
+     * The duration that the condition must be met continuously before firing the
+     * trigger.
+     * 
+ * + * .google.protobuf.Duration for = 10; + * @return Whether the for field is set. + */ + @java.lang.Override + public boolean hasFor() { + return for_ != null; + } + /** + *
+     * The duration that the condition must be met continuously before firing the
+     * trigger.
+     * 
+ * + * .google.protobuf.Duration for = 10; + * @return The for. + */ + @java.lang.Override + public com.google.protobuf.Duration getFor() { + return for_ == null ? com.google.protobuf.Duration.getDefaultInstance() : for_; + } + /** + *
+     * The duration that the condition must be met continuously before firing the
+     * trigger.
+     * 
+ * + * .google.protobuf.Duration for = 10; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getForOrBuilder() { + return getFor(); + } + + public static final int FOR_RAW_EXPR_FIELD_NUMBER = 11; + private volatile java.lang.Object forRawExpr_; + /** + *
+     * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+     * 
+ * + * string for_raw_expr = 11; + * @return The forRawExpr. + */ + @java.lang.Override + public java.lang.String getForRawExpr() { + java.lang.Object ref = forRawExpr_; + 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(); + forRawExpr_ = s; + return s; + } + } + /** + *
+     * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+     * 
+ * + * string for_raw_expr = 11; + * @return The bytes for forRawExpr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getForRawExprBytes() { + java.lang.Object ref = forRawExpr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + forRawExpr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEEP_FIRING_FOR_FIELD_NUMBER = 12; + private com.google.protobuf.Duration keepFiringFor_; + /** + *
+     * The duration to keep firing after the condition is no longer met.
+     * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + * @return Whether the keepFiringFor field is set. + */ + @java.lang.Override + public boolean hasKeepFiringFor() { + return keepFiringFor_ != null; + } + /** + *
+     * The duration to keep firing after the condition is no longer met.
+     * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + * @return The keepFiringFor. + */ + @java.lang.Override + public com.google.protobuf.Duration getKeepFiringFor() { + return keepFiringFor_ == null ? com.google.protobuf.Duration.getDefaultInstance() : keepFiringFor_; + } + /** + *
+     * The duration to keep firing after the condition is no longer met.
+     * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getKeepFiringForOrBuilder() { + return getKeepFiringFor(); + } + + public static final int KEEP_FIRING_FOR_RAW_EXPR_FIELD_NUMBER = 13; + private volatile java.lang.Object keepFiringForRawExpr_; + /** + *
+     * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+     * '10 minutes'::INTERVAL.
+     * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return The keepFiringForRawExpr. + */ + @java.lang.Override + public java.lang.String getKeepFiringForRawExpr() { + java.lang.Object ref = keepFiringForRawExpr_; + 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(); + keepFiringForRawExpr_ = s; + return s; + } + } + /** + *
+     * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+     * '10 minutes'::INTERVAL.
+     * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return The bytes for keepFiringForRawExpr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeepFiringForRawExprBytes() { + java.lang.Object ref = keepFiringForRawExpr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keepFiringForRawExpr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -46096,6 +46408,18 @@ java.lang.String defaultValue); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawIntervalExpr_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, rawIntervalExpr_); } + if (for_ != null) { + output.writeMessage(10, getFor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forRawExpr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, forRawExpr_); + } + if (keepFiringFor_ != null) { + output.writeMessage(12, getKeepFiringFor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keepFiringForRawExpr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, keepFiringForRawExpr_); + } unknownFields.writeTo(output); } @@ -46149,6 +46473,20 @@ java.lang.String defaultValue); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawIntervalExpr_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, rawIntervalExpr_); } + if (for_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getFor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forRawExpr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, forRawExpr_); + } + if (keepFiringFor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getKeepFiringFor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keepFiringForRawExpr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, keepFiringForRawExpr_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -46185,6 +46523,20 @@ java.lang.String defaultValue); } if (!getRawIntervalExpr() .equals(other.getRawIntervalExpr())) return false; + if (hasFor() != other.hasFor()) return false; + if (hasFor()) { + if (!getFor() + .equals(other.getFor())) return false; + } + if (!getForRawExpr() + .equals(other.getForRawExpr())) return false; + if (hasKeepFiringFor() != other.hasKeepFiringFor()) return false; + if (hasKeepFiringFor()) { + if (!getKeepFiringFor() + .equals(other.getKeepFiringFor())) return false; + } + if (!getKeepFiringForRawExpr() + .equals(other.getKeepFiringForRawExpr())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -46223,6 +46575,18 @@ java.lang.String defaultValue); } hash = (37 * hash) + RAW_INTERVAL_EXPR_FIELD_NUMBER; hash = (53 * hash) + getRawIntervalExpr().hashCode(); + if (hasFor()) { + hash = (37 * hash) + FOR_FIELD_NUMBER; + hash = (53 * hash) + getFor().hashCode(); + } + hash = (37 * hash) + FOR_RAW_EXPR_FIELD_NUMBER; + hash = (53 * hash) + getForRawExpr().hashCode(); + if (hasKeepFiringFor()) { + hash = (37 * hash) + KEEP_FIRING_FOR_FIELD_NUMBER; + hash = (53 * hash) + getKeepFiringFor().hashCode(); + } + hash = (37 * hash) + KEEP_FIRING_FOR_RAW_EXPR_FIELD_NUMBER; + hash = (53 * hash) + getKeepFiringForRawExpr().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -46411,6 +46775,22 @@ java.lang.String defaultValue); } rawIntervalExpr_ = ""; + if (forBuilder_ == null) { + for_ = null; + } else { + for_ = null; + forBuilder_ = null; + } + forRawExpr_ = ""; + + if (keepFiringForBuilder_ == null) { + keepFiringFor_ = null; + } else { + keepFiringFor_ = null; + keepFiringForBuilder_ = null; + } + keepFiringForRawExpr_ = ""; + return this; } @@ -46461,6 +46841,18 @@ java.lang.String defaultValue); result.interval_ = intervalBuilder_.build(); } result.rawIntervalExpr_ = rawIntervalExpr_; + if (forBuilder_ == null) { + result.for_ = for_; + } else { + result.for_ = forBuilder_.build(); + } + result.forRawExpr_ = forRawExpr_; + if (keepFiringForBuilder_ == null) { + result.keepFiringFor_ = keepFiringFor_; + } else { + result.keepFiringFor_ = keepFiringForBuilder_.build(); + } + result.keepFiringForRawExpr_ = keepFiringForRawExpr_; onBuilt(); return result; } @@ -46561,6 +46953,20 @@ java.lang.String defaultValue); rawIntervalExpr_ = other.rawIntervalExpr_; onChanged(); } + if (other.hasFor()) { + mergeFor(other.getFor()); + } + if (!other.getForRawExpr().isEmpty()) { + forRawExpr_ = other.forRawExpr_; + onChanged(); + } + if (other.hasKeepFiringFor()) { + mergeKeepFiringFor(other.getKeepFiringFor()); + } + if (!other.getKeepFiringForRawExpr().isEmpty()) { + keepFiringForRawExpr_ = other.keepFiringForRawExpr_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -47714,6 +48120,522 @@ java.lang.String defaultValue); onChanged(); return this; } + + private com.google.protobuf.Duration for_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> forBuilder_; + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + * @return Whether the for field is set. + */ + public boolean hasFor() { + return forBuilder_ != null || for_ != null; + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + * @return The for. + */ + public com.google.protobuf.Duration getFor() { + if (forBuilder_ == null) { + return for_ == null ? com.google.protobuf.Duration.getDefaultInstance() : for_; + } else { + return forBuilder_.getMessage(); + } + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + public Builder setFor(com.google.protobuf.Duration value) { + if (forBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + for_ = value; + onChanged(); + } else { + forBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + public Builder setFor( + com.google.protobuf.Duration.Builder builderForValue) { + if (forBuilder_ == null) { + for_ = builderForValue.build(); + onChanged(); + } else { + forBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + public Builder mergeFor(com.google.protobuf.Duration value) { + if (forBuilder_ == null) { + if (for_ != null) { + for_ = + com.google.protobuf.Duration.newBuilder(for_).mergeFrom(value).buildPartial(); + } else { + for_ = value; + } + onChanged(); + } else { + forBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + public Builder clearFor() { + if (forBuilder_ == null) { + for_ = null; + onChanged(); + } else { + for_ = null; + forBuilder_ = null; + } + + return this; + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + public com.google.protobuf.Duration.Builder getForBuilder() { + + onChanged(); + return getForFieldBuilder().getBuilder(); + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + public com.google.protobuf.DurationOrBuilder getForOrBuilder() { + if (forBuilder_ != null) { + return forBuilder_.getMessageOrBuilder(); + } else { + return for_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : for_; + } + } + /** + *
+       * The duration that the condition must be met continuously before firing the
+       * trigger.
+       * 
+ * + * .google.protobuf.Duration for = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getForFieldBuilder() { + if (forBuilder_ == null) { + forBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getFor(), + getParentForChildren(), + isClean()); + for_ = null; + } + return forBuilder_; + } + + private java.lang.Object forRawExpr_ = ""; + /** + *
+       * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+       * 
+ * + * string for_raw_expr = 11; + * @return The forRawExpr. + */ + public java.lang.String getForRawExpr() { + java.lang.Object ref = forRawExpr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + forRawExpr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+       * 
+ * + * string for_raw_expr = 11; + * @return The bytes for forRawExpr. + */ + public com.google.protobuf.ByteString + getForRawExprBytes() { + java.lang.Object ref = forRawExpr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + forRawExpr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+       * 
+ * + * string for_raw_expr = 11; + * @param value The forRawExpr to set. + * @return This builder for chaining. + */ + public Builder setForRawExpr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + forRawExpr_ = value; + onChanged(); + return this; + } + /** + *
+       * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+       * 
+ * + * string for_raw_expr = 11; + * @return This builder for chaining. + */ + public Builder clearForRawExpr() { + + forRawExpr_ = getDefaultInstance().getForRawExpr(); + onChanged(); + return this; + } + /** + *
+       * The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL.
+       * 
+ * + * string for_raw_expr = 11; + * @param value The bytes for forRawExpr to set. + * @return This builder for chaining. + */ + public Builder setForRawExprBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + forRawExpr_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration keepFiringFor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> keepFiringForBuilder_; + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + * @return Whether the keepFiringFor field is set. + */ + public boolean hasKeepFiringFor() { + return keepFiringForBuilder_ != null || keepFiringFor_ != null; + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + * @return The keepFiringFor. + */ + public com.google.protobuf.Duration getKeepFiringFor() { + if (keepFiringForBuilder_ == null) { + return keepFiringFor_ == null ? com.google.protobuf.Duration.getDefaultInstance() : keepFiringFor_; + } else { + return keepFiringForBuilder_.getMessage(); + } + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + public Builder setKeepFiringFor(com.google.protobuf.Duration value) { + if (keepFiringForBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keepFiringFor_ = value; + onChanged(); + } else { + keepFiringForBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + public Builder setKeepFiringFor( + com.google.protobuf.Duration.Builder builderForValue) { + if (keepFiringForBuilder_ == null) { + keepFiringFor_ = builderForValue.build(); + onChanged(); + } else { + keepFiringForBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + public Builder mergeKeepFiringFor(com.google.protobuf.Duration value) { + if (keepFiringForBuilder_ == null) { + if (keepFiringFor_ != null) { + keepFiringFor_ = + com.google.protobuf.Duration.newBuilder(keepFiringFor_).mergeFrom(value).buildPartial(); + } else { + keepFiringFor_ = value; + } + onChanged(); + } else { + keepFiringForBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + public Builder clearKeepFiringFor() { + if (keepFiringForBuilder_ == null) { + keepFiringFor_ = null; + onChanged(); + } else { + keepFiringFor_ = null; + keepFiringForBuilder_ = null; + } + + return this; + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + public com.google.protobuf.Duration.Builder getKeepFiringForBuilder() { + + onChanged(); + return getKeepFiringForFieldBuilder().getBuilder(); + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + public com.google.protobuf.DurationOrBuilder getKeepFiringForOrBuilder() { + if (keepFiringForBuilder_ != null) { + return keepFiringForBuilder_.getMessageOrBuilder(); + } else { + return keepFiringFor_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : keepFiringFor_; + } + } + /** + *
+       * The duration to keep firing after the condition is no longer met.
+       * 
+ * + * .google.protobuf.Duration keep_firing_for = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getKeepFiringForFieldBuilder() { + if (keepFiringForBuilder_ == null) { + keepFiringForBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getKeepFiringFor(), + getParentForChildren(), + isClean()); + keepFiringFor_ = null; + } + return keepFiringForBuilder_; + } + + private java.lang.Object keepFiringForRawExpr_ = ""; + /** + *
+       * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+       * '10 minutes'::INTERVAL.
+       * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return The keepFiringForRawExpr. + */ + public java.lang.String getKeepFiringForRawExpr() { + java.lang.Object ref = keepFiringForRawExpr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keepFiringForRawExpr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+       * '10 minutes'::INTERVAL.
+       * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return The bytes for keepFiringForRawExpr. + */ + public com.google.protobuf.ByteString + getKeepFiringForRawExprBytes() { + java.lang.Object ref = keepFiringForRawExpr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keepFiringForRawExpr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+       * '10 minutes'::INTERVAL.
+       * 
+ * + * string keep_firing_for_raw_expr = 13; + * @param value The keepFiringForRawExpr to set. + * @return This builder for chaining. + */ + public Builder setKeepFiringForRawExpr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keepFiringForRawExpr_ = value; + onChanged(); + return this; + } + /** + *
+       * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+       * '10 minutes'::INTERVAL.
+       * 
+ * + * string keep_firing_for_raw_expr = 13; + * @return This builder for chaining. + */ + public Builder clearKeepFiringForRawExpr() { + + keepFiringForRawExpr_ = getDefaultInstance().getKeepFiringForRawExpr(); + onChanged(); + return this; + } + /** + *
+       * The raw SQL expression for 'keep_firing_for' duration, e.g.,
+       * '10 minutes'::INTERVAL.
+       * 
+ * + * string keep_firing_for_raw_expr = 13; + * @param value The bytes for keepFiringForRawExpr to set. + * @return This builder for chaining. + */ + public Builder setKeepFiringForRawExprBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keepFiringForRawExpr_ = value; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -50760,8 +51682,8 @@ java.lang.String defaultValue); "(\0132!.greptime.v1.UnsetDatabaseOptionsH\000B" + "\006\n\004kind\"G\n\022SetDatabaseOptions\0221\n\024set_dat" + "abase_options\030\001 \003(\0132\023.greptime.v1.Option" + - "\"$\n\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t\"\305" + - "\003\n\021CreateTriggerExpr\022\024\n\014catalog_name\030\001 \001" + + "\"$\n\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t\"\331" + + "\004\n\021CreateTriggerExpr\022\024\n\014catalog_name\030\001 \001" + "(\t\022\024\n\014trigger_name\030\002 \001(\t\022\034\n\024create_if_no" + "t_exists\030\003 \001(\010\022\013\n\003sql\030\004 \001(\t\022,\n\010channels\030" + "\005 \003(\0132\032.greptime.v1.NotifyChannel\022:\n\006lab" + @@ -50769,23 +51691,26 @@ java.lang.String defaultValue); "r.LabelsEntry\022D\n\013annotations\030\007 \003(\0132/.gre" + "ptime.v1.CreateTriggerExpr.AnnotationsEn" + "try\022+\n\010interval\030\010 \001(\0132\031.google.protobuf." + - "Duration\022\031\n\021raw_interval_expr\030\t \001(\t\032-\n\013L" + - "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + - "8\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + - "alue\030\002 \001(\t:\0028\001\"]\n\rNotifyChannel\022\014\n\004name\030" + - "\001 \001(\t\022.\n\007webhook\030\002 \001(\0132\033.greptime.v1.Web" + - "hookOptionsH\000B\016\n\014channel_type\"\177\n\016Webhook" + - "Options\022\013\n\003url\030\001 \001(\t\0223\n\004opts\030\002 \003(\0132%.gre" + - "ptime.v1.WebhookOptions.OptsEntry\032+\n\tOpt" + - "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"U" + - "\n\017DropTriggerExpr\022\024\n\014catalog_name\030\001 \001(\t\022" + - "\024\n\014trigger_name\030\002 \001(\t\022\026\n\016drop_if_exists\030" + - "\003 \001(\010*$\n\010Analyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINES" + - "E\020\001*)\n\017FulltextBackend\022\013\n\007TANTIVY\020\000\022\t\n\005B" + - "LOOM\020\001*%\n\021SkippingIndexType\022\020\n\014BLOOM_FIL" + - "TER\020\000BL\n\016io.greptime.v1B\003DdlZ5github.com" + - "/GreptimeTeam/greptime-proto/go/greptime" + - "/v1b\006proto3" + "Duration\022\031\n\021raw_interval_expr\030\t \001(\t\022&\n\003f" + + "or\030\n \001(\0132\031.google.protobuf.Duration\022\024\n\014f" + + "or_raw_expr\030\013 \001(\t\0222\n\017keep_firing_for\030\014 \001" + + "(\0132\031.google.protobuf.Duration\022 \n\030keep_fi" + + "ring_for_raw_expr\030\r \001(\t\032-\n\013LabelsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020Annota" + + "tionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"]\n\rNotifyChannel\022\014\n\004name\030\001 \001(\t\022.\n\007web" + + "hook\030\002 \001(\0132\033.greptime.v1.WebhookOptionsH" + + "\000B\016\n\014channel_type\"\177\n\016WebhookOptions\022\013\n\003u" + + "rl\030\001 \001(\t\0223\n\004opts\030\002 \003(\0132%.greptime.v1.Web" + + "hookOptions.OptsEntry\032+\n\tOptsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"U\n\017DropTrigge" + + "rExpr\022\024\n\014catalog_name\030\001 \001(\t\022\024\n\014trigger_n" + + "ame\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010*$\n\010Ana" + + "lyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001*)\n\017Fullt" + + "extBackend\022\013\n\007TANTIVY\020\000\022\t\n\005BLOOM\020\001*%\n\021Sk" + + "ippingIndexType\022\020\n\014BLOOM_FILTER\020\000BL\n\016io." + + "greptime.v1B\003DdlZ5github.com/GreptimeTea" + + "m/greptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -51068,7 +51993,7 @@ java.lang.String defaultValue); internal_static_greptime_v1_CreateTriggerExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_CreateTriggerExpr_descriptor, - new java.lang.String[] { "CatalogName", "TriggerName", "CreateIfNotExists", "Sql", "Channels", "Labels", "Annotations", "Interval", "RawIntervalExpr", }); + new java.lang.String[] { "CatalogName", "TriggerName", "CreateIfNotExists", "Sql", "Channels", "Labels", "Annotations", "Interval", "RawIntervalExpr", "For", "ForRawExpr", "KeepFiringFor", "KeepFiringForRawExpr", }); internal_static_greptime_v1_CreateTriggerExpr_LabelsEntry_descriptor = internal_static_greptime_v1_CreateTriggerExpr_descriptor.getNestedTypes().get(0); internal_static_greptime_v1_CreateTriggerExpr_LabelsEntry_fieldAccessorTable = new diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index d59d019..d4acac7 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -356,6 +356,16 @@ message CreateTriggerExpr { google.protobuf.Duration interval = 8; // The raw interval expression, e.g., '1 minute'::INTERVAL. string raw_interval_expr = 9; + // The duration that the condition must be met continuously before firing the + // trigger. + google.protobuf.Duration for = 10; + // The raw SQL expression for 'for' duration, e.g., '5 minutes'::INTERVAL. + string for_raw_expr = 11; + // The duration to keep firing after the condition is no longer met. + google.protobuf.Duration keep_firing_for = 12; + // The raw SQL expression for 'keep_firing_for' duration, e.g., + // '10 minutes'::INTERVAL. + string keep_firing_for_raw_expr = 13; } // The notification channel for trigger.