xds-types 0.1.0

Generated protobuf types for Envoy xDS APIs
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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ParsedExpr {
    #[prost(message, optional, tag = "2")]
    pub expr: ::core::option::Option<Expr>,
    #[prost(message, optional, tag = "3")]
    pub source_info: ::core::option::Option<SourceInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expr {
    #[prost(int64, tag = "2")]
    pub id: i64,
    #[prost(oneof = "expr::ExprKind", tags = "3, 4, 5, 6, 7, 8, 9")]
    pub expr_kind: ::core::option::Option<expr::ExprKind>,
}
/// Nested message and enum types in `Expr`.
pub mod expr {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Ident {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Select {
        #[prost(message, optional, boxed, tag = "1")]
        pub operand: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
        #[prost(string, tag = "2")]
        pub field: ::prost::alloc::string::String,
        #[prost(bool, tag = "3")]
        pub test_only: bool,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Call {
        #[prost(message, optional, boxed, tag = "1")]
        pub target: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
        #[prost(string, tag = "2")]
        pub function: ::prost::alloc::string::String,
        #[prost(message, repeated, tag = "3")]
        pub args: ::prost::alloc::vec::Vec<super::Expr>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CreateList {
        #[prost(message, repeated, tag = "1")]
        pub elements: ::prost::alloc::vec::Vec<super::Expr>,
        #[prost(int32, repeated, tag = "2")]
        pub optional_indices: ::prost::alloc::vec::Vec<i32>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CreateStruct {
        #[prost(string, tag = "1")]
        pub message_name: ::prost::alloc::string::String,
        #[prost(message, repeated, tag = "2")]
        pub entries: ::prost::alloc::vec::Vec<create_struct::Entry>,
    }
    /// Nested message and enum types in `CreateStruct`.
    pub mod create_struct {
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Entry {
            #[prost(int64, tag = "1")]
            pub id: i64,
            #[prost(message, optional, tag = "4")]
            pub value: ::core::option::Option<super::super::Expr>,
            #[prost(bool, tag = "5")]
            pub optional_entry: bool,
            #[prost(oneof = "entry::KeyKind", tags = "2, 3")]
            pub key_kind: ::core::option::Option<entry::KeyKind>,
        }
        /// Nested message and enum types in `Entry`.
        pub mod entry {
            #[derive(Clone, PartialEq, ::prost::Oneof)]
            pub enum KeyKind {
                #[prost(string, tag = "2")]
                FieldKey(::prost::alloc::string::String),
                #[prost(message, tag = "3")]
                MapKey(super::super::super::Expr),
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Comprehension {
        #[prost(string, tag = "1")]
        pub iter_var: ::prost::alloc::string::String,
        #[prost(string, tag = "8")]
        pub iter_var2: ::prost::alloc::string::String,
        #[prost(message, optional, boxed, tag = "2")]
        pub iter_range: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
        #[prost(string, tag = "3")]
        pub accu_var: ::prost::alloc::string::String,
        #[prost(message, optional, boxed, tag = "4")]
        pub accu_init: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
        #[prost(message, optional, boxed, tag = "5")]
        pub loop_condition: ::core::option::Option<
            ::prost::alloc::boxed::Box<super::Expr>,
        >,
        #[prost(message, optional, boxed, tag = "6")]
        pub loop_step: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
        #[prost(message, optional, boxed, tag = "7")]
        pub result: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ExprKind {
        #[prost(message, tag = "3")]
        ConstExpr(super::Constant),
        #[prost(message, tag = "4")]
        IdentExpr(Ident),
        #[prost(message, tag = "5")]
        SelectExpr(::prost::alloc::boxed::Box<Select>),
        #[prost(message, tag = "6")]
        CallExpr(::prost::alloc::boxed::Box<Call>),
        #[prost(message, tag = "7")]
        ListExpr(CreateList),
        #[prost(message, tag = "8")]
        StructExpr(CreateStruct),
        #[prost(message, tag = "9")]
        ComprehensionExpr(::prost::alloc::boxed::Box<Comprehension>),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Constant {
    #[prost(oneof = "constant::ConstantKind", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
    pub constant_kind: ::core::option::Option<constant::ConstantKind>,
}
/// Nested message and enum types in `Constant`.
pub mod constant {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ConstantKind {
        #[prost(
            enumeration = "super::super::super::super::protobuf::NullValue",
            tag = "1"
        )]
        NullValue(i32),
        #[prost(bool, tag = "2")]
        BoolValue(bool),
        #[prost(int64, tag = "3")]
        Int64Value(i64),
        #[prost(uint64, tag = "4")]
        Uint64Value(u64),
        #[prost(double, tag = "5")]
        DoubleValue(f64),
        #[prost(string, tag = "6")]
        StringValue(::prost::alloc::string::String),
        #[prost(bytes, tag = "7")]
        BytesValue(::prost::alloc::vec::Vec<u8>),
        #[prost(message, tag = "8")]
        DurationValue(super::super::super::super::protobuf::Duration),
        #[prost(message, tag = "9")]
        TimestampValue(super::super::super::super::protobuf::Timestamp),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceInfo {
    #[prost(string, tag = "1")]
    pub syntax_version: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub location: ::prost::alloc::string::String,
    #[prost(int32, repeated, tag = "3")]
    pub line_offsets: ::prost::alloc::vec::Vec<i32>,
    #[prost(map = "int64, int32", tag = "4")]
    pub positions: ::std::collections::HashMap<i64, i32>,
    #[prost(map = "int64, message", tag = "5")]
    pub macro_calls: ::std::collections::HashMap<i64, Expr>,
    #[prost(message, repeated, tag = "6")]
    pub extensions: ::prost::alloc::vec::Vec<source_info::Extension>,
}
/// Nested message and enum types in `SourceInfo`.
pub mod source_info {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Extension {
        #[prost(string, tag = "1")]
        pub id: ::prost::alloc::string::String,
        #[prost(enumeration = "extension::Component", repeated, tag = "2")]
        pub affected_components: ::prost::alloc::vec::Vec<i32>,
        #[prost(message, optional, tag = "3")]
        pub version: ::core::option::Option<extension::Version>,
    }
    /// Nested message and enum types in `Extension`.
    pub mod extension {
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        pub struct Version {
            #[prost(int64, tag = "1")]
            pub major: i64,
            #[prost(int64, tag = "2")]
            pub minor: i64,
        }
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Component {
            Unspecified = 0,
            Parser = 1,
            TypeChecker = 2,
            Runtime = 3,
        }
        impl Component {
            /// 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 => "COMPONENT_UNSPECIFIED",
                    Self::Parser => "COMPONENT_PARSER",
                    Self::TypeChecker => "COMPONENT_TYPE_CHECKER",
                    Self::Runtime => "COMPONENT_RUNTIME",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "COMPONENT_UNSPECIFIED" => Some(Self::Unspecified),
                    "COMPONENT_PARSER" => Some(Self::Parser),
                    "COMPONENT_TYPE_CHECKER" => Some(Self::TypeChecker),
                    "COMPONENT_RUNTIME" => Some(Self::Runtime),
                    _ => None,
                }
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourcePosition {
    #[prost(string, tag = "1")]
    pub location: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub offset: i32,
    #[prost(int32, tag = "3")]
    pub line: i32,
    #[prost(int32, tag = "4")]
    pub column: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckedExpr {
    #[prost(map = "int64, message", tag = "2")]
    pub reference_map: ::std::collections::HashMap<i64, Reference>,
    #[prost(map = "int64, message", tag = "3")]
    pub type_map: ::std::collections::HashMap<i64, Type>,
    #[prost(message, optional, tag = "5")]
    pub source_info: ::core::option::Option<SourceInfo>,
    #[prost(string, tag = "6")]
    pub expr_version: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub expr: ::core::option::Option<Expr>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Type {
    #[prost(
        oneof = "r#type::TypeKind",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14"
    )]
    pub type_kind: ::core::option::Option<r#type::TypeKind>,
}
/// Nested message and enum types in `Type`.
pub mod r#type {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ListType {
        #[prost(message, optional, boxed, tag = "1")]
        pub elem_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MapType {
        #[prost(message, optional, boxed, tag = "1")]
        pub key_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
        #[prost(message, optional, boxed, tag = "2")]
        pub value_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FunctionType {
        #[prost(message, optional, boxed, tag = "1")]
        pub result_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
        #[prost(message, repeated, tag = "2")]
        pub arg_types: ::prost::alloc::vec::Vec<super::Type>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AbstractType {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(message, repeated, tag = "2")]
        pub parameter_types: ::prost::alloc::vec::Vec<super::Type>,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum PrimitiveType {
        Unspecified = 0,
        Bool = 1,
        Int64 = 2,
        Uint64 = 3,
        Double = 4,
        String = 5,
        Bytes = 6,
    }
    impl PrimitiveType {
        /// 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 => "PRIMITIVE_TYPE_UNSPECIFIED",
                Self::Bool => "BOOL",
                Self::Int64 => "INT64",
                Self::Uint64 => "UINT64",
                Self::Double => "DOUBLE",
                Self::String => "STRING",
                Self::Bytes => "BYTES",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PRIMITIVE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "BOOL" => Some(Self::Bool),
                "INT64" => Some(Self::Int64),
                "UINT64" => Some(Self::Uint64),
                "DOUBLE" => Some(Self::Double),
                "STRING" => Some(Self::String),
                "BYTES" => Some(Self::Bytes),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum WellKnownType {
        Unspecified = 0,
        Any = 1,
        Timestamp = 2,
        Duration = 3,
    }
    impl WellKnownType {
        /// 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 => "WELL_KNOWN_TYPE_UNSPECIFIED",
                Self::Any => "ANY",
                Self::Timestamp => "TIMESTAMP",
                Self::Duration => "DURATION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "WELL_KNOWN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ANY" => Some(Self::Any),
                "TIMESTAMP" => Some(Self::Timestamp),
                "DURATION" => Some(Self::Duration),
                _ => None,
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum TypeKind {
        #[prost(message, tag = "1")]
        Dyn(super::super::super::super::protobuf::Empty),
        #[prost(
            enumeration = "super::super::super::super::protobuf::NullValue",
            tag = "2"
        )]
        Null(i32),
        #[prost(enumeration = "PrimitiveType", tag = "3")]
        Primitive(i32),
        #[prost(enumeration = "PrimitiveType", tag = "4")]
        Wrapper(i32),
        #[prost(enumeration = "WellKnownType", tag = "5")]
        WellKnown(i32),
        #[prost(message, tag = "6")]
        ListType(::prost::alloc::boxed::Box<ListType>),
        #[prost(message, tag = "7")]
        MapType(::prost::alloc::boxed::Box<MapType>),
        #[prost(message, tag = "8")]
        Function(::prost::alloc::boxed::Box<FunctionType>),
        #[prost(string, tag = "9")]
        MessageType(::prost::alloc::string::String),
        #[prost(string, tag = "10")]
        TypeParam(::prost::alloc::string::String),
        #[prost(message, tag = "11")]
        Type(::prost::alloc::boxed::Box<super::Type>),
        #[prost(message, tag = "12")]
        Error(super::super::super::super::protobuf::Empty),
        #[prost(message, tag = "14")]
        AbstractType(AbstractType),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Decl {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(oneof = "decl::DeclKind", tags = "2, 3")]
    pub decl_kind: ::core::option::Option<decl::DeclKind>,
}
/// Nested message and enum types in `Decl`.
pub mod decl {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct IdentDecl {
        #[prost(message, optional, tag = "1")]
        pub r#type: ::core::option::Option<super::Type>,
        #[prost(message, optional, tag = "2")]
        pub value: ::core::option::Option<super::Constant>,
        #[prost(string, tag = "3")]
        pub doc: ::prost::alloc::string::String,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FunctionDecl {
        #[prost(message, repeated, tag = "1")]
        pub overloads: ::prost::alloc::vec::Vec<function_decl::Overload>,
    }
    /// Nested message and enum types in `FunctionDecl`.
    pub mod function_decl {
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Overload {
            #[prost(string, tag = "1")]
            pub overload_id: ::prost::alloc::string::String,
            #[prost(message, repeated, tag = "2")]
            pub params: ::prost::alloc::vec::Vec<super::super::Type>,
            #[prost(string, repeated, tag = "3")]
            pub type_params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
            #[prost(message, optional, tag = "4")]
            pub result_type: ::core::option::Option<super::super::Type>,
            #[prost(bool, tag = "5")]
            pub is_instance_function: bool,
            #[prost(string, tag = "6")]
            pub doc: ::prost::alloc::string::String,
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum DeclKind {
        #[prost(message, tag = "2")]
        Ident(IdentDecl),
        #[prost(message, tag = "3")]
        Function(FunctionDecl),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reference {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "3")]
    pub overload_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "4")]
    pub value: ::core::option::Option<Constant>,
}