1#[derive(::serde::Serialize, ::serde::Deserialize)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct ConfigurationFormRequest {}
5#[derive(::serde::Serialize, ::serde::Deserialize)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct ConfigurationFormResponse {
8 #[prost(bool, tag = "1")]
9 pub schema_selection_supported: bool,
10 #[prost(bool, tag = "2")]
11 pub table_selection_supported: bool,
12 #[prost(message, repeated, tag = "3")]
13 pub fields: ::prost::alloc::vec::Vec<FormField>,
14 #[prost(message, repeated, tag = "4")]
15 pub tests: ::prost::alloc::vec::Vec<ConfigurationTest>,
16}
17#[derive(::serde::Serialize, ::serde::Deserialize)]
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct FormField {
20 #[prost(string, tag = "1")]
21 pub name: ::prost::alloc::string::String,
22 #[prost(string, tag = "2")]
23 pub label: ::prost::alloc::string::String,
24 #[prost(bool, optional, tag = "3")]
25 pub required: ::core::option::Option<bool>,
26 #[prost(string, optional, tag = "4")]
27 pub description: ::core::option::Option<::prost::alloc::string::String>,
28 #[prost(string, optional, tag = "8")]
29 pub default_value: ::core::option::Option<::prost::alloc::string::String>,
30 #[prost(string, optional, tag = "9")]
31 pub placeholder: ::core::option::Option<::prost::alloc::string::String>,
32 #[prost(oneof = "form_field::Type", tags = "5, 6, 7, 10")]
33 pub r#type: ::core::option::Option<form_field::Type>,
34}
35pub mod form_field {
37 #[derive(::serde::Serialize, ::serde::Deserialize)]
38 #[derive(Clone, PartialEq, ::prost::Oneof)]
39 pub enum Type {
40 #[prost(enumeration = "super::TextField", tag = "5")]
41 TextField(i32),
42 #[prost(message, tag = "6")]
43 DropdownField(super::DropdownField),
44 #[prost(message, tag = "7")]
45 ToggleField(super::ToggleField),
46 #[prost(message, tag = "10")]
47 ConditionalFields(super::ConditionalFields),
48 }
49}
50#[derive(::serde::Serialize, ::serde::Deserialize)]
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct ConditionalFields {
53 #[prost(message, optional, tag = "1")]
54 pub condition: ::core::option::Option<VisibilityCondition>,
55 #[prost(message, repeated, tag = "2")]
56 pub fields: ::prost::alloc::vec::Vec<FormField>,
57}
58#[derive(::serde::Serialize, ::serde::Deserialize)]
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct VisibilityCondition {
61 #[prost(string, tag = "1")]
62 pub condition_field: ::prost::alloc::string::String,
63 #[prost(oneof = "visibility_condition::VisibleWhen", tags = "2, 3, 4")]
64 pub visible_when: ::core::option::Option<visibility_condition::VisibleWhen>,
65}
66pub mod visibility_condition {
68 #[derive(::serde::Serialize, ::serde::Deserialize)]
69 #[derive(Clone, PartialEq, ::prost::Oneof)]
70 pub enum VisibleWhen {
71 #[prost(bool, tag = "2")]
72 BoolValue(bool),
73 #[prost(string, tag = "3")]
74 StringValue(::prost::alloc::string::String),
75 #[prost(bool, tag = "4")]
76 EmptyValue(bool),
77 }
78}
79#[derive(::serde::Serialize, ::serde::Deserialize)]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct DropdownField {
82 #[prost(string, repeated, tag = "1")]
83 pub dropdown_field: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
84}
85#[derive(::serde::Serialize, ::serde::Deserialize)]
86#[derive(Clone, Copy, PartialEq, ::prost::Message)]
87pub struct ToggleField {}
88#[derive(::serde::Serialize, ::serde::Deserialize)]
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct ConfigurationTest {
91 #[prost(string, tag = "1")]
92 pub name: ::prost::alloc::string::String,
93 #[prost(string, tag = "2")]
94 pub label: ::prost::alloc::string::String,
95}
96#[derive(::serde::Serialize, ::serde::Deserialize)]
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct TestRequest {
99 #[prost(string, tag = "1")]
100 pub name: ::prost::alloc::string::String,
101 #[prost(btree_map = "string, string", tag = "2")]
102 pub configuration: ::prost::alloc::collections::BTreeMap<
103 ::prost::alloc::string::String,
104 ::prost::alloc::string::String,
105 >,
106}
107#[derive(::serde::Serialize, ::serde::Deserialize)]
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct TestResponse {
110 #[prost(oneof = "test_response::Response", tags = "1, 2")]
111 pub response: ::core::option::Option<test_response::Response>,
112}
113pub mod test_response {
115 #[derive(::serde::Serialize, ::serde::Deserialize)]
116 #[derive(Clone, PartialEq, ::prost::Oneof)]
117 pub enum Response {
118 #[prost(bool, tag = "1")]
119 Success(bool),
120 #[prost(string, tag = "2")]
121 Failure(::prost::alloc::string::String),
122 }
123}
124#[derive(::serde::Serialize, ::serde::Deserialize)]
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct SchemaList {
127 #[prost(message, repeated, tag = "1")]
128 pub schemas: ::prost::alloc::vec::Vec<Schema>,
129}
130#[derive(::serde::Serialize, ::serde::Deserialize)]
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct TableList {
133 #[prost(message, repeated, tag = "1")]
134 pub tables: ::prost::alloc::vec::Vec<Table>,
135}
136#[derive(::serde::Serialize, ::serde::Deserialize)]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct Schema {
139 #[prost(string, tag = "1")]
140 pub name: ::prost::alloc::string::String,
141 #[prost(message, repeated, tag = "2")]
142 pub tables: ::prost::alloc::vec::Vec<Table>,
143}
144#[derive(::serde::Serialize, ::serde::Deserialize)]
145#[derive(Clone, Copy, PartialEq, ::prost::Message)]
146pub struct DataTypeParams {
147 #[prost(oneof = "data_type_params::Params", tags = "1, 2")]
148 pub params: ::core::option::Option<data_type_params::Params>,
149}
150pub mod data_type_params {
152 #[derive(::serde::Serialize, ::serde::Deserialize)]
153 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
154 pub enum Params {
155 #[prost(message, tag = "1")]
156 Decimal(super::DecimalParams),
157 #[prost(int32, tag = "2")]
158 StringByteLength(i32),
159 }
160}
161#[derive(::serde::Serialize, ::serde::Deserialize)]
162#[derive(Clone, Copy, PartialEq, ::prost::Message)]
163pub struct DecimalParams {
164 #[prost(uint32, tag = "1")]
165 pub precision: u32,
166 #[prost(uint32, tag = "2")]
167 pub scale: u32,
168}
169#[derive(::serde::Serialize, ::serde::Deserialize)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct ValueType {
172 #[prost(
173 oneof = "value_type::Inner",
174 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16"
175 )]
176 pub inner: ::core::option::Option<value_type::Inner>,
177}
178pub mod value_type {
180 #[derive(::serde::Serialize, ::serde::Deserialize)]
181 #[derive(Clone, PartialEq, ::prost::Oneof)]
182 pub enum Inner {
183 #[prost(bool, tag = "1")]
184 Null(bool),
185 #[prost(bool, tag = "2")]
186 Bool(bool),
187 #[prost(int32, tag = "3")]
188 Short(i32),
189 #[prost(int32, tag = "4")]
190 Int(i32),
191 #[prost(int64, tag = "5")]
192 Long(i64),
193 #[prost(float, tag = "6")]
194 Float(f32),
195 #[prost(double, tag = "7")]
196 Double(f64),
197 #[prost(message, tag = "8")]
198 NaiveDate(super::super::super::google::protobuf::Timestamp),
199 #[prost(message, tag = "9")]
200 NaiveDatetime(super::super::super::google::protobuf::Timestamp),
201 #[prost(message, tag = "10")]
202 UtcDatetime(super::super::super::google::protobuf::Timestamp),
203 #[prost(string, tag = "11")]
204 Decimal(::prost::alloc::string::String),
205 #[prost(bytes, tag = "12")]
206 Binary(::prost::alloc::vec::Vec<u8>),
207 #[prost(string, tag = "13")]
208 String(::prost::alloc::string::String),
209 #[prost(string, tag = "14")]
210 Json(::prost::alloc::string::String),
211 #[prost(string, tag = "15")]
212 Xml(::prost::alloc::string::String),
213 #[prost(message, tag = "16")]
214 NaiveTime(super::super::super::google::protobuf::Timestamp),
215 }
216}
217#[derive(::serde::Serialize, ::serde::Deserialize)]
218#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct Table {
220 #[prost(string, tag = "1")]
221 pub name: ::prost::alloc::string::String,
222 #[prost(message, repeated, tag = "2")]
223 pub columns: ::prost::alloc::vec::Vec<Column>,
224}
225#[derive(::serde::Serialize, ::serde::Deserialize)]
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct Column {
228 #[prost(string, tag = "1")]
229 pub name: ::prost::alloc::string::String,
230 #[prost(enumeration = "DataType", tag = "2")]
231 pub r#type: i32,
232 #[prost(bool, tag = "3")]
233 pub primary_key: bool,
234 #[prost(message, optional, tag = "4")]
235 pub params: ::core::option::Option<DataTypeParams>,
236}
237#[derive(::serde::Serialize, ::serde::Deserialize)]
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct Warning {
240 #[prost(string, tag = "1")]
241 pub message: ::prost::alloc::string::String,
242}
243#[derive(::serde::Serialize, ::serde::Deserialize)]
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct Task {
246 #[prost(string, tag = "1")]
247 pub message: ::prost::alloc::string::String,
248}
249#[derive(::serde::Serialize, ::serde::Deserialize)]
250#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
251#[repr(i32)]
252pub enum TextField {
253 PlainText = 0,
254 Password = 1,
255 Hidden = 2,
256}
257impl TextField {
258 pub fn as_str_name(&self) -> &'static str {
263 match self {
264 Self::PlainText => "PlainText",
265 Self::Password => "Password",
266 Self::Hidden => "Hidden",
267 }
268 }
269 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
271 match value {
272 "PlainText" => Some(Self::PlainText),
273 "Password" => Some(Self::Password),
274 "Hidden" => Some(Self::Hidden),
275 _ => None,
276 }
277 }
278}
279#[derive(::serde::Serialize, ::serde::Deserialize)]
280#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
281#[repr(i32)]
282pub enum DataType {
283 Unspecified = 0,
284 Boolean = 1,
285 Short = 2,
286 Int = 3,
287 Long = 4,
288 Decimal = 5,
289 Float = 6,
290 Double = 7,
291 NaiveDate = 8,
292 NaiveDatetime = 9,
293 UtcDatetime = 10,
294 Binary = 11,
295 Xml = 12,
296 String = 13,
297 Json = 14,
298 NaiveTime = 15,
299}
300impl DataType {
301 pub fn as_str_name(&self) -> &'static str {
306 match self {
307 Self::Unspecified => "UNSPECIFIED",
308 Self::Boolean => "BOOLEAN",
309 Self::Short => "SHORT",
310 Self::Int => "INT",
311 Self::Long => "LONG",
312 Self::Decimal => "DECIMAL",
313 Self::Float => "FLOAT",
314 Self::Double => "DOUBLE",
315 Self::NaiveDate => "NAIVE_DATE",
316 Self::NaiveDatetime => "NAIVE_DATETIME",
317 Self::UtcDatetime => "UTC_DATETIME",
318 Self::Binary => "BINARY",
319 Self::Xml => "XML",
320 Self::String => "STRING",
321 Self::Json => "JSON",
322 Self::NaiveTime => "NAIVE_TIME",
323 }
324 }
325 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
327 match value {
328 "UNSPECIFIED" => Some(Self::Unspecified),
329 "BOOLEAN" => Some(Self::Boolean),
330 "SHORT" => Some(Self::Short),
331 "INT" => Some(Self::Int),
332 "LONG" => Some(Self::Long),
333 "DECIMAL" => Some(Self::Decimal),
334 "FLOAT" => Some(Self::Float),
335 "DOUBLE" => Some(Self::Double),
336 "NAIVE_DATE" => Some(Self::NaiveDate),
337 "NAIVE_DATETIME" => Some(Self::NaiveDatetime),
338 "UTC_DATETIME" => Some(Self::UtcDatetime),
339 "BINARY" => Some(Self::Binary),
340 "XML" => Some(Self::Xml),
341 "STRING" => Some(Self::String),
342 "JSON" => Some(Self::Json),
343 "NAIVE_TIME" => Some(Self::NaiveTime),
344 _ => None,
345 }
346 }
347}
348#[derive(::serde::Serialize, ::serde::Deserialize)]
349#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
350#[repr(i32)]
351pub enum RecordType {
352 Upsert = 0,
353 Update = 1,
354 Delete = 2,
355 Truncate = 3,
356}
357impl RecordType {
358 pub fn as_str_name(&self) -> &'static str {
363 match self {
364 Self::Upsert => "UPSERT",
365 Self::Update => "UPDATE",
366 Self::Delete => "DELETE",
367 Self::Truncate => "TRUNCATE",
368 }
369 }
370 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
372 match value {
373 "UPSERT" => Some(Self::Upsert),
374 "UPDATE" => Some(Self::Update),
375 "DELETE" => Some(Self::Delete),
376 "TRUNCATE" => Some(Self::Truncate),
377 _ => None,
378 }
379 }
380}
381#[derive(::serde::Serialize, ::serde::Deserialize)]
382#[derive(Clone, Copy, PartialEq, ::prost::Message)]
383pub struct CapabilitiesRequest {}
384#[derive(::serde::Serialize, ::serde::Deserialize)]
385#[derive(Clone, Copy, PartialEq, ::prost::Message)]
386pub struct CapabilitiesResponse {
387 #[prost(enumeration = "BatchFileFormat", tag = "1")]
388 pub batch_file_format: i32,
389}
390#[derive(::serde::Serialize, ::serde::Deserialize)]
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct DescribeTableRequest {
393 #[prost(btree_map = "string, string", tag = "1")]
394 pub configuration: ::prost::alloc::collections::BTreeMap<
395 ::prost::alloc::string::String,
396 ::prost::alloc::string::String,
397 >,
398 #[prost(string, tag = "2")]
399 pub schema_name: ::prost::alloc::string::String,
400 #[prost(string, tag = "3")]
401 pub table_name: ::prost::alloc::string::String,
402}
403#[derive(::serde::Serialize, ::serde::Deserialize)]
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct DescribeTableResponse {
406 #[prost(oneof = "describe_table_response::Response", tags = "1, 2, 3, 4")]
407 pub response: ::core::option::Option<describe_table_response::Response>,
408}
409pub mod describe_table_response {
411 #[derive(::serde::Serialize, ::serde::Deserialize)]
412 #[derive(Clone, PartialEq, ::prost::Oneof)]
413 pub enum Response {
414 #[prost(bool, tag = "1")]
415 NotFound(bool),
416 #[prost(message, tag = "2")]
417 Table(super::Table),
418 #[prost(message, tag = "3")]
419 Warning(super::Warning),
420 #[prost(message, tag = "4")]
421 Task(super::Task),
422 }
423}
424#[derive(::serde::Serialize, ::serde::Deserialize)]
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct CreateTableRequest {
427 #[prost(btree_map = "string, string", tag = "1")]
428 pub configuration: ::prost::alloc::collections::BTreeMap<
429 ::prost::alloc::string::String,
430 ::prost::alloc::string::String,
431 >,
432 #[prost(string, tag = "2")]
433 pub schema_name: ::prost::alloc::string::String,
434 #[prost(message, optional, tag = "3")]
435 pub table: ::core::option::Option<Table>,
436}
437#[derive(::serde::Serialize, ::serde::Deserialize)]
438#[derive(Clone, PartialEq, ::prost::Message)]
439pub struct CreateTableResponse {
440 #[prost(oneof = "create_table_response::Response", tags = "1, 2, 3")]
441 pub response: ::core::option::Option<create_table_response::Response>,
442}
443pub mod create_table_response {
445 #[derive(::serde::Serialize, ::serde::Deserialize)]
446 #[derive(Clone, PartialEq, ::prost::Oneof)]
447 pub enum Response {
448 #[prost(bool, tag = "1")]
449 Success(bool),
450 #[prost(message, tag = "2")]
451 Warning(super::Warning),
452 #[prost(message, tag = "3")]
453 Task(super::Task),
454 }
455}
456#[derive(::serde::Serialize, ::serde::Deserialize)]
457#[derive(Clone, PartialEq, ::prost::Message)]
458pub struct AlterTableRequest {
459 #[prost(btree_map = "string, string", tag = "1")]
460 pub configuration: ::prost::alloc::collections::BTreeMap<
461 ::prost::alloc::string::String,
462 ::prost::alloc::string::String,
463 >,
464 #[prost(string, tag = "2")]
465 pub schema_name: ::prost::alloc::string::String,
466 #[prost(message, optional, tag = "3")]
467 pub table: ::core::option::Option<Table>,
468}
469#[derive(::serde::Serialize, ::serde::Deserialize)]
470#[derive(Clone, PartialEq, ::prost::Message)]
471pub struct AlterTableResponse {
472 #[prost(oneof = "alter_table_response::Response", tags = "1, 2, 3")]
473 pub response: ::core::option::Option<alter_table_response::Response>,
474}
475pub mod alter_table_response {
477 #[derive(::serde::Serialize, ::serde::Deserialize)]
478 #[derive(Clone, PartialEq, ::prost::Oneof)]
479 pub enum Response {
480 #[prost(bool, tag = "1")]
481 Success(bool),
482 #[prost(message, tag = "2")]
483 Warning(super::Warning),
484 #[prost(message, tag = "3")]
485 Task(super::Task),
486 }
487}
488#[derive(::serde::Serialize, ::serde::Deserialize)]
489#[derive(Clone, PartialEq, ::prost::Message)]
490pub struct TruncateRequest {
491 #[prost(btree_map = "string, string", tag = "1")]
492 pub configuration: ::prost::alloc::collections::BTreeMap<
493 ::prost::alloc::string::String,
494 ::prost::alloc::string::String,
495 >,
496 #[prost(string, tag = "2")]
497 pub schema_name: ::prost::alloc::string::String,
498 #[prost(string, tag = "3")]
499 pub table_name: ::prost::alloc::string::String,
500 #[prost(string, tag = "4")]
501 pub synced_column: ::prost::alloc::string::String,
502 #[prost(message, optional, tag = "5")]
503 pub utc_delete_before: ::core::option::Option<
504 super::super::google::protobuf::Timestamp,
505 >,
506 #[prost(message, optional, tag = "6")]
507 pub soft: ::core::option::Option<SoftTruncate>,
508}
509#[derive(::serde::Serialize, ::serde::Deserialize)]
510#[derive(Clone, PartialEq, ::prost::Message)]
511pub struct SoftTruncate {
512 #[prost(string, tag = "1")]
513 pub deleted_column: ::prost::alloc::string::String,
514}
515#[derive(::serde::Serialize, ::serde::Deserialize)]
516#[derive(Clone, PartialEq, ::prost::Message)]
517pub struct TruncateResponse {
518 #[prost(oneof = "truncate_response::Response", tags = "1, 2, 3")]
519 pub response: ::core::option::Option<truncate_response::Response>,
520}
521pub mod truncate_response {
523 #[derive(::serde::Serialize, ::serde::Deserialize)]
524 #[derive(Clone, PartialEq, ::prost::Oneof)]
525 pub enum Response {
526 #[prost(bool, tag = "1")]
527 Success(bool),
528 #[prost(message, tag = "2")]
529 Warning(super::Warning),
530 #[prost(message, tag = "3")]
531 Task(super::Task),
532 }
533}
534#[derive(::serde::Serialize, ::serde::Deserialize)]
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct WriteBatchRequest {
537 #[prost(btree_map = "string, string", tag = "1")]
538 pub configuration: ::prost::alloc::collections::BTreeMap<
539 ::prost::alloc::string::String,
540 ::prost::alloc::string::String,
541 >,
542 #[prost(string, tag = "2")]
543 pub schema_name: ::prost::alloc::string::String,
544 #[prost(message, optional, tag = "3")]
545 pub table: ::core::option::Option<Table>,
546 #[prost(btree_map = "string, bytes", tag = "4")]
547 pub keys: ::prost::alloc::collections::BTreeMap<
548 ::prost::alloc::string::String,
549 ::prost::alloc::vec::Vec<u8>,
550 >,
551 #[prost(string, repeated, tag = "5")]
552 pub replace_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
553 #[prost(string, repeated, tag = "6")]
554 pub update_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
555 #[prost(string, repeated, tag = "7")]
556 pub delete_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
557 #[prost(message, optional, tag = "8")]
558 pub file_params: ::core::option::Option<FileParams>,
559}
560#[derive(::serde::Serialize, ::serde::Deserialize)]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct WriteHistoryBatchRequest {
563 #[prost(btree_map = "string, string", tag = "1")]
564 pub configuration: ::prost::alloc::collections::BTreeMap<
565 ::prost::alloc::string::String,
566 ::prost::alloc::string::String,
567 >,
568 #[prost(string, tag = "2")]
569 pub schema_name: ::prost::alloc::string::String,
570 #[prost(message, optional, tag = "3")]
571 pub table: ::core::option::Option<Table>,
572 #[prost(btree_map = "string, bytes", tag = "4")]
573 pub keys: ::prost::alloc::collections::BTreeMap<
574 ::prost::alloc::string::String,
575 ::prost::alloc::vec::Vec<u8>,
576 >,
577 #[prost(string, repeated, tag = "5")]
578 pub earliest_start_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
579 #[prost(string, repeated, tag = "6")]
580 pub replace_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
581 #[prost(string, repeated, tag = "7")]
582 pub update_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
583 #[prost(string, repeated, tag = "8")]
584 pub delete_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
585 #[prost(message, optional, tag = "9")]
586 pub file_params: ::core::option::Option<FileParams>,
587}
588#[derive(::serde::Serialize, ::serde::Deserialize)]
589#[derive(Clone, PartialEq, ::prost::Message)]
590pub struct FileParams {
591 #[prost(enumeration = "Compression", tag = "1")]
592 pub compression: i32,
593 #[prost(enumeration = "Encryption", tag = "2")]
594 pub encryption: i32,
595 #[prost(string, tag = "3")]
596 pub null_string: ::prost::alloc::string::String,
597 #[prost(string, tag = "4")]
598 pub unmodified_string: ::prost::alloc::string::String,
599}
600#[derive(::serde::Serialize, ::serde::Deserialize)]
601#[derive(Clone, PartialEq, ::prost::Message)]
602pub struct WriteBatchResponse {
603 #[prost(oneof = "write_batch_response::Response", tags = "1, 2, 3")]
604 pub response: ::core::option::Option<write_batch_response::Response>,
605}
606pub mod write_batch_response {
608 #[derive(::serde::Serialize, ::serde::Deserialize)]
609 #[derive(Clone, PartialEq, ::prost::Oneof)]
610 pub enum Response {
611 #[prost(bool, tag = "1")]
612 Success(bool),
613 #[prost(message, tag = "2")]
614 Warning(super::Warning),
615 #[prost(message, tag = "3")]
616 Task(super::Task),
617 }
618}
619#[derive(::serde::Serialize, ::serde::Deserialize)]
620#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
621#[repr(i32)]
622pub enum Encryption {
623 None = 0,
624 Aes = 1,
625}
626impl Encryption {
627 pub fn as_str_name(&self) -> &'static str {
632 match self {
633 Self::None => "NONE",
634 Self::Aes => "AES",
635 }
636 }
637 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
639 match value {
640 "NONE" => Some(Self::None),
641 "AES" => Some(Self::Aes),
642 _ => None,
643 }
644 }
645}
646#[derive(::serde::Serialize, ::serde::Deserialize)]
647#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
648#[repr(i32)]
649pub enum BatchFileFormat {
650 Csv = 0,
651 Parquet = 1,
652}
653impl BatchFileFormat {
654 pub fn as_str_name(&self) -> &'static str {
659 match self {
660 Self::Csv => "CSV",
661 Self::Parquet => "PARQUET",
662 }
663 }
664 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
666 match value {
667 "CSV" => Some(Self::Csv),
668 "PARQUET" => Some(Self::Parquet),
669 _ => None,
670 }
671 }
672}
673#[derive(::serde::Serialize, ::serde::Deserialize)]
674#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
675#[repr(i32)]
676pub enum Compression {
677 Off = 0,
678 Zstd = 1,
679 Gzip = 2,
680}
681impl Compression {
682 pub fn as_str_name(&self) -> &'static str {
687 match self {
688 Self::Off => "OFF",
689 Self::Zstd => "ZSTD",
690 Self::Gzip => "GZIP",
691 }
692 }
693 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
695 match value {
696 "OFF" => Some(Self::Off),
697 "ZSTD" => Some(Self::Zstd),
698 "GZIP" => Some(Self::Gzip),
699 _ => None,
700 }
701 }
702}
703pub mod destination_connector_client {
705 #![allow(
706 unused_variables,
707 dead_code,
708 missing_docs,
709 clippy::wildcard_imports,
710 clippy::let_unit_value,
711 )]
712 use tonic::codegen::*;
713 use tonic::codegen::http::Uri;
714 #[derive(Debug, Clone)]
716 pub struct DestinationConnectorClient<T> {
717 inner: tonic::client::Grpc<T>,
718 }
719 impl DestinationConnectorClient<tonic::transport::Channel> {
720 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
722 where
723 D: TryInto<tonic::transport::Endpoint>,
724 D::Error: Into<StdError>,
725 {
726 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
727 Ok(Self::new(conn))
728 }
729 }
730 impl<T> DestinationConnectorClient<T>
731 where
732 T: tonic::client::GrpcService<tonic::body::BoxBody>,
733 T::Error: Into<StdError>,
734 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
735 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
736 {
737 pub fn new(inner: T) -> Self {
738 let inner = tonic::client::Grpc::new(inner);
739 Self { inner }
740 }
741 pub fn with_origin(inner: T, origin: Uri) -> Self {
742 let inner = tonic::client::Grpc::with_origin(inner, origin);
743 Self { inner }
744 }
745 pub fn with_interceptor<F>(
746 inner: T,
747 interceptor: F,
748 ) -> DestinationConnectorClient<InterceptedService<T, F>>
749 where
750 F: tonic::service::Interceptor,
751 T::ResponseBody: Default,
752 T: tonic::codegen::Service<
753 http::Request<tonic::body::BoxBody>,
754 Response = http::Response<
755 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
756 >,
757 >,
758 <T as tonic::codegen::Service<
759 http::Request<tonic::body::BoxBody>,
760 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
761 {
762 DestinationConnectorClient::new(InterceptedService::new(inner, interceptor))
763 }
764 #[must_use]
769 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
770 self.inner = self.inner.send_compressed(encoding);
771 self
772 }
773 #[must_use]
775 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
776 self.inner = self.inner.accept_compressed(encoding);
777 self
778 }
779 #[must_use]
783 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
784 self.inner = self.inner.max_decoding_message_size(limit);
785 self
786 }
787 #[must_use]
791 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
792 self.inner = self.inner.max_encoding_message_size(limit);
793 self
794 }
795 pub async fn configuration_form(
796 &mut self,
797 request: impl tonic::IntoRequest<super::ConfigurationFormRequest>,
798 ) -> std::result::Result<
799 tonic::Response<super::ConfigurationFormResponse>,
800 tonic::Status,
801 > {
802 self.inner
803 .ready()
804 .await
805 .map_err(|e| {
806 tonic::Status::unknown(
807 format!("Service was not ready: {}", e.into()),
808 )
809 })?;
810 let codec = tonic::codec::ProstCodec::default();
811 let path = http::uri::PathAndQuery::from_static(
812 "/fivetran_sdk.v2.DestinationConnector/ConfigurationForm",
813 );
814 let mut req = request.into_request();
815 req.extensions_mut()
816 .insert(
817 GrpcMethod::new(
818 "fivetran_sdk.v2.DestinationConnector",
819 "ConfigurationForm",
820 ),
821 );
822 self.inner.unary(req, path, codec).await
823 }
824 pub async fn capabilities(
825 &mut self,
826 request: impl tonic::IntoRequest<super::CapabilitiesRequest>,
827 ) -> std::result::Result<
828 tonic::Response<super::CapabilitiesResponse>,
829 tonic::Status,
830 > {
831 self.inner
832 .ready()
833 .await
834 .map_err(|e| {
835 tonic::Status::unknown(
836 format!("Service was not ready: {}", e.into()),
837 )
838 })?;
839 let codec = tonic::codec::ProstCodec::default();
840 let path = http::uri::PathAndQuery::from_static(
841 "/fivetran_sdk.v2.DestinationConnector/Capabilities",
842 );
843 let mut req = request.into_request();
844 req.extensions_mut()
845 .insert(
846 GrpcMethod::new(
847 "fivetran_sdk.v2.DestinationConnector",
848 "Capabilities",
849 ),
850 );
851 self.inner.unary(req, path, codec).await
852 }
853 pub async fn test(
854 &mut self,
855 request: impl tonic::IntoRequest<super::TestRequest>,
856 ) -> std::result::Result<tonic::Response<super::TestResponse>, tonic::Status> {
857 self.inner
858 .ready()
859 .await
860 .map_err(|e| {
861 tonic::Status::unknown(
862 format!("Service was not ready: {}", e.into()),
863 )
864 })?;
865 let codec = tonic::codec::ProstCodec::default();
866 let path = http::uri::PathAndQuery::from_static(
867 "/fivetran_sdk.v2.DestinationConnector/Test",
868 );
869 let mut req = request.into_request();
870 req.extensions_mut()
871 .insert(GrpcMethod::new("fivetran_sdk.v2.DestinationConnector", "Test"));
872 self.inner.unary(req, path, codec).await
873 }
874 pub async fn describe_table(
875 &mut self,
876 request: impl tonic::IntoRequest<super::DescribeTableRequest>,
877 ) -> std::result::Result<
878 tonic::Response<super::DescribeTableResponse>,
879 tonic::Status,
880 > {
881 self.inner
882 .ready()
883 .await
884 .map_err(|e| {
885 tonic::Status::unknown(
886 format!("Service was not ready: {}", e.into()),
887 )
888 })?;
889 let codec = tonic::codec::ProstCodec::default();
890 let path = http::uri::PathAndQuery::from_static(
891 "/fivetran_sdk.v2.DestinationConnector/DescribeTable",
892 );
893 let mut req = request.into_request();
894 req.extensions_mut()
895 .insert(
896 GrpcMethod::new(
897 "fivetran_sdk.v2.DestinationConnector",
898 "DescribeTable",
899 ),
900 );
901 self.inner.unary(req, path, codec).await
902 }
903 pub async fn create_table(
904 &mut self,
905 request: impl tonic::IntoRequest<super::CreateTableRequest>,
906 ) -> std::result::Result<
907 tonic::Response<super::CreateTableResponse>,
908 tonic::Status,
909 > {
910 self.inner
911 .ready()
912 .await
913 .map_err(|e| {
914 tonic::Status::unknown(
915 format!("Service was not ready: {}", e.into()),
916 )
917 })?;
918 let codec = tonic::codec::ProstCodec::default();
919 let path = http::uri::PathAndQuery::from_static(
920 "/fivetran_sdk.v2.DestinationConnector/CreateTable",
921 );
922 let mut req = request.into_request();
923 req.extensions_mut()
924 .insert(
925 GrpcMethod::new(
926 "fivetran_sdk.v2.DestinationConnector",
927 "CreateTable",
928 ),
929 );
930 self.inner.unary(req, path, codec).await
931 }
932 pub async fn alter_table(
933 &mut self,
934 request: impl tonic::IntoRequest<super::AlterTableRequest>,
935 ) -> std::result::Result<
936 tonic::Response<super::AlterTableResponse>,
937 tonic::Status,
938 > {
939 self.inner
940 .ready()
941 .await
942 .map_err(|e| {
943 tonic::Status::unknown(
944 format!("Service was not ready: {}", e.into()),
945 )
946 })?;
947 let codec = tonic::codec::ProstCodec::default();
948 let path = http::uri::PathAndQuery::from_static(
949 "/fivetran_sdk.v2.DestinationConnector/AlterTable",
950 );
951 let mut req = request.into_request();
952 req.extensions_mut()
953 .insert(
954 GrpcMethod::new("fivetran_sdk.v2.DestinationConnector", "AlterTable"),
955 );
956 self.inner.unary(req, path, codec).await
957 }
958 pub async fn truncate(
959 &mut self,
960 request: impl tonic::IntoRequest<super::TruncateRequest>,
961 ) -> std::result::Result<
962 tonic::Response<super::TruncateResponse>,
963 tonic::Status,
964 > {
965 self.inner
966 .ready()
967 .await
968 .map_err(|e| {
969 tonic::Status::unknown(
970 format!("Service was not ready: {}", e.into()),
971 )
972 })?;
973 let codec = tonic::codec::ProstCodec::default();
974 let path = http::uri::PathAndQuery::from_static(
975 "/fivetran_sdk.v2.DestinationConnector/Truncate",
976 );
977 let mut req = request.into_request();
978 req.extensions_mut()
979 .insert(
980 GrpcMethod::new("fivetran_sdk.v2.DestinationConnector", "Truncate"),
981 );
982 self.inner.unary(req, path, codec).await
983 }
984 pub async fn write_batch(
985 &mut self,
986 request: impl tonic::IntoRequest<super::WriteBatchRequest>,
987 ) -> std::result::Result<
988 tonic::Response<super::WriteBatchResponse>,
989 tonic::Status,
990 > {
991 self.inner
992 .ready()
993 .await
994 .map_err(|e| {
995 tonic::Status::unknown(
996 format!("Service was not ready: {}", e.into()),
997 )
998 })?;
999 let codec = tonic::codec::ProstCodec::default();
1000 let path = http::uri::PathAndQuery::from_static(
1001 "/fivetran_sdk.v2.DestinationConnector/WriteBatch",
1002 );
1003 let mut req = request.into_request();
1004 req.extensions_mut()
1005 .insert(
1006 GrpcMethod::new("fivetran_sdk.v2.DestinationConnector", "WriteBatch"),
1007 );
1008 self.inner.unary(req, path, codec).await
1009 }
1010 pub async fn write_history_batch(
1011 &mut self,
1012 request: impl tonic::IntoRequest<super::WriteHistoryBatchRequest>,
1013 ) -> std::result::Result<
1014 tonic::Response<super::WriteBatchResponse>,
1015 tonic::Status,
1016 > {
1017 self.inner
1018 .ready()
1019 .await
1020 .map_err(|e| {
1021 tonic::Status::unknown(
1022 format!("Service was not ready: {}", e.into()),
1023 )
1024 })?;
1025 let codec = tonic::codec::ProstCodec::default();
1026 let path = http::uri::PathAndQuery::from_static(
1027 "/fivetran_sdk.v2.DestinationConnector/WriteHistoryBatch",
1028 );
1029 let mut req = request.into_request();
1030 req.extensions_mut()
1031 .insert(
1032 GrpcMethod::new(
1033 "fivetran_sdk.v2.DestinationConnector",
1034 "WriteHistoryBatch",
1035 ),
1036 );
1037 self.inner.unary(req, path, codec).await
1038 }
1039 }
1040}
1041pub mod destination_connector_server {
1043 #![allow(
1044 unused_variables,
1045 dead_code,
1046 missing_docs,
1047 clippy::wildcard_imports,
1048 clippy::let_unit_value,
1049 )]
1050 use tonic::codegen::*;
1051 #[async_trait]
1053 pub trait DestinationConnector: std::marker::Send + std::marker::Sync + 'static {
1054 async fn configuration_form(
1055 &self,
1056 request: tonic::Request<super::ConfigurationFormRequest>,
1057 ) -> std::result::Result<
1058 tonic::Response<super::ConfigurationFormResponse>,
1059 tonic::Status,
1060 >;
1061 async fn capabilities(
1062 &self,
1063 request: tonic::Request<super::CapabilitiesRequest>,
1064 ) -> std::result::Result<
1065 tonic::Response<super::CapabilitiesResponse>,
1066 tonic::Status,
1067 >;
1068 async fn test(
1069 &self,
1070 request: tonic::Request<super::TestRequest>,
1071 ) -> std::result::Result<tonic::Response<super::TestResponse>, tonic::Status>;
1072 async fn describe_table(
1073 &self,
1074 request: tonic::Request<super::DescribeTableRequest>,
1075 ) -> std::result::Result<
1076 tonic::Response<super::DescribeTableResponse>,
1077 tonic::Status,
1078 >;
1079 async fn create_table(
1080 &self,
1081 request: tonic::Request<super::CreateTableRequest>,
1082 ) -> std::result::Result<
1083 tonic::Response<super::CreateTableResponse>,
1084 tonic::Status,
1085 >;
1086 async fn alter_table(
1087 &self,
1088 request: tonic::Request<super::AlterTableRequest>,
1089 ) -> std::result::Result<
1090 tonic::Response<super::AlterTableResponse>,
1091 tonic::Status,
1092 >;
1093 async fn truncate(
1094 &self,
1095 request: tonic::Request<super::TruncateRequest>,
1096 ) -> std::result::Result<
1097 tonic::Response<super::TruncateResponse>,
1098 tonic::Status,
1099 >;
1100 async fn write_batch(
1101 &self,
1102 request: tonic::Request<super::WriteBatchRequest>,
1103 ) -> std::result::Result<
1104 tonic::Response<super::WriteBatchResponse>,
1105 tonic::Status,
1106 >;
1107 async fn write_history_batch(
1108 &self,
1109 request: tonic::Request<super::WriteHistoryBatchRequest>,
1110 ) -> std::result::Result<
1111 tonic::Response<super::WriteBatchResponse>,
1112 tonic::Status,
1113 >;
1114 }
1115 #[derive(Debug)]
1117 pub struct DestinationConnectorServer<T> {
1118 inner: Arc<T>,
1119 accept_compression_encodings: EnabledCompressionEncodings,
1120 send_compression_encodings: EnabledCompressionEncodings,
1121 max_decoding_message_size: Option<usize>,
1122 max_encoding_message_size: Option<usize>,
1123 }
1124 impl<T> DestinationConnectorServer<T> {
1125 pub fn new(inner: T) -> Self {
1126 Self::from_arc(Arc::new(inner))
1127 }
1128 pub fn from_arc(inner: Arc<T>) -> Self {
1129 Self {
1130 inner,
1131 accept_compression_encodings: Default::default(),
1132 send_compression_encodings: Default::default(),
1133 max_decoding_message_size: None,
1134 max_encoding_message_size: None,
1135 }
1136 }
1137 pub fn with_interceptor<F>(
1138 inner: T,
1139 interceptor: F,
1140 ) -> InterceptedService<Self, F>
1141 where
1142 F: tonic::service::Interceptor,
1143 {
1144 InterceptedService::new(Self::new(inner), interceptor)
1145 }
1146 #[must_use]
1148 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1149 self.accept_compression_encodings.enable(encoding);
1150 self
1151 }
1152 #[must_use]
1154 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1155 self.send_compression_encodings.enable(encoding);
1156 self
1157 }
1158 #[must_use]
1162 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1163 self.max_decoding_message_size = Some(limit);
1164 self
1165 }
1166 #[must_use]
1170 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1171 self.max_encoding_message_size = Some(limit);
1172 self
1173 }
1174 }
1175 impl<T, B> tonic::codegen::Service<http::Request<B>>
1176 for DestinationConnectorServer<T>
1177 where
1178 T: DestinationConnector,
1179 B: Body + std::marker::Send + 'static,
1180 B::Error: Into<StdError> + std::marker::Send + 'static,
1181 {
1182 type Response = http::Response<tonic::body::BoxBody>;
1183 type Error = std::convert::Infallible;
1184 type Future = BoxFuture<Self::Response, Self::Error>;
1185 fn poll_ready(
1186 &mut self,
1187 _cx: &mut Context<'_>,
1188 ) -> Poll<std::result::Result<(), Self::Error>> {
1189 Poll::Ready(Ok(()))
1190 }
1191 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1192 match req.uri().path() {
1193 "/fivetran_sdk.v2.DestinationConnector/ConfigurationForm" => {
1194 #[allow(non_camel_case_types)]
1195 struct ConfigurationFormSvc<T: DestinationConnector>(pub Arc<T>);
1196 impl<
1197 T: DestinationConnector,
1198 > tonic::server::UnaryService<super::ConfigurationFormRequest>
1199 for ConfigurationFormSvc<T> {
1200 type Response = super::ConfigurationFormResponse;
1201 type Future = BoxFuture<
1202 tonic::Response<Self::Response>,
1203 tonic::Status,
1204 >;
1205 fn call(
1206 &mut self,
1207 request: tonic::Request<super::ConfigurationFormRequest>,
1208 ) -> Self::Future {
1209 let inner = Arc::clone(&self.0);
1210 let fut = async move {
1211 <T as DestinationConnector>::configuration_form(
1212 &inner,
1213 request,
1214 )
1215 .await
1216 };
1217 Box::pin(fut)
1218 }
1219 }
1220 let accept_compression_encodings = self.accept_compression_encodings;
1221 let send_compression_encodings = self.send_compression_encodings;
1222 let max_decoding_message_size = self.max_decoding_message_size;
1223 let max_encoding_message_size = self.max_encoding_message_size;
1224 let inner = self.inner.clone();
1225 let fut = async move {
1226 let method = ConfigurationFormSvc(inner);
1227 let codec = tonic::codec::ProstCodec::default();
1228 let mut grpc = tonic::server::Grpc::new(codec)
1229 .apply_compression_config(
1230 accept_compression_encodings,
1231 send_compression_encodings,
1232 )
1233 .apply_max_message_size_config(
1234 max_decoding_message_size,
1235 max_encoding_message_size,
1236 );
1237 let res = grpc.unary(method, req).await;
1238 Ok(res)
1239 };
1240 Box::pin(fut)
1241 }
1242 "/fivetran_sdk.v2.DestinationConnector/Capabilities" => {
1243 #[allow(non_camel_case_types)]
1244 struct CapabilitiesSvc<T: DestinationConnector>(pub Arc<T>);
1245 impl<
1246 T: DestinationConnector,
1247 > tonic::server::UnaryService<super::CapabilitiesRequest>
1248 for CapabilitiesSvc<T> {
1249 type Response = super::CapabilitiesResponse;
1250 type Future = BoxFuture<
1251 tonic::Response<Self::Response>,
1252 tonic::Status,
1253 >;
1254 fn call(
1255 &mut self,
1256 request: tonic::Request<super::CapabilitiesRequest>,
1257 ) -> Self::Future {
1258 let inner = Arc::clone(&self.0);
1259 let fut = async move {
1260 <T as DestinationConnector>::capabilities(&inner, request)
1261 .await
1262 };
1263 Box::pin(fut)
1264 }
1265 }
1266 let accept_compression_encodings = self.accept_compression_encodings;
1267 let send_compression_encodings = self.send_compression_encodings;
1268 let max_decoding_message_size = self.max_decoding_message_size;
1269 let max_encoding_message_size = self.max_encoding_message_size;
1270 let inner = self.inner.clone();
1271 let fut = async move {
1272 let method = CapabilitiesSvc(inner);
1273 let codec = tonic::codec::ProstCodec::default();
1274 let mut grpc = tonic::server::Grpc::new(codec)
1275 .apply_compression_config(
1276 accept_compression_encodings,
1277 send_compression_encodings,
1278 )
1279 .apply_max_message_size_config(
1280 max_decoding_message_size,
1281 max_encoding_message_size,
1282 );
1283 let res = grpc.unary(method, req).await;
1284 Ok(res)
1285 };
1286 Box::pin(fut)
1287 }
1288 "/fivetran_sdk.v2.DestinationConnector/Test" => {
1289 #[allow(non_camel_case_types)]
1290 struct TestSvc<T: DestinationConnector>(pub Arc<T>);
1291 impl<
1292 T: DestinationConnector,
1293 > tonic::server::UnaryService<super::TestRequest> for TestSvc<T> {
1294 type Response = super::TestResponse;
1295 type Future = BoxFuture<
1296 tonic::Response<Self::Response>,
1297 tonic::Status,
1298 >;
1299 fn call(
1300 &mut self,
1301 request: tonic::Request<super::TestRequest>,
1302 ) -> Self::Future {
1303 let inner = Arc::clone(&self.0);
1304 let fut = async move {
1305 <T as DestinationConnector>::test(&inner, request).await
1306 };
1307 Box::pin(fut)
1308 }
1309 }
1310 let accept_compression_encodings = self.accept_compression_encodings;
1311 let send_compression_encodings = self.send_compression_encodings;
1312 let max_decoding_message_size = self.max_decoding_message_size;
1313 let max_encoding_message_size = self.max_encoding_message_size;
1314 let inner = self.inner.clone();
1315 let fut = async move {
1316 let method = TestSvc(inner);
1317 let codec = tonic::codec::ProstCodec::default();
1318 let mut grpc = tonic::server::Grpc::new(codec)
1319 .apply_compression_config(
1320 accept_compression_encodings,
1321 send_compression_encodings,
1322 )
1323 .apply_max_message_size_config(
1324 max_decoding_message_size,
1325 max_encoding_message_size,
1326 );
1327 let res = grpc.unary(method, req).await;
1328 Ok(res)
1329 };
1330 Box::pin(fut)
1331 }
1332 "/fivetran_sdk.v2.DestinationConnector/DescribeTable" => {
1333 #[allow(non_camel_case_types)]
1334 struct DescribeTableSvc<T: DestinationConnector>(pub Arc<T>);
1335 impl<
1336 T: DestinationConnector,
1337 > tonic::server::UnaryService<super::DescribeTableRequest>
1338 for DescribeTableSvc<T> {
1339 type Response = super::DescribeTableResponse;
1340 type Future = BoxFuture<
1341 tonic::Response<Self::Response>,
1342 tonic::Status,
1343 >;
1344 fn call(
1345 &mut self,
1346 request: tonic::Request<super::DescribeTableRequest>,
1347 ) -> Self::Future {
1348 let inner = Arc::clone(&self.0);
1349 let fut = async move {
1350 <T as DestinationConnector>::describe_table(&inner, request)
1351 .await
1352 };
1353 Box::pin(fut)
1354 }
1355 }
1356 let accept_compression_encodings = self.accept_compression_encodings;
1357 let send_compression_encodings = self.send_compression_encodings;
1358 let max_decoding_message_size = self.max_decoding_message_size;
1359 let max_encoding_message_size = self.max_encoding_message_size;
1360 let inner = self.inner.clone();
1361 let fut = async move {
1362 let method = DescribeTableSvc(inner);
1363 let codec = tonic::codec::ProstCodec::default();
1364 let mut grpc = tonic::server::Grpc::new(codec)
1365 .apply_compression_config(
1366 accept_compression_encodings,
1367 send_compression_encodings,
1368 )
1369 .apply_max_message_size_config(
1370 max_decoding_message_size,
1371 max_encoding_message_size,
1372 );
1373 let res = grpc.unary(method, req).await;
1374 Ok(res)
1375 };
1376 Box::pin(fut)
1377 }
1378 "/fivetran_sdk.v2.DestinationConnector/CreateTable" => {
1379 #[allow(non_camel_case_types)]
1380 struct CreateTableSvc<T: DestinationConnector>(pub Arc<T>);
1381 impl<
1382 T: DestinationConnector,
1383 > tonic::server::UnaryService<super::CreateTableRequest>
1384 for CreateTableSvc<T> {
1385 type Response = super::CreateTableResponse;
1386 type Future = BoxFuture<
1387 tonic::Response<Self::Response>,
1388 tonic::Status,
1389 >;
1390 fn call(
1391 &mut self,
1392 request: tonic::Request<super::CreateTableRequest>,
1393 ) -> Self::Future {
1394 let inner = Arc::clone(&self.0);
1395 let fut = async move {
1396 <T as DestinationConnector>::create_table(&inner, request)
1397 .await
1398 };
1399 Box::pin(fut)
1400 }
1401 }
1402 let accept_compression_encodings = self.accept_compression_encodings;
1403 let send_compression_encodings = self.send_compression_encodings;
1404 let max_decoding_message_size = self.max_decoding_message_size;
1405 let max_encoding_message_size = self.max_encoding_message_size;
1406 let inner = self.inner.clone();
1407 let fut = async move {
1408 let method = CreateTableSvc(inner);
1409 let codec = tonic::codec::ProstCodec::default();
1410 let mut grpc = tonic::server::Grpc::new(codec)
1411 .apply_compression_config(
1412 accept_compression_encodings,
1413 send_compression_encodings,
1414 )
1415 .apply_max_message_size_config(
1416 max_decoding_message_size,
1417 max_encoding_message_size,
1418 );
1419 let res = grpc.unary(method, req).await;
1420 Ok(res)
1421 };
1422 Box::pin(fut)
1423 }
1424 "/fivetran_sdk.v2.DestinationConnector/AlterTable" => {
1425 #[allow(non_camel_case_types)]
1426 struct AlterTableSvc<T: DestinationConnector>(pub Arc<T>);
1427 impl<
1428 T: DestinationConnector,
1429 > tonic::server::UnaryService<super::AlterTableRequest>
1430 for AlterTableSvc<T> {
1431 type Response = super::AlterTableResponse;
1432 type Future = BoxFuture<
1433 tonic::Response<Self::Response>,
1434 tonic::Status,
1435 >;
1436 fn call(
1437 &mut self,
1438 request: tonic::Request<super::AlterTableRequest>,
1439 ) -> Self::Future {
1440 let inner = Arc::clone(&self.0);
1441 let fut = async move {
1442 <T as DestinationConnector>::alter_table(&inner, request)
1443 .await
1444 };
1445 Box::pin(fut)
1446 }
1447 }
1448 let accept_compression_encodings = self.accept_compression_encodings;
1449 let send_compression_encodings = self.send_compression_encodings;
1450 let max_decoding_message_size = self.max_decoding_message_size;
1451 let max_encoding_message_size = self.max_encoding_message_size;
1452 let inner = self.inner.clone();
1453 let fut = async move {
1454 let method = AlterTableSvc(inner);
1455 let codec = tonic::codec::ProstCodec::default();
1456 let mut grpc = tonic::server::Grpc::new(codec)
1457 .apply_compression_config(
1458 accept_compression_encodings,
1459 send_compression_encodings,
1460 )
1461 .apply_max_message_size_config(
1462 max_decoding_message_size,
1463 max_encoding_message_size,
1464 );
1465 let res = grpc.unary(method, req).await;
1466 Ok(res)
1467 };
1468 Box::pin(fut)
1469 }
1470 "/fivetran_sdk.v2.DestinationConnector/Truncate" => {
1471 #[allow(non_camel_case_types)]
1472 struct TruncateSvc<T: DestinationConnector>(pub Arc<T>);
1473 impl<
1474 T: DestinationConnector,
1475 > tonic::server::UnaryService<super::TruncateRequest>
1476 for TruncateSvc<T> {
1477 type Response = super::TruncateResponse;
1478 type Future = BoxFuture<
1479 tonic::Response<Self::Response>,
1480 tonic::Status,
1481 >;
1482 fn call(
1483 &mut self,
1484 request: tonic::Request<super::TruncateRequest>,
1485 ) -> Self::Future {
1486 let inner = Arc::clone(&self.0);
1487 let fut = async move {
1488 <T as DestinationConnector>::truncate(&inner, request).await
1489 };
1490 Box::pin(fut)
1491 }
1492 }
1493 let accept_compression_encodings = self.accept_compression_encodings;
1494 let send_compression_encodings = self.send_compression_encodings;
1495 let max_decoding_message_size = self.max_decoding_message_size;
1496 let max_encoding_message_size = self.max_encoding_message_size;
1497 let inner = self.inner.clone();
1498 let fut = async move {
1499 let method = TruncateSvc(inner);
1500 let codec = tonic::codec::ProstCodec::default();
1501 let mut grpc = tonic::server::Grpc::new(codec)
1502 .apply_compression_config(
1503 accept_compression_encodings,
1504 send_compression_encodings,
1505 )
1506 .apply_max_message_size_config(
1507 max_decoding_message_size,
1508 max_encoding_message_size,
1509 );
1510 let res = grpc.unary(method, req).await;
1511 Ok(res)
1512 };
1513 Box::pin(fut)
1514 }
1515 "/fivetran_sdk.v2.DestinationConnector/WriteBatch" => {
1516 #[allow(non_camel_case_types)]
1517 struct WriteBatchSvc<T: DestinationConnector>(pub Arc<T>);
1518 impl<
1519 T: DestinationConnector,
1520 > tonic::server::UnaryService<super::WriteBatchRequest>
1521 for WriteBatchSvc<T> {
1522 type Response = super::WriteBatchResponse;
1523 type Future = BoxFuture<
1524 tonic::Response<Self::Response>,
1525 tonic::Status,
1526 >;
1527 fn call(
1528 &mut self,
1529 request: tonic::Request<super::WriteBatchRequest>,
1530 ) -> Self::Future {
1531 let inner = Arc::clone(&self.0);
1532 let fut = async move {
1533 <T as DestinationConnector>::write_batch(&inner, request)
1534 .await
1535 };
1536 Box::pin(fut)
1537 }
1538 }
1539 let accept_compression_encodings = self.accept_compression_encodings;
1540 let send_compression_encodings = self.send_compression_encodings;
1541 let max_decoding_message_size = self.max_decoding_message_size;
1542 let max_encoding_message_size = self.max_encoding_message_size;
1543 let inner = self.inner.clone();
1544 let fut = async move {
1545 let method = WriteBatchSvc(inner);
1546 let codec = tonic::codec::ProstCodec::default();
1547 let mut grpc = tonic::server::Grpc::new(codec)
1548 .apply_compression_config(
1549 accept_compression_encodings,
1550 send_compression_encodings,
1551 )
1552 .apply_max_message_size_config(
1553 max_decoding_message_size,
1554 max_encoding_message_size,
1555 );
1556 let res = grpc.unary(method, req).await;
1557 Ok(res)
1558 };
1559 Box::pin(fut)
1560 }
1561 "/fivetran_sdk.v2.DestinationConnector/WriteHistoryBatch" => {
1562 #[allow(non_camel_case_types)]
1563 struct WriteHistoryBatchSvc<T: DestinationConnector>(pub Arc<T>);
1564 impl<
1565 T: DestinationConnector,
1566 > tonic::server::UnaryService<super::WriteHistoryBatchRequest>
1567 for WriteHistoryBatchSvc<T> {
1568 type Response = super::WriteBatchResponse;
1569 type Future = BoxFuture<
1570 tonic::Response<Self::Response>,
1571 tonic::Status,
1572 >;
1573 fn call(
1574 &mut self,
1575 request: tonic::Request<super::WriteHistoryBatchRequest>,
1576 ) -> Self::Future {
1577 let inner = Arc::clone(&self.0);
1578 let fut = async move {
1579 <T as DestinationConnector>::write_history_batch(
1580 &inner,
1581 request,
1582 )
1583 .await
1584 };
1585 Box::pin(fut)
1586 }
1587 }
1588 let accept_compression_encodings = self.accept_compression_encodings;
1589 let send_compression_encodings = self.send_compression_encodings;
1590 let max_decoding_message_size = self.max_decoding_message_size;
1591 let max_encoding_message_size = self.max_encoding_message_size;
1592 let inner = self.inner.clone();
1593 let fut = async move {
1594 let method = WriteHistoryBatchSvc(inner);
1595 let codec = tonic::codec::ProstCodec::default();
1596 let mut grpc = tonic::server::Grpc::new(codec)
1597 .apply_compression_config(
1598 accept_compression_encodings,
1599 send_compression_encodings,
1600 )
1601 .apply_max_message_size_config(
1602 max_decoding_message_size,
1603 max_encoding_message_size,
1604 );
1605 let res = grpc.unary(method, req).await;
1606 Ok(res)
1607 };
1608 Box::pin(fut)
1609 }
1610 _ => {
1611 Box::pin(async move {
1612 let mut response = http::Response::new(empty_body());
1613 let headers = response.headers_mut();
1614 headers
1615 .insert(
1616 tonic::Status::GRPC_STATUS,
1617 (tonic::Code::Unimplemented as i32).into(),
1618 );
1619 headers
1620 .insert(
1621 http::header::CONTENT_TYPE,
1622 tonic::metadata::GRPC_CONTENT_TYPE,
1623 );
1624 Ok(response)
1625 })
1626 }
1627 }
1628 }
1629 }
1630 impl<T> Clone for DestinationConnectorServer<T> {
1631 fn clone(&self) -> Self {
1632 let inner = self.inner.clone();
1633 Self {
1634 inner,
1635 accept_compression_encodings: self.accept_compression_encodings,
1636 send_compression_encodings: self.send_compression_encodings,
1637 max_decoding_message_size: self.max_decoding_message_size,
1638 max_encoding_message_size: self.max_encoding_message_size,
1639 }
1640 }
1641 }
1642 pub const SERVICE_NAME: &str = "fivetran_sdk.v2.DestinationConnector";
1644 impl<T> tonic::server::NamedService for DestinationConnectorServer<T> {
1645 const NAME: &'static str = SERVICE_NAME;
1646 }
1647}