1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct SubscribeIcebergCompactionEventRequest {
5 #[prost(uint64, tag = "3")]
6 pub create_at: u64,
7 #[prost(
8 oneof = "subscribe_iceberg_compaction_event_request::Event",
9 tags = "1, 2, 4"
10 )]
11 pub event: ::core::option::Option<subscribe_iceberg_compaction_event_request::Event>,
12}
13pub mod subscribe_iceberg_compaction_event_request {
15 #[derive(prost_helpers::AnyPB)]
17 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
18 pub struct Register {
19 #[prost(uint32, tag = "1", wrapper = "crate::id::WorkerId")]
20 pub context_id: crate::id::WorkerId,
21 }
22 #[derive(prost_helpers::AnyPB)]
24 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
25 pub struct PullTask {
26 #[prost(uint32, tag = "1")]
27 pub pull_task_count: u32,
28 }
29 #[derive(prost_helpers::AnyPB)]
30 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
31 pub struct ReportTask {
32 #[prost(uint64, tag = "1")]
33 pub task_id: u64,
34 #[prost(uint32, tag = "2")]
35 pub sink_id: u32,
36 #[prost(enumeration = "report_task::Status", tag = "3")]
37 pub status: i32,
38 #[prost(string, optional, tag = "6")]
39 pub error_message: ::core::option::Option<::prost::alloc::string::String>,
40 }
41 pub mod report_task {
43 #[derive(prost_helpers::AnyPB)]
44 #[derive(
45 Clone,
46 Copy,
47 Debug,
48 PartialEq,
49 Eq,
50 Hash,
51 PartialOrd,
52 Ord,
53 ::prost::Enumeration
54 )]
55 #[repr(i32)]
56 pub enum Status {
57 Unspecified = 0,
58 Success = 1,
59 Failed = 2,
60 }
61 impl Status {
62 pub fn as_str_name(&self) -> &'static str {
67 match self {
68 Self::Unspecified => "UNSPECIFIED",
69 Self::Success => "SUCCESS",
70 Self::Failed => "FAILED",
71 }
72 }
73 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
75 match value {
76 "UNSPECIFIED" => Some(Self::Unspecified),
77 "SUCCESS" => Some(Self::Success),
78 "FAILED" => Some(Self::Failed),
79 _ => None,
80 }
81 }
82 }
83 }
84 #[derive(prost_helpers::AnyPB)]
85 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
86 pub enum Event {
87 #[prost(message, tag = "1")]
89 Register(Register),
90 #[prost(message, tag = "2")]
92 PullTask(PullTask),
93 #[prost(message, tag = "4")]
95 ReportTask(ReportTask),
96 }
97}
98#[derive(prost_helpers::AnyPB)]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct IcebergCompactionTask {
101 #[prost(uint64, tag = "1")]
102 pub task_id: u64,
103 #[prost(btree_map = "string, string", tag = "2")]
106 pub props: ::prost::alloc::collections::BTreeMap<
107 ::prost::alloc::string::String,
108 ::prost::alloc::string::String,
109 >,
110 #[prost(enumeration = "iceberg_compaction_task::TaskType", tag = "3")]
111 pub task_type: i32,
112 #[prost(uint32, tag = "4")]
113 pub sink_id: u32,
114}
115pub mod iceberg_compaction_task {
117 #[derive(prost_helpers::AnyPB)]
118 #[derive(
119 Clone,
120 Copy,
121 Debug,
122 PartialEq,
123 Eq,
124 Hash,
125 PartialOrd,
126 Ord,
127 ::prost::Enumeration
128 )]
129 #[repr(i32)]
130 pub enum TaskType {
131 Unspecified = 0,
132 Full = 1,
134 SmallFiles = 2,
136 FilesWithDelete = 3,
137 }
138 impl TaskType {
139 pub fn as_str_name(&self) -> &'static str {
144 match self {
145 Self::Unspecified => "UNSPECIFIED",
146 Self::Full => "FULL",
147 Self::SmallFiles => "SMALL_FILES",
148 Self::FilesWithDelete => "FILES_WITH_DELETE",
149 }
150 }
151 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
153 match value {
154 "UNSPECIFIED" => Some(Self::Unspecified),
155 "FULL" => Some(Self::Full),
156 "SMALL_FILES" => Some(Self::SmallFiles),
157 "FILES_WITH_DELETE" => Some(Self::FilesWithDelete),
158 _ => None,
159 }
160 }
161 }
162}
163#[derive(prost_helpers::AnyPB)]
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct SubscribeIcebergCompactionEventResponse {
166 #[prost(uint64, tag = "7")]
167 pub create_at: u64,
168 #[prost(oneof = "subscribe_iceberg_compaction_event_response::Event", tags = "1, 2")]
169 pub event: ::core::option::Option<
170 subscribe_iceberg_compaction_event_response::Event,
171 >,
172}
173pub mod subscribe_iceberg_compaction_event_response {
175 #[derive(prost_helpers::AnyPB)]
178 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
179 pub struct PullTaskAck {}
180 #[derive(prost_helpers::AnyPB)]
181 #[derive(Clone, PartialEq, ::prost::Oneof)]
182 pub enum Event {
183 #[prost(message, tag = "1")]
184 CompactTask(super::IcebergCompactionTask),
185 #[prost(message, tag = "2")]
186 PullTaskAck(PullTaskAck),
187 }
188}