chalk-client 0.1.0

Rust client SDK for the Chalk feature store
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schema {
    #[prost(message, repeated, tag = "1")]
    pub columns: ::prost::alloc::vec::Vec<Field>,
    #[prost(map = "string, string", tag = "2")]
    pub metadata: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Field {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, boxed, tag = "2")]
    pub arrow_type: ::core::option::Option<::prost::alloc::boxed::Box<ArrowType>>,
    #[prost(bool, tag = "3")]
    pub nullable: bool,
    #[prost(message, repeated, tag = "4")]
    pub children: ::prost::alloc::vec::Vec<Field>,
    #[prost(map = "string, string", tag = "5")]
    pub metadata: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FixedSizeBinary {
    #[prost(int32, tag = "1")]
    pub length: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Timestamp {
    #[prost(enumeration = "TimeUnit", tag = "1")]
    pub time_unit: i32,
    #[prost(string, tag = "2")]
    pub timezone: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Decimal {
    #[prost(int32, tag = "1")]
    pub precision: i32,
    #[prost(int32, tag = "2")]
    pub scale: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct List {
    #[prost(message, optional, boxed, tag = "1")]
    pub field_type: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FixedSizeList {
    #[prost(message, optional, boxed, tag = "1")]
    pub field_type: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
    #[prost(int32, tag = "2")]
    pub list_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Struct {
    #[prost(message, repeated, tag = "1")]
    pub sub_field_types: ::prost::alloc::vec::Vec<Field>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Map {
    #[prost(message, optional, boxed, tag = "1")]
    pub key_field: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
    #[prost(message, optional, boxed, tag = "2")]
    pub item_field: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
    #[prost(bool, tag = "3")]
    pub keys_sorted: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScalarListValue {
    #[prost(bytes = "vec", tag = "1")]
    pub arrow_data: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "2")]
    pub schema: ::core::option::Option<Schema>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScalarTime32Value {
    #[prost(oneof = "scalar_time32_value::Value", tags = "1, 2")]
    pub value: ::core::option::Option<scalar_time32_value::Value>,
}
/// Nested message and enum types in `ScalarTime32Value`.
pub mod scalar_time32_value {
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(int32, tag = "1")]
        Time32SecondValue(i32),
        #[prost(int32, tag = "2")]
        Time32MillisecondValue(i32),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScalarTime64Value {
    #[prost(oneof = "scalar_time64_value::Value", tags = "1, 2")]
    pub value: ::core::option::Option<scalar_time64_value::Value>,
}
/// Nested message and enum types in `ScalarTime64Value`.
pub mod scalar_time64_value {
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(int64, tag = "1")]
        Time64MicrosecondValue(i64),
        #[prost(int64, tag = "2")]
        Time64NanosecondValue(i64),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScalarTimestampValue {
    #[prost(string, tag = "5")]
    pub timezone: ::prost::alloc::string::String,
    #[prost(oneof = "scalar_timestamp_value::Value", tags = "1, 2, 3, 4")]
    pub value: ::core::option::Option<scalar_timestamp_value::Value>,
}
/// Nested message and enum types in `ScalarTimestampValue`.
pub mod scalar_timestamp_value {
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(int64, tag = "1")]
        TimeMicrosecondValue(i64),
        #[prost(int64, tag = "2")]
        TimeNanosecondValue(i64),
        #[prost(int64, tag = "3")]
        TimeSecondValue(i64),
        #[prost(int64, tag = "4")]
        TimeMillisecondValue(i64),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StructValue {
    #[prost(message, repeated, tag = "2")]
    pub field_values: ::prost::alloc::vec::Vec<ScalarValue>,
    #[prost(message, repeated, tag = "3")]
    pub fields: ::prost::alloc::vec::Vec<Field>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScalarFixedSizeBinary {
    #[prost(bytes = "vec", tag = "1")]
    pub values: ::prost::alloc::vec::Vec<u8>,
    #[prost(int32, tag = "2")]
    pub length: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DecimalValue {
    #[prost(bytes = "vec", tag = "1")]
    pub value: ::prost::alloc::vec::Vec<u8>,
    #[prost(int32, tag = "2")]
    pub precision: i32,
    #[prost(int32, tag = "3")]
    pub scale: i32,
}
/// Extension is used to
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Extension {
    /// The name of the extension -- e.g. arrow.json. See
    /// <https://arrow.apache.org/docs/format/CanonicalExtensions.html>
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The underlying storage type for this extension type.
    #[prost(message, optional, boxed, tag = "2")]
    pub storage_type: ::core::option::Option<::prost::alloc::boxed::Box<ArrowType>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtensionValue {
    #[prost(message, optional, tag = "1")]
    pub extension_type: ::core::option::Option<Extension>,
    #[prost(message, optional, boxed, tag = "2")]
    pub storage_value: ::core::option::Option<::prost::alloc::boxed::Box<ScalarValue>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScalarValue {
    #[prost(
        oneof = "scalar_value::Value",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40"
    )]
    pub value: ::core::option::Option<scalar_value::Value>,
}
/// Nested message and enum types in `ScalarValue`.
pub mod scalar_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        /// Group popular types at the top
        /// to save space in the serialized
        /// message.
        #[prost(message, tag = "1")]
        NullValue(super::ArrowType),
        #[prost(bool, tag = "2")]
        BoolValue(bool),
        #[prost(double, tag = "3")]
        Float64Value(f64),
        #[prost(int64, tag = "4")]
        Int64Value(i64),
        #[prost(string, tag = "5")]
        LargeUtf8Value(::prost::alloc::string::String),
        #[prost(message, tag = "6")]
        TimestampValue(super::ScalarTimestampValue),
        #[prost(int64, tag = "7")]
        Date64Value(i64),
        #[prost(message, tag = "8")]
        StructValue(super::StructValue),
        #[prost(message, tag = "9")]
        LargeListValue(super::ScalarListValue),
        /// Leave placeholders for 11-15 in case
        /// we get the most popular types wrong.
        #[prost(message, tag = "10")]
        Time64Value(super::ScalarTime64Value),
        #[prost(int64, tag = "16")]
        DurationSecondValue(i64),
        #[prost(int64, tag = "17")]
        DurationMillisecondValue(i64),
        #[prost(int64, tag = "18")]
        DurationMicrosecondValue(i64),
        #[prost(int64, tag = "19")]
        DurationNanosecondValue(i64),
        #[prost(string, tag = "20")]
        Utf8Value(::prost::alloc::string::String),
        #[prost(int32, tag = "21")]
        Int8Value(i32),
        #[prost(int32, tag = "22")]
        Int16Value(i32),
        #[prost(int32, tag = "23")]
        Int32Value(i32),
        #[prost(uint32, tag = "24")]
        Uint8Value(u32),
        #[prost(uint32, tag = "25")]
        Uint16Value(u32),
        #[prost(uint32, tag = "26")]
        Uint32Value(u32),
        #[prost(uint64, tag = "27")]
        Uint64Value(u64),
        #[prost(float, tag = "28")]
        Float16Value(f32),
        #[prost(float, tag = "29")]
        Float32Value(f32),
        #[prost(int32, tag = "30")]
        Date32Value(i32),
        #[prost(message, tag = "31")]
        Time32Value(super::ScalarTime32Value),
        #[prost(message, tag = "32")]
        ListValue(super::ScalarListValue),
        #[prost(message, tag = "33")]
        FixedSizeListValue(super::ScalarListValue),
        #[prost(message, tag = "34")]
        MapValue(super::ScalarListValue),
        #[prost(bytes, tag = "35")]
        BinaryValue(::prost::alloc::vec::Vec<u8>),
        #[prost(bytes, tag = "36")]
        LargeBinaryValue(::prost::alloc::vec::Vec<u8>),
        #[prost(message, tag = "37")]
        FixedSizeBinaryValue(super::ScalarFixedSizeBinary),
        #[prost(message, tag = "38")]
        Decimal128Value(super::DecimalValue),
        #[prost(message, tag = "39")]
        Decimal256Value(super::DecimalValue),
        #[prost(message, tag = "40")]
        ExtensionValue(::prost::alloc::boxed::Box<super::ExtensionValue>),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArrowType {
    #[prost(
        oneof = "arrow_type::ArrowTypeEnum",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37"
    )]
    pub arrow_type_enum: ::core::option::Option<arrow_type::ArrowTypeEnum>,
}
/// Nested message and enum types in `ArrowType`.
pub mod arrow_type {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ArrowTypeEnum {
        /// Group popular types at the top
        /// to save space in the serialized
        /// message.
        #[prost(message, tag = "1")]
        None(super::EmptyMessage),
        #[prost(message, tag = "2")]
        Bool(super::EmptyMessage),
        #[prost(message, tag = "3")]
        Float64(super::EmptyMessage),
        #[prost(message, tag = "4")]
        Int64(super::EmptyMessage),
        #[prost(message, tag = "5")]
        LargeUtf8(super::EmptyMessage),
        #[prost(message, tag = "6")]
        Timestamp(super::Timestamp),
        #[prost(message, tag = "7")]
        Date64(super::EmptyMessage),
        #[prost(message, tag = "8")]
        Struct(super::Struct),
        #[prost(message, tag = "9")]
        LargeList(::prost::alloc::boxed::Box<super::List>),
        /// Leave placeholders for 11-15 in case
        /// we get the most popular types wrong.
        #[prost(enumeration = "super::TimeUnit", tag = "10")]
        Time64(i32),
        #[prost(enumeration = "super::TimeUnit", tag = "16")]
        Duration(i32),
        #[prost(message, tag = "17")]
        Utf8(super::EmptyMessage),
        #[prost(message, tag = "18")]
        Int8(super::EmptyMessage),
        #[prost(message, tag = "19")]
        Int16(super::EmptyMessage),
        #[prost(message, tag = "20")]
        Int32(super::EmptyMessage),
        #[prost(message, tag = "21")]
        Uint8(super::EmptyMessage),
        #[prost(message, tag = "22")]
        Uint16(super::EmptyMessage),
        #[prost(message, tag = "23")]
        Uint32(super::EmptyMessage),
        #[prost(message, tag = "24")]
        Uint64(super::EmptyMessage),
        #[prost(message, tag = "25")]
        Float16(super::EmptyMessage),
        #[prost(message, tag = "26")]
        Float32(super::EmptyMessage),
        #[prost(message, tag = "27")]
        Date32(super::EmptyMessage),
        #[prost(enumeration = "super::TimeUnit", tag = "28")]
        Time32(i32),
        #[prost(message, tag = "29")]
        List(::prost::alloc::boxed::Box<super::List>),
        #[prost(message, tag = "30")]
        FixedSizeList(::prost::alloc::boxed::Box<super::FixedSizeList>),
        #[prost(message, tag = "31")]
        Binary(super::EmptyMessage),
        #[prost(message, tag = "32")]
        LargeBinary(super::EmptyMessage),
        #[prost(int32, tag = "33")]
        FixedSizeBinary(i32),
        #[prost(message, tag = "34")]
        Decimal128(super::Decimal),
        #[prost(message, tag = "35")]
        Decimal256(super::Decimal),
        #[prost(message, tag = "36")]
        Map(::prost::alloc::boxed::Box<super::Map>),
        #[prost(message, tag = "37")]
        Extension(::prost::alloc::boxed::Box<super::Extension>),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EmptyMessage {}
/// / A Table, encoded as parquet bytes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableParquetBytes {
    #[prost(bytes = "vec", tag = "1")]
    pub encoded_parquet_bytes: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TimeUnit {
    Unspecified = 0,
    Second = 1,
    Millisecond = 2,
    Microsecond = 3,
    Nanosecond = 4,
}
impl TimeUnit {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TIME_UNIT_UNSPECIFIED",
            Self::Second => "TIME_UNIT_SECOND",
            Self::Millisecond => "TIME_UNIT_MILLISECOND",
            Self::Microsecond => "TIME_UNIT_MICROSECOND",
            Self::Nanosecond => "TIME_UNIT_NANOSECOND",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TIME_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
            "TIME_UNIT_SECOND" => Some(Self::Second),
            "TIME_UNIT_MILLISECOND" => Some(Self::Millisecond),
            "TIME_UNIT_MICROSECOND" => Some(Self::Microsecond),
            "TIME_UNIT_NANOSECOND" => Some(Self::Nanosecond),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FeatherCompression {
    Unspecified = 0,
    Uncompressed = 1,
    Lz4 = 2,
    Zstd = 3,
}
impl FeatherCompression {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "FEATHER_COMPRESSION_UNSPECIFIED",
            Self::Uncompressed => "FEATHER_COMPRESSION_UNCOMPRESSED",
            Self::Lz4 => "FEATHER_COMPRESSION_LZ4",
            Self::Zstd => "FEATHER_COMPRESSION_ZSTD",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FEATHER_COMPRESSION_UNSPECIFIED" => Some(Self::Unspecified),
            "FEATHER_COMPRESSION_UNCOMPRESSED" => Some(Self::Uncompressed),
            "FEATHER_COMPRESSION_LZ4" => Some(Self::Lz4),
            "FEATHER_COMPRESSION_ZSTD" => Some(Self::Zstd),
            _ => None,
        }
    }
}