From 3cd0cc06e31c95939821f9343bf7a5da85e9ccbb Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 15 Nov 2023 03:01:49 -0800 Subject: [PATCH] update idl Signed-off-by: Kevin Su --- .../gen/pb-cpp/flyteidl/admin/common.pb.cc | 579 +++++++-- .../gen/pb-cpp/flyteidl/admin/common.pb.h | 259 +++- .../pb-cpp/flyteidl/admin/notification.pb.cc | 340 +++++- .../pb-cpp/flyteidl/admin/notification.pb.h | 185 ++- .../gen/pb-go/flyteidl/admin/common.pb.go | 224 ++-- .../flyteidl/admin/common.pb.validate.go | 79 ++ .../pb-go/flyteidl/admin/notification.pb.go | 73 +- .../admin/notification.pb.validate.go | 67 ++ .../gen/pb-java/flyteidl/admin/Common.java | 1041 +++++++++++++++-- .../pb-java/flyteidl/admin/Notification.java | 611 +++++++++- flyteidl/gen/pb-js/flyteidl.d.ts | 250 ++-- flyteidl/gen/pb-js/flyteidl.js | 577 ++++++--- .../pb_python/flyteidl/admin/common_pb2.py | 117 +- .../pb_python/flyteidl/admin/common_pb2.pyi | 9 + .../flyteidl/admin/notification_pb2.py | 4 +- .../flyteidl/admin/notification_pb2.pyi | 6 + flyteidl/gen/pb_rust/flyteidl.admin.rs | 69 +- flyteidl/protos/flyteidl/admin/common.proto | 11 + .../protos/flyteidl/admin/notification.proto | 5 +- 19 files changed, 3901 insertions(+), 605 deletions(-) diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc index 982f3fb6b7..65bba4c461 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc @@ -25,6 +25,7 @@ extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::prot extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SlackNotification_flyteidl_2fadmin_2fcommon_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fnotification_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_WebhookMessage_flyteidl_2fadmin_2fnotification_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2fidentifier_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Identifier_flyteidl_2fcore_2fidentifier_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2fliterals_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_KeyValuePair_flyteidl_2fcore_2fliterals_2eproto; namespace flyteidl { @@ -89,6 +90,10 @@ class PagerDutyNotificationDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _PagerDutyNotification_default_instance_; +class WebhookNotificationDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _WebhookNotification_default_instance_; class SlackNotificationDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; @@ -360,6 +365,21 @@ static void InitDefaultsPagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto( ::google::protobuf::internal::SCCInfo<0> scc_info_PagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto}, {}}; +static void InitDefaultsWebhookNotification_flyteidl_2fadmin_2fcommon_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_WebhookNotification_default_instance_; + new (ptr) ::flyteidl::admin::WebhookNotification(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::WebhookNotification::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_WebhookNotification_flyteidl_2fadmin_2fcommon_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsWebhookNotification_flyteidl_2fadmin_2fcommon_2eproto}, { + &scc_info_WebhookMessage_flyteidl_2fadmin_2fnotification_2eproto.base,}}; + static void InitDefaultsSlackNotification_flyteidl_2fadmin_2fcommon_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -534,6 +554,7 @@ void InitDefaults_flyteidl_2fadmin_2fcommon_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_ResourceListRequest_flyteidl_2fadmin_2fcommon_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_EmailNotification_flyteidl_2fadmin_2fcommon_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_PagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_WebhookNotification_flyteidl_2fadmin_2fcommon_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_SlackNotification_flyteidl_2fadmin_2fcommon_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_Notification_flyteidl_2fadmin_2fcommon_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_UrlBlob_flyteidl_2fadmin_2fcommon_2eproto.base); @@ -547,7 +568,7 @@ void InitDefaults_flyteidl_2fadmin_2fcommon_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_FlyteURLs_flyteidl_2fadmin_2fcommon_2eproto.base); } -::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[26]; +::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[27]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto[2]; constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fadmin_2fcommon_2eproto = nullptr; @@ -668,6 +689,13 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fcommon_2eproto:: ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::PagerDutyNotification, recipients_email_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::WebhookNotification, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::WebhookNotification, webhook_name_), + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::WebhookNotification, message_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::SlackNotification, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -764,17 +792,18 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SE { 93, -1, sizeof(::flyteidl::admin::ResourceListRequest)}, { 103, -1, sizeof(::flyteidl::admin::EmailNotification)}, { 109, -1, sizeof(::flyteidl::admin::PagerDutyNotification)}, - { 115, -1, sizeof(::flyteidl::admin::SlackNotification)}, - { 121, -1, sizeof(::flyteidl::admin::Notification)}, - { 131, -1, sizeof(::flyteidl::admin::UrlBlob)}, - { 138, 145, sizeof(::flyteidl::admin::Labels_ValuesEntry_DoNotUse)}, - { 147, -1, sizeof(::flyteidl::admin::Labels)}, - { 153, 160, sizeof(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse)}, - { 162, -1, sizeof(::flyteidl::admin::Annotations)}, - { 168, -1, sizeof(::flyteidl::admin::Envs)}, - { 174, -1, sizeof(::flyteidl::admin::AuthRole)}, - { 181, -1, sizeof(::flyteidl::admin::RawOutputDataConfig)}, - { 187, -1, sizeof(::flyteidl::admin::FlyteURLs)}, + { 115, -1, sizeof(::flyteidl::admin::WebhookNotification)}, + { 122, -1, sizeof(::flyteidl::admin::SlackNotification)}, + { 128, -1, sizeof(::flyteidl::admin::Notification)}, + { 138, -1, sizeof(::flyteidl::admin::UrlBlob)}, + { 145, 152, sizeof(::flyteidl::admin::Labels_ValuesEntry_DoNotUse)}, + { 154, -1, sizeof(::flyteidl::admin::Labels)}, + { 160, 167, sizeof(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse)}, + { 169, -1, sizeof(::flyteidl::admin::Annotations)}, + { 175, -1, sizeof(::flyteidl::admin::Envs)}, + { 181, -1, sizeof(::flyteidl::admin::AuthRole)}, + { 188, -1, sizeof(::flyteidl::admin::RawOutputDataConfig)}, + { 194, -1, sizeof(::flyteidl::admin::FlyteURLs)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { @@ -793,6 +822,7 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::flyteidl::admin::_ResourceListRequest_default_instance_), reinterpret_cast(&::flyteidl::admin::_EmailNotification_default_instance_), reinterpret_cast(&::flyteidl::admin::_PagerDutyNotification_default_instance_), + reinterpret_cast(&::flyteidl::admin::_WebhookNotification_default_instance_), reinterpret_cast(&::flyteidl::admin::_SlackNotification_default_instance_), reinterpret_cast(&::flyteidl::admin::_Notification_default_instance_), reinterpret_cast(&::flyteidl::admin::_UrlBlob_default_instance_), @@ -809,97 +839,101 @@ static ::google::protobuf::Message const * const file_default_instances[] = { ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto = { {}, AddDescriptors_flyteidl_2fadmin_2fcommon_2eproto, "flyteidl/admin/common.proto", schemas, file_default_instances, TableStruct_flyteidl_2fadmin_2fcommon_2eproto::offsets, - file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto, 26, file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fcommon_2eproto, + file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto, 27, file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fcommon_2eproto, }; const char descriptor_table_protodef_flyteidl_2fadmin_2fcommon_2eproto[] = "\n\033flyteidl/admin/common.proto\022\016flyteidl." - "admin\032\035flyteidl/core/execution.proto\032\036fl" - "yteidl/core/identifier.proto\032\034flyteidl/c" - "ore/literals.proto\032\037google/protobuf/time" - "stamp.proto\"F\n\025NamedEntityIdentifier\022\017\n\007" - "project\030\001 \001(\t\022\016\n\006domain\030\002 \001(\t\022\014\n\004name\030\003 " - "\001(\t\"[\n\023NamedEntityMetadata\022\023\n\013descriptio" - "n\030\001 \001(\t\022/\n\005state\030\002 \001(\0162 .flyteidl.admin." - "NamedEntityState\"\253\001\n\013NamedEntity\0222\n\rreso" - "urce_type\030\001 \001(\0162\033.flyteidl.core.Resource" - "Type\0221\n\002id\030\002 \001(\0132%.flyteidl.admin.NamedE" - "ntityIdentifier\0225\n\010metadata\030\003 \001(\0132#.flyt" - "eidl.admin.NamedEntityMetadata\"r\n\004Sort\022\013" - "\n\003key\030\001 \001(\t\0221\n\tdirection\030\002 \001(\0162\036.flyteid" - "l.admin.Sort.Direction\"*\n\tDirection\022\016\n\nD" - "ESCENDING\020\000\022\r\n\tASCENDING\020\001\"\231\001\n NamedEnti" - "tyIdentifierListRequest\022\017\n\007project\030\001 \001(\t" - "\022\016\n\006domain\030\002 \001(\t\022\r\n\005limit\030\003 \001(\r\022\r\n\005token" - "\030\004 \001(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admin" - ".Sort\022\017\n\007filters\030\006 \001(\t\"\303\001\n\026NamedEntityLi" - "stRequest\0222\n\rresource_type\030\001 \001(\0162\033.flyte" - "idl.core.ResourceType\022\017\n\007project\030\002 \001(\t\022\016" - "\n\006domain\030\003 \001(\t\022\r\n\005limit\030\004 \001(\r\022\r\n\005token\030\005" - " \001(\t\022%\n\007sort_by\030\006 \001(\0132\024.flyteidl.admin.S" - "ort\022\017\n\007filters\030\007 \001(\t\"c\n\031NamedEntityIdent" - "ifierList\0227\n\010entities\030\001 \003(\0132%.flyteidl.a" - "dmin.NamedEntityIdentifier\022\r\n\005token\030\002 \001(" - "\t\"O\n\017NamedEntityList\022-\n\010entities\030\001 \003(\0132\033" - ".flyteidl.admin.NamedEntity\022\r\n\005token\030\002 \001" - "(\t\"~\n\025NamedEntityGetRequest\0222\n\rresource_" + "admin\032!flyteidl/admin/notification.proto" + "\032\035flyteidl/core/execution.proto\032\036flyteid" + "l/core/identifier.proto\032\034flyteidl/core/l" + "iterals.proto\032\037google/protobuf/timestamp" + ".proto\"F\n\025NamedEntityIdentifier\022\017\n\007proje" + "ct\030\001 \001(\t\022\016\n\006domain\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\"[" + "\n\023NamedEntityMetadata\022\023\n\013description\030\001 \001" + "(\t\022/\n\005state\030\002 \001(\0162 .flyteidl.admin.Named" + "EntityState\"\253\001\n\013NamedEntity\0222\n\rresource_" "type\030\001 \001(\0162\033.flyteidl.core.ResourceType\022" "1\n\002id\030\002 \001(\0132%.flyteidl.admin.NamedEntity" - "Identifier\"\270\001\n\030NamedEntityUpdateRequest\022" - "2\n\rresource_type\030\001 \001(\0162\033.flyteidl.core.R" - "esourceType\0221\n\002id\030\002 \001(\0132%.flyteidl.admin" - ".NamedEntityIdentifier\0225\n\010metadata\030\003 \001(\013" - "2#.flyteidl.admin.NamedEntityMetadata\"\033\n" - "\031NamedEntityUpdateResponse\"9\n\020ObjectGetR" - "equest\022%\n\002id\030\001 \001(\0132\031.flyteidl.core.Ident" - "ifier\"\236\001\n\023ResourceListRequest\0221\n\002id\030\001 \001(" - "\0132%.flyteidl.admin.NamedEntityIdentifier" - "\022\r\n\005limit\030\002 \001(\r\022\r\n\005token\030\003 \001(\t\022\017\n\007filter" - "s\030\004 \001(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admi" - "n.Sort\"-\n\021EmailNotification\022\030\n\020recipient" - "s_email\030\001 \003(\t\"1\n\025PagerDutyNotification\022\030" - "\n\020recipients_email\030\001 \003(\t\"-\n\021SlackNotific" - "ation\022\030\n\020recipients_email\030\001 \003(\t\"\363\001\n\014Noti" - "fication\0226\n\006phases\030\001 \003(\0162&.flyteidl.core" - ".WorkflowExecution.Phase\0222\n\005email\030\002 \001(\0132" - "!.flyteidl.admin.EmailNotificationH\000\022;\n\n" - "pager_duty\030\003 \001(\0132%.flyteidl.admin.PagerD" - "utyNotificationH\000\0222\n\005slack\030\004 \001(\0132!.flyte" - "idl.admin.SlackNotificationH\000B\006\n\004type\")\n" - "\007UrlBlob\022\013\n\003url\030\001 \001(\t\022\r\n\005bytes\030\002 \001(\003:\002\030\001" - "\"k\n\006Labels\0222\n\006values\030\001 \003(\0132\".flyteidl.ad" - "min.Labels.ValuesEntry\032-\n\013ValuesEntry\022\013\n" - "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"u\n\013Annotat" - "ions\0227\n\006values\030\001 \003(\0132\'.flyteidl.admin.An" - "notations.ValuesEntry\032-\n\013ValuesEntry\022\013\n\003" - "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\004Envs\022+\n\006" - "values\030\001 \003(\0132\033.flyteidl.core.KeyValuePai" - "r\"N\n\010AuthRole\022\032\n\022assumable_iam_role\030\001 \001(" - "\t\022\"\n\032kubernetes_service_account\030\002 \001(\t:\002\030" - "\001\"5\n\023RawOutputDataConfig\022\036\n\026output_locat" - "ion_prefix\030\001 \001(\t\":\n\tFlyteURLs\022\016\n\006inputs\030" - "\001 \001(\t\022\017\n\007outputs\030\002 \001(\t\022\014\n\004deck\030\003 \001(\t*\\\n\020" - "NamedEntityState\022\027\n\023NAMED_ENTITY_ACTIVE\020" - "\000\022\031\n\025NAMED_ENTITY_ARCHIVED\020\001\022\024\n\020SYSTEM_G" - "ENERATED\020\002B=Z;github.com/flyteorg/flyte/" - "flyteidl/gen/pb-go/flyteidl/adminb\006proto" - "3" + "Identifier\0225\n\010metadata\030\003 \001(\0132#.flyteidl." + "admin.NamedEntityMetadata\"r\n\004Sort\022\013\n\003key" + "\030\001 \001(\t\0221\n\tdirection\030\002 \001(\0162\036.flyteidl.adm" + "in.Sort.Direction\"*\n\tDirection\022\016\n\nDESCEN" + "DING\020\000\022\r\n\tASCENDING\020\001\"\231\001\n NamedEntityIde" + "ntifierListRequest\022\017\n\007project\030\001 \001(\t\022\016\n\006d" + "omain\030\002 \001(\t\022\r\n\005limit\030\003 \001(\r\022\r\n\005token\030\004 \001(" + "\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admin.Sort" + "\022\017\n\007filters\030\006 \001(\t\"\303\001\n\026NamedEntityListReq" + "uest\0222\n\rresource_type\030\001 \001(\0162\033.flyteidl.c" + "ore.ResourceType\022\017\n\007project\030\002 \001(\t\022\016\n\006dom" + "ain\030\003 \001(\t\022\r\n\005limit\030\004 \001(\r\022\r\n\005token\030\005 \001(\t\022" + "%\n\007sort_by\030\006 \001(\0132\024.flyteidl.admin.Sort\022\017" + "\n\007filters\030\007 \001(\t\"c\n\031NamedEntityIdentifier" + "List\0227\n\010entities\030\001 \003(\0132%.flyteidl.admin." + "NamedEntityIdentifier\022\r\n\005token\030\002 \001(\t\"O\n\017" + "NamedEntityList\022-\n\010entities\030\001 \003(\0132\033.flyt" + "eidl.admin.NamedEntity\022\r\n\005token\030\002 \001(\t\"~\n" + "\025NamedEntityGetRequest\0222\n\rresource_type\030" + "\001 \001(\0162\033.flyteidl.core.ResourceType\0221\n\002id" + "\030\002 \001(\0132%.flyteidl.admin.NamedEntityIdent" + "ifier\"\270\001\n\030NamedEntityUpdateRequest\0222\n\rre" + "source_type\030\001 \001(\0162\033.flyteidl.core.Resour" + "ceType\0221\n\002id\030\002 \001(\0132%.flyteidl.admin.Name" + "dEntityIdentifier\0225\n\010metadata\030\003 \001(\0132#.fl" + "yteidl.admin.NamedEntityMetadata\"\033\n\031Name" + "dEntityUpdateResponse\"9\n\020ObjectGetReques" + "t\022%\n\002id\030\001 \001(\0132\031.flyteidl.core.Identifier" + "\"\236\001\n\023ResourceListRequest\0221\n\002id\030\001 \001(\0132%.f" + "lyteidl.admin.NamedEntityIdentifier\022\r\n\005l" + "imit\030\002 \001(\r\022\r\n\005token\030\003 \001(\t\022\017\n\007filters\030\004 \001" + "(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admin.Sor" + "t\"-\n\021EmailNotification\022\030\n\020recipients_ema" + "il\030\001 \003(\t\"1\n\025PagerDutyNotification\022\030\n\020rec" + "ipients_email\030\001 \003(\t\"\\\n\023WebhookNotificati" + "on\022\024\n\014webhook_name\030\001 \001(\t\022/\n\007message\030\002 \001(" + "\0132\036.flyteidl.admin.WebhookMessage\"-\n\021Sla" + "ckNotification\022\030\n\020recipients_email\030\001 \003(\t" + "\"\363\001\n\014Notification\0226\n\006phases\030\001 \003(\0162&.flyt" + "eidl.core.WorkflowExecution.Phase\0222\n\005ema" + "il\030\002 \001(\0132!.flyteidl.admin.EmailNotificat" + "ionH\000\022;\n\npager_duty\030\003 \001(\0132%.flyteidl.adm" + "in.PagerDutyNotificationH\000\0222\n\005slack\030\004 \001(" + "\0132!.flyteidl.admin.SlackNotificationH\000B\006" + "\n\004type\")\n\007UrlBlob\022\013\n\003url\030\001 \001(\t\022\r\n\005bytes\030" + "\002 \001(\003:\002\030\001\"k\n\006Labels\0222\n\006values\030\001 \003(\0132\".fl" + "yteidl.admin.Labels.ValuesEntry\032-\n\013Value" + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"u" + "\n\013Annotations\0227\n\006values\030\001 \003(\0132\'.flyteidl" + ".admin.Annotations.ValuesEntry\032-\n\013Values" + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n" + "\004Envs\022+\n\006values\030\001 \003(\0132\033.flyteidl.core.Ke" + "yValuePair\"N\n\010AuthRole\022\032\n\022assumable_iam_" + "role\030\001 \001(\t\022\"\n\032kubernetes_service_account" + "\030\002 \001(\t:\002\030\001\"5\n\023RawOutputDataConfig\022\036\n\026out" + "put_location_prefix\030\001 \001(\t\":\n\tFlyteURLs\022\016" + "\n\006inputs\030\001 \001(\t\022\017\n\007outputs\030\002 \001(\t\022\014\n\004deck\030" + "\003 \001(\t*\\\n\020NamedEntityState\022\027\n\023NAMED_ENTIT" + "Y_ACTIVE\020\000\022\031\n\025NAMED_ENTITY_ARCHIVED\020\001\022\024\n" + "\020SYSTEM_GENERATED\020\002B=Z;github.com/flyteo" + "rg/flyte/flyteidl/gen/pb-go/flyteidl/adm" + "inb\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fcommon_2eproto = { false, InitDefaults_flyteidl_2fadmin_2fcommon_2eproto, descriptor_table_protodef_flyteidl_2fadmin_2fcommon_2eproto, - "flyteidl/admin/common.proto", &assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto, 2801, + "flyteidl/admin/common.proto", &assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto, 2930, }; void AddDescriptors_flyteidl_2fadmin_2fcommon_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[4] = + static constexpr ::google::protobuf::internal::InitFunc deps[5] = { + ::AddDescriptors_flyteidl_2fadmin_2fnotification_2eproto, ::AddDescriptors_flyteidl_2fcore_2fexecution_2eproto, ::AddDescriptors_flyteidl_2fcore_2fidentifier_2eproto, ::AddDescriptors_flyteidl_2fcore_2fliterals_2eproto, ::AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fadmin_2fcommon_2eproto, deps, 4); + ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fadmin_2fcommon_2eproto, deps, 5); } // Force running AddDescriptors() at dynamic initialization time. @@ -6872,6 +6906,376 @@ ::google::protobuf::Metadata PagerDutyNotification::GetMetadata() const { } +// =================================================================== + +void WebhookNotification::InitAsDefaultInstance() { + ::flyteidl::admin::_WebhookNotification_default_instance_._instance.get_mutable()->message_ = const_cast< ::flyteidl::admin::WebhookMessage*>( + ::flyteidl::admin::WebhookMessage::internal_default_instance()); +} +class WebhookNotification::HasBitSetters { + public: + static const ::flyteidl::admin::WebhookMessage& message(const WebhookNotification* msg); +}; + +const ::flyteidl::admin::WebhookMessage& +WebhookNotification::HasBitSetters::message(const WebhookNotification* msg) { + return *msg->message_; +} +void WebhookNotification::clear_message() { + if (GetArenaNoVirtual() == nullptr && message_ != nullptr) { + delete message_; + } + message_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int WebhookNotification::kWebhookNameFieldNumber; +const int WebhookNotification::kMessageFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +WebhookNotification::WebhookNotification() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.WebhookNotification) +} +WebhookNotification::WebhookNotification(const WebhookNotification& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + webhook_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.webhook_name().size() > 0) { + webhook_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.webhook_name_); + } + if (from.has_message()) { + message_ = new ::flyteidl::admin::WebhookMessage(*from.message_); + } else { + message_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.WebhookNotification) +} + +void WebhookNotification::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_WebhookNotification_flyteidl_2fadmin_2fcommon_2eproto.base); + webhook_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_ = nullptr; +} + +WebhookNotification::~WebhookNotification() { + // @@protoc_insertion_point(destructor:flyteidl.admin.WebhookNotification) + SharedDtor(); +} + +void WebhookNotification::SharedDtor() { + webhook_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete message_; +} + +void WebhookNotification::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const WebhookNotification& WebhookNotification::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_WebhookNotification_flyteidl_2fadmin_2fcommon_2eproto.base); + return *internal_default_instance(); +} + + +void WebhookNotification::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.WebhookNotification) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + webhook_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && message_ != nullptr) { + delete message_; + } + message_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* WebhookNotification::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string webhook_name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.admin.WebhookNotification.webhook_name"); + object = msg->mutable_webhook_name(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // .flyteidl.admin.WebhookMessage message = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::admin::WebhookMessage::_InternalParse; + object = msg->mutable_message(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool WebhookNotification::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.WebhookNotification) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string webhook_name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_webhook_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->webhook_name().data(), static_cast(this->webhook_name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.admin.WebhookNotification.webhook_name")); + } else { + goto handle_unusual; + } + break; + } + + // .flyteidl.admin.WebhookMessage message = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_message())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.WebhookNotification) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.WebhookNotification) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void WebhookNotification::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.WebhookNotification) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string webhook_name = 1; + if (this->webhook_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->webhook_name().data(), static_cast(this->webhook_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.WebhookNotification.webhook_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->webhook_name(), output); + } + + // .flyteidl.admin.WebhookMessage message = 2; + if (this->has_message()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, HasBitSetters::message(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.WebhookNotification) +} + +::google::protobuf::uint8* WebhookNotification::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.WebhookNotification) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string webhook_name = 1; + if (this->webhook_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->webhook_name().data(), static_cast(this->webhook_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.WebhookNotification.webhook_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->webhook_name(), target); + } + + // .flyteidl.admin.WebhookMessage message = 2; + if (this->has_message()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, HasBitSetters::message(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.WebhookNotification) + return target; +} + +size_t WebhookNotification::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.WebhookNotification) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string webhook_name = 1; + if (this->webhook_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->webhook_name()); + } + + // .flyteidl.admin.WebhookMessage message = 2; + if (this->has_message()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *message_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WebhookNotification::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.WebhookNotification) + GOOGLE_DCHECK_NE(&from, this); + const WebhookNotification* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.WebhookNotification) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.WebhookNotification) + MergeFrom(*source); + } +} + +void WebhookNotification::MergeFrom(const WebhookNotification& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.WebhookNotification) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.webhook_name().size() > 0) { + + webhook_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.webhook_name_); + } + if (from.has_message()) { + mutable_message()->::flyteidl::admin::WebhookMessage::MergeFrom(from.message()); + } +} + +void WebhookNotification::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.WebhookNotification) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void WebhookNotification::CopyFrom(const WebhookNotification& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.WebhookNotification) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WebhookNotification::IsInitialized() const { + return true; +} + +void WebhookNotification::Swap(WebhookNotification* other) { + if (other == this) return; + InternalSwap(other); +} +void WebhookNotification::InternalSwap(WebhookNotification* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + webhook_name_.Swap(&other->webhook_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(message_, other->message_); +} + +::google::protobuf::Metadata WebhookNotification::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[kIndexInFileMessages]; +} + + // =================================================================== void SlackNotification::InitAsDefaultInstance() { @@ -8100,7 +8504,7 @@ void Labels_ValuesEntry_DoNotUse::MergeFrom(const Labels_ValuesEntry_DoNotUse& o } ::google::protobuf::Metadata Labels_ValuesEntry_DoNotUse::GetMetadata() const { ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto); - return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[18]; + return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[19]; } void Labels_ValuesEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -8523,7 +8927,7 @@ void Annotations_ValuesEntry_DoNotUse::MergeFrom(const Annotations_ValuesEntry_D } ::google::protobuf::Metadata Annotations_ValuesEntry_DoNotUse::GetMetadata() const { ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto); - return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[20]; + return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[21]; } void Annotations_ValuesEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -10379,6 +10783,9 @@ template<> PROTOBUF_NOINLINE ::flyteidl::admin::EmailNotification* Arena::Create template<> PROTOBUF_NOINLINE ::flyteidl::admin::PagerDutyNotification* Arena::CreateMaybeMessage< ::flyteidl::admin::PagerDutyNotification >(Arena* arena) { return Arena::CreateInternal< ::flyteidl::admin::PagerDutyNotification >(arena); } +template<> PROTOBUF_NOINLINE ::flyteidl::admin::WebhookNotification* Arena::CreateMaybeMessage< ::flyteidl::admin::WebhookNotification >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::WebhookNotification >(arena); +} template<> PROTOBUF_NOINLINE ::flyteidl::admin::SlackNotification* Arena::CreateMaybeMessage< ::flyteidl::admin::SlackNotification >(Arena* arena) { return Arena::CreateInternal< ::flyteidl::admin::SlackNotification >(arena); } diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.h index b2eb1cb4e5..57732d76cc 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.h @@ -35,6 +35,7 @@ #include #include #include +#include "flyteidl/admin/notification.pb.h" #include "flyteidl/core/execution.pb.h" #include "flyteidl/core/identifier.pb.h" #include "flyteidl/core/literals.pb.h" @@ -49,7 +50,7 @@ struct TableStruct_flyteidl_2fadmin_2fcommon_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[26] + static const ::google::protobuf::internal::ParseTable schema[27] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; @@ -136,6 +137,9 @@ extern SortDefaultTypeInternal _Sort_default_instance_; class UrlBlob; class UrlBlobDefaultTypeInternal; extern UrlBlobDefaultTypeInternal _UrlBlob_default_instance_; +class WebhookNotification; +class WebhookNotificationDefaultTypeInternal; +extern WebhookNotificationDefaultTypeInternal _WebhookNotification_default_instance_; } // namespace admin } // namespace flyteidl namespace google { @@ -166,6 +170,7 @@ template<> ::flyteidl::admin::ResourceListRequest* Arena::CreateMaybeMessage<::f template<> ::flyteidl::admin::SlackNotification* Arena::CreateMaybeMessage<::flyteidl::admin::SlackNotification>(Arena*); template<> ::flyteidl::admin::Sort* Arena::CreateMaybeMessage<::flyteidl::admin::Sort>(Arena*); template<> ::flyteidl::admin::UrlBlob* Arena::CreateMaybeMessage<::flyteidl::admin::UrlBlob>(Arena*); +template<> ::flyteidl::admin::WebhookNotification* Arena::CreateMaybeMessage<::flyteidl::admin::WebhookNotification>(Arena*); } // namespace protobuf } // namespace google namespace flyteidl { @@ -2307,6 +2312,136 @@ class PagerDutyNotification final : }; // ------------------------------------------------------------------- +class WebhookNotification final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.WebhookNotification) */ { + public: + WebhookNotification(); + virtual ~WebhookNotification(); + + WebhookNotification(const WebhookNotification& from); + + inline WebhookNotification& operator=(const WebhookNotification& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + WebhookNotification(WebhookNotification&& from) noexcept + : WebhookNotification() { + *this = ::std::move(from); + } + + inline WebhookNotification& operator=(WebhookNotification&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const WebhookNotification& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const WebhookNotification* internal_default_instance() { + return reinterpret_cast( + &_WebhookNotification_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + void Swap(WebhookNotification* other); + friend void swap(WebhookNotification& a, WebhookNotification& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline WebhookNotification* New() const final { + return CreateMaybeMessage(nullptr); + } + + WebhookNotification* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const WebhookNotification& from); + void MergeFrom(const WebhookNotification& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WebhookNotification* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string webhook_name = 1; + void clear_webhook_name(); + static const int kWebhookNameFieldNumber = 1; + const ::std::string& webhook_name() const; + void set_webhook_name(const ::std::string& value); + #if LANG_CXX11 + void set_webhook_name(::std::string&& value); + #endif + void set_webhook_name(const char* value); + void set_webhook_name(const char* value, size_t size); + ::std::string* mutable_webhook_name(); + ::std::string* release_webhook_name(); + void set_allocated_webhook_name(::std::string* webhook_name); + + // .flyteidl.admin.WebhookMessage message = 2; + bool has_message() const; + void clear_message(); + static const int kMessageFieldNumber = 2; + const ::flyteidl::admin::WebhookMessage& message() const; + ::flyteidl::admin::WebhookMessage* release_message(); + ::flyteidl::admin::WebhookMessage* mutable_message(); + void set_allocated_message(::flyteidl::admin::WebhookMessage* message); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.WebhookNotification) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr webhook_name_; + ::flyteidl::admin::WebhookMessage* message_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + class SlackNotification final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.SlackNotification) */ { public: @@ -2345,7 +2480,7 @@ class SlackNotification final : &_SlackNotification_default_instance_); } static constexpr int kIndexInFileMessages = - 15; + 16; void Swap(SlackNotification* other); friend void swap(SlackNotification& a, SlackNotification& b) { @@ -2480,7 +2615,7 @@ class Notification final : &_Notification_default_instance_); } static constexpr int kIndexInFileMessages = - 16; + 17; void Swap(Notification* other); friend void swap(Notification& a, Notification& b) { @@ -2640,7 +2775,7 @@ class UrlBlob final : &_UrlBlob_default_instance_); } static constexpr int kIndexInFileMessages = - 17; + 18; void Swap(UrlBlob* other); friend void swap(UrlBlob& a, UrlBlob& b) { @@ -2791,7 +2926,7 @@ class Labels final : &_Labels_default_instance_); } static constexpr int kIndexInFileMessages = - 19; + 20; void Swap(Labels* other); friend void swap(Labels& a, Labels& b) { @@ -2936,7 +3071,7 @@ class Annotations final : &_Annotations_default_instance_); } static constexpr int kIndexInFileMessages = - 21; + 22; void Swap(Annotations* other); friend void swap(Annotations& a, Annotations& b) { @@ -3057,7 +3192,7 @@ class Envs final : &_Envs_default_instance_); } static constexpr int kIndexInFileMessages = - 22; + 23; void Swap(Envs* other); friend void swap(Envs& a, Envs& b) { @@ -3175,7 +3310,7 @@ class AuthRole final : &_AuthRole_default_instance_); } static constexpr int kIndexInFileMessages = - 23; + 24; void Swap(AuthRole* other); friend void swap(AuthRole& a, AuthRole& b) { @@ -3310,7 +3445,7 @@ class RawOutputDataConfig final : &_RawOutputDataConfig_default_instance_); } static constexpr int kIndexInFileMessages = - 24; + 25; void Swap(RawOutputDataConfig* other); friend void swap(RawOutputDataConfig& a, RawOutputDataConfig& b) { @@ -3430,7 +3565,7 @@ class FlyteURLs final : &_FlyteURLs_default_instance_); } static constexpr int kIndexInFileMessages = - 25; + 26; void Swap(FlyteURLs* other); friend void swap(FlyteURLs& a, FlyteURLs& b) { @@ -5338,6 +5473,108 @@ PagerDutyNotification::mutable_recipients_email() { // ------------------------------------------------------------------- +// WebhookNotification + +// string webhook_name = 1; +inline void WebhookNotification::clear_webhook_name() { + webhook_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& WebhookNotification::webhook_name() const { + // @@protoc_insertion_point(field_get:flyteidl.admin.WebhookNotification.webhook_name) + return webhook_name_.GetNoArena(); +} +inline void WebhookNotification::set_webhook_name(const ::std::string& value) { + + webhook_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.admin.WebhookNotification.webhook_name) +} +#if LANG_CXX11 +inline void WebhookNotification::set_webhook_name(::std::string&& value) { + + webhook_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.WebhookNotification.webhook_name) +} +#endif +inline void WebhookNotification::set_webhook_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + webhook_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.admin.WebhookNotification.webhook_name) +} +inline void WebhookNotification::set_webhook_name(const char* value, size_t size) { + + webhook_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.WebhookNotification.webhook_name) +} +inline ::std::string* WebhookNotification::mutable_webhook_name() { + + // @@protoc_insertion_point(field_mutable:flyteidl.admin.WebhookNotification.webhook_name) + return webhook_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* WebhookNotification::release_webhook_name() { + // @@protoc_insertion_point(field_release:flyteidl.admin.WebhookNotification.webhook_name) + + return webhook_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void WebhookNotification::set_allocated_webhook_name(::std::string* webhook_name) { + if (webhook_name != nullptr) { + + } else { + + } + webhook_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), webhook_name); + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.WebhookNotification.webhook_name) +} + +// .flyteidl.admin.WebhookMessage message = 2; +inline bool WebhookNotification::has_message() const { + return this != internal_default_instance() && message_ != nullptr; +} +inline const ::flyteidl::admin::WebhookMessage& WebhookNotification::message() const { + const ::flyteidl::admin::WebhookMessage* p = message_; + // @@protoc_insertion_point(field_get:flyteidl.admin.WebhookNotification.message) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::admin::_WebhookMessage_default_instance_); +} +inline ::flyteidl::admin::WebhookMessage* WebhookNotification::release_message() { + // @@protoc_insertion_point(field_release:flyteidl.admin.WebhookNotification.message) + + ::flyteidl::admin::WebhookMessage* temp = message_; + message_ = nullptr; + return temp; +} +inline ::flyteidl::admin::WebhookMessage* WebhookNotification::mutable_message() { + + if (message_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::admin::WebhookMessage>(GetArenaNoVirtual()); + message_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.admin.WebhookNotification.message) + return message_; +} +inline void WebhookNotification::set_allocated_message(::flyteidl::admin::WebhookMessage* message) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(message_); + } + if (message) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + message = ::google::protobuf::internal::GetOwnedMessage( + message_arena, message, submessage_arena); + } + + } else { + + } + message_ = message; + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.WebhookNotification.message) +} + +// ------------------------------------------------------------------- + // SlackNotification // repeated string recipients_email = 1; @@ -6108,6 +6345,8 @@ inline void FlyteURLs::set_allocated_deck(::std::string* deck) { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.cc index 2807e63edf..40538236c0 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.cc @@ -22,6 +22,10 @@ class EmailMessageDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _EmailMessage_default_instance_; +class WebhookMessageDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _WebhookMessage_default_instance_; } // namespace admin } // namespace flyteidl static void InitDefaultsEmailMessage_flyteidl_2fadmin_2fnotification_2eproto() { @@ -38,11 +42,26 @@ static void InitDefaultsEmailMessage_flyteidl_2fadmin_2fnotification_2eproto() { ::google::protobuf::internal::SCCInfo<0> scc_info_EmailMessage_flyteidl_2fadmin_2fnotification_2eproto = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmailMessage_flyteidl_2fadmin_2fnotification_2eproto}, {}}; +static void InitDefaultsWebhookMessage_flyteidl_2fadmin_2fnotification_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_WebhookMessage_default_instance_; + new (ptr) ::flyteidl::admin::WebhookMessage(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::WebhookMessage::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_WebhookMessage_flyteidl_2fadmin_2fnotification_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsWebhookMessage_flyteidl_2fadmin_2fnotification_2eproto}, {}}; + void InitDefaults_flyteidl_2fadmin_2fnotification_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_EmailMessage_flyteidl_2fadmin_2fnotification_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_WebhookMessage_flyteidl_2fadmin_2fnotification_2eproto.base); } -::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fnotification_2eproto[1]; +::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fnotification_2eproto[2]; constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_flyteidl_2fadmin_2fnotification_2eproto = nullptr; constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fadmin_2fnotification_2eproto = nullptr; @@ -56,33 +75,42 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fnotification_2ep PROTOBUF_FIELD_OFFSET(::flyteidl::admin::EmailMessage, sender_email_), PROTOBUF_FIELD_OFFSET(::flyteidl::admin::EmailMessage, subject_line_), PROTOBUF_FIELD_OFFSET(::flyteidl::admin::EmailMessage, body_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::WebhookMessage, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::WebhookMessage, body_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::flyteidl::admin::EmailMessage)}, + { 9, -1, sizeof(::flyteidl::admin::WebhookMessage)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::flyteidl::admin::_EmailMessage_default_instance_), + reinterpret_cast(&::flyteidl::admin::_WebhookMessage_default_instance_), }; ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fadmin_2fnotification_2eproto = { {}, AddDescriptors_flyteidl_2fadmin_2fnotification_2eproto, "flyteidl/admin/notification.proto", schemas, file_default_instances, TableStruct_flyteidl_2fadmin_2fnotification_2eproto::offsets, - file_level_metadata_flyteidl_2fadmin_2fnotification_2eproto, 1, file_level_enum_descriptors_flyteidl_2fadmin_2fnotification_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fnotification_2eproto, + file_level_metadata_flyteidl_2fadmin_2fnotification_2eproto, 2, file_level_enum_descriptors_flyteidl_2fadmin_2fnotification_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fnotification_2eproto, }; const char descriptor_table_protodef_flyteidl_2fadmin_2fnotification_2eproto[] = "\n!flyteidl/admin/notification.proto\022\016fly" "teidl.admin\"b\n\014EmailMessage\022\030\n\020recipient" "s_email\030\001 \003(\t\022\024\n\014sender_email\030\002 \001(\t\022\024\n\014s" - "ubject_line\030\003 \001(\t\022\014\n\004body\030\004 \001(\tB=Z;githu" - "b.com/flyteorg/flyte/flyteidl/gen/pb-go/" - "flyteidl/adminb\006proto3" + "ubject_line\030\003 \001(\t\022\014\n\004body\030\004 \001(\t\"\036\n\016Webho" + "okMessage\022\014\n\004body\030\001 \001(\tB=Z;github.com/fl" + "yteorg/flyte/flyteidl/gen/pb-go/flyteidl" + "/adminb\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fnotification_2eproto = { false, InitDefaults_flyteidl_2fadmin_2fnotification_2eproto, descriptor_table_protodef_flyteidl_2fadmin_2fnotification_2eproto, - "flyteidl/admin/notification.proto", &assign_descriptors_table_flyteidl_2fadmin_2fnotification_2eproto, 222, + "flyteidl/admin/notification.proto", &assign_descriptors_table_flyteidl_2fadmin_2fnotification_2eproto, 254, }; void AddDescriptors_flyteidl_2fadmin_2fnotification_2eproto() { @@ -608,6 +636,303 @@ ::google::protobuf::Metadata EmailMessage::GetMetadata() const { } +// =================================================================== + +void WebhookMessage::InitAsDefaultInstance() { +} +class WebhookMessage::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int WebhookMessage::kBodyFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +WebhookMessage::WebhookMessage() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.WebhookMessage) +} +WebhookMessage::WebhookMessage(const WebhookMessage& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.body().size() > 0) { + body_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.body_); + } + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.WebhookMessage) +} + +void WebhookMessage::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_WebhookMessage_flyteidl_2fadmin_2fnotification_2eproto.base); + body_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +WebhookMessage::~WebhookMessage() { + // @@protoc_insertion_point(destructor:flyteidl.admin.WebhookMessage) + SharedDtor(); +} + +void WebhookMessage::SharedDtor() { + body_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void WebhookMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const WebhookMessage& WebhookMessage::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_WebhookMessage_flyteidl_2fadmin_2fnotification_2eproto.base); + return *internal_default_instance(); +} + + +void WebhookMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.WebhookMessage) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + body_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* WebhookMessage::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string body = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.admin.WebhookMessage.body"); + object = msg->mutable_body(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool WebhookMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.WebhookMessage) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string body = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_body())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->body().data(), static_cast(this->body().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.admin.WebhookMessage.body")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.WebhookMessage) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.WebhookMessage) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void WebhookMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.WebhookMessage) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string body = 1; + if (this->body().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->body().data(), static_cast(this->body().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.WebhookMessage.body"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->body(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.WebhookMessage) +} + +::google::protobuf::uint8* WebhookMessage::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.WebhookMessage) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string body = 1; + if (this->body().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->body().data(), static_cast(this->body().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.WebhookMessage.body"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->body(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.WebhookMessage) + return target; +} + +size_t WebhookMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.WebhookMessage) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string body = 1; + if (this->body().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->body()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WebhookMessage::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.WebhookMessage) + GOOGLE_DCHECK_NE(&from, this); + const WebhookMessage* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.WebhookMessage) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.WebhookMessage) + MergeFrom(*source); + } +} + +void WebhookMessage::MergeFrom(const WebhookMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.WebhookMessage) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.body().size() > 0) { + + body_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.body_); + } +} + +void WebhookMessage::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.WebhookMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void WebhookMessage::CopyFrom(const WebhookMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.WebhookMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WebhookMessage::IsInitialized() const { + return true; +} + +void WebhookMessage::Swap(WebhookMessage* other) { + if (other == this) return; + InternalSwap(other); +} +void WebhookMessage::InternalSwap(WebhookMessage* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + body_.Swap(&other->body_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::google::protobuf::Metadata WebhookMessage::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fnotification_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fnotification_2eproto[kIndexInFileMessages]; +} + + // @@protoc_insertion_point(namespace_scope) } // namespace admin } // namespace flyteidl @@ -616,6 +941,9 @@ namespace protobuf { template<> PROTOBUF_NOINLINE ::flyteidl::admin::EmailMessage* Arena::CreateMaybeMessage< ::flyteidl::admin::EmailMessage >(Arena* arena) { return Arena::CreateInternal< ::flyteidl::admin::EmailMessage >(arena); } +template<> PROTOBUF_NOINLINE ::flyteidl::admin::WebhookMessage* Arena::CreateMaybeMessage< ::flyteidl::admin::WebhookMessage >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::WebhookMessage >(arena); +} } // namespace protobuf } // namespace google diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.h index f73d432fec..c3b877628f 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/notification.pb.h @@ -41,7 +41,7 @@ struct TableStruct_flyteidl_2fadmin_2fnotification_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::google::protobuf::internal::ParseTable schema[2] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; @@ -53,11 +53,15 @@ namespace admin { class EmailMessage; class EmailMessageDefaultTypeInternal; extern EmailMessageDefaultTypeInternal _EmailMessage_default_instance_; +class WebhookMessage; +class WebhookMessageDefaultTypeInternal; +extern WebhookMessageDefaultTypeInternal _WebhookMessage_default_instance_; } // namespace admin } // namespace flyteidl namespace google { namespace protobuf { template<> ::flyteidl::admin::EmailMessage* Arena::CreateMaybeMessage<::flyteidl::admin::EmailMessage>(Arena*); +template<> ::flyteidl::admin::WebhookMessage* Arena::CreateMaybeMessage<::flyteidl::admin::WebhookMessage>(Arena*); } // namespace protobuf } // namespace google namespace flyteidl { @@ -236,6 +240,126 @@ class EmailMessage final : mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_flyteidl_2fadmin_2fnotification_2eproto; }; +// ------------------------------------------------------------------- + +class WebhookMessage final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.WebhookMessage) */ { + public: + WebhookMessage(); + virtual ~WebhookMessage(); + + WebhookMessage(const WebhookMessage& from); + + inline WebhookMessage& operator=(const WebhookMessage& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + WebhookMessage(WebhookMessage&& from) noexcept + : WebhookMessage() { + *this = ::std::move(from); + } + + inline WebhookMessage& operator=(WebhookMessage&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const WebhookMessage& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const WebhookMessage* internal_default_instance() { + return reinterpret_cast( + &_WebhookMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void Swap(WebhookMessage* other); + friend void swap(WebhookMessage& a, WebhookMessage& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline WebhookMessage* New() const final { + return CreateMaybeMessage(nullptr); + } + + WebhookMessage* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const WebhookMessage& from); + void MergeFrom(const WebhookMessage& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WebhookMessage* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string body = 1; + void clear_body(); + static const int kBodyFieldNumber = 1; + const ::std::string& body() const; + void set_body(const ::std::string& value); + #if LANG_CXX11 + void set_body(::std::string&& value); + #endif + void set_body(const char* value); + void set_body(const char* value, size_t size); + ::std::string* mutable_body(); + ::std::string* release_body(); + void set_allocated_body(::std::string* body); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.WebhookMessage) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr body_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fnotification_2eproto; +}; // =================================================================== @@ -475,9 +599,68 @@ inline void EmailMessage::set_allocated_body(::std::string* body) { // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.EmailMessage.body) } +// ------------------------------------------------------------------- + +// WebhookMessage + +// string body = 1; +inline void WebhookMessage::clear_body() { + body_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& WebhookMessage::body() const { + // @@protoc_insertion_point(field_get:flyteidl.admin.WebhookMessage.body) + return body_.GetNoArena(); +} +inline void WebhookMessage::set_body(const ::std::string& value) { + + body_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.admin.WebhookMessage.body) +} +#if LANG_CXX11 +inline void WebhookMessage::set_body(::std::string&& value) { + + body_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.WebhookMessage.body) +} +#endif +inline void WebhookMessage::set_body(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + body_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.admin.WebhookMessage.body) +} +inline void WebhookMessage::set_body(const char* value, size_t size) { + + body_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.WebhookMessage.body) +} +inline ::std::string* WebhookMessage::mutable_body() { + + // @@protoc_insertion_point(field_mutable:flyteidl.admin.WebhookMessage.body) + return body_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* WebhookMessage::release_body() { + // @@protoc_insertion_point(field_release:flyteidl.admin.WebhookMessage.body) + + return body_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void WebhookMessage::set_allocated_body(::std::string* body) { + if (body != nullptr) { + + } else { + + } + body_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), body); + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.WebhookMessage.body) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/flyteidl/gen/pb-go/flyteidl/admin/common.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/common.pb.go index 3703dfb22e..e45e5a0810 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/common.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/common.pb.go @@ -963,6 +963,58 @@ func (m *PagerDutyNotification) GetRecipientsEmail() []string { return nil } +// Defines a webhook notification specification. +type WebhookNotification struct { + // +required + // The webhook that is already registered to the flyteadmin. + WebhookName string `protobuf:"bytes,1,opt,name=webhook_name,json=webhookName,proto3" json:"webhook_name,omitempty"` + // The message to send to the webhook. if not specified, use default payload defined in flyteadmin. + // +optional + Message *WebhookMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WebhookNotification) Reset() { *m = WebhookNotification{} } +func (m *WebhookNotification) String() string { return proto.CompactTextString(m) } +func (*WebhookNotification) ProtoMessage() {} +func (*WebhookNotification) Descriptor() ([]byte, []int) { + return fileDescriptor_7c2cf612a185829c, []int{15} +} + +func (m *WebhookNotification) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WebhookNotification.Unmarshal(m, b) +} +func (m *WebhookNotification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WebhookNotification.Marshal(b, m, deterministic) +} +func (m *WebhookNotification) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebhookNotification.Merge(m, src) +} +func (m *WebhookNotification) XXX_Size() int { + return xxx_messageInfo_WebhookNotification.Size(m) +} +func (m *WebhookNotification) XXX_DiscardUnknown() { + xxx_messageInfo_WebhookNotification.DiscardUnknown(m) +} + +var xxx_messageInfo_WebhookNotification proto.InternalMessageInfo + +func (m *WebhookNotification) GetWebhookName() string { + if m != nil { + return m.WebhookName + } + return "" +} + +func (m *WebhookNotification) GetMessage() *WebhookMessage { + if m != nil { + return m.Message + } + return nil +} + // Defines a slack notification specification. type SlackNotification struct { // Currently, Slack notifications leverage email to trigger a notification. @@ -977,7 +1029,7 @@ func (m *SlackNotification) Reset() { *m = SlackNotification{} } func (m *SlackNotification) String() string { return proto.CompactTextString(m) } func (*SlackNotification) ProtoMessage() {} func (*SlackNotification) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{15} + return fileDescriptor_7c2cf612a185829c, []int{16} } func (m *SlackNotification) XXX_Unmarshal(b []byte) error { @@ -1029,7 +1081,7 @@ func (m *Notification) Reset() { *m = Notification{} } func (m *Notification) String() string { return proto.CompactTextString(m) } func (*Notification) ProtoMessage() {} func (*Notification) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{16} + return fileDescriptor_7c2cf612a185829c, []int{17} } func (m *Notification) XXX_Unmarshal(b []byte) error { @@ -1133,7 +1185,7 @@ func (m *UrlBlob) Reset() { *m = UrlBlob{} } func (m *UrlBlob) String() string { return proto.CompactTextString(m) } func (*UrlBlob) ProtoMessage() {} func (*UrlBlob) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{17} + return fileDescriptor_7c2cf612a185829c, []int{18} } func (m *UrlBlob) XXX_Unmarshal(b []byte) error { @@ -1183,7 +1235,7 @@ func (m *Labels) Reset() { *m = Labels{} } func (m *Labels) String() string { return proto.CompactTextString(m) } func (*Labels) ProtoMessage() {} func (*Labels) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{18} + return fileDescriptor_7c2cf612a185829c, []int{19} } func (m *Labels) XXX_Unmarshal(b []byte) error { @@ -1226,7 +1278,7 @@ func (m *Annotations) Reset() { *m = Annotations{} } func (m *Annotations) String() string { return proto.CompactTextString(m) } func (*Annotations) ProtoMessage() {} func (*Annotations) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{19} + return fileDescriptor_7c2cf612a185829c, []int{20} } func (m *Annotations) XXX_Unmarshal(b []byte) error { @@ -1269,7 +1321,7 @@ func (m *Envs) Reset() { *m = Envs{} } func (m *Envs) String() string { return proto.CompactTextString(m) } func (*Envs) ProtoMessage() {} func (*Envs) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{20} + return fileDescriptor_7c2cf612a185829c, []int{21} } func (m *Envs) XXX_Unmarshal(b []byte) error { @@ -1316,7 +1368,7 @@ func (m *AuthRole) Reset() { *m = AuthRole{} } func (m *AuthRole) String() string { return proto.CompactTextString(m) } func (*AuthRole) ProtoMessage() {} func (*AuthRole) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{21} + return fileDescriptor_7c2cf612a185829c, []int{22} } func (m *AuthRole) XXX_Unmarshal(b []byte) error { @@ -1366,7 +1418,7 @@ func (m *RawOutputDataConfig) Reset() { *m = RawOutputDataConfig{} } func (m *RawOutputDataConfig) String() string { return proto.CompactTextString(m) } func (*RawOutputDataConfig) ProtoMessage() {} func (*RawOutputDataConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{22} + return fileDescriptor_7c2cf612a185829c, []int{23} } func (m *RawOutputDataConfig) XXX_Unmarshal(b []byte) error { @@ -1408,7 +1460,7 @@ func (m *FlyteURLs) Reset() { *m = FlyteURLs{} } func (m *FlyteURLs) String() string { return proto.CompactTextString(m) } func (*FlyteURLs) ProtoMessage() {} func (*FlyteURLs) Descriptor() ([]byte, []int) { - return fileDescriptor_7c2cf612a185829c, []int{23} + return fileDescriptor_7c2cf612a185829c, []int{24} } func (m *FlyteURLs) XXX_Unmarshal(b []byte) error { @@ -1468,6 +1520,7 @@ func init() { proto.RegisterType((*ResourceListRequest)(nil), "flyteidl.admin.ResourceListRequest") proto.RegisterType((*EmailNotification)(nil), "flyteidl.admin.EmailNotification") proto.RegisterType((*PagerDutyNotification)(nil), "flyteidl.admin.PagerDutyNotification") + proto.RegisterType((*WebhookNotification)(nil), "flyteidl.admin.WebhookNotification") proto.RegisterType((*SlackNotification)(nil), "flyteidl.admin.SlackNotification") proto.RegisterType((*Notification)(nil), "flyteidl.admin.Notification") proto.RegisterType((*UrlBlob)(nil), "flyteidl.admin.UrlBlob") @@ -1484,80 +1537,83 @@ func init() { func init() { proto.RegisterFile("flyteidl/admin/common.proto", fileDescriptor_7c2cf612a185829c) } var fileDescriptor_7c2cf612a185829c = []byte{ - // 1192 bytes of a gzipped FileDescriptorProto + // 1244 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xdf, 0x73, 0xdb, 0xc4, - 0x13, 0x8f, 0x1c, 0xc7, 0xa9, 0x37, 0x6d, 0xea, 0x5e, 0xd2, 0x7e, 0xdd, 0xe4, 0x4b, 0x09, 0x62, - 0xf8, 0xd1, 0x0e, 0xb5, 0x67, 0x52, 0x0a, 0xf4, 0x37, 0x4e, 0xac, 0xb6, 0x99, 0xa6, 0x6e, 0x90, - 0xd3, 0x32, 0x65, 0x60, 0xc4, 0x59, 0x3a, 0xbb, 0x47, 0x24, 0x9d, 0xb8, 0x3b, 0xb5, 0x15, 0x2f, - 0x0c, 0xbc, 0xf1, 0xc6, 0x03, 0xff, 0x10, 0x4f, 0x0c, 0xef, 0xfc, 0x41, 0xcc, 0x9d, 0x24, 0x5b, - 0x56, 0xdc, 0x42, 0xd3, 0xce, 0xf0, 0x76, 0x7b, 0xbb, 0x7b, 0xfb, 0xd9, 0xcf, 0xed, 0xae, 0x4e, - 0xb0, 0x3e, 0xf4, 0x13, 0x49, 0xa8, 0xe7, 0xb7, 0xb1, 0x17, 0xd0, 0xb0, 0xed, 0xb2, 0x20, 0x60, - 0x61, 0x2b, 0xe2, 0x4c, 0x32, 0xb4, 0x9c, 0x2b, 0x5b, 0x5a, 0xb9, 0xf6, 0xd6, 0xd8, 0xd8, 0x65, - 0x9c, 0xb4, 0xc9, 0x73, 0xe2, 0xc6, 0x92, 0xe6, 0xe6, 0x6b, 0xe7, 0xa6, 0xd5, 0xd4, 0x23, 0xa1, - 0xa4, 0x43, 0x4a, 0x78, 0xa6, 0xff, 0xff, 0xb4, 0xde, 0xa7, 0x92, 0x70, 0xec, 0x8b, 0x4c, 0xfb, - 0xf6, 0x88, 0xb1, 0x91, 0x4f, 0xda, 0x5a, 0x1a, 0xc4, 0xc3, 0xb6, 0xa4, 0x01, 0x11, 0x12, 0x07, - 0x51, 0x6a, 0x60, 0x7e, 0x03, 0xa7, 0x7b, 0x38, 0x20, 0x9e, 0x15, 0x4a, 0x2a, 0x93, 0x9d, 0xf1, - 0xe9, 0xa8, 0x09, 0x8b, 0x11, 0x67, 0xdf, 0x11, 0x57, 0x36, 0x8d, 0x0d, 0xe3, 0xc3, 0xba, 0x9d, - 0x8b, 0xe8, 0x0c, 0xd4, 0x3c, 0x16, 0x60, 0x1a, 0x36, 0x2b, 0x5a, 0x91, 0x49, 0x08, 0x41, 0x35, - 0xc4, 0x01, 0x69, 0xce, 0xeb, 0x5d, 0xbd, 0x36, 0x19, 0xac, 0x14, 0x8e, 0xbf, 0x4f, 0x24, 0xf6, - 0xb0, 0xc4, 0x68, 0x03, 0x96, 0x3c, 0x22, 0x5c, 0x4e, 0x23, 0x95, 0x69, 0x16, 0xa0, 0xb8, 0x85, - 0x3e, 0x81, 0x05, 0x21, 0xb1, 0x24, 0x3a, 0xc6, 0xf2, 0xe6, 0x46, 0x6b, 0x9a, 0xb5, 0x56, 0xe1, - 0xd4, 0xbe, 0xb2, 0xb3, 0x53, 0x73, 0xf3, 0x0f, 0x03, 0x96, 0x0a, 0x3a, 0xf4, 0x39, 0x9c, 0xe0, - 0x44, 0xb0, 0x98, 0xbb, 0xc4, 0x91, 0x49, 0x44, 0x74, 0xac, 0xe5, 0xcd, 0xf5, 0xc9, 0x79, 0x8a, - 0xb6, 0x96, 0x9d, 0xd9, 0xec, 0x27, 0x11, 0xb1, 0x8f, 0xf3, 0x82, 0x84, 0x2e, 0x43, 0x85, 0x7a, - 0x1a, 0xc6, 0xd2, 0xe6, 0x7b, 0x2f, 0x81, 0x31, 0xe1, 0xce, 0xae, 0x50, 0x0f, 0xdd, 0x82, 0x63, - 0x41, 0x96, 0xae, 0x66, 0x64, 0x69, 0xf3, 0xdd, 0x97, 0x38, 0xe7, 0xcc, 0xd8, 0x63, 0x27, 0xf3, - 0x67, 0x03, 0xaa, 0x7d, 0xc6, 0x25, 0x6a, 0xc0, 0xfc, 0x01, 0x49, 0x32, 0x92, 0xd4, 0x12, 0x5d, - 0x87, 0xba, 0x47, 0x39, 0x71, 0x35, 0x79, 0x29, 0x41, 0xe7, 0xca, 0x87, 0x2b, 0xd7, 0x56, 0x37, - 0xb7, 0xb2, 0x27, 0x0e, 0xe6, 0x05, 0xa8, 0x8f, 0xf7, 0xd1, 0x32, 0x40, 0xd7, 0xea, 0x6f, 0x5b, - 0xbd, 0xee, 0x4e, 0xef, 0x4e, 0x63, 0x0e, 0x9d, 0x80, 0x7a, 0x67, 0x2c, 0x1a, 0xe6, 0x9f, 0x06, - 0x6c, 0xcc, 0xcc, 0x71, 0x97, 0x0a, 0x69, 0x93, 0xef, 0x63, 0x22, 0xe4, 0x11, 0x4a, 0x65, 0x15, - 0x16, 0x7c, 0x1a, 0x50, 0xa9, 0x99, 0x39, 0x61, 0xa7, 0x82, 0xda, 0x95, 0xec, 0x80, 0x84, 0xcd, - 0xaa, 0x36, 0x4e, 0x05, 0x74, 0x11, 0x16, 0x05, 0xe3, 0xd2, 0x19, 0x24, 0xcd, 0x05, 0xcd, 0xe3, - 0xea, 0xac, 0x54, 0xed, 0x9a, 0x32, 0xda, 0x4a, 0x14, 0x98, 0x21, 0xf5, 0x25, 0xe1, 0xa2, 0x59, - 0x4b, 0xc1, 0x64, 0xa2, 0xf9, 0x53, 0x05, 0xce, 0x14, 0x72, 0x29, 0x66, 0xf0, 0xfa, 0x55, 0x52, - 0xe0, 0xa0, 0xf2, 0x22, 0x0e, 0xe6, 0x67, 0x73, 0x50, 0x9d, 0xc9, 0xc1, 0xc2, 0x0b, 0x38, 0xa8, - 0xbd, 0x1a, 0x07, 0x8b, 0xd3, 0x1c, 0x48, 0x38, 0xfb, 0xc2, 0xeb, 0x44, 0x1d, 0x38, 0xa6, 0x64, - 0x49, 0x89, 0x68, 0x1a, 0x1b, 0xf3, 0xff, 0xbe, 0xde, 0xc7, 0x6e, 0x13, 0xf8, 0x95, 0x02, 0x7c, - 0xf3, 0x5b, 0x38, 0x59, 0x22, 0x1e, 0x7d, 0x7a, 0x28, 0xd6, 0xfa, 0x4b, 0x62, 0xfd, 0x63, 0x84, - 0x5f, 0x8d, 0xa9, 0x39, 0x76, 0x87, 0xbc, 0xc1, 0xab, 0x3d, 0xda, 0x00, 0x30, 0xff, 0x32, 0xa0, - 0x59, 0xd0, 0x3e, 0x8c, 0x3c, 0x35, 0xa6, 0xfe, 0x63, 0x54, 0xaf, 0x3f, 0x96, 0xd6, 0xa7, 0x2a, - 0x28, 0xcf, 0x4a, 0x44, 0x2c, 0x14, 0xc4, 0xbc, 0x01, 0x8d, 0x07, 0x03, 0x55, 0xf5, 0x85, 0x0b, - 0x38, 0xaf, 0x81, 0x1a, 0x3a, 0xd6, 0xd9, 0x52, 0x7e, 0x25, 0xca, 0x7e, 0x37, 0x60, 0x25, 0x4f, - 0xb9, 0xd8, 0x9e, 0x97, 0x0b, 0x47, 0xbc, 0x42, 0xae, 0xe3, 0x0e, 0xab, 0xcc, 0xec, 0xb0, 0xf9, - 0x62, 0x87, 0x15, 0x5a, 0xa6, 0x3a, 0xd5, 0x32, 0xaf, 0x38, 0x7f, 0xcc, 0x9b, 0x70, 0xca, 0x0a, - 0x30, 0xf5, 0x7b, 0x4c, 0x21, 0x71, 0xb1, 0x9e, 0xb2, 0xe7, 0xa1, 0xc1, 0x89, 0x4b, 0x23, 0x4a, - 0x42, 0x29, 0x1c, 0xa2, 0xf4, 0xba, 0xea, 0xeb, 0xf6, 0xc9, 0xc9, 0xbe, 0x76, 0x33, 0xb7, 0xe0, - 0xf4, 0x1e, 0x1e, 0x11, 0xde, 0x8d, 0x65, 0x72, 0xd4, 0x33, 0x6e, 0xc2, 0xa9, 0xbe, 0x8f, 0xdd, - 0x83, 0xa3, 0xfa, 0xff, 0x56, 0x81, 0xe3, 0x53, 0xbe, 0x37, 0xa1, 0x16, 0x3d, 0xc1, 0x22, 0xeb, - 0xd5, 0xe5, 0xcd, 0xf7, 0x4b, 0xf7, 0xf8, 0x25, 0xe3, 0x07, 0x43, 0x9f, 0x3d, 0xb3, 0xc6, 0x8f, - 0x97, 0x3d, 0x65, 0x6e, 0x67, 0x5e, 0xe8, 0x0a, 0x2c, 0xa4, 0x01, 0xd3, 0x7a, 0x7d, 0xa7, 0xcc, - 0xe0, 0x21, 0xc6, 0xee, 0xce, 0xd9, 0xa9, 0x07, 0xba, 0x0d, 0x10, 0x29, 0x3e, 0x1c, 0x2f, 0x96, - 0x49, 0x56, 0xb2, 0x87, 0x6a, 0x60, 0x26, 0x63, 0x77, 0xe7, 0xec, 0x7a, 0x94, 0x2b, 0x14, 0x04, - 0xa1, 0x38, 0xd1, 0xd7, 0x3b, 0x03, 0xc2, 0x21, 0xc2, 0x14, 0x04, 0xed, 0xb1, 0x55, 0x83, 0xaa, - 0xea, 0x51, 0xf3, 0x32, 0x2c, 0x3e, 0xe4, 0xfe, 0x96, 0xcf, 0x06, 0xea, 0x9b, 0x1c, 0x73, 0x3f, - 0xff, 0x26, 0xc7, 0xdc, 0x57, 0x65, 0x35, 0x48, 0x24, 0x11, 0x3a, 0xc5, 0x79, 0x3b, 0x15, 0xae, - 0x56, 0x9a, 0x86, 0xf9, 0x23, 0xd4, 0x76, 0xf1, 0x80, 0xf8, 0x02, 0x5d, 0x85, 0xda, 0x53, 0xec, - 0xc7, 0xe3, 0x91, 0x67, 0x96, 0x41, 0xa4, 0x76, 0xad, 0x47, 0xda, 0xc8, 0x0a, 0x25, 0x4f, 0xec, - 0xcc, 0x63, 0xed, 0x0a, 0x2c, 0x15, 0xb6, 0x67, 0x3c, 0x0a, 0x56, 0x61, 0x41, 0x9b, 0xe6, 0x83, - 0x51, 0x0b, 0x57, 0x2b, 0x9f, 0x19, 0xe6, 0x2f, 0x06, 0x2c, 0x75, 0xc2, 0x90, 0x49, 0x9d, 0x97, - 0x40, 0xb7, 0x4a, 0x30, 0x3e, 0x28, 0xc3, 0x28, 0x18, 0xbf, 0x69, 0x2c, 0xd7, 0xa0, 0x6a, 0x85, - 0x4f, 0x05, 0xba, 0x54, 0xc2, 0x50, 0x9e, 0x7c, 0xf7, 0x48, 0xa2, 0x43, 0xec, 0x61, 0xca, 0xf3, - 0xb8, 0xe6, 0x0f, 0x70, 0xac, 0x13, 0xcb, 0x27, 0x36, 0xf3, 0x09, 0xfa, 0x08, 0x10, 0x16, 0x22, - 0x0e, 0xf0, 0xc0, 0x27, 0x0e, 0xc5, 0x81, 0xc3, 0x99, 0x4f, 0x32, 0x0c, 0x8d, 0xb1, 0x66, 0x07, - 0x07, 0xda, 0xfa, 0x3a, 0xac, 0x1d, 0xc4, 0x03, 0xc2, 0x43, 0x22, 0x89, 0x70, 0x04, 0xe1, 0x4f, - 0xa9, 0x4b, 0x1c, 0xec, 0xba, 0x2c, 0x0e, 0xf3, 0x2f, 0x76, 0x73, 0x62, 0xd1, 0x4f, 0x0d, 0x3a, - 0xa9, 0x5e, 0xdf, 0xe2, 0x3d, 0x58, 0xb1, 0xf1, 0xb3, 0x07, 0xb1, 0x8c, 0x62, 0xd9, 0xc5, 0x12, - 0x6f, 0xb3, 0x70, 0x48, 0x47, 0xe8, 0x63, 0x38, 0xc3, 0xf4, 0x9e, 0xe3, 0xb3, 0xb4, 0x6e, 0x9c, - 0x88, 0x93, 0x21, 0x7d, 0x9e, 0x41, 0x59, 0x4d, 0xb5, 0xbb, 0x99, 0x72, 0x4f, 0xeb, 0xcc, 0x2f, - 0xa0, 0x7e, 0x5b, 0xa5, 0xfb, 0xd0, 0xde, 0x15, 0xea, 0x81, 0x40, 0xc3, 0x28, 0x96, 0x22, 0x73, - 0xc9, 0x24, 0x35, 0x92, 0x52, 0x67, 0x91, 0x3f, 0x29, 0x32, 0x51, 0xbd, 0xb4, 0x3d, 0xe2, 0x1e, - 0xe4, 0x2f, 0x6d, 0xb5, 0xbe, 0xf0, 0x35, 0x34, 0xca, 0x6f, 0x62, 0xf4, 0x3f, 0x58, 0xe9, 0x75, - 0xee, 0x5b, 0x5d, 0xc7, 0xea, 0xed, 0xef, 0xec, 0x3f, 0x76, 0x3a, 0xdb, 0xfb, 0x3b, 0x8f, 0xac, - 0xc6, 0x1c, 0x3a, 0x0b, 0xa7, 0xa7, 0x15, 0xf6, 0xf6, 0xdd, 0x9d, 0x47, 0x56, 0xb7, 0x61, 0xa0, - 0x55, 0x68, 0xf4, 0x1f, 0xf7, 0xf7, 0xad, 0xfb, 0xce, 0x1d, 0xab, 0x67, 0xd9, 0x9d, 0x7d, 0xab, - 0xdb, 0xa8, 0x6c, 0xdd, 0xf8, 0xea, 0xda, 0x88, 0xca, 0x27, 0xf1, 0xa0, 0xe5, 0xb2, 0xa0, 0xad, - 0xaf, 0x8a, 0xf1, 0x51, 0xba, 0x68, 0x8f, 0xff, 0x40, 0x46, 0x24, 0x6c, 0x47, 0x83, 0x8b, 0x23, - 0xd6, 0x9e, 0xfe, 0x01, 0x1a, 0xd4, 0xf4, 0xcf, 0xc6, 0xa5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x5a, 0xee, 0x56, 0xed, 0x19, 0x0d, 0x00, 0x00, + 0x13, 0x8f, 0x1c, 0xc7, 0xa9, 0x37, 0x6d, 0xea, 0xef, 0x25, 0xed, 0xd7, 0x4d, 0xa0, 0xa4, 0x62, + 0xf8, 0xd1, 0x0e, 0xb5, 0x67, 0x52, 0x0a, 0xfd, 0x5d, 0x9c, 0x58, 0x6d, 0x33, 0x4d, 0xdc, 0x20, + 0xa7, 0xed, 0x94, 0x81, 0x11, 0x67, 0xe9, 0xec, 0x1c, 0x96, 0x74, 0xe2, 0xee, 0xd4, 0xd6, 0xbc, + 0x30, 0xf0, 0xc6, 0x1b, 0x0f, 0xfc, 0x43, 0x3c, 0x31, 0xbc, 0xf3, 0x07, 0x31, 0x77, 0x92, 0x1c, + 0x59, 0x71, 0x0b, 0x49, 0x3b, 0xc3, 0x9b, 0xf6, 0xf6, 0xb3, 0xb7, 0xbb, 0x9f, 0xdb, 0xdb, 0x5b, + 0xc1, 0x6a, 0xdf, 0x1f, 0x49, 0x42, 0x3d, 0xbf, 0x89, 0xbd, 0x80, 0x86, 0x4d, 0x97, 0x05, 0x01, + 0x0b, 0x1b, 0x11, 0x67, 0x92, 0xa1, 0xc5, 0x4c, 0xd9, 0xd0, 0xca, 0x95, 0x0b, 0x05, 0x70, 0xc8, + 0x24, 0xed, 0x53, 0x17, 0x4b, 0x9a, 0x99, 0xac, 0xbc, 0x3b, 0x86, 0xb8, 0x8c, 0x93, 0x26, 0x79, + 0x49, 0xdc, 0x38, 0xa7, 0x3e, 0x3f, 0xa9, 0xa6, 0x1e, 0x09, 0xd5, 0x16, 0x84, 0xa7, 0xfa, 0x77, + 0x26, 0xf5, 0x3e, 0x95, 0x84, 0x63, 0x5f, 0xa4, 0xda, 0xf7, 0x06, 0x8c, 0x0d, 0x7c, 0xd2, 0xd4, + 0x52, 0x2f, 0xee, 0x37, 0x25, 0x0d, 0x88, 0x90, 0x38, 0x88, 0x12, 0x80, 0xf9, 0x0d, 0x9c, 0xe9, + 0xe0, 0x80, 0x78, 0x56, 0x28, 0xa9, 0x1c, 0x6d, 0x8d, 0x77, 0x47, 0x75, 0x98, 0x8f, 0x38, 0xfb, + 0x8e, 0xb8, 0xb2, 0x6e, 0xac, 0x19, 0x1f, 0x57, 0xed, 0x4c, 0x44, 0x67, 0xa1, 0xe2, 0xb1, 0x00, + 0xd3, 0xb0, 0x5e, 0xd2, 0x8a, 0x54, 0x42, 0x08, 0xca, 0x21, 0x0e, 0x48, 0x7d, 0x56, 0xaf, 0xea, + 0x6f, 0x93, 0xc1, 0x52, 0x6e, 0xfb, 0x1d, 0x22, 0xb1, 0x87, 0x25, 0x46, 0x6b, 0xb0, 0xe0, 0x11, + 0xe1, 0x72, 0x1a, 0xa9, 0x4c, 0x53, 0x07, 0xf9, 0x25, 0xf4, 0x19, 0xcc, 0x09, 0x89, 0x25, 0xd1, + 0x3e, 0x16, 0xd7, 0xd7, 0x1a, 0x93, 0xc4, 0x36, 0x72, 0xbb, 0x76, 0x15, 0xce, 0x4e, 0xe0, 0xe6, + 0x1f, 0x06, 0x2c, 0xe4, 0x74, 0xe8, 0x0b, 0x38, 0xc5, 0x89, 0x60, 0x31, 0x77, 0x89, 0x23, 0x47, + 0x11, 0xd1, 0xbe, 0x16, 0xd7, 0x57, 0x0f, 0xf6, 0x53, 0xb4, 0x35, 0xec, 0x14, 0xb3, 0x37, 0x8a, + 0x88, 0x7d, 0x92, 0xe7, 0x24, 0x74, 0x15, 0x4a, 0xd4, 0xd3, 0x61, 0x2c, 0xac, 0x7f, 0xf0, 0x9a, + 0x30, 0x0e, 0xb8, 0xb3, 0x4b, 0xd4, 0x43, 0x77, 0xe1, 0x44, 0x90, 0xa6, 0xab, 0x19, 0x59, 0x58, + 0x7f, 0xff, 0x35, 0xc6, 0x19, 0x33, 0xf6, 0xd8, 0xc8, 0xfc, 0xd9, 0x80, 0x72, 0x97, 0x71, 0x89, + 0x6a, 0x30, 0x3b, 0x24, 0xa3, 0x94, 0x24, 0xf5, 0x89, 0x6e, 0x41, 0xd5, 0xa3, 0x9c, 0xb8, 0x9a, + 0xbc, 0x84, 0xa0, 0xf3, 0xc5, 0xcd, 0x95, 0x69, 0xa3, 0x9d, 0xa1, 0xec, 0x03, 0x03, 0xf3, 0x12, + 0x54, 0xc7, 0xeb, 0x68, 0x11, 0xa0, 0x6d, 0x75, 0x37, 0xad, 0x4e, 0x7b, 0xab, 0x73, 0xbf, 0x36, + 0x83, 0x4e, 0x41, 0xb5, 0x35, 0x16, 0x0d, 0xf3, 0x4f, 0x03, 0xd6, 0xa6, 0xe6, 0xb8, 0x4d, 0x85, + 0xb4, 0xc9, 0xf7, 0x31, 0x11, 0xf2, 0x18, 0xa5, 0xb2, 0x0c, 0x73, 0x3e, 0x0d, 0xa8, 0xd4, 0xcc, + 0x9c, 0xb2, 0x13, 0x41, 0xad, 0x4a, 0x36, 0x24, 0x61, 0xbd, 0xac, 0xc1, 0x89, 0x80, 0x2e, 0xc3, + 0xbc, 0x60, 0x5c, 0x3a, 0xbd, 0x51, 0x7d, 0x4e, 0xf3, 0xb8, 0x3c, 0x2d, 0x55, 0xbb, 0xa2, 0x40, + 0x1b, 0x23, 0x15, 0x4c, 0x9f, 0xfa, 0x92, 0x70, 0x51, 0xaf, 0x24, 0xc1, 0xa4, 0xa2, 0xf9, 0x53, + 0x09, 0xce, 0xe6, 0x72, 0xc9, 0x67, 0xf0, 0xe6, 0x55, 0x92, 0xe3, 0xa0, 0xf4, 0x2a, 0x0e, 0x66, + 0xa7, 0x73, 0x50, 0x9e, 0xca, 0xc1, 0xdc, 0x2b, 0x38, 0xa8, 0x1c, 0x8d, 0x83, 0xf9, 0x49, 0x0e, + 0x24, 0x9c, 0x7b, 0xe5, 0x71, 0xa2, 0x16, 0x9c, 0x50, 0xb2, 0xa4, 0x44, 0xd4, 0x8d, 0xb5, 0xd9, + 0x7f, 0x5f, 0xef, 0x63, 0xb3, 0x83, 0xf0, 0x4b, 0xb9, 0xf0, 0xcd, 0x6f, 0xe1, 0x74, 0x81, 0x78, + 0xf4, 0xf9, 0x21, 0x5f, 0xab, 0xaf, 0xf1, 0xf5, 0x8f, 0x1e, 0x7e, 0x35, 0x26, 0xfa, 0xd8, 0x7d, + 0xf2, 0x16, 0x8f, 0xf6, 0x78, 0x0d, 0xc0, 0xfc, 0xcb, 0x80, 0x7a, 0x4e, 0xfb, 0x38, 0xf2, 0x54, + 0x9b, 0xfa, 0x8f, 0xa3, 0x7a, 0xf3, 0xb6, 0xb4, 0x3a, 0x51, 0x41, 0x59, 0x56, 0x22, 0x62, 0xa1, + 0x20, 0xe6, 0x6d, 0xa8, 0x3d, 0xea, 0xa9, 0xaa, 0xcf, 0x1d, 0xc0, 0x45, 0x1d, 0xa8, 0xa1, 0x7d, + 0x9d, 0x2b, 0xe4, 0x57, 0xa0, 0xec, 0x77, 0x03, 0x96, 0xb2, 0x94, 0xf3, 0xd7, 0xf3, 0x6a, 0x6e, + 0x8b, 0x23, 0xe4, 0x3a, 0xbe, 0x61, 0xa5, 0xa9, 0x37, 0x6c, 0x36, 0x7f, 0xc3, 0x72, 0x57, 0xa6, + 0x3c, 0x71, 0x65, 0x8e, 0xd8, 0x7f, 0xcc, 0x3b, 0xf0, 0x3f, 0x2b, 0xc0, 0xd4, 0xef, 0xe4, 0x5e, + 0x7a, 0x74, 0x11, 0x6a, 0x9c, 0xb8, 0x34, 0xa2, 0x24, 0x94, 0xc2, 0x21, 0x4a, 0xaf, 0xab, 0xbe, + 0x6a, 0x9f, 0x3e, 0x58, 0xd7, 0x66, 0xe6, 0x06, 0x9c, 0xd9, 0xc5, 0x03, 0xc2, 0xdb, 0xb1, 0x1c, + 0x1d, 0x77, 0x0f, 0x0e, 0x4b, 0x4f, 0x49, 0x6f, 0x9f, 0xb1, 0xe1, 0xc4, 0x0e, 0x17, 0xe0, 0xe4, + 0x8b, 0x64, 0xd9, 0xd1, 0x0f, 0x75, 0xfa, 0xec, 0xa6, 0x6b, 0x8a, 0x47, 0x74, 0x0d, 0xe6, 0x03, + 0x22, 0x04, 0x1e, 0x90, 0xb4, 0xb4, 0x0e, 0xbd, 0x2b, 0xe9, 0xc6, 0x3b, 0x09, 0xca, 0xce, 0xe0, + 0x2a, 0xef, 0xae, 0x8f, 0xdd, 0xe1, 0x71, 0x63, 0xfe, 0xad, 0x04, 0x27, 0x27, 0x6c, 0xef, 0x40, + 0x25, 0xda, 0xc7, 0x22, 0xed, 0x0f, 0x8b, 0xeb, 0x1f, 0x16, 0x6a, 0xe7, 0x29, 0xe3, 0xc3, 0xbe, + 0xcf, 0x5e, 0x58, 0xe3, 0x81, 0x69, 0x57, 0xc1, 0xed, 0xd4, 0x0a, 0x5d, 0x87, 0xb9, 0xc4, 0x61, + 0x92, 0xc8, 0x85, 0x62, 0x22, 0x87, 0x4e, 0xe9, 0xc1, 0x8c, 0x9d, 0x58, 0xa0, 0x7b, 0x00, 0x91, + 0x3a, 0x03, 0xc7, 0x8b, 0xe5, 0x28, 0xbd, 0x26, 0x87, 0xea, 0x6e, 0xea, 0x29, 0x3d, 0x98, 0xb1, + 0xab, 0x51, 0xa6, 0x50, 0x21, 0x08, 0xc5, 0x89, 0x2e, 0xa9, 0x29, 0x21, 0x1c, 0x22, 0x4c, 0x85, + 0xa0, 0x2d, 0x36, 0x2a, 0x50, 0x56, 0x7d, 0xc1, 0xbc, 0x0a, 0xf3, 0x8f, 0xb9, 0xbf, 0xe1, 0xb3, + 0x9e, 0x9a, 0x03, 0x62, 0xee, 0x67, 0x73, 0x40, 0xcc, 0x7d, 0x55, 0xca, 0xbd, 0x91, 0x24, 0x42, + 0xa7, 0x38, 0x6b, 0x27, 0xc2, 0x8d, 0x52, 0xdd, 0x30, 0x7f, 0x84, 0xca, 0x36, 0xee, 0x11, 0x5f, + 0xa0, 0x1b, 0x50, 0x79, 0x8e, 0xfd, 0x78, 0xdc, 0x66, 0xcd, 0x62, 0x10, 0x09, 0xae, 0xf1, 0x44, + 0x83, 0xac, 0x50, 0xf2, 0x91, 0x9d, 0x5a, 0xac, 0x5c, 0x87, 0x85, 0xdc, 0xf2, 0x94, 0x41, 0x64, + 0x19, 0xe6, 0x34, 0x34, 0x6b, 0xc6, 0x5a, 0xb8, 0x51, 0xba, 0x66, 0x98, 0xbf, 0x18, 0xb0, 0xd0, + 0x0a, 0x43, 0x26, 0x75, 0x5e, 0x02, 0xdd, 0x2d, 0x84, 0xf1, 0x51, 0x31, 0x8c, 0x1c, 0xf8, 0x6d, + 0xc7, 0x72, 0x13, 0xca, 0x56, 0xf8, 0x5c, 0xa0, 0x2b, 0x85, 0x18, 0x8a, 0xdd, 0xf6, 0x21, 0x19, + 0x69, 0x17, 0xbb, 0x98, 0xf2, 0xcc, 0xaf, 0xf9, 0x03, 0x9c, 0x68, 0xc5, 0x72, 0xdf, 0x66, 0x3e, + 0x41, 0x9f, 0x00, 0xc2, 0x42, 0xc4, 0x01, 0xee, 0xf9, 0xc4, 0xa1, 0x38, 0x70, 0x38, 0xf3, 0xb3, + 0x6b, 0x54, 0x1b, 0x6b, 0xb6, 0x70, 0xa0, 0xd1, 0xb7, 0x60, 0x65, 0x18, 0xf7, 0x08, 0x0f, 0x89, + 0x24, 0xc2, 0x11, 0x84, 0x3f, 0xa7, 0x2e, 0x71, 0xb0, 0xeb, 0xb2, 0x38, 0xcc, 0xa6, 0x84, 0xfa, + 0x01, 0xa2, 0x9b, 0x00, 0x5a, 0x89, 0x5e, 0x9f, 0xe2, 0x43, 0x58, 0xb2, 0xf1, 0x8b, 0x47, 0xb1, + 0x8c, 0x62, 0xd9, 0xc6, 0x12, 0x6f, 0xb2, 0xb0, 0x4f, 0x07, 0xe8, 0x53, 0x38, 0xcb, 0xf4, 0x9a, + 0xe3, 0xb3, 0xa4, 0x6e, 0x9c, 0x88, 0x93, 0x3e, 0x7d, 0x99, 0x86, 0xb2, 0x9c, 0x68, 0xb7, 0x53, + 0xe5, 0xae, 0xd6, 0x99, 0x5f, 0x42, 0xf5, 0x9e, 0x4a, 0xf7, 0xb1, 0xbd, 0x2d, 0xd4, 0x50, 0x42, + 0xc3, 0x28, 0x96, 0x22, 0x35, 0x49, 0x25, 0xd5, 0x06, 0x13, 0x63, 0x91, 0x8d, 0x31, 0xa9, 0xa8, + 0xa6, 0x7b, 0x8f, 0xb8, 0xc3, 0x6c, 0xba, 0x57, 0xdf, 0x97, 0xbe, 0x86, 0x5a, 0x71, 0x0e, 0x47, + 0xff, 0x87, 0xa5, 0x4e, 0x6b, 0xc7, 0x6a, 0x3b, 0x56, 0x67, 0x6f, 0x6b, 0xef, 0x99, 0xd3, 0xda, + 0xdc, 0xdb, 0x7a, 0x62, 0xd5, 0x66, 0xd0, 0x39, 0x38, 0x33, 0xa9, 0xb0, 0x37, 0x1f, 0x6c, 0x3d, + 0xb1, 0xda, 0x35, 0x03, 0x2d, 0x43, 0xad, 0xfb, 0xac, 0xbb, 0x67, 0xed, 0x38, 0xf7, 0xad, 0x8e, + 0x65, 0xb7, 0xf6, 0xac, 0x76, 0xad, 0xb4, 0x71, 0xfb, 0xab, 0x9b, 0x03, 0x2a, 0xf7, 0xe3, 0x5e, + 0xc3, 0x65, 0x41, 0x53, 0x1f, 0x15, 0xe3, 0x83, 0xe4, 0xa3, 0x39, 0xfe, 0xeb, 0x19, 0x90, 0xb0, + 0x19, 0xf5, 0x2e, 0x0f, 0x58, 0x73, 0xf2, 0x57, 0xab, 0x57, 0xd1, 0x3f, 0x38, 0x57, 0xfe, 0x0e, + 0x00, 0x00, 0xff, 0xff, 0x08, 0x61, 0xe6, 0x43, 0xb0, 0x0d, 0x00, 0x00, } diff --git a/flyteidl/gen/pb-go/flyteidl/admin/common.pb.validate.go b/flyteidl/gen/pb-go/flyteidl/admin/common.pb.validate.go index 9cdccf378e..2bd1daedc7 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/common.pb.validate.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/common.pb.validate.go @@ -1225,6 +1225,85 @@ var _ interface { ErrorName() string } = PagerDutyNotificationValidationError{} +// Validate checks the field values on WebhookNotification with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *WebhookNotification) Validate() error { + if m == nil { + return nil + } + + // no validation rules for WebhookName + + if v, ok := interface{}(m.GetMessage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WebhookNotificationValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// WebhookNotificationValidationError is the validation error returned by +// WebhookNotification.Validate if the designated constraints aren't met. +type WebhookNotificationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WebhookNotificationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WebhookNotificationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WebhookNotificationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WebhookNotificationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WebhookNotificationValidationError) ErrorName() string { + return "WebhookNotificationValidationError" +} + +// Error satisfies the builtin error interface +func (e WebhookNotificationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sWebhookNotification.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WebhookNotificationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WebhookNotificationValidationError{} + // Validate checks the field values on SlackNotification with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. diff --git a/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.go index 3e5480bbf9..643e9326cd 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.go @@ -95,26 +95,69 @@ func (m *EmailMessage) GetBody() string { return "" } +// Represents the content that will be sent to a webhook endpoint. +type WebhookMessage struct { + // The content of webhook request. + Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WebhookMessage) Reset() { *m = WebhookMessage{} } +func (m *WebhookMessage) String() string { return proto.CompactTextString(m) } +func (*WebhookMessage) ProtoMessage() {} +func (*WebhookMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_cbe32eb21e00da05, []int{1} +} + +func (m *WebhookMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WebhookMessage.Unmarshal(m, b) +} +func (m *WebhookMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WebhookMessage.Marshal(b, m, deterministic) +} +func (m *WebhookMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebhookMessage.Merge(m, src) +} +func (m *WebhookMessage) XXX_Size() int { + return xxx_messageInfo_WebhookMessage.Size(m) +} +func (m *WebhookMessage) XXX_DiscardUnknown() { + xxx_messageInfo_WebhookMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_WebhookMessage proto.InternalMessageInfo + +func (m *WebhookMessage) GetBody() string { + if m != nil { + return m.Body + } + return "" +} + func init() { proto.RegisterType((*EmailMessage)(nil), "flyteidl.admin.EmailMessage") + proto.RegisterType((*WebhookMessage)(nil), "flyteidl.admin.WebhookMessage") } func init() { proto.RegisterFile("flyteidl/admin/notification.proto", fileDescriptor_cbe32eb21e00da05) } var fileDescriptor_cbe32eb21e00da05 = []byte{ - // 210 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0x3f, 0x4f, 0xc3, 0x30, - 0x10, 0xc5, 0x15, 0x5a, 0x21, 0xd5, 0x54, 0x80, 0x3c, 0x65, 0x6c, 0x99, 0xca, 0x40, 0x3c, 0x30, - 0x22, 0x16, 0x24, 0x36, 0x58, 0x3a, 0xb2, 0x54, 0xfe, 0x73, 0x31, 0x87, 0x9c, 0xbb, 0xc8, 0x76, - 0x86, 0x7c, 0x0e, 0xbe, 0x30, 0xc2, 0x09, 0x44, 0xdd, 0x9e, 0xde, 0xfb, 0x9d, 0x74, 0x3f, 0xb1, - 0x6f, 0xc3, 0x98, 0x01, 0x5d, 0x50, 0xda, 0x75, 0x48, 0x8a, 0x38, 0x63, 0x8b, 0x56, 0x67, 0x64, - 0x6a, 0xfa, 0xc8, 0x99, 0xe5, 0xf5, 0x1f, 0xd2, 0x14, 0xe4, 0xee, 0xbb, 0x12, 0xdb, 0xd7, 0x4e, - 0x63, 0x78, 0x87, 0x94, 0xb4, 0x07, 0x79, 0x2f, 0x6e, 0x23, 0x58, 0xec, 0x11, 0x28, 0xa7, 0x13, - 0xfc, 0x4e, 0x75, 0xb5, 0x5b, 0x1d, 0x36, 0xc7, 0x9b, 0xa5, 0x2f, 0x17, 0x72, 0x2f, 0xb6, 0x09, - 0xc8, 0x41, 0x9c, 0xb1, 0x8b, 0x5d, 0x75, 0xd8, 0x1c, 0xaf, 0xa6, 0x6e, 0x41, 0x06, 0xf3, 0x05, - 0x36, 0x9f, 0x02, 0x12, 0xd4, 0xab, 0x19, 0x99, 0xba, 0x37, 0x24, 0x90, 0x52, 0xac, 0x0d, 0xbb, - 0xb1, 0x5e, 0x97, 0xa9, 0xe4, 0x97, 0xe7, 0x8f, 0x27, 0x8f, 0xf9, 0x73, 0x30, 0x8d, 0xe5, 0x4e, - 0x95, 0x97, 0x39, 0xfa, 0x29, 0xa8, 0x7f, 0x49, 0x0f, 0xa4, 0x7a, 0xf3, 0xe0, 0x59, 0x9d, 0x7b, - 0x9b, 0xcb, 0xe2, 0xfa, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x54, 0x10, 0xff, 0x10, 0x01, - 0x00, 0x00, + // 228 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0xd0, 0xbf, 0x4e, 0xc3, 0x30, + 0x10, 0x06, 0x70, 0x85, 0x56, 0x48, 0x35, 0x55, 0x41, 0x9e, 0x32, 0xb6, 0x15, 0x43, 0x19, 0x88, + 0x07, 0x46, 0xc4, 0x82, 0xc4, 0x06, 0x4b, 0x17, 0x24, 0x96, 0xca, 0x7f, 0xae, 0xee, 0x81, 0x73, + 0x17, 0xd9, 0xee, 0xd0, 0xe7, 0xe0, 0x85, 0x11, 0x4e, 0x43, 0xc4, 0x76, 0xfa, 0xee, 0x67, 0xc9, + 0xf7, 0x89, 0xd5, 0x3e, 0x9c, 0x32, 0xa0, 0x0b, 0x4a, 0xbb, 0x16, 0x49, 0x11, 0x67, 0xdc, 0xa3, + 0xd5, 0x19, 0x99, 0x9a, 0x2e, 0x72, 0x66, 0xb9, 0x18, 0x48, 0x53, 0xc8, 0xfa, 0xbb, 0x12, 0xf3, + 0x97, 0x56, 0x63, 0x78, 0x83, 0x94, 0xb4, 0x07, 0x79, 0x27, 0x6e, 0x22, 0x58, 0xec, 0x10, 0x28, + 0xa7, 0x1d, 0xfc, 0xae, 0xea, 0x6a, 0x39, 0xd9, 0xcc, 0xb6, 0xd7, 0x63, 0x5e, 0x5e, 0xc8, 0x95, + 0x98, 0x27, 0x20, 0x07, 0xf1, 0xcc, 0x2e, 0x96, 0xd5, 0x66, 0xb6, 0xbd, 0xea, 0xb3, 0x91, 0x1c, + 0xcd, 0x27, 0xd8, 0xbc, 0x0b, 0x48, 0x50, 0x4f, 0xce, 0xa4, 0xcf, 0x5e, 0x91, 0x40, 0x4a, 0x31, + 0x35, 0xec, 0x4e, 0xf5, 0xb4, 0xac, 0xca, 0xbc, 0xbe, 0x15, 0x8b, 0x77, 0x30, 0x07, 0xe6, 0xaf, + 0xe1, 0x5b, 0x83, 0xaa, 0x46, 0xf5, 0xfc, 0xf4, 0xf1, 0xe8, 0x31, 0x1f, 0x8e, 0xa6, 0xb1, 0xdc, + 0xaa, 0x72, 0x18, 0x47, 0xdf, 0x0f, 0xea, 0xaf, 0x0a, 0x0f, 0xa4, 0x3a, 0x73, 0xef, 0x59, 0xfd, + 0x6f, 0xc7, 0x5c, 0x96, 0x46, 0x1e, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x27, 0xbe, 0xc4, 0x40, + 0x36, 0x01, 0x00, 0x00, } diff --git a/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.validate.go b/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.validate.go index 46b7a7d305..070d0ca578 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.validate.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/notification.pb.validate.go @@ -106,3 +106,70 @@ var _ interface { Cause() error ErrorName() string } = EmailMessageValidationError{} + +// Validate checks the field values on WebhookMessage with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *WebhookMessage) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Body + + return nil +} + +// WebhookMessageValidationError is the validation error returned by +// WebhookMessage.Validate if the designated constraints aren't met. +type WebhookMessageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WebhookMessageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WebhookMessageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WebhookMessageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WebhookMessageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WebhookMessageValidationError) ErrorName() string { return "WebhookMessageValidationError" } + +// Error satisfies the builtin error interface +func (e WebhookMessageValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sWebhookMessage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WebhookMessageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WebhookMessageValidationError{} diff --git a/flyteidl/gen/pb-java/flyteidl/admin/Common.java b/flyteidl/gen/pb-java/flyteidl/admin/Common.java index 4120abc852..9f078869e1 100644 --- a/flyteidl/gen/pb-java/flyteidl/admin/Common.java +++ b/flyteidl/gen/pb-java/flyteidl/admin/Common.java @@ -14890,6 +14890,877 @@ public flyteidl.admin.Common.PagerDutyNotification getDefaultInstanceForType() { } + public interface WebhookNotificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.WebhookNotification) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * +required
+     * The webhook that is already registered to the flyteadmin.
+     * 
+ * + * string webhook_name = 1; + */ + java.lang.String getWebhookName(); + /** + *
+     * +required
+     * The webhook that is already registered to the flyteadmin.
+     * 
+ * + * string webhook_name = 1; + */ + com.google.protobuf.ByteString + getWebhookNameBytes(); + + /** + *
+     * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+     * +optional
+     * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + boolean hasMessage(); + /** + *
+     * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+     * +optional
+     * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + flyteidl.admin.Notification.WebhookMessage getMessage(); + /** + *
+     * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+     * +optional
+     * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + flyteidl.admin.Notification.WebhookMessageOrBuilder getMessageOrBuilder(); + } + /** + *
+   * Defines a webhook notification specification.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.WebhookNotification} + */ + public static final class WebhookNotification extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.WebhookNotification) + WebhookNotificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebhookNotification.newBuilder() to construct. + private WebhookNotification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebhookNotification() { + webhookName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebhookNotification( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + webhookName_ = s; + break; + } + case 18: { + flyteidl.admin.Notification.WebhookMessage.Builder subBuilder = null; + if (message_ != null) { + subBuilder = message_.toBuilder(); + } + message_ = input.readMessage(flyteidl.admin.Notification.WebhookMessage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(message_); + message_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 flyteidl.admin.Common.internal_static_flyteidl_admin_WebhookNotification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.Common.internal_static_flyteidl_admin_WebhookNotification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.Common.WebhookNotification.class, flyteidl.admin.Common.WebhookNotification.Builder.class); + } + + public static final int WEBHOOK_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object webhookName_; + /** + *
+     * +required
+     * The webhook that is already registered to the flyteadmin.
+     * 
+ * + * string webhook_name = 1; + */ + public java.lang.String getWebhookName() { + java.lang.Object ref = webhookName_; + 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(); + webhookName_ = s; + return s; + } + } + /** + *
+     * +required
+     * The webhook that is already registered to the flyteadmin.
+     * 
+ * + * string webhook_name = 1; + */ + public com.google.protobuf.ByteString + getWebhookNameBytes() { + java.lang.Object ref = webhookName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webhookName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + private flyteidl.admin.Notification.WebhookMessage message_; + /** + *
+     * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+     * +optional
+     * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public boolean hasMessage() { + return message_ != null; + } + /** + *
+     * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+     * +optional
+     * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public flyteidl.admin.Notification.WebhookMessage getMessage() { + return message_ == null ? flyteidl.admin.Notification.WebhookMessage.getDefaultInstance() : message_; + } + /** + *
+     * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+     * +optional
+     * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public flyteidl.admin.Notification.WebhookMessageOrBuilder getMessageOrBuilder() { + return getMessage(); + } + + 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 (!getWebhookNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, webhookName_); + } + if (message_ != null) { + output.writeMessage(2, getMessage()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getWebhookNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, webhookName_); + } + if (message_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMessage()); + } + 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 flyteidl.admin.Common.WebhookNotification)) { + return super.equals(obj); + } + flyteidl.admin.Common.WebhookNotification other = (flyteidl.admin.Common.WebhookNotification) obj; + + if (!getWebhookName() + .equals(other.getWebhookName())) return false; + if (hasMessage() != other.hasMessage()) return false; + if (hasMessage()) { + if (!getMessage() + .equals(other.getMessage())) 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) + WEBHOOK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWebhookName().hashCode(); + if (hasMessage()) { + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.Common.WebhookNotification parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.Common.WebhookNotification parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.Common.WebhookNotification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.Common.WebhookNotification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.Common.WebhookNotification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.Common.WebhookNotification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.Common.WebhookNotification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.Common.WebhookNotification 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 flyteidl.admin.Common.WebhookNotification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.Common.WebhookNotification 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 flyteidl.admin.Common.WebhookNotification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.Common.WebhookNotification 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(flyteidl.admin.Common.WebhookNotification 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; + } + /** + *
+     * Defines a webhook notification specification.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.WebhookNotification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.WebhookNotification) + flyteidl.admin.Common.WebhookNotificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.Common.internal_static_flyteidl_admin_WebhookNotification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.Common.internal_static_flyteidl_admin_WebhookNotification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.Common.WebhookNotification.class, flyteidl.admin.Common.WebhookNotification.Builder.class); + } + + // Construct using flyteidl.admin.Common.WebhookNotification.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(); + webhookName_ = ""; + + if (messageBuilder_ == null) { + message_ = null; + } else { + message_ = null; + messageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.Common.internal_static_flyteidl_admin_WebhookNotification_descriptor; + } + + @java.lang.Override + public flyteidl.admin.Common.WebhookNotification getDefaultInstanceForType() { + return flyteidl.admin.Common.WebhookNotification.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.Common.WebhookNotification build() { + flyteidl.admin.Common.WebhookNotification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.Common.WebhookNotification buildPartial() { + flyteidl.admin.Common.WebhookNotification result = new flyteidl.admin.Common.WebhookNotification(this); + result.webhookName_ = webhookName_; + if (messageBuilder_ == null) { + result.message_ = message_; + } else { + result.message_ = messageBuilder_.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 flyteidl.admin.Common.WebhookNotification) { + return mergeFrom((flyteidl.admin.Common.WebhookNotification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.Common.WebhookNotification other) { + if (other == flyteidl.admin.Common.WebhookNotification.getDefaultInstance()) return this; + if (!other.getWebhookName().isEmpty()) { + webhookName_ = other.webhookName_; + onChanged(); + } + if (other.hasMessage()) { + mergeMessage(other.getMessage()); + } + 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 { + flyteidl.admin.Common.WebhookNotification parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.Common.WebhookNotification) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object webhookName_ = ""; + /** + *
+       * +required
+       * The webhook that is already registered to the flyteadmin.
+       * 
+ * + * string webhook_name = 1; + */ + public java.lang.String getWebhookName() { + java.lang.Object ref = webhookName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * +required
+       * The webhook that is already registered to the flyteadmin.
+       * 
+ * + * string webhook_name = 1; + */ + public com.google.protobuf.ByteString + getWebhookNameBytes() { + java.lang.Object ref = webhookName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webhookName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * +required
+       * The webhook that is already registered to the flyteadmin.
+       * 
+ * + * string webhook_name = 1; + */ + public Builder setWebhookName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webhookName_ = value; + onChanged(); + return this; + } + /** + *
+       * +required
+       * The webhook that is already registered to the flyteadmin.
+       * 
+ * + * string webhook_name = 1; + */ + public Builder clearWebhookName() { + + webhookName_ = getDefaultInstance().getWebhookName(); + onChanged(); + return this; + } + /** + *
+       * +required
+       * The webhook that is already registered to the flyteadmin.
+       * 
+ * + * string webhook_name = 1; + */ + public Builder setWebhookNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webhookName_ = value; + onChanged(); + return this; + } + + private flyteidl.admin.Notification.WebhookMessage message_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.Notification.WebhookMessage, flyteidl.admin.Notification.WebhookMessage.Builder, flyteidl.admin.Notification.WebhookMessageOrBuilder> messageBuilder_; + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public boolean hasMessage() { + return messageBuilder_ != null || message_ != null; + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public flyteidl.admin.Notification.WebhookMessage getMessage() { + if (messageBuilder_ == null) { + return message_ == null ? flyteidl.admin.Notification.WebhookMessage.getDefaultInstance() : message_; + } else { + return messageBuilder_.getMessage(); + } + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public Builder setMessage(flyteidl.admin.Notification.WebhookMessage value) { + if (messageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + messageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public Builder setMessage( + flyteidl.admin.Notification.WebhookMessage.Builder builderForValue) { + if (messageBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + messageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public Builder mergeMessage(flyteidl.admin.Notification.WebhookMessage value) { + if (messageBuilder_ == null) { + if (message_ != null) { + message_ = + flyteidl.admin.Notification.WebhookMessage.newBuilder(message_).mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + messageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public Builder clearMessage() { + if (messageBuilder_ == null) { + message_ = null; + onChanged(); + } else { + message_ = null; + messageBuilder_ = null; + } + + return this; + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public flyteidl.admin.Notification.WebhookMessage.Builder getMessageBuilder() { + + onChanged(); + return getMessageFieldBuilder().getBuilder(); + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + public flyteidl.admin.Notification.WebhookMessageOrBuilder getMessageOrBuilder() { + if (messageBuilder_ != null) { + return messageBuilder_.getMessageOrBuilder(); + } else { + return message_ == null ? + flyteidl.admin.Notification.WebhookMessage.getDefaultInstance() : message_; + } + } + /** + *
+       * The message to send to the webhook. if not specified, use default payload defined in flyteadmin.
+       * +optional
+       * 
+ * + * .flyteidl.admin.WebhookMessage message = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.Notification.WebhookMessage, flyteidl.admin.Notification.WebhookMessage.Builder, flyteidl.admin.Notification.WebhookMessageOrBuilder> + getMessageFieldBuilder() { + if (messageBuilder_ == null) { + messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.Notification.WebhookMessage, flyteidl.admin.Notification.WebhookMessage.Builder, flyteidl.admin.Notification.WebhookMessageOrBuilder>( + getMessage(), + getParentForChildren(), + isClean()); + message_ = null; + } + return messageBuilder_; + } + @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:flyteidl.admin.WebhookNotification) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.WebhookNotification) + private static final flyteidl.admin.Common.WebhookNotification DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.Common.WebhookNotification(); + } + + public static flyteidl.admin.Common.WebhookNotification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebhookNotification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebhookNotification(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 flyteidl.admin.Common.WebhookNotification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface SlackNotificationOrBuilder extends // @@protoc_insertion_point(interface_extends:flyteidl.admin.SlackNotification) com.google.protobuf.MessageOrBuilder { @@ -22554,6 +23425,11 @@ public flyteidl.admin.Common.FlyteURLs getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_flyteidl_admin_PagerDutyNotification_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_WebhookNotification_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_WebhookNotification_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_flyteidl_admin_SlackNotification_descriptor; private static final @@ -22619,76 +23495,79 @@ public flyteidl.admin.Common.FlyteURLs getDefaultInstanceForType() { static { java.lang.String[] descriptorData = { "\n\033flyteidl/admin/common.proto\022\016flyteidl." + - "admin\032\035flyteidl/core/execution.proto\032\036fl" + - "yteidl/core/identifier.proto\032\034flyteidl/c" + - "ore/literals.proto\032\037google/protobuf/time" + - "stamp.proto\"F\n\025NamedEntityIdentifier\022\017\n\007" + - "project\030\001 \001(\t\022\016\n\006domain\030\002 \001(\t\022\014\n\004name\030\003 " + - "\001(\t\"[\n\023NamedEntityMetadata\022\023\n\013descriptio" + - "n\030\001 \001(\t\022/\n\005state\030\002 \001(\0162 .flyteidl.admin." + - "NamedEntityState\"\253\001\n\013NamedEntity\0222\n\rreso" + - "urce_type\030\001 \001(\0162\033.flyteidl.core.Resource" + - "Type\0221\n\002id\030\002 \001(\0132%.flyteidl.admin.NamedE" + - "ntityIdentifier\0225\n\010metadata\030\003 \001(\0132#.flyt" + - "eidl.admin.NamedEntityMetadata\"r\n\004Sort\022\013" + - "\n\003key\030\001 \001(\t\0221\n\tdirection\030\002 \001(\0162\036.flyteid" + - "l.admin.Sort.Direction\"*\n\tDirection\022\016\n\nD" + - "ESCENDING\020\000\022\r\n\tASCENDING\020\001\"\231\001\n NamedEnti" + - "tyIdentifierListRequest\022\017\n\007project\030\001 \001(\t" + - "\022\016\n\006domain\030\002 \001(\t\022\r\n\005limit\030\003 \001(\r\022\r\n\005token" + - "\030\004 \001(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admin" + - ".Sort\022\017\n\007filters\030\006 \001(\t\"\303\001\n\026NamedEntityLi" + - "stRequest\0222\n\rresource_type\030\001 \001(\0162\033.flyte" + - "idl.core.ResourceType\022\017\n\007project\030\002 \001(\t\022\016" + - "\n\006domain\030\003 \001(\t\022\r\n\005limit\030\004 \001(\r\022\r\n\005token\030\005" + - " \001(\t\022%\n\007sort_by\030\006 \001(\0132\024.flyteidl.admin.S" + - "ort\022\017\n\007filters\030\007 \001(\t\"c\n\031NamedEntityIdent" + - "ifierList\0227\n\010entities\030\001 \003(\0132%.flyteidl.a" + - "dmin.NamedEntityIdentifier\022\r\n\005token\030\002 \001(" + - "\t\"O\n\017NamedEntityList\022-\n\010entities\030\001 \003(\0132\033" + - ".flyteidl.admin.NamedEntity\022\r\n\005token\030\002 \001" + - "(\t\"~\n\025NamedEntityGetRequest\0222\n\rresource_" + + "admin\032!flyteidl/admin/notification.proto" + + "\032\035flyteidl/core/execution.proto\032\036flyteid" + + "l/core/identifier.proto\032\034flyteidl/core/l" + + "iterals.proto\032\037google/protobuf/timestamp" + + ".proto\"F\n\025NamedEntityIdentifier\022\017\n\007proje" + + "ct\030\001 \001(\t\022\016\n\006domain\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\"[" + + "\n\023NamedEntityMetadata\022\023\n\013description\030\001 \001" + + "(\t\022/\n\005state\030\002 \001(\0162 .flyteidl.admin.Named" + + "EntityState\"\253\001\n\013NamedEntity\0222\n\rresource_" + "type\030\001 \001(\0162\033.flyteidl.core.ResourceType\022" + "1\n\002id\030\002 \001(\0132%.flyteidl.admin.NamedEntity" + - "Identifier\"\270\001\n\030NamedEntityUpdateRequest\022" + - "2\n\rresource_type\030\001 \001(\0162\033.flyteidl.core.R" + - "esourceType\0221\n\002id\030\002 \001(\0132%.flyteidl.admin" + - ".NamedEntityIdentifier\0225\n\010metadata\030\003 \001(\013" + - "2#.flyteidl.admin.NamedEntityMetadata\"\033\n" + - "\031NamedEntityUpdateResponse\"9\n\020ObjectGetR" + - "equest\022%\n\002id\030\001 \001(\0132\031.flyteidl.core.Ident" + - "ifier\"\236\001\n\023ResourceListRequest\0221\n\002id\030\001 \001(" + - "\0132%.flyteidl.admin.NamedEntityIdentifier" + - "\022\r\n\005limit\030\002 \001(\r\022\r\n\005token\030\003 \001(\t\022\017\n\007filter" + - "s\030\004 \001(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admi" + - "n.Sort\"-\n\021EmailNotification\022\030\n\020recipient" + - "s_email\030\001 \003(\t\"1\n\025PagerDutyNotification\022\030" + - "\n\020recipients_email\030\001 \003(\t\"-\n\021SlackNotific" + - "ation\022\030\n\020recipients_email\030\001 \003(\t\"\363\001\n\014Noti" + - "fication\0226\n\006phases\030\001 \003(\0162&.flyteidl.core" + - ".WorkflowExecution.Phase\0222\n\005email\030\002 \001(\0132" + - "!.flyteidl.admin.EmailNotificationH\000\022;\n\n" + - "pager_duty\030\003 \001(\0132%.flyteidl.admin.PagerD" + - "utyNotificationH\000\0222\n\005slack\030\004 \001(\0132!.flyte" + - "idl.admin.SlackNotificationH\000B\006\n\004type\")\n" + - "\007UrlBlob\022\013\n\003url\030\001 \001(\t\022\r\n\005bytes\030\002 \001(\003:\002\030\001" + - "\"k\n\006Labels\0222\n\006values\030\001 \003(\0132\".flyteidl.ad" + - "min.Labels.ValuesEntry\032-\n\013ValuesEntry\022\013\n" + - "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"u\n\013Annotat" + - "ions\0227\n\006values\030\001 \003(\0132\'.flyteidl.admin.An" + - "notations.ValuesEntry\032-\n\013ValuesEntry\022\013\n\003" + - "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\004Envs\022+\n\006" + - "values\030\001 \003(\0132\033.flyteidl.core.KeyValuePai" + - "r\"N\n\010AuthRole\022\032\n\022assumable_iam_role\030\001 \001(" + - "\t\022\"\n\032kubernetes_service_account\030\002 \001(\t:\002\030" + - "\001\"5\n\023RawOutputDataConfig\022\036\n\026output_locat" + - "ion_prefix\030\001 \001(\t\":\n\tFlyteURLs\022\016\n\006inputs\030" + - "\001 \001(\t\022\017\n\007outputs\030\002 \001(\t\022\014\n\004deck\030\003 \001(\t*\\\n\020" + - "NamedEntityState\022\027\n\023NAMED_ENTITY_ACTIVE\020" + - "\000\022\031\n\025NAMED_ENTITY_ARCHIVED\020\001\022\024\n\020SYSTEM_G" + - "ENERATED\020\002B=Z;github.com/flyteorg/flyte/" + - "flyteidl/gen/pb-go/flyteidl/adminb\006proto" + - "3" + "Identifier\0225\n\010metadata\030\003 \001(\0132#.flyteidl." + + "admin.NamedEntityMetadata\"r\n\004Sort\022\013\n\003key" + + "\030\001 \001(\t\0221\n\tdirection\030\002 \001(\0162\036.flyteidl.adm" + + "in.Sort.Direction\"*\n\tDirection\022\016\n\nDESCEN" + + "DING\020\000\022\r\n\tASCENDING\020\001\"\231\001\n NamedEntityIde" + + "ntifierListRequest\022\017\n\007project\030\001 \001(\t\022\016\n\006d" + + "omain\030\002 \001(\t\022\r\n\005limit\030\003 \001(\r\022\r\n\005token\030\004 \001(" + + "\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admin.Sort" + + "\022\017\n\007filters\030\006 \001(\t\"\303\001\n\026NamedEntityListReq" + + "uest\0222\n\rresource_type\030\001 \001(\0162\033.flyteidl.c" + + "ore.ResourceType\022\017\n\007project\030\002 \001(\t\022\016\n\006dom" + + "ain\030\003 \001(\t\022\r\n\005limit\030\004 \001(\r\022\r\n\005token\030\005 \001(\t\022" + + "%\n\007sort_by\030\006 \001(\0132\024.flyteidl.admin.Sort\022\017" + + "\n\007filters\030\007 \001(\t\"c\n\031NamedEntityIdentifier" + + "List\0227\n\010entities\030\001 \003(\0132%.flyteidl.admin." + + "NamedEntityIdentifier\022\r\n\005token\030\002 \001(\t\"O\n\017" + + "NamedEntityList\022-\n\010entities\030\001 \003(\0132\033.flyt" + + "eidl.admin.NamedEntity\022\r\n\005token\030\002 \001(\t\"~\n" + + "\025NamedEntityGetRequest\0222\n\rresource_type\030" + + "\001 \001(\0162\033.flyteidl.core.ResourceType\0221\n\002id" + + "\030\002 \001(\0132%.flyteidl.admin.NamedEntityIdent" + + "ifier\"\270\001\n\030NamedEntityUpdateRequest\0222\n\rre" + + "source_type\030\001 \001(\0162\033.flyteidl.core.Resour" + + "ceType\0221\n\002id\030\002 \001(\0132%.flyteidl.admin.Name" + + "dEntityIdentifier\0225\n\010metadata\030\003 \001(\0132#.fl" + + "yteidl.admin.NamedEntityMetadata\"\033\n\031Name" + + "dEntityUpdateResponse\"9\n\020ObjectGetReques" + + "t\022%\n\002id\030\001 \001(\0132\031.flyteidl.core.Identifier" + + "\"\236\001\n\023ResourceListRequest\0221\n\002id\030\001 \001(\0132%.f" + + "lyteidl.admin.NamedEntityIdentifier\022\r\n\005l" + + "imit\030\002 \001(\r\022\r\n\005token\030\003 \001(\t\022\017\n\007filters\030\004 \001" + + "(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyteidl.admin.Sor" + + "t\"-\n\021EmailNotification\022\030\n\020recipients_ema" + + "il\030\001 \003(\t\"1\n\025PagerDutyNotification\022\030\n\020rec" + + "ipients_email\030\001 \003(\t\"\\\n\023WebhookNotificati" + + "on\022\024\n\014webhook_name\030\001 \001(\t\022/\n\007message\030\002 \001(" + + "\0132\036.flyteidl.admin.WebhookMessage\"-\n\021Sla" + + "ckNotification\022\030\n\020recipients_email\030\001 \003(\t" + + "\"\363\001\n\014Notification\0226\n\006phases\030\001 \003(\0162&.flyt" + + "eidl.core.WorkflowExecution.Phase\0222\n\005ema" + + "il\030\002 \001(\0132!.flyteidl.admin.EmailNotificat" + + "ionH\000\022;\n\npager_duty\030\003 \001(\0132%.flyteidl.adm" + + "in.PagerDutyNotificationH\000\0222\n\005slack\030\004 \001(" + + "\0132!.flyteidl.admin.SlackNotificationH\000B\006" + + "\n\004type\")\n\007UrlBlob\022\013\n\003url\030\001 \001(\t\022\r\n\005bytes\030" + + "\002 \001(\003:\002\030\001\"k\n\006Labels\0222\n\006values\030\001 \003(\0132\".fl" + + "yteidl.admin.Labels.ValuesEntry\032-\n\013Value" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"u" + + "\n\013Annotations\0227\n\006values\030\001 \003(\0132\'.flyteidl" + + ".admin.Annotations.ValuesEntry\032-\n\013Values" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n" + + "\004Envs\022+\n\006values\030\001 \003(\0132\033.flyteidl.core.Ke" + + "yValuePair\"N\n\010AuthRole\022\032\n\022assumable_iam_" + + "role\030\001 \001(\t\022\"\n\032kubernetes_service_account" + + "\030\002 \001(\t:\002\030\001\"5\n\023RawOutputDataConfig\022\036\n\026out" + + "put_location_prefix\030\001 \001(\t\":\n\tFlyteURLs\022\016" + + "\n\006inputs\030\001 \001(\t\022\017\n\007outputs\030\002 \001(\t\022\014\n\004deck\030" + + "\003 \001(\t*\\\n\020NamedEntityState\022\027\n\023NAMED_ENTIT" + + "Y_ACTIVE\020\000\022\031\n\025NAMED_ENTITY_ARCHIVED\020\001\022\024\n" + + "\020SYSTEM_GENERATED\020\002B=Z;github.com/flyteo" + + "rg/flyte/flyteidl/gen/pb-go/flyteidl/adm" + + "inb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -22701,6 +23580,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + flyteidl.admin.Notification.getDescriptor(), flyteidl.core.Execution.getDescriptor(), flyteidl.core.IdentifierOuterClass.getDescriptor(), flyteidl.core.Literals.getDescriptor(), @@ -22796,26 +23676,32 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_PagerDutyNotification_descriptor, new java.lang.String[] { "RecipientsEmail", }); - internal_static_flyteidl_admin_SlackNotification_descriptor = + internal_static_flyteidl_admin_WebhookNotification_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_flyteidl_admin_WebhookNotification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_WebhookNotification_descriptor, + new java.lang.String[] { "WebhookName", "Message", }); + internal_static_flyteidl_admin_SlackNotification_descriptor = + getDescriptor().getMessageTypes().get(16); internal_static_flyteidl_admin_SlackNotification_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_SlackNotification_descriptor, new java.lang.String[] { "RecipientsEmail", }); internal_static_flyteidl_admin_Notification_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_flyteidl_admin_Notification_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_Notification_descriptor, new java.lang.String[] { "Phases", "Email", "PagerDuty", "Slack", "Type", }); internal_static_flyteidl_admin_UrlBlob_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_flyteidl_admin_UrlBlob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_UrlBlob_descriptor, new java.lang.String[] { "Url", "Bytes", }); internal_static_flyteidl_admin_Labels_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_flyteidl_admin_Labels_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_Labels_descriptor, @@ -22827,7 +23713,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_admin_Labels_ValuesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_flyteidl_admin_Annotations_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_flyteidl_admin_Annotations_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_Annotations_descriptor, @@ -22839,29 +23725,30 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_admin_Annotations_ValuesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_flyteidl_admin_Envs_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_flyteidl_admin_Envs_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_Envs_descriptor, new java.lang.String[] { "Values", }); internal_static_flyteidl_admin_AuthRole_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_flyteidl_admin_AuthRole_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_AuthRole_descriptor, new java.lang.String[] { "AssumableIamRole", "KubernetesServiceAccount", }); internal_static_flyteidl_admin_RawOutputDataConfig_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_flyteidl_admin_RawOutputDataConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_RawOutputDataConfig_descriptor, new java.lang.String[] { "OutputLocationPrefix", }); internal_static_flyteidl_admin_FlyteURLs_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_flyteidl_admin_FlyteURLs_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_FlyteURLs_descriptor, new java.lang.String[] { "Inputs", "Outputs", "Deck", }); + flyteidl.admin.Notification.getDescriptor(); flyteidl.core.Execution.getDescriptor(); flyteidl.core.IdentifierOuterClass.getDescriptor(); flyteidl.core.Literals.getDescriptor(); diff --git a/flyteidl/gen/pb-java/flyteidl/admin/Notification.java b/flyteidl/gen/pb-java/flyteidl/admin/Notification.java index 4d5a1f2b35..4959bdd04c 100644 --- a/flyteidl/gen/pb-java/flyteidl/admin/Notification.java +++ b/flyteidl/gen/pb-java/flyteidl/admin/Notification.java @@ -1280,11 +1280,609 @@ public flyteidl.admin.Notification.EmailMessage getDefaultInstanceForType() { } + public interface WebhookMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.WebhookMessage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The content of webhook request.
+     * 
+ * + * string body = 1; + */ + java.lang.String getBody(); + /** + *
+     * The content of webhook request.
+     * 
+ * + * string body = 1; + */ + com.google.protobuf.ByteString + getBodyBytes(); + } + /** + *
+   * Represents the content that will be sent to a webhook endpoint.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.WebhookMessage} + */ + public static final class WebhookMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.WebhookMessage) + WebhookMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebhookMessage.newBuilder() to construct. + private WebhookMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebhookMessage() { + body_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebhookMessage( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + body_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 flyteidl.admin.Notification.internal_static_flyteidl_admin_WebhookMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.Notification.internal_static_flyteidl_admin_WebhookMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.Notification.WebhookMessage.class, flyteidl.admin.Notification.WebhookMessage.Builder.class); + } + + public static final int BODY_FIELD_NUMBER = 1; + private volatile java.lang.Object body_; + /** + *
+     * The content of webhook request.
+     * 
+ * + * string body = 1; + */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + 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(); + body_ = s; + return s; + } + } + /** + *
+     * The content of webhook request.
+     * 
+ * + * string body = 1; + */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getBodyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, body_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBodyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, body_); + } + 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 flyteidl.admin.Notification.WebhookMessage)) { + return super.equals(obj); + } + flyteidl.admin.Notification.WebhookMessage other = (flyteidl.admin.Notification.WebhookMessage) obj; + + if (!getBody() + .equals(other.getBody())) 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) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.Notification.WebhookMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.Notification.WebhookMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.Notification.WebhookMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.Notification.WebhookMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.Notification.WebhookMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.Notification.WebhookMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.Notification.WebhookMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.Notification.WebhookMessage 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 flyteidl.admin.Notification.WebhookMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.Notification.WebhookMessage 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 flyteidl.admin.Notification.WebhookMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.Notification.WebhookMessage 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(flyteidl.admin.Notification.WebhookMessage 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; + } + /** + *
+     * Represents the content that will be sent to a webhook endpoint.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.WebhookMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.WebhookMessage) + flyteidl.admin.Notification.WebhookMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.Notification.internal_static_flyteidl_admin_WebhookMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.Notification.internal_static_flyteidl_admin_WebhookMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.Notification.WebhookMessage.class, flyteidl.admin.Notification.WebhookMessage.Builder.class); + } + + // Construct using flyteidl.admin.Notification.WebhookMessage.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(); + body_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.Notification.internal_static_flyteidl_admin_WebhookMessage_descriptor; + } + + @java.lang.Override + public flyteidl.admin.Notification.WebhookMessage getDefaultInstanceForType() { + return flyteidl.admin.Notification.WebhookMessage.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.Notification.WebhookMessage build() { + flyteidl.admin.Notification.WebhookMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.Notification.WebhookMessage buildPartial() { + flyteidl.admin.Notification.WebhookMessage result = new flyteidl.admin.Notification.WebhookMessage(this); + result.body_ = body_; + 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 flyteidl.admin.Notification.WebhookMessage) { + return mergeFrom((flyteidl.admin.Notification.WebhookMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.Notification.WebhookMessage other) { + if (other == flyteidl.admin.Notification.WebhookMessage.getDefaultInstance()) return this; + if (!other.getBody().isEmpty()) { + body_ = other.body_; + onChanged(); + } + 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 { + flyteidl.admin.Notification.WebhookMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.Notification.WebhookMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object body_ = ""; + /** + *
+       * The content of webhook request.
+       * 
+ * + * string body = 1; + */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The content of webhook request.
+       * 
+ * + * string body = 1; + */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The content of webhook request.
+       * 
+ * + * string body = 1; + */ + public Builder setBody( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + body_ = value; + onChanged(); + return this; + } + /** + *
+       * The content of webhook request.
+       * 
+ * + * string body = 1; + */ + public Builder clearBody() { + + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + /** + *
+       * The content of webhook request.
+       * 
+ * + * string body = 1; + */ + public Builder setBodyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + body_ = value; + onChanged(); + return this; + } + @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:flyteidl.admin.WebhookMessage) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.WebhookMessage) + private static final flyteidl.admin.Notification.WebhookMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.Notification.WebhookMessage(); + } + + public static flyteidl.admin.Notification.WebhookMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebhookMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebhookMessage(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 flyteidl.admin.Notification.WebhookMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_flyteidl_admin_EmailMessage_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_flyteidl_admin_EmailMessage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_WebhookMessage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_WebhookMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -1297,9 +1895,10 @@ public flyteidl.admin.Notification.EmailMessage getDefaultInstanceForType() { "\n!flyteidl/admin/notification.proto\022\016fly" + "teidl.admin\"b\n\014EmailMessage\022\030\n\020recipient" + "s_email\030\001 \003(\t\022\024\n\014sender_email\030\002 \001(\t\022\024\n\014s" + - "ubject_line\030\003 \001(\t\022\014\n\004body\030\004 \001(\tB=Z;githu" + - "b.com/flyteorg/flyte/flyteidl/gen/pb-go/" + - "flyteidl/adminb\006proto3" + "ubject_line\030\003 \001(\t\022\014\n\004body\030\004 \001(\t\"\036\n\016Webho" + + "okMessage\022\014\n\004body\030\001 \001(\tB=Z;github.com/fl" + + "yteorg/flyte/flyteidl/gen/pb-go/flyteidl" + + "/adminb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -1319,6 +1918,12 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_EmailMessage_descriptor, new java.lang.String[] { "RecipientsEmail", "SenderEmail", "SubjectLine", "Body", }); + internal_static_flyteidl_admin_WebhookMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_flyteidl_admin_WebhookMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_WebhookMessage_descriptor, + new java.lang.String[] { "Body", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index f7186dea01..b23d049ec1 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -9345,6 +9345,64 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a WebhookNotification. */ + interface IWebhookNotification { + + /** WebhookNotification webhookName */ + webhookName?: (string|null); + + /** WebhookNotification message */ + message?: (flyteidl.admin.IWebhookMessage|null); + } + + /** Represents a WebhookNotification. */ + class WebhookNotification implements IWebhookNotification { + + /** + * Constructs a new WebhookNotification. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IWebhookNotification); + + /** WebhookNotification webhookName. */ + public webhookName: string; + + /** WebhookNotification message. */ + public message?: (flyteidl.admin.IWebhookMessage|null); + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns WebhookNotification instance + */ + public static create(properties?: flyteidl.admin.IWebhookNotification): flyteidl.admin.WebhookNotification; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link flyteidl.admin.WebhookNotification.verify|verify} messages. + * @param message WebhookNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IWebhookNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.WebhookNotification; + + /** + * Verifies a WebhookNotification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a SlackNotification. */ interface ISlackNotification { @@ -9858,6 +9916,128 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of an EmailMessage. */ + interface IEmailMessage { + + /** EmailMessage recipientsEmail */ + recipientsEmail?: (string[]|null); + + /** EmailMessage senderEmail */ + senderEmail?: (string|null); + + /** EmailMessage subjectLine */ + subjectLine?: (string|null); + + /** EmailMessage body */ + body?: (string|null); + } + + /** Represents an EmailMessage. */ + class EmailMessage implements IEmailMessage { + + /** + * Constructs a new EmailMessage. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IEmailMessage); + + /** EmailMessage recipientsEmail. */ + public recipientsEmail: string[]; + + /** EmailMessage senderEmail. */ + public senderEmail: string; + + /** EmailMessage subjectLine. */ + public subjectLine: string; + + /** EmailMessage body. */ + public body: string; + + /** + * Creates a new EmailMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EmailMessage instance + */ + public static create(properties?: flyteidl.admin.IEmailMessage): flyteidl.admin.EmailMessage; + + /** + * Encodes the specified EmailMessage message. Does not implicitly {@link flyteidl.admin.EmailMessage.verify|verify} messages. + * @param message EmailMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IEmailMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmailMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmailMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.EmailMessage; + + /** + * Verifies an EmailMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of a WebhookMessage. */ + interface IWebhookMessage { + + /** WebhookMessage body */ + body?: (string|null); + } + + /** Represents a WebhookMessage. */ + class WebhookMessage implements IWebhookMessage { + + /** + * Constructs a new WebhookMessage. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IWebhookMessage); + + /** WebhookMessage body. */ + public body: string; + + /** + * Creates a new WebhookMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns WebhookMessage instance + */ + public static create(properties?: flyteidl.admin.IWebhookMessage): flyteidl.admin.WebhookMessage; + + /** + * Encodes the specified WebhookMessage message. Does not implicitly {@link flyteidl.admin.WebhookMessage.verify|verify} messages. + * @param message WebhookMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IWebhookMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebhookMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebhookMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.WebhookMessage; + + /** + * Verifies a WebhookMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a DescriptionEntity. */ interface IDescriptionEntity { @@ -14882,76 +15062,6 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } - /** Properties of an EmailMessage. */ - interface IEmailMessage { - - /** EmailMessage recipientsEmail */ - recipientsEmail?: (string[]|null); - - /** EmailMessage senderEmail */ - senderEmail?: (string|null); - - /** EmailMessage subjectLine */ - subjectLine?: (string|null); - - /** EmailMessage body */ - body?: (string|null); - } - - /** Represents an EmailMessage. */ - class EmailMessage implements IEmailMessage { - - /** - * Constructs a new EmailMessage. - * @param [properties] Properties to set - */ - constructor(properties?: flyteidl.admin.IEmailMessage); - - /** EmailMessage recipientsEmail. */ - public recipientsEmail: string[]; - - /** EmailMessage senderEmail. */ - public senderEmail: string; - - /** EmailMessage subjectLine. */ - public subjectLine: string; - - /** EmailMessage body. */ - public body: string; - - /** - * Creates a new EmailMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns EmailMessage instance - */ - public static create(properties?: flyteidl.admin.IEmailMessage): flyteidl.admin.EmailMessage; - - /** - * Encodes the specified EmailMessage message. Does not implicitly {@link flyteidl.admin.EmailMessage.verify|verify} messages. - * @param message EmailMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: flyteidl.admin.IEmailMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EmailMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EmailMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.EmailMessage; - - /** - * Verifies an EmailMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - } - /** Properties of a Domain. */ interface IDomain { diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 223d617ecf..a72898776b 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -22668,6 +22668,135 @@ return PagerDutyNotification; })(); + admin.WebhookNotification = (function() { + + /** + * Properties of a WebhookNotification. + * @memberof flyteidl.admin + * @interface IWebhookNotification + * @property {string|null} [webhookName] WebhookNotification webhookName + * @property {flyteidl.admin.IWebhookMessage|null} [message] WebhookNotification message + */ + + /** + * Constructs a new WebhookNotification. + * @memberof flyteidl.admin + * @classdesc Represents a WebhookNotification. + * @implements IWebhookNotification + * @constructor + * @param {flyteidl.admin.IWebhookNotification=} [properties] Properties to set + */ + function WebhookNotification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebhookNotification webhookName. + * @member {string} webhookName + * @memberof flyteidl.admin.WebhookNotification + * @instance + */ + WebhookNotification.prototype.webhookName = ""; + + /** + * WebhookNotification message. + * @member {flyteidl.admin.IWebhookMessage|null|undefined} message + * @memberof flyteidl.admin.WebhookNotification + * @instance + */ + WebhookNotification.prototype.message = null; + + /** + * Creates a new WebhookNotification instance using the specified properties. + * @function create + * @memberof flyteidl.admin.WebhookNotification + * @static + * @param {flyteidl.admin.IWebhookNotification=} [properties] Properties to set + * @returns {flyteidl.admin.WebhookNotification} WebhookNotification instance + */ + WebhookNotification.create = function create(properties) { + return new WebhookNotification(properties); + }; + + /** + * Encodes the specified WebhookNotification message. Does not implicitly {@link flyteidl.admin.WebhookNotification.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.WebhookNotification + * @static + * @param {flyteidl.admin.IWebhookNotification} message WebhookNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webhookName != null && message.hasOwnProperty("webhookName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.webhookName); + if (message.message != null && message.hasOwnProperty("message")) + $root.flyteidl.admin.WebhookMessage.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a WebhookNotification message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.WebhookNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.WebhookNotification} WebhookNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookNotification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.WebhookNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.webhookName = reader.string(); + break; + case 2: + message.message = $root.flyteidl.admin.WebhookMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a WebhookNotification message. + * @function verify + * @memberof flyteidl.admin.WebhookNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webhookName != null && message.hasOwnProperty("webhookName")) + if (!$util.isString(message.webhookName)) + return "webhookName: string expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.flyteidl.admin.WebhookMessage.verify(message.message); + if (error) + return "message." + error; + } + return null; + }; + + return WebhookNotification; + })(); + admin.SlackNotification = (function() { /** @@ -23882,6 +24011,285 @@ return FlyteURLs; })(); + admin.EmailMessage = (function() { + + /** + * Properties of an EmailMessage. + * @memberof flyteidl.admin + * @interface IEmailMessage + * @property {Array.|null} [recipientsEmail] EmailMessage recipientsEmail + * @property {string|null} [senderEmail] EmailMessage senderEmail + * @property {string|null} [subjectLine] EmailMessage subjectLine + * @property {string|null} [body] EmailMessage body + */ + + /** + * Constructs a new EmailMessage. + * @memberof flyteidl.admin + * @classdesc Represents an EmailMessage. + * @implements IEmailMessage + * @constructor + * @param {flyteidl.admin.IEmailMessage=} [properties] Properties to set + */ + function EmailMessage(properties) { + this.recipientsEmail = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EmailMessage recipientsEmail. + * @member {Array.} recipientsEmail + * @memberof flyteidl.admin.EmailMessage + * @instance + */ + EmailMessage.prototype.recipientsEmail = $util.emptyArray; + + /** + * EmailMessage senderEmail. + * @member {string} senderEmail + * @memberof flyteidl.admin.EmailMessage + * @instance + */ + EmailMessage.prototype.senderEmail = ""; + + /** + * EmailMessage subjectLine. + * @member {string} subjectLine + * @memberof flyteidl.admin.EmailMessage + * @instance + */ + EmailMessage.prototype.subjectLine = ""; + + /** + * EmailMessage body. + * @member {string} body + * @memberof flyteidl.admin.EmailMessage + * @instance + */ + EmailMessage.prototype.body = ""; + + /** + * Creates a new EmailMessage instance using the specified properties. + * @function create + * @memberof flyteidl.admin.EmailMessage + * @static + * @param {flyteidl.admin.IEmailMessage=} [properties] Properties to set + * @returns {flyteidl.admin.EmailMessage} EmailMessage instance + */ + EmailMessage.create = function create(properties) { + return new EmailMessage(properties); + }; + + /** + * Encodes the specified EmailMessage message. Does not implicitly {@link flyteidl.admin.EmailMessage.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.EmailMessage + * @static + * @param {flyteidl.admin.IEmailMessage} message EmailMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmailMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recipientsEmail != null && message.recipientsEmail.length) + for (var i = 0; i < message.recipientsEmail.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.recipientsEmail[i]); + if (message.senderEmail != null && message.hasOwnProperty("senderEmail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.senderEmail); + if (message.subjectLine != null && message.hasOwnProperty("subjectLine")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subjectLine); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.body); + return writer; + }; + + /** + * Decodes an EmailMessage message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.EmailMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.EmailMessage} EmailMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmailMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.EmailMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.recipientsEmail && message.recipientsEmail.length)) + message.recipientsEmail = []; + message.recipientsEmail.push(reader.string()); + break; + case 2: + message.senderEmail = reader.string(); + break; + case 3: + message.subjectLine = reader.string(); + break; + case 4: + message.body = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an EmailMessage message. + * @function verify + * @memberof flyteidl.admin.EmailMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmailMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recipientsEmail != null && message.hasOwnProperty("recipientsEmail")) { + if (!Array.isArray(message.recipientsEmail)) + return "recipientsEmail: array expected"; + for (var i = 0; i < message.recipientsEmail.length; ++i) + if (!$util.isString(message.recipientsEmail[i])) + return "recipientsEmail: string[] expected"; + } + if (message.senderEmail != null && message.hasOwnProperty("senderEmail")) + if (!$util.isString(message.senderEmail)) + return "senderEmail: string expected"; + if (message.subjectLine != null && message.hasOwnProperty("subjectLine")) + if (!$util.isString(message.subjectLine)) + return "subjectLine: string expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + return null; + }; + + return EmailMessage; + })(); + + admin.WebhookMessage = (function() { + + /** + * Properties of a WebhookMessage. + * @memberof flyteidl.admin + * @interface IWebhookMessage + * @property {string|null} [body] WebhookMessage body + */ + + /** + * Constructs a new WebhookMessage. + * @memberof flyteidl.admin + * @classdesc Represents a WebhookMessage. + * @implements IWebhookMessage + * @constructor + * @param {flyteidl.admin.IWebhookMessage=} [properties] Properties to set + */ + function WebhookMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebhookMessage body. + * @member {string} body + * @memberof flyteidl.admin.WebhookMessage + * @instance + */ + WebhookMessage.prototype.body = ""; + + /** + * Creates a new WebhookMessage instance using the specified properties. + * @function create + * @memberof flyteidl.admin.WebhookMessage + * @static + * @param {flyteidl.admin.IWebhookMessage=} [properties] Properties to set + * @returns {flyteidl.admin.WebhookMessage} WebhookMessage instance + */ + WebhookMessage.create = function create(properties) { + return new WebhookMessage(properties); + }; + + /** + * Encodes the specified WebhookMessage message. Does not implicitly {@link flyteidl.admin.WebhookMessage.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.WebhookMessage + * @static + * @param {flyteidl.admin.IWebhookMessage} message WebhookMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.body); + return writer; + }; + + /** + * Decodes a WebhookMessage message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.WebhookMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.WebhookMessage} WebhookMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.WebhookMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a WebhookMessage message. + * @function verify + * @memberof flyteidl.admin.WebhookMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + return null; + }; + + return WebhookMessage; + })(); + admin.DescriptionEntity = (function() { /** @@ -35904,175 +36312,6 @@ return NodeExecutionGetDataResponse; })(); - admin.EmailMessage = (function() { - - /** - * Properties of an EmailMessage. - * @memberof flyteidl.admin - * @interface IEmailMessage - * @property {Array.|null} [recipientsEmail] EmailMessage recipientsEmail - * @property {string|null} [senderEmail] EmailMessage senderEmail - * @property {string|null} [subjectLine] EmailMessage subjectLine - * @property {string|null} [body] EmailMessage body - */ - - /** - * Constructs a new EmailMessage. - * @memberof flyteidl.admin - * @classdesc Represents an EmailMessage. - * @implements IEmailMessage - * @constructor - * @param {flyteidl.admin.IEmailMessage=} [properties] Properties to set - */ - function EmailMessage(properties) { - this.recipientsEmail = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EmailMessage recipientsEmail. - * @member {Array.} recipientsEmail - * @memberof flyteidl.admin.EmailMessage - * @instance - */ - EmailMessage.prototype.recipientsEmail = $util.emptyArray; - - /** - * EmailMessage senderEmail. - * @member {string} senderEmail - * @memberof flyteidl.admin.EmailMessage - * @instance - */ - EmailMessage.prototype.senderEmail = ""; - - /** - * EmailMessage subjectLine. - * @member {string} subjectLine - * @memberof flyteidl.admin.EmailMessage - * @instance - */ - EmailMessage.prototype.subjectLine = ""; - - /** - * EmailMessage body. - * @member {string} body - * @memberof flyteidl.admin.EmailMessage - * @instance - */ - EmailMessage.prototype.body = ""; - - /** - * Creates a new EmailMessage instance using the specified properties. - * @function create - * @memberof flyteidl.admin.EmailMessage - * @static - * @param {flyteidl.admin.IEmailMessage=} [properties] Properties to set - * @returns {flyteidl.admin.EmailMessage} EmailMessage instance - */ - EmailMessage.create = function create(properties) { - return new EmailMessage(properties); - }; - - /** - * Encodes the specified EmailMessage message. Does not implicitly {@link flyteidl.admin.EmailMessage.verify|verify} messages. - * @function encode - * @memberof flyteidl.admin.EmailMessage - * @static - * @param {flyteidl.admin.IEmailMessage} message EmailMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmailMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recipientsEmail != null && message.recipientsEmail.length) - for (var i = 0; i < message.recipientsEmail.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.recipientsEmail[i]); - if (message.senderEmail != null && message.hasOwnProperty("senderEmail")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.senderEmail); - if (message.subjectLine != null && message.hasOwnProperty("subjectLine")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subjectLine); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.body); - return writer; - }; - - /** - * Decodes an EmailMessage message from the specified reader or buffer. - * @function decode - * @memberof flyteidl.admin.EmailMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {flyteidl.admin.EmailMessage} EmailMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmailMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.EmailMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.recipientsEmail && message.recipientsEmail.length)) - message.recipientsEmail = []; - message.recipientsEmail.push(reader.string()); - break; - case 2: - message.senderEmail = reader.string(); - break; - case 3: - message.subjectLine = reader.string(); - break; - case 4: - message.body = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Verifies an EmailMessage message. - * @function verify - * @memberof flyteidl.admin.EmailMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EmailMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recipientsEmail != null && message.hasOwnProperty("recipientsEmail")) { - if (!Array.isArray(message.recipientsEmail)) - return "recipientsEmail: array expected"; - for (var i = 0; i < message.recipientsEmail.length; ++i) - if (!$util.isString(message.recipientsEmail[i])) - return "recipientsEmail: string[] expected"; - } - if (message.senderEmail != null && message.hasOwnProperty("senderEmail")) - if (!$util.isString(message.senderEmail)) - return "senderEmail: string expected"; - if (message.subjectLine != null && message.hasOwnProperty("subjectLine")) - if (!$util.isString(message.subjectLine)) - return "subjectLine: string expected"; - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - return null; - }; - - return EmailMessage; - })(); - admin.Domain = (function() { /** diff --git a/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.py index 7c99413e09..42147bc445 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.py @@ -11,13 +11,14 @@ _sym_db = _symbol_database.Default() +from flyteidl.admin import notification_pb2 as flyteidl_dot_admin_dot_notification__pb2 from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2 from flyteidl.core import identifier_pb2 as flyteidl_dot_core_dot_identifier__pb2 from flyteidl.core import literals_pb2 as flyteidl_dot_core_dot_literals__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66lyteidl/admin/common.proto\x12\x0e\x66lyteidl.admin\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\x15NamedEntityIdentifier\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\"o\n\x13NamedEntityMetadata\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12\x36\n\x05state\x18\x02 \x01(\x0e\x32 .flyteidl.admin.NamedEntityStateR\x05state\"\xc7\x01\n\x0bNamedEntity\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32#.flyteidl.admin.NamedEntityMetadataR\x08metadata\"\x82\x01\n\x04Sort\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12<\n\tdirection\x18\x02 \x01(\x0e\x32\x1e.flyteidl.admin.Sort.DirectionR\tdirection\"*\n\tDirection\x12\x0e\n\nDESCENDING\x10\x00\x12\r\n\tASCENDING\x10\x01\"\xc9\x01\n NamedEntityIdentifierListRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x14\n\x05limit\x18\x03 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x04 \x01(\tR\x05token\x12-\n\x07sort_by\x18\x05 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\x12\x18\n\x07\x66ilters\x18\x06 \x01(\tR\x07\x66ilters\"\x81\x02\n\x16NamedEntityListRequest\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x18\n\x07project\x18\x02 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x03 \x01(\tR\x06\x64omain\x12\x14\n\x05limit\x18\x04 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x05 \x01(\tR\x05token\x12-\n\x07sort_by\x18\x06 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\x12\x18\n\x07\x66ilters\x18\x07 \x01(\tR\x07\x66ilters\"t\n\x19NamedEntityIdentifierList\x12\x41\n\x08\x65ntities\x18\x01 \x03(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x08\x65ntities\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"`\n\x0fNamedEntityList\x12\x37\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\x1b.flyteidl.admin.NamedEntityR\x08\x65ntities\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x90\x01\n\x15NamedEntityGetRequest\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\"\xd4\x01\n\x18NamedEntityUpdateRequest\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32#.flyteidl.admin.NamedEntityMetadataR\x08metadata\"\x1b\n\x19NamedEntityUpdateResponse\"=\n\x10ObjectGetRequest\x12)\n\x02id\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\x02id\"\xc1\x01\n\x13ResourceListRequest\x12\x35\n\x02id\x18\x01 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\x12\x14\n\x05limit\x18\x02 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x03 \x01(\tR\x05token\x12\x18\n\x07\x66ilters\x18\x04 \x01(\tR\x07\x66ilters\x12-\n\x07sort_by\x18\x05 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\">\n\x11\x45mailNotification\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\"B\n\x15PagerDutyNotification\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\">\n\x11SlackNotification\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\"\x94\x02\n\x0cNotification\x12>\n\x06phases\x18\x01 \x03(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x06phases\x12\x39\n\x05\x65mail\x18\x02 \x01(\x0b\x32!.flyteidl.admin.EmailNotificationH\x00R\x05\x65mail\x12\x46\n\npager_duty\x18\x03 \x01(\x0b\x32%.flyteidl.admin.PagerDutyNotificationH\x00R\tpagerDuty\x12\x39\n\x05slack\x18\x04 \x01(\x0b\x32!.flyteidl.admin.SlackNotificationH\x00R\x05slackB\x06\n\x04type\"5\n\x07UrlBlob\x12\x10\n\x03url\x18\x01 \x01(\tR\x03url\x12\x14\n\x05\x62ytes\x18\x02 \x01(\x03R\x05\x62ytes:\x02\x18\x01\"\x7f\n\x06Labels\x12:\n\x06values\x18\x01 \x03(\x0b\x32\".flyteidl.admin.Labels.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x89\x01\n\x0b\x41nnotations\x12?\n\x06values\x18\x01 \x03(\x0b\x32\'.flyteidl.admin.Annotations.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\";\n\x04\x45nvs\x12\x33\n\x06values\x18\x01 \x03(\x0b\x32\x1b.flyteidl.core.KeyValuePairR\x06values\"z\n\x08\x41uthRole\x12,\n\x12\x61ssumable_iam_role\x18\x01 \x01(\tR\x10\x61ssumableIamRole\x12<\n\x1akubernetes_service_account\x18\x02 \x01(\tR\x18kubernetesServiceAccount:\x02\x18\x01\"K\n\x13RawOutputDataConfig\x12\x34\n\x16output_location_prefix\x18\x01 \x01(\tR\x14outputLocationPrefix\"Q\n\tFlyteURLs\x12\x16\n\x06inputs\x18\x01 \x01(\tR\x06inputs\x12\x18\n\x07outputs\x18\x02 \x01(\tR\x07outputs\x12\x12\n\x04\x64\x65\x63k\x18\x03 \x01(\tR\x04\x64\x65\x63k*\\\n\x10NamedEntityState\x12\x17\n\x13NAMED_ENTITY_ACTIVE\x10\x00\x12\x19\n\x15NAMED_ENTITY_ARCHIVED\x10\x01\x12\x14\n\x10SYSTEM_GENERATED\x10\x02\x42\xb7\x01\n\x12\x63om.flyteidl.adminB\x0b\x43ommonProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66lyteidl/admin/common.proto\x12\x0e\x66lyteidl.admin\x1a!flyteidl/admin/notification.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\x15NamedEntityIdentifier\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\"o\n\x13NamedEntityMetadata\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12\x36\n\x05state\x18\x02 \x01(\x0e\x32 .flyteidl.admin.NamedEntityStateR\x05state\"\xc7\x01\n\x0bNamedEntity\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32#.flyteidl.admin.NamedEntityMetadataR\x08metadata\"\x82\x01\n\x04Sort\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12<\n\tdirection\x18\x02 \x01(\x0e\x32\x1e.flyteidl.admin.Sort.DirectionR\tdirection\"*\n\tDirection\x12\x0e\n\nDESCENDING\x10\x00\x12\r\n\tASCENDING\x10\x01\"\xc9\x01\n NamedEntityIdentifierListRequest\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x02 \x01(\tR\x06\x64omain\x12\x14\n\x05limit\x18\x03 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x04 \x01(\tR\x05token\x12-\n\x07sort_by\x18\x05 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\x12\x18\n\x07\x66ilters\x18\x06 \x01(\tR\x07\x66ilters\"\x81\x02\n\x16NamedEntityListRequest\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x18\n\x07project\x18\x02 \x01(\tR\x07project\x12\x16\n\x06\x64omain\x18\x03 \x01(\tR\x06\x64omain\x12\x14\n\x05limit\x18\x04 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x05 \x01(\tR\x05token\x12-\n\x07sort_by\x18\x06 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\x12\x18\n\x07\x66ilters\x18\x07 \x01(\tR\x07\x66ilters\"t\n\x19NamedEntityIdentifierList\x12\x41\n\x08\x65ntities\x18\x01 \x03(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x08\x65ntities\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"`\n\x0fNamedEntityList\x12\x37\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\x1b.flyteidl.admin.NamedEntityR\x08\x65ntities\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x90\x01\n\x15NamedEntityGetRequest\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\"\xd4\x01\n\x18NamedEntityUpdateRequest\x12@\n\rresource_type\x18\x01 \x01(\x0e\x32\x1b.flyteidl.core.ResourceTypeR\x0cresourceType\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32#.flyteidl.admin.NamedEntityMetadataR\x08metadata\"\x1b\n\x19NamedEntityUpdateResponse\"=\n\x10ObjectGetRequest\x12)\n\x02id\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\x02id\"\xc1\x01\n\x13ResourceListRequest\x12\x35\n\x02id\x18\x01 \x01(\x0b\x32%.flyteidl.admin.NamedEntityIdentifierR\x02id\x12\x14\n\x05limit\x18\x02 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x03 \x01(\tR\x05token\x12\x18\n\x07\x66ilters\x18\x04 \x01(\tR\x07\x66ilters\x12-\n\x07sort_by\x18\x05 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\">\n\x11\x45mailNotification\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\"B\n\x15PagerDutyNotification\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\"r\n\x13WebhookNotification\x12!\n\x0cwebhook_name\x18\x01 \x01(\tR\x0bwebhookName\x12\x38\n\x07message\x18\x02 \x01(\x0b\x32\x1e.flyteidl.admin.WebhookMessageR\x07message\">\n\x11SlackNotification\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\"\x94\x02\n\x0cNotification\x12>\n\x06phases\x18\x01 \x03(\x0e\x32&.flyteidl.core.WorkflowExecution.PhaseR\x06phases\x12\x39\n\x05\x65mail\x18\x02 \x01(\x0b\x32!.flyteidl.admin.EmailNotificationH\x00R\x05\x65mail\x12\x46\n\npager_duty\x18\x03 \x01(\x0b\x32%.flyteidl.admin.PagerDutyNotificationH\x00R\tpagerDuty\x12\x39\n\x05slack\x18\x04 \x01(\x0b\x32!.flyteidl.admin.SlackNotificationH\x00R\x05slackB\x06\n\x04type\"5\n\x07UrlBlob\x12\x10\n\x03url\x18\x01 \x01(\tR\x03url\x12\x14\n\x05\x62ytes\x18\x02 \x01(\x03R\x05\x62ytes:\x02\x18\x01\"\x7f\n\x06Labels\x12:\n\x06values\x18\x01 \x03(\x0b\x32\".flyteidl.admin.Labels.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x89\x01\n\x0b\x41nnotations\x12?\n\x06values\x18\x01 \x03(\x0b\x32\'.flyteidl.admin.Annotations.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\";\n\x04\x45nvs\x12\x33\n\x06values\x18\x01 \x03(\x0b\x32\x1b.flyteidl.core.KeyValuePairR\x06values\"z\n\x08\x41uthRole\x12,\n\x12\x61ssumable_iam_role\x18\x01 \x01(\tR\x10\x61ssumableIamRole\x12<\n\x1akubernetes_service_account\x18\x02 \x01(\tR\x18kubernetesServiceAccount:\x02\x18\x01\"K\n\x13RawOutputDataConfig\x12\x34\n\x16output_location_prefix\x18\x01 \x01(\tR\x14outputLocationPrefix\"Q\n\tFlyteURLs\x12\x16\n\x06inputs\x18\x01 \x01(\tR\x06inputs\x12\x18\n\x07outputs\x18\x02 \x01(\tR\x07outputs\x12\x12\n\x04\x64\x65\x63k\x18\x03 \x01(\tR\x04\x64\x65\x63k*\\\n\x10NamedEntityState\x12\x17\n\x13NAMED_ENTITY_ACTIVE\x10\x00\x12\x19\n\x15NAMED_ENTITY_ARCHIVED\x10\x01\x12\x14\n\x10SYSTEM_GENERATED\x10\x02\x42\xb7\x01\n\x12\x63om.flyteidl.adminB\x0b\x43ommonProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -34,60 +35,62 @@ _ANNOTATIONS_VALUESENTRY._serialized_options = b'8\001' _AUTHROLE._options = None _AUTHROLE._serialized_options = b'\030\001' - _globals['_NAMEDENTITYSTATE']._serialized_start=3190 - _globals['_NAMEDENTITYSTATE']._serialized_end=3282 - _globals['_NAMEDENTITYIDENTIFIER']._serialized_start=173 - _globals['_NAMEDENTITYIDENTIFIER']._serialized_end=266 - _globals['_NAMEDENTITYMETADATA']._serialized_start=268 - _globals['_NAMEDENTITYMETADATA']._serialized_end=379 - _globals['_NAMEDENTITY']._serialized_start=382 - _globals['_NAMEDENTITY']._serialized_end=581 - _globals['_SORT']._serialized_start=584 - _globals['_SORT']._serialized_end=714 - _globals['_SORT_DIRECTION']._serialized_start=672 - _globals['_SORT_DIRECTION']._serialized_end=714 - _globals['_NAMEDENTITYIDENTIFIERLISTREQUEST']._serialized_start=717 - _globals['_NAMEDENTITYIDENTIFIERLISTREQUEST']._serialized_end=918 - _globals['_NAMEDENTITYLISTREQUEST']._serialized_start=921 - _globals['_NAMEDENTITYLISTREQUEST']._serialized_end=1178 - _globals['_NAMEDENTITYIDENTIFIERLIST']._serialized_start=1180 - _globals['_NAMEDENTITYIDENTIFIERLIST']._serialized_end=1296 - _globals['_NAMEDENTITYLIST']._serialized_start=1298 - _globals['_NAMEDENTITYLIST']._serialized_end=1394 - _globals['_NAMEDENTITYGETREQUEST']._serialized_start=1397 - _globals['_NAMEDENTITYGETREQUEST']._serialized_end=1541 - _globals['_NAMEDENTITYUPDATEREQUEST']._serialized_start=1544 - _globals['_NAMEDENTITYUPDATEREQUEST']._serialized_end=1756 - _globals['_NAMEDENTITYUPDATERESPONSE']._serialized_start=1758 - _globals['_NAMEDENTITYUPDATERESPONSE']._serialized_end=1785 - _globals['_OBJECTGETREQUEST']._serialized_start=1787 - _globals['_OBJECTGETREQUEST']._serialized_end=1848 - _globals['_RESOURCELISTREQUEST']._serialized_start=1851 - _globals['_RESOURCELISTREQUEST']._serialized_end=2044 - _globals['_EMAILNOTIFICATION']._serialized_start=2046 - _globals['_EMAILNOTIFICATION']._serialized_end=2108 - _globals['_PAGERDUTYNOTIFICATION']._serialized_start=2110 - _globals['_PAGERDUTYNOTIFICATION']._serialized_end=2176 - _globals['_SLACKNOTIFICATION']._serialized_start=2178 - _globals['_SLACKNOTIFICATION']._serialized_end=2240 - _globals['_NOTIFICATION']._serialized_start=2243 - _globals['_NOTIFICATION']._serialized_end=2519 - _globals['_URLBLOB']._serialized_start=2521 - _globals['_URLBLOB']._serialized_end=2574 - _globals['_LABELS']._serialized_start=2576 - _globals['_LABELS']._serialized_end=2703 - _globals['_LABELS_VALUESENTRY']._serialized_start=2646 - _globals['_LABELS_VALUESENTRY']._serialized_end=2703 - _globals['_ANNOTATIONS']._serialized_start=2706 - _globals['_ANNOTATIONS']._serialized_end=2843 - _globals['_ANNOTATIONS_VALUESENTRY']._serialized_start=2646 - _globals['_ANNOTATIONS_VALUESENTRY']._serialized_end=2703 - _globals['_ENVS']._serialized_start=2845 - _globals['_ENVS']._serialized_end=2904 - _globals['_AUTHROLE']._serialized_start=2906 - _globals['_AUTHROLE']._serialized_end=3028 - _globals['_RAWOUTPUTDATACONFIG']._serialized_start=3030 - _globals['_RAWOUTPUTDATACONFIG']._serialized_end=3105 - _globals['_FLYTEURLS']._serialized_start=3107 - _globals['_FLYTEURLS']._serialized_end=3188 + _globals['_NAMEDENTITYSTATE']._serialized_start=3341 + _globals['_NAMEDENTITYSTATE']._serialized_end=3433 + _globals['_NAMEDENTITYIDENTIFIER']._serialized_start=208 + _globals['_NAMEDENTITYIDENTIFIER']._serialized_end=301 + _globals['_NAMEDENTITYMETADATA']._serialized_start=303 + _globals['_NAMEDENTITYMETADATA']._serialized_end=414 + _globals['_NAMEDENTITY']._serialized_start=417 + _globals['_NAMEDENTITY']._serialized_end=616 + _globals['_SORT']._serialized_start=619 + _globals['_SORT']._serialized_end=749 + _globals['_SORT_DIRECTION']._serialized_start=707 + _globals['_SORT_DIRECTION']._serialized_end=749 + _globals['_NAMEDENTITYIDENTIFIERLISTREQUEST']._serialized_start=752 + _globals['_NAMEDENTITYIDENTIFIERLISTREQUEST']._serialized_end=953 + _globals['_NAMEDENTITYLISTREQUEST']._serialized_start=956 + _globals['_NAMEDENTITYLISTREQUEST']._serialized_end=1213 + _globals['_NAMEDENTITYIDENTIFIERLIST']._serialized_start=1215 + _globals['_NAMEDENTITYIDENTIFIERLIST']._serialized_end=1331 + _globals['_NAMEDENTITYLIST']._serialized_start=1333 + _globals['_NAMEDENTITYLIST']._serialized_end=1429 + _globals['_NAMEDENTITYGETREQUEST']._serialized_start=1432 + _globals['_NAMEDENTITYGETREQUEST']._serialized_end=1576 + _globals['_NAMEDENTITYUPDATEREQUEST']._serialized_start=1579 + _globals['_NAMEDENTITYUPDATEREQUEST']._serialized_end=1791 + _globals['_NAMEDENTITYUPDATERESPONSE']._serialized_start=1793 + _globals['_NAMEDENTITYUPDATERESPONSE']._serialized_end=1820 + _globals['_OBJECTGETREQUEST']._serialized_start=1822 + _globals['_OBJECTGETREQUEST']._serialized_end=1883 + _globals['_RESOURCELISTREQUEST']._serialized_start=1886 + _globals['_RESOURCELISTREQUEST']._serialized_end=2079 + _globals['_EMAILNOTIFICATION']._serialized_start=2081 + _globals['_EMAILNOTIFICATION']._serialized_end=2143 + _globals['_PAGERDUTYNOTIFICATION']._serialized_start=2145 + _globals['_PAGERDUTYNOTIFICATION']._serialized_end=2211 + _globals['_WEBHOOKNOTIFICATION']._serialized_start=2213 + _globals['_WEBHOOKNOTIFICATION']._serialized_end=2327 + _globals['_SLACKNOTIFICATION']._serialized_start=2329 + _globals['_SLACKNOTIFICATION']._serialized_end=2391 + _globals['_NOTIFICATION']._serialized_start=2394 + _globals['_NOTIFICATION']._serialized_end=2670 + _globals['_URLBLOB']._serialized_start=2672 + _globals['_URLBLOB']._serialized_end=2725 + _globals['_LABELS']._serialized_start=2727 + _globals['_LABELS']._serialized_end=2854 + _globals['_LABELS_VALUESENTRY']._serialized_start=2797 + _globals['_LABELS_VALUESENTRY']._serialized_end=2854 + _globals['_ANNOTATIONS']._serialized_start=2857 + _globals['_ANNOTATIONS']._serialized_end=2994 + _globals['_ANNOTATIONS_VALUESENTRY']._serialized_start=2797 + _globals['_ANNOTATIONS_VALUESENTRY']._serialized_end=2854 + _globals['_ENVS']._serialized_start=2996 + _globals['_ENVS']._serialized_end=3055 + _globals['_AUTHROLE']._serialized_start=3057 + _globals['_AUTHROLE']._serialized_end=3179 + _globals['_RAWOUTPUTDATACONFIG']._serialized_start=3181 + _globals['_RAWOUTPUTDATACONFIG']._serialized_end=3256 + _globals['_FLYTEURLS']._serialized_start=3258 + _globals['_FLYTEURLS']._serialized_end=3339 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.pyi index 9c81d7cf45..b6c25393e5 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/common_pb2.pyi @@ -1,3 +1,4 @@ +from flyteidl.admin import notification_pb2 as _notification_pb2 from flyteidl.core import execution_pb2 as _execution_pb2 from flyteidl.core import identifier_pb2 as _identifier_pb2 from flyteidl.core import literals_pb2 as _literals_pb2 @@ -165,6 +166,14 @@ class PagerDutyNotification(_message.Message): recipients_email: _containers.RepeatedScalarFieldContainer[str] def __init__(self, recipients_email: _Optional[_Iterable[str]] = ...) -> None: ... +class WebhookNotification(_message.Message): + __slots__ = ["webhook_name", "message"] + WEBHOOK_NAME_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + webhook_name: str + message: _notification_pb2.WebhookMessage + def __init__(self, webhook_name: _Optional[str] = ..., message: _Optional[_Union[_notification_pb2.WebhookMessage, _Mapping]] = ...) -> None: ... + class SlackNotification(_message.Message): __slots__ = ["recipients_email"] RECIPIENTS_EMAIL_FIELD_NUMBER: _ClassVar[int] diff --git a/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.py index 5f247002e5..416111b8e5 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!flyteidl/admin/notification.proto\x12\x0e\x66lyteidl.admin\"\x93\x01\n\x0c\x45mailMessage\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\x12!\n\x0csender_email\x18\x02 \x01(\tR\x0bsenderEmail\x12!\n\x0csubject_line\x18\x03 \x01(\tR\x0bsubjectLine\x12\x12\n\x04\x62ody\x18\x04 \x01(\tR\x04\x62odyB\xbd\x01\n\x12\x63om.flyteidl.adminB\x11NotificationProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!flyteidl/admin/notification.proto\x12\x0e\x66lyteidl.admin\"\x93\x01\n\x0c\x45mailMessage\x12)\n\x10recipients_email\x18\x01 \x03(\tR\x0frecipientsEmail\x12!\n\x0csender_email\x18\x02 \x01(\tR\x0bsenderEmail\x12!\n\x0csubject_line\x18\x03 \x01(\tR\x0bsubjectLine\x12\x12\n\x04\x62ody\x18\x04 \x01(\tR\x04\x62ody\"$\n\x0eWebhookMessage\x12\x12\n\x04\x62ody\x18\x01 \x01(\tR\x04\x62odyB\xbd\x01\n\x12\x63om.flyteidl.adminB\x11NotificationProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,4 +24,6 @@ DESCRIPTOR._serialized_options = b'\n\022com.flyteidl.adminB\021NotificationProtoP\001Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\242\002\003FAX\252\002\016Flyteidl.Admin\312\002\016Flyteidl\\Admin\342\002\032Flyteidl\\Admin\\GPBMetadata\352\002\017Flyteidl::Admin' _globals['_EMAILMESSAGE']._serialized_start=54 _globals['_EMAILMESSAGE']._serialized_end=201 + _globals['_WEBHOOKMESSAGE']._serialized_start=203 + _globals['_WEBHOOKMESSAGE']._serialized_end=239 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.pyi index 5a06a72f34..0071d19845 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/notification_pb2.pyi @@ -16,3 +16,9 @@ class EmailMessage(_message.Message): subject_line: str body: str def __init__(self, recipients_email: _Optional[_Iterable[str]] = ..., sender_email: _Optional[str] = ..., subject_line: _Optional[str] = ..., body: _Optional[str] = ...) -> None: ... + +class WebhookMessage(_message.Message): + __slots__ = ["body"] + BODY_FIELD_NUMBER: _ClassVar[int] + body: str + def __init__(self, body: _Optional[str] = ...) -> None: ... diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index 759983a507..cc1a75e07f 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -141,6 +141,38 @@ pub struct ClusterAssignment { #[prost(string, tag="3")] pub cluster_pool_name: ::prost::alloc::string::String, } +/// Represents the Email object that is sent to a publisher/subscriber +/// to forward the notification. +/// Note: This is internal to Admin and doesn't need to be exposed to other components. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailMessage { + /// The list of email addresses to receive an email with the content populated in the other fields. + /// Currently, each email recipient will receive its own email. + /// This populates the TO field. + #[prost(string, repeated, tag="1")] + pub recipients_email: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// The email of the sender. + /// This populates the FROM field. + #[prost(string, tag="2")] + pub sender_email: ::prost::alloc::string::String, + /// The content of the subject line. + /// This populates the SUBJECT field. + #[prost(string, tag="3")] + pub subject_line: ::prost::alloc::string::String, + /// The content of the email body. + /// This populates the BODY field. + #[prost(string, tag="4")] + pub body: ::prost::alloc::string::String, +} +/// Represents the content that will be sent to a webhook endpoint. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebhookMessage { + /// The content of webhook request. + #[prost(string, tag="1")] + pub body: ::prost::alloc::string::String, +} /// Encapsulation of fields that identifies a Flyte resource. /// A Flyte resource can be a task, workflow or launch plan. /// A resource can internally have multiple versions and is uniquely identified @@ -409,6 +441,19 @@ pub struct PagerDutyNotification { #[prost(string, repeated, tag="1")] pub recipients_email: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +/// Defines a webhook notification specification. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebhookNotification { + /// +required + /// The webhook that is already registered to the flyteadmin. + #[prost(string, tag="1")] + pub webhook_name: ::prost::alloc::string::String, + /// The message to send to the webhook. if not specified, use default payload defined in flyteadmin. + /// +optional + #[prost(message, optional, tag="2")] + pub message: ::core::option::Option, +} /// Defines a slack notification specification. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2128,30 +2173,6 @@ pub struct NodeExecutionGetDataResponse { #[prost(message, optional, tag="17")] pub flyte_urls: ::core::option::Option, } -/// Represents the Email object that is sent to a publisher/subscriber -/// to forward the notification. -/// Note: This is internal to Admin and doesn't need to be exposed to other components. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EmailMessage { - /// The list of email addresses to receive an email with the content populated in the other fields. - /// Currently, each email recipient will receive its own email. - /// This populates the TO field. - #[prost(string, repeated, tag="1")] - pub recipients_email: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// The email of the sender. - /// This populates the FROM field. - #[prost(string, tag="2")] - pub sender_email: ::prost::alloc::string::String, - /// The content of the subject line. - /// This populates the SUBJECT field. - #[prost(string, tag="3")] - pub subject_line: ::prost::alloc::string::String, - /// The content of the email body. - /// This populates the BODY field. - #[prost(string, tag="4")] - pub body: ::prost::alloc::string::String, -} /// Namespace within a project commonly used to differentiate between different service instances. /// e.g. "production", "development", etc. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/flyteidl/protos/flyteidl/admin/common.proto b/flyteidl/protos/flyteidl/admin/common.proto index 93bf9b0e03..16f9bab9a3 100644 --- a/flyteidl/protos/flyteidl/admin/common.proto +++ b/flyteidl/protos/flyteidl/admin/common.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package flyteidl.admin; option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"; +import "flyteidl/admin/notification.proto"; import "flyteidl/core/execution.proto"; import "flyteidl/core/identifier.proto"; import "flyteidl/core/literals.proto"; @@ -229,6 +230,16 @@ message PagerDutyNotification { repeated string recipients_email = 1; } +// Defines a webhook notification specification. +message WebhookNotification { + // +required + // The webhook that is already registered to the flyteadmin. + string webhook_name = 1; + // The message to send to the webhook. if not specified, use default payload defined in flyteadmin. + // +optional + WebhookMessage message = 2; +} + // Defines a slack notification specification. message SlackNotification { // Currently, Slack notifications leverage email to trigger a notification. diff --git a/flyteidl/protos/flyteidl/admin/notification.proto b/flyteidl/protos/flyteidl/admin/notification.proto index 610a1d6108..3264bb6dce 100644 --- a/flyteidl/protos/flyteidl/admin/notification.proto +++ b/flyteidl/protos/flyteidl/admin/notification.proto @@ -27,6 +27,7 @@ message EmailMessage { } // Represents the content that will be sent to a webhook endpoint. -message WebhookPayload { - string message = 1; +message WebhookMessage { + // The content of webhook request. + string body = 1; } \ No newline at end of file