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
// This file is generated by rust-protobuf 2.27.1. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `tensorflow/core/framework/types.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;

#[derive(PartialEq,Clone,Default)]
pub struct SerializedDType {
    // message fields
    pub datatype: DataType,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a SerializedDType {
    fn default() -> &'a SerializedDType {
        <SerializedDType as ::protobuf::Message>::default_instance()
    }
}

impl SerializedDType {
    pub fn new() -> SerializedDType {
        ::std::default::Default::default()
    }

    // .tensorflow.DataType datatype = 1;


    pub fn get_datatype(&self) -> DataType {
        self.datatype
    }
    pub fn clear_datatype(&mut self) {
        self.datatype = DataType::DT_INVALID;
    }

    // Param is passed by value, moved
    pub fn set_datatype(&mut self, v: DataType) {
        self.datatype = v;
    }
}

impl ::protobuf::Message for SerializedDType {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.datatype, 1, &mut self.unknown_fields)?
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.datatype != DataType::DT_INVALID {
            my_size += ::protobuf::rt::enum_size(1, self.datatype);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if self.datatype != DataType::DT_INVALID {
            os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.datatype))?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> SerializedDType {
        SerializedDType::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<DataType>>(
                "datatype",
                |m: &SerializedDType| { &m.datatype },
                |m: &mut SerializedDType| { &mut m.datatype },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<SerializedDType>(
                "SerializedDType",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static SerializedDType {
        static instance: ::protobuf::rt::LazyV2<SerializedDType> = ::protobuf::rt::LazyV2::INIT;
        instance.get(SerializedDType::new)
    }
}

impl ::protobuf::Clear for SerializedDType {
    fn clear(&mut self) {
        self.datatype = DataType::DT_INVALID;
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for SerializedDType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for SerializedDType {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum DataType {
    DT_INVALID = 0,
    DT_FLOAT = 1,
    DT_DOUBLE = 2,
    DT_INT32 = 3,
    DT_UINT8 = 4,
    DT_INT16 = 5,
    DT_INT8 = 6,
    DT_STRING = 7,
    DT_COMPLEX64 = 8,
    DT_INT64 = 9,
    DT_BOOL = 10,
    DT_QINT8 = 11,
    DT_QUINT8 = 12,
    DT_QINT32 = 13,
    DT_BFLOAT16 = 14,
    DT_QINT16 = 15,
    DT_QUINT16 = 16,
    DT_UINT16 = 17,
    DT_COMPLEX128 = 18,
    DT_HALF = 19,
    DT_RESOURCE = 20,
    DT_VARIANT = 21,
    DT_UINT32 = 22,
    DT_UINT64 = 23,
    DT_FLOAT8_E5M2 = 24,
    DT_FLOAT8_E4M3FN = 25,
    DT_FLOAT_REF = 101,
    DT_DOUBLE_REF = 102,
    DT_INT32_REF = 103,
    DT_UINT8_REF = 104,
    DT_INT16_REF = 105,
    DT_INT8_REF = 106,
    DT_STRING_REF = 107,
    DT_COMPLEX64_REF = 108,
    DT_INT64_REF = 109,
    DT_BOOL_REF = 110,
    DT_QINT8_REF = 111,
    DT_QUINT8_REF = 112,
    DT_QINT32_REF = 113,
    DT_BFLOAT16_REF = 114,
    DT_QINT16_REF = 115,
    DT_QUINT16_REF = 116,
    DT_UINT16_REF = 117,
    DT_COMPLEX128_REF = 118,
    DT_HALF_REF = 119,
    DT_RESOURCE_REF = 120,
    DT_VARIANT_REF = 121,
    DT_UINT32_REF = 122,
    DT_UINT64_REF = 123,
    DT_FLOAT8_E5M2_REF = 124,
    DT_FLOAT8_E4M3FN_REF = 125,
}

impl ::protobuf::ProtobufEnum for DataType {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<DataType> {
        match value {
            0 => ::std::option::Option::Some(DataType::DT_INVALID),
            1 => ::std::option::Option::Some(DataType::DT_FLOAT),
            2 => ::std::option::Option::Some(DataType::DT_DOUBLE),
            3 => ::std::option::Option::Some(DataType::DT_INT32),
            4 => ::std::option::Option::Some(DataType::DT_UINT8),
            5 => ::std::option::Option::Some(DataType::DT_INT16),
            6 => ::std::option::Option::Some(DataType::DT_INT8),
            7 => ::std::option::Option::Some(DataType::DT_STRING),
            8 => ::std::option::Option::Some(DataType::DT_COMPLEX64),
            9 => ::std::option::Option::Some(DataType::DT_INT64),
            10 => ::std::option::Option::Some(DataType::DT_BOOL),
            11 => ::std::option::Option::Some(DataType::DT_QINT8),
            12 => ::std::option::Option::Some(DataType::DT_QUINT8),
            13 => ::std::option::Option::Some(DataType::DT_QINT32),
            14 => ::std::option::Option::Some(DataType::DT_BFLOAT16),
            15 => ::std::option::Option::Some(DataType::DT_QINT16),
            16 => ::std::option::Option::Some(DataType::DT_QUINT16),
            17 => ::std::option::Option::Some(DataType::DT_UINT16),
            18 => ::std::option::Option::Some(DataType::DT_COMPLEX128),
            19 => ::std::option::Option::Some(DataType::DT_HALF),
            20 => ::std::option::Option::Some(DataType::DT_RESOURCE),
            21 => ::std::option::Option::Some(DataType::DT_VARIANT),
            22 => ::std::option::Option::Some(DataType::DT_UINT32),
            23 => ::std::option::Option::Some(DataType::DT_UINT64),
            24 => ::std::option::Option::Some(DataType::DT_FLOAT8_E5M2),
            25 => ::std::option::Option::Some(DataType::DT_FLOAT8_E4M3FN),
            101 => ::std::option::Option::Some(DataType::DT_FLOAT_REF),
            102 => ::std::option::Option::Some(DataType::DT_DOUBLE_REF),
            103 => ::std::option::Option::Some(DataType::DT_INT32_REF),
            104 => ::std::option::Option::Some(DataType::DT_UINT8_REF),
            105 => ::std::option::Option::Some(DataType::DT_INT16_REF),
            106 => ::std::option::Option::Some(DataType::DT_INT8_REF),
            107 => ::std::option::Option::Some(DataType::DT_STRING_REF),
            108 => ::std::option::Option::Some(DataType::DT_COMPLEX64_REF),
            109 => ::std::option::Option::Some(DataType::DT_INT64_REF),
            110 => ::std::option::Option::Some(DataType::DT_BOOL_REF),
            111 => ::std::option::Option::Some(DataType::DT_QINT8_REF),
            112 => ::std::option::Option::Some(DataType::DT_QUINT8_REF),
            113 => ::std::option::Option::Some(DataType::DT_QINT32_REF),
            114 => ::std::option::Option::Some(DataType::DT_BFLOAT16_REF),
            115 => ::std::option::Option::Some(DataType::DT_QINT16_REF),
            116 => ::std::option::Option::Some(DataType::DT_QUINT16_REF),
            117 => ::std::option::Option::Some(DataType::DT_UINT16_REF),
            118 => ::std::option::Option::Some(DataType::DT_COMPLEX128_REF),
            119 => ::std::option::Option::Some(DataType::DT_HALF_REF),
            120 => ::std::option::Option::Some(DataType::DT_RESOURCE_REF),
            121 => ::std::option::Option::Some(DataType::DT_VARIANT_REF),
            122 => ::std::option::Option::Some(DataType::DT_UINT32_REF),
            123 => ::std::option::Option::Some(DataType::DT_UINT64_REF),
            124 => ::std::option::Option::Some(DataType::DT_FLOAT8_E5M2_REF),
            125 => ::std::option::Option::Some(DataType::DT_FLOAT8_E4M3FN_REF),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [DataType] = &[
            DataType::DT_INVALID,
            DataType::DT_FLOAT,
            DataType::DT_DOUBLE,
            DataType::DT_INT32,
            DataType::DT_UINT8,
            DataType::DT_INT16,
            DataType::DT_INT8,
            DataType::DT_STRING,
            DataType::DT_COMPLEX64,
            DataType::DT_INT64,
            DataType::DT_BOOL,
            DataType::DT_QINT8,
            DataType::DT_QUINT8,
            DataType::DT_QINT32,
            DataType::DT_BFLOAT16,
            DataType::DT_QINT16,
            DataType::DT_QUINT16,
            DataType::DT_UINT16,
            DataType::DT_COMPLEX128,
            DataType::DT_HALF,
            DataType::DT_RESOURCE,
            DataType::DT_VARIANT,
            DataType::DT_UINT32,
            DataType::DT_UINT64,
            DataType::DT_FLOAT8_E5M2,
            DataType::DT_FLOAT8_E4M3FN,
            DataType::DT_FLOAT_REF,
            DataType::DT_DOUBLE_REF,
            DataType::DT_INT32_REF,
            DataType::DT_UINT8_REF,
            DataType::DT_INT16_REF,
            DataType::DT_INT8_REF,
            DataType::DT_STRING_REF,
            DataType::DT_COMPLEX64_REF,
            DataType::DT_INT64_REF,
            DataType::DT_BOOL_REF,
            DataType::DT_QINT8_REF,
            DataType::DT_QUINT8_REF,
            DataType::DT_QINT32_REF,
            DataType::DT_BFLOAT16_REF,
            DataType::DT_QINT16_REF,
            DataType::DT_QUINT16_REF,
            DataType::DT_UINT16_REF,
            DataType::DT_COMPLEX128_REF,
            DataType::DT_HALF_REF,
            DataType::DT_RESOURCE_REF,
            DataType::DT_VARIANT_REF,
            DataType::DT_UINT32_REF,
            DataType::DT_UINT64_REF,
            DataType::DT_FLOAT8_E5M2_REF,
            DataType::DT_FLOAT8_E4M3FN_REF,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<DataType>("DataType", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for DataType {
}

impl ::std::default::Default for DataType {
    fn default() -> Self {
        DataType::DT_INVALID
    }
}

impl ::protobuf::reflect::ProtobufValue for DataType {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n%tensorflow/core/framework/types.proto\x12\ntensorflow\"C\n\x0fSeriali\
    zedDType\x120\n\x08datatype\x18\x01\x20\x01(\x0e2\x14.tensorflow.DataTyp\
    eR\x08datatype*\x86\x07\n\x08DataType\x12\x0e\n\nDT_INVALID\x10\0\x12\
    \x0c\n\x08DT_FLOAT\x10\x01\x12\r\n\tDT_DOUBLE\x10\x02\x12\x0c\n\x08DT_IN\
    T32\x10\x03\x12\x0c\n\x08DT_UINT8\x10\x04\x12\x0c\n\x08DT_INT16\x10\x05\
    \x12\x0b\n\x07DT_INT8\x10\x06\x12\r\n\tDT_STRING\x10\x07\x12\x10\n\x0cDT\
    _COMPLEX64\x10\x08\x12\x0c\n\x08DT_INT64\x10\t\x12\x0b\n\x07DT_BOOL\x10\
    \n\x12\x0c\n\x08DT_QINT8\x10\x0b\x12\r\n\tDT_QUINT8\x10\x0c\x12\r\n\tDT_\
    QINT32\x10\r\x12\x0f\n\x0bDT_BFLOAT16\x10\x0e\x12\r\n\tDT_QINT16\x10\x0f\
    \x12\x0e\n\nDT_QUINT16\x10\x10\x12\r\n\tDT_UINT16\x10\x11\x12\x11\n\rDT_\
    COMPLEX128\x10\x12\x12\x0b\n\x07DT_HALF\x10\x13\x12\x0f\n\x0bDT_RESOURCE\
    \x10\x14\x12\x0e\n\nDT_VARIANT\x10\x15\x12\r\n\tDT_UINT32\x10\x16\x12\r\
    \n\tDT_UINT64\x10\x17\x12\x12\n\x0eDT_FLOAT8_E5M2\x10\x18\x12\x14\n\x10D\
    T_FLOAT8_E4M3FN\x10\x19\x12\x10\n\x0cDT_FLOAT_REF\x10e\x12\x11\n\rDT_DOU\
    BLE_REF\x10f\x12\x10\n\x0cDT_INT32_REF\x10g\x12\x10\n\x0cDT_UINT8_REF\
    \x10h\x12\x10\n\x0cDT_INT16_REF\x10i\x12\x0f\n\x0bDT_INT8_REF\x10j\x12\
    \x11\n\rDT_STRING_REF\x10k\x12\x14\n\x10DT_COMPLEX64_REF\x10l\x12\x10\n\
    \x0cDT_INT64_REF\x10m\x12\x0f\n\x0bDT_BOOL_REF\x10n\x12\x10\n\x0cDT_QINT\
    8_REF\x10o\x12\x11\n\rDT_QUINT8_REF\x10p\x12\x11\n\rDT_QINT32_REF\x10q\
    \x12\x13\n\x0fDT_BFLOAT16_REF\x10r\x12\x11\n\rDT_QINT16_REF\x10s\x12\x12\
    \n\x0eDT_QUINT16_REF\x10t\x12\x11\n\rDT_UINT16_REF\x10u\x12\x15\n\x11DT_\
    COMPLEX128_REF\x10v\x12\x0f\n\x0bDT_HALF_REF\x10w\x12\x13\n\x0fDT_RESOUR\
    CE_REF\x10x\x12\x12\n\x0eDT_VARIANT_REF\x10y\x12\x11\n\rDT_UINT32_REF\
    \x10z\x12\x11\n\rDT_UINT64_REF\x10{\x12\x16\n\x12DT_FLOAT8_E5M2_REF\x10|\
    \x12\x18\n\x14DT_FLOAT8_E4M3FN_REF\x10}Bz\n\x18org.tensorflow.frameworkB\
    \x0bTypesProtosP\x01ZLgithub.com/tensorflow/tensorflow/tensorflow/go/cor\
    e/framework/types_go_proto\xf8\x01\x01b\x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}