1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/protobuf/struct.proto |
3 | |
4 | #include "tensorflow/core/protobuf/struct.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TensorProto_tensorflow_2fcore_2fframework_2ftensor_2eproto; |
22 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto; |
23 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; |
24 | namespace tensorflow { |
25 | class StructuredValueDefaultTypeInternal { |
26 | public: |
27 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredValue> _instance; |
28 | const ::tensorflow::NoneValue* none_value_; |
29 | double float64_value_; |
30 | ::PROTOBUF_NAMESPACE_ID::int64 int64_value_; |
31 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; |
32 | bool bool_value_; |
33 | const ::tensorflow::TensorShapeProto* tensor_shape_value_; |
34 | int tensor_dtype_value_; |
35 | const ::tensorflow::TensorSpecProto* tensor_spec_value_; |
36 | const ::tensorflow::TypeSpecProto* type_spec_value_; |
37 | const ::tensorflow::BoundedTensorSpecProto* bounded_tensor_spec_value_; |
38 | const ::tensorflow::ListValue* list_value_; |
39 | const ::tensorflow::TupleValue* tuple_value_; |
40 | const ::tensorflow::DictValue* dict_value_; |
41 | const ::tensorflow::NamedTupleValue* named_tuple_value_; |
42 | } _StructuredValue_default_instance_; |
43 | class NoneValueDefaultTypeInternal { |
44 | public: |
45 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NoneValue> _instance; |
46 | } _NoneValue_default_instance_; |
47 | class ListValueDefaultTypeInternal { |
48 | public: |
49 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListValue> _instance; |
50 | } _ListValue_default_instance_; |
51 | class TupleValueDefaultTypeInternal { |
52 | public: |
53 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TupleValue> _instance; |
54 | } _TupleValue_default_instance_; |
55 | class DictValue_FieldsEntry_DoNotUseDefaultTypeInternal { |
56 | public: |
57 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DictValue_FieldsEntry_DoNotUse> _instance; |
58 | } _DictValue_FieldsEntry_DoNotUse_default_instance_; |
59 | class DictValueDefaultTypeInternal { |
60 | public: |
61 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DictValue> _instance; |
62 | } _DictValue_default_instance_; |
63 | class PairValueDefaultTypeInternal { |
64 | public: |
65 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PairValue> _instance; |
66 | } _PairValue_default_instance_; |
67 | class NamedTupleValueDefaultTypeInternal { |
68 | public: |
69 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NamedTupleValue> _instance; |
70 | } _NamedTupleValue_default_instance_; |
71 | class TensorSpecProtoDefaultTypeInternal { |
72 | public: |
73 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TensorSpecProto> _instance; |
74 | } _TensorSpecProto_default_instance_; |
75 | class BoundedTensorSpecProtoDefaultTypeInternal { |
76 | public: |
77 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BoundedTensorSpecProto> _instance; |
78 | } _BoundedTensorSpecProto_default_instance_; |
79 | class TypeSpecProtoDefaultTypeInternal { |
80 | public: |
81 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TypeSpecProto> _instance; |
82 | } _TypeSpecProto_default_instance_; |
83 | } // namespace tensorflow |
84 | static void InitDefaultsscc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto() { |
85 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
86 | |
87 | { |
88 | void* ptr = &::tensorflow::_BoundedTensorSpecProto_default_instance_; |
89 | new (ptr) ::tensorflow::BoundedTensorSpecProto(); |
90 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
91 | } |
92 | ::tensorflow::BoundedTensorSpecProto::InitAsDefaultInstance(); |
93 | } |
94 | |
95 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = |
96 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto}, { |
97 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base, |
98 | &scc_info_TensorProto_tensorflow_2fcore_2fframework_2ftensor_2eproto.base,}}; |
99 | |
100 | static void InitDefaultsscc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto() { |
101 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
102 | |
103 | { |
104 | void* ptr = &::tensorflow::_StructuredValue_default_instance_; |
105 | new (ptr) ::tensorflow::StructuredValue(); |
106 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
107 | } |
108 | { |
109 | void* ptr = &::tensorflow::_ListValue_default_instance_; |
110 | new (ptr) ::tensorflow::ListValue(); |
111 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
112 | } |
113 | { |
114 | void* ptr = &::tensorflow::_TupleValue_default_instance_; |
115 | new (ptr) ::tensorflow::TupleValue(); |
116 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
117 | } |
118 | { |
119 | void* ptr = &::tensorflow::_DictValue_FieldsEntry_DoNotUse_default_instance_; |
120 | new (ptr) ::tensorflow::DictValue_FieldsEntry_DoNotUse(); |
121 | } |
122 | { |
123 | void* ptr = &::tensorflow::_DictValue_default_instance_; |
124 | new (ptr) ::tensorflow::DictValue(); |
125 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
126 | } |
127 | { |
128 | void* ptr = &::tensorflow::_PairValue_default_instance_; |
129 | new (ptr) ::tensorflow::PairValue(); |
130 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
131 | } |
132 | { |
133 | void* ptr = &::tensorflow::_NamedTupleValue_default_instance_; |
134 | new (ptr) ::tensorflow::NamedTupleValue(); |
135 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
136 | } |
137 | { |
138 | void* ptr = &::tensorflow::_TypeSpecProto_default_instance_; |
139 | new (ptr) ::tensorflow::TypeSpecProto(); |
140 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
141 | } |
142 | ::tensorflow::StructuredValue::InitAsDefaultInstance(); |
143 | ::tensorflow::ListValue::InitAsDefaultInstance(); |
144 | ::tensorflow::TupleValue::InitAsDefaultInstance(); |
145 | ::tensorflow::DictValue_FieldsEntry_DoNotUse::InitAsDefaultInstance(); |
146 | ::tensorflow::DictValue::InitAsDefaultInstance(); |
147 | ::tensorflow::PairValue::InitAsDefaultInstance(); |
148 | ::tensorflow::NamedTupleValue::InitAsDefaultInstance(); |
149 | ::tensorflow::TypeSpecProto::InitAsDefaultInstance(); |
150 | } |
151 | |
152 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = |
153 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsscc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto}, { |
154 | &scc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base, |
155 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base, |
156 | &scc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base, |
157 | &scc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base,}}; |
158 | |
159 | static void InitDefaultsscc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto() { |
160 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
161 | |
162 | { |
163 | void* ptr = &::tensorflow::_NoneValue_default_instance_; |
164 | new (ptr) ::tensorflow::NoneValue(); |
165 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
166 | } |
167 | ::tensorflow::NoneValue::InitAsDefaultInstance(); |
168 | } |
169 | |
170 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = |
171 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto}, {}}; |
172 | |
173 | static void InitDefaultsscc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto() { |
174 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
175 | |
176 | { |
177 | void* ptr = &::tensorflow::_TensorSpecProto_default_instance_; |
178 | new (ptr) ::tensorflow::TensorSpecProto(); |
179 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
180 | } |
181 | ::tensorflow::TensorSpecProto::InitAsDefaultInstance(); |
182 | } |
183 | |
184 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = |
185 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto}, { |
186 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base,}}; |
187 | |
188 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto[11]; |
189 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto[1]; |
190 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = nullptr; |
191 | |
192 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
193 | ~0u, // no _has_bits_ |
194 | PROTOBUF_FIELD_OFFSET(::tensorflow::StructuredValue, _internal_metadata_), |
195 | ~0u, // no _extensions_ |
196 | PROTOBUF_FIELD_OFFSET(::tensorflow::StructuredValue, _oneof_case_[0]), |
197 | ~0u, // no _weak_field_map_ |
198 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, none_value_), |
199 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, float64_value_), |
200 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, int64_value_), |
201 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, string_value_), |
202 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, bool_value_), |
203 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, tensor_shape_value_), |
204 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, tensor_dtype_value_), |
205 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, tensor_spec_value_), |
206 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, type_spec_value_), |
207 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, bounded_tensor_spec_value_), |
208 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, list_value_), |
209 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, tuple_value_), |
210 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, dict_value_), |
211 | offsetof(::tensorflow::StructuredValueDefaultTypeInternal, named_tuple_value_), |
212 | PROTOBUF_FIELD_OFFSET(::tensorflow::StructuredValue, kind_), |
213 | ~0u, // no _has_bits_ |
214 | PROTOBUF_FIELD_OFFSET(::tensorflow::NoneValue, _internal_metadata_), |
215 | ~0u, // no _extensions_ |
216 | ~0u, // no _oneof_case_ |
217 | ~0u, // no _weak_field_map_ |
218 | ~0u, // no _has_bits_ |
219 | PROTOBUF_FIELD_OFFSET(::tensorflow::ListValue, _internal_metadata_), |
220 | ~0u, // no _extensions_ |
221 | ~0u, // no _oneof_case_ |
222 | ~0u, // no _weak_field_map_ |
223 | PROTOBUF_FIELD_OFFSET(::tensorflow::ListValue, values_), |
224 | ~0u, // no _has_bits_ |
225 | PROTOBUF_FIELD_OFFSET(::tensorflow::TupleValue, _internal_metadata_), |
226 | ~0u, // no _extensions_ |
227 | ~0u, // no _oneof_case_ |
228 | ~0u, // no _weak_field_map_ |
229 | PROTOBUF_FIELD_OFFSET(::tensorflow::TupleValue, values_), |
230 | PROTOBUF_FIELD_OFFSET(::tensorflow::DictValue_FieldsEntry_DoNotUse, _has_bits_), |
231 | PROTOBUF_FIELD_OFFSET(::tensorflow::DictValue_FieldsEntry_DoNotUse, _internal_metadata_), |
232 | ~0u, // no _extensions_ |
233 | ~0u, // no _oneof_case_ |
234 | ~0u, // no _weak_field_map_ |
235 | PROTOBUF_FIELD_OFFSET(::tensorflow::DictValue_FieldsEntry_DoNotUse, key_), |
236 | PROTOBUF_FIELD_OFFSET(::tensorflow::DictValue_FieldsEntry_DoNotUse, value_), |
237 | 0, |
238 | 1, |
239 | ~0u, // no _has_bits_ |
240 | PROTOBUF_FIELD_OFFSET(::tensorflow::DictValue, _internal_metadata_), |
241 | ~0u, // no _extensions_ |
242 | ~0u, // no _oneof_case_ |
243 | ~0u, // no _weak_field_map_ |
244 | PROTOBUF_FIELD_OFFSET(::tensorflow::DictValue, fields_), |
245 | ~0u, // no _has_bits_ |
246 | PROTOBUF_FIELD_OFFSET(::tensorflow::PairValue, _internal_metadata_), |
247 | ~0u, // no _extensions_ |
248 | ~0u, // no _oneof_case_ |
249 | ~0u, // no _weak_field_map_ |
250 | PROTOBUF_FIELD_OFFSET(::tensorflow::PairValue, key_), |
251 | PROTOBUF_FIELD_OFFSET(::tensorflow::PairValue, value_), |
252 | ~0u, // no _has_bits_ |
253 | PROTOBUF_FIELD_OFFSET(::tensorflow::NamedTupleValue, _internal_metadata_), |
254 | ~0u, // no _extensions_ |
255 | ~0u, // no _oneof_case_ |
256 | ~0u, // no _weak_field_map_ |
257 | PROTOBUF_FIELD_OFFSET(::tensorflow::NamedTupleValue, name_), |
258 | PROTOBUF_FIELD_OFFSET(::tensorflow::NamedTupleValue, values_), |
259 | ~0u, // no _has_bits_ |
260 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSpecProto, _internal_metadata_), |
261 | ~0u, // no _extensions_ |
262 | ~0u, // no _oneof_case_ |
263 | ~0u, // no _weak_field_map_ |
264 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSpecProto, name_), |
265 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSpecProto, shape_), |
266 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSpecProto, dtype_), |
267 | ~0u, // no _has_bits_ |
268 | PROTOBUF_FIELD_OFFSET(::tensorflow::BoundedTensorSpecProto, _internal_metadata_), |
269 | ~0u, // no _extensions_ |
270 | ~0u, // no _oneof_case_ |
271 | ~0u, // no _weak_field_map_ |
272 | PROTOBUF_FIELD_OFFSET(::tensorflow::BoundedTensorSpecProto, name_), |
273 | PROTOBUF_FIELD_OFFSET(::tensorflow::BoundedTensorSpecProto, shape_), |
274 | PROTOBUF_FIELD_OFFSET(::tensorflow::BoundedTensorSpecProto, dtype_), |
275 | PROTOBUF_FIELD_OFFSET(::tensorflow::BoundedTensorSpecProto, minimum_), |
276 | PROTOBUF_FIELD_OFFSET(::tensorflow::BoundedTensorSpecProto, maximum_), |
277 | ~0u, // no _has_bits_ |
278 | PROTOBUF_FIELD_OFFSET(::tensorflow::TypeSpecProto, _internal_metadata_), |
279 | ~0u, // no _extensions_ |
280 | ~0u, // no _oneof_case_ |
281 | ~0u, // no _weak_field_map_ |
282 | PROTOBUF_FIELD_OFFSET(::tensorflow::TypeSpecProto, type_spec_class_), |
283 | PROTOBUF_FIELD_OFFSET(::tensorflow::TypeSpecProto, type_state_), |
284 | PROTOBUF_FIELD_OFFSET(::tensorflow::TypeSpecProto, type_spec_class_name_), |
285 | PROTOBUF_FIELD_OFFSET(::tensorflow::TypeSpecProto, num_flat_components_), |
286 | }; |
287 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
288 | { 0, -1, sizeof(::tensorflow::StructuredValue)}, |
289 | { 20, -1, sizeof(::tensorflow::NoneValue)}, |
290 | { 25, -1, sizeof(::tensorflow::ListValue)}, |
291 | { 31, -1, sizeof(::tensorflow::TupleValue)}, |
292 | { 37, 44, sizeof(::tensorflow::DictValue_FieldsEntry_DoNotUse)}, |
293 | { 46, -1, sizeof(::tensorflow::DictValue)}, |
294 | { 52, -1, sizeof(::tensorflow::PairValue)}, |
295 | { 59, -1, sizeof(::tensorflow::NamedTupleValue)}, |
296 | { 66, -1, sizeof(::tensorflow::TensorSpecProto)}, |
297 | { 74, -1, sizeof(::tensorflow::BoundedTensorSpecProto)}, |
298 | { 84, -1, sizeof(::tensorflow::TypeSpecProto)}, |
299 | }; |
300 | |
301 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
302 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_StructuredValue_default_instance_), |
303 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_NoneValue_default_instance_), |
304 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ListValue_default_instance_), |
305 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TupleValue_default_instance_), |
306 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_DictValue_FieldsEntry_DoNotUse_default_instance_), |
307 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_DictValue_default_instance_), |
308 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_PairValue_default_instance_), |
309 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_NamedTupleValue_default_instance_), |
310 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TensorSpecProto_default_instance_), |
311 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_BoundedTensorSpecProto_default_instance_), |
312 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TypeSpecProto_default_instance_), |
313 | }; |
314 | |
315 | const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
316 | "\n%tensorflow/core/protobuf/struct.proto\022" |
317 | "\ntensorflow\032&tensorflow/core/framework/t" |
318 | "ensor.proto\032,tensorflow/core/framework/t" |
319 | "ensor_shape.proto\032%tensorflow/core/frame" |
320 | "work/types.proto\"\220\005\n\017StructuredValue\022+\n\n" |
321 | "none_value\030\001 \001(\0132\025.tensorflow.NoneValueH" |
322 | "\000\022\027\n\rfloat64_value\030\013 \001(\001H\000\022\025\n\013int64_valu" |
323 | "e\030\014 \001(\022H\000\022\026\n\014string_value\030\r \001(\tH\000\022\024\n\nboo" |
324 | "l_value\030\016 \001(\010H\000\022:\n\022tensor_shape_value\030\037 " |
325 | "\001(\0132\034.tensorflow.TensorShapeProtoH\000\0222\n\022t" |
326 | "ensor_dtype_value\030 \001(\0162\024.tensorflow.Dat" |
327 | "aTypeH\000\0228\n\021tensor_spec_value\030! \001(\0132\033.ten" |
328 | "sorflow.TensorSpecProtoH\000\0224\n\017type_spec_v" |
329 | "alue\030\" \001(\0132\031.tensorflow.TypeSpecProtoH\000\022" |
330 | "G\n\031bounded_tensor_spec_value\030# \001(\0132\".ten" |
331 | "sorflow.BoundedTensorSpecProtoH\000\022+\n\nlist" |
332 | "_value\0303 \001(\0132\025.tensorflow.ListValueH\000\022-\n" |
333 | "\013tuple_value\0304 \001(\0132\026.tensorflow.TupleVal" |
334 | "ueH\000\022+\n\ndict_value\0305 \001(\0132\025.tensorflow.Di" |
335 | "ctValueH\000\0228\n\021named_tuple_value\0306 \001(\0132\033.t" |
336 | "ensorflow.NamedTupleValueH\000B\006\n\004kind\"\013\n\tN" |
337 | "oneValue\"8\n\tListValue\022+\n\006values\030\001 \003(\0132\033." |
338 | "tensorflow.StructuredValue\"9\n\nTupleValue" |
339 | "\022+\n\006values\030\001 \003(\0132\033.tensorflow.Structured" |
340 | "Value\"\212\001\n\tDictValue\0221\n\006fields\030\001 \003(\0132!.te" |
341 | "nsorflow.DictValue.FieldsEntry\032J\n\013Fields" |
342 | "Entry\022\013\n\003key\030\001 \001(\t\022*\n\005value\030\002 \001(\0132\033.tens" |
343 | "orflow.StructuredValue:\0028\001\"D\n\tPairValue\022" |
344 | "\013\n\003key\030\001 \001(\t\022*\n\005value\030\002 \001(\0132\033.tensorflow" |
345 | ".StructuredValue\"F\n\017NamedTupleValue\022\014\n\004n" |
346 | "ame\030\001 \001(\t\022%\n\006values\030\002 \003(\0132\025.tensorflow.P" |
347 | "airValue\"q\n\017TensorSpecProto\022\014\n\004name\030\001 \001(" |
348 | "\t\022+\n\005shape\030\002 \001(\0132\034.tensorflow.TensorShap" |
349 | "eProto\022#\n\005dtype\030\003 \001(\0162\024.tensorflow.DataT" |
350 | "ype\"\314\001\n\026BoundedTensorSpecProto\022\014\n\004name\030\001" |
351 | " \001(\t\022+\n\005shape\030\002 \001(\0132\034.tensorflow.TensorS" |
352 | "hapeProto\022#\n\005dtype\030\003 \001(\0162\024.tensorflow.Da" |
353 | "taType\022(\n\007minimum\030\004 \001(\0132\027.tensorflow.Ten" |
354 | "sorProto\022(\n\007maximum\030\005 \001(\0132\027.tensorflow.T" |
355 | "ensorProto\"\370\003\n\rTypeSpecProto\022@\n\017type_spe" |
356 | "c_class\030\001 \001(\0162\'.tensorflow.TypeSpecProto" |
357 | ".TypeSpecClass\022/\n\ntype_state\030\002 \001(\0132\033.ten" |
358 | "sorflow.StructuredValue\022\034\n\024type_spec_cla" |
359 | "ss_name\030\003 \001(\t\022\033\n\023num_flat_components\030\004 \001" |
360 | "(\005\"\270\002\n\rTypeSpecClass\022\013\n\007UNKNOWN\020\000\022\026\n\022SPA" |
361 | "RSE_TENSOR_SPEC\020\001\022\027\n\023INDEXED_SLICES_SPEC" |
362 | "\020\002\022\026\n\022RAGGED_TENSOR_SPEC\020\003\022\025\n\021TENSOR_ARR" |
363 | "AY_SPEC\020\004\022\025\n\021DATA_DATASET_SPEC\020\005\022\026\n\022DATA" |
364 | "_ITERATOR_SPEC\020\006\022\021\n\rOPTIONAL_SPEC\020\007\022\024\n\020P" |
365 | "ER_REPLICA_SPEC\020\010\022\021\n\rVARIABLE_SPEC\020\t\022\026\n\022" |
366 | "ROW_PARTITION_SPEC\020\n\022\030\n\024REGISTERED_TYPE_" |
367 | "SPEC\020\014\022\027\n\023EXTENSION_TYPE_SPEC\020\r\"\004\010\013\020\013BWZ" |
368 | "Ugithub.com/tensorflow/tensorflow/tensor" |
369 | "flow/go/core/protobuf/for_core_protos_go" |
370 | "_protob\006proto3" |
371 | ; |
372 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_deps[3] = { |
373 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_2eproto, |
374 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto, |
375 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftypes_2eproto, |
376 | }; |
377 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_sccs[4] = { |
378 | &scc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base, |
379 | &scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base, |
380 | &scc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base, |
381 | &scc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base, |
382 | }; |
383 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_once; |
384 | static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_initialized = false; |
385 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = { |
386 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto, "tensorflow/core/protobuf/struct.proto" , 2174, |
387 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto_deps, 4, 3, |
388 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto::offsets, |
389 | file_level_metadata_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto, 11, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto, |
390 | }; |
391 | |
392 | // Force running AddDescriptors() at dynamic initialization time. |
393 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto), true); |
394 | namespace tensorflow { |
395 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TypeSpecProto_TypeSpecClass_descriptor() { |
396 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto); |
397 | return file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto[0]; |
398 | } |
399 | bool TypeSpecProto_TypeSpecClass_IsValid(int value) { |
400 | switch (value) { |
401 | case 0: |
402 | case 1: |
403 | case 2: |
404 | case 3: |
405 | case 4: |
406 | case 5: |
407 | case 6: |
408 | case 7: |
409 | case 8: |
410 | case 9: |
411 | case 10: |
412 | case 12: |
413 | case 13: |
414 | return true; |
415 | default: |
416 | return false; |
417 | } |
418 | } |
419 | |
420 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
421 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::UNKNOWN; |
422 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::SPARSE_TENSOR_SPEC; |
423 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::INDEXED_SLICES_SPEC; |
424 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::RAGGED_TENSOR_SPEC; |
425 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::TENSOR_ARRAY_SPEC; |
426 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::DATA_DATASET_SPEC; |
427 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::DATA_ITERATOR_SPEC; |
428 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::OPTIONAL_SPEC; |
429 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::PER_REPLICA_SPEC; |
430 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::VARIABLE_SPEC; |
431 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::ROW_PARTITION_SPEC; |
432 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::REGISTERED_TYPE_SPEC; |
433 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::EXTENSION_TYPE_SPEC; |
434 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::TypeSpecClass_MIN; |
435 | constexpr TypeSpecProto_TypeSpecClass TypeSpecProto::TypeSpecClass_MAX; |
436 | constexpr int TypeSpecProto::TypeSpecClass_ARRAYSIZE; |
437 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
438 | |
439 | // =================================================================== |
440 | |
441 | void StructuredValue::InitAsDefaultInstance() { |
442 | ::tensorflow::_StructuredValue_default_instance_.none_value_ = const_cast< ::tensorflow::NoneValue*>( |
443 | ::tensorflow::NoneValue::internal_default_instance()); |
444 | ::tensorflow::_StructuredValue_default_instance_.float64_value_ = 0; |
445 | ::tensorflow::_StructuredValue_default_instance_.int64_value_ = PROTOBUF_LONGLONG(0); |
446 | ::tensorflow::_StructuredValue_default_instance_.string_value_.UnsafeSetDefault( |
447 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
448 | ::tensorflow::_StructuredValue_default_instance_.bool_value_ = false; |
449 | ::tensorflow::_StructuredValue_default_instance_.tensor_shape_value_ = const_cast< ::tensorflow::TensorShapeProto*>( |
450 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
451 | ::tensorflow::_StructuredValue_default_instance_.tensor_dtype_value_ = 0; |
452 | ::tensorflow::_StructuredValue_default_instance_.tensor_spec_value_ = const_cast< ::tensorflow::TensorSpecProto*>( |
453 | ::tensorflow::TensorSpecProto::internal_default_instance()); |
454 | ::tensorflow::_StructuredValue_default_instance_.type_spec_value_ = const_cast< ::tensorflow::TypeSpecProto*>( |
455 | ::tensorflow::TypeSpecProto::internal_default_instance()); |
456 | ::tensorflow::_StructuredValue_default_instance_.bounded_tensor_spec_value_ = const_cast< ::tensorflow::BoundedTensorSpecProto*>( |
457 | ::tensorflow::BoundedTensorSpecProto::internal_default_instance()); |
458 | ::tensorflow::_StructuredValue_default_instance_.list_value_ = const_cast< ::tensorflow::ListValue*>( |
459 | ::tensorflow::ListValue::internal_default_instance()); |
460 | ::tensorflow::_StructuredValue_default_instance_.tuple_value_ = const_cast< ::tensorflow::TupleValue*>( |
461 | ::tensorflow::TupleValue::internal_default_instance()); |
462 | ::tensorflow::_StructuredValue_default_instance_.dict_value_ = const_cast< ::tensorflow::DictValue*>( |
463 | ::tensorflow::DictValue::internal_default_instance()); |
464 | ::tensorflow::_StructuredValue_default_instance_.named_tuple_value_ = const_cast< ::tensorflow::NamedTupleValue*>( |
465 | ::tensorflow::NamedTupleValue::internal_default_instance()); |
466 | } |
467 | class StructuredValue::_Internal { |
468 | public: |
469 | static const ::tensorflow::NoneValue& none_value(const StructuredValue* msg); |
470 | static const ::tensorflow::TensorShapeProto& tensor_shape_value(const StructuredValue* msg); |
471 | static const ::tensorflow::TensorSpecProto& tensor_spec_value(const StructuredValue* msg); |
472 | static const ::tensorflow::TypeSpecProto& type_spec_value(const StructuredValue* msg); |
473 | static const ::tensorflow::BoundedTensorSpecProto& bounded_tensor_spec_value(const StructuredValue* msg); |
474 | static const ::tensorflow::ListValue& list_value(const StructuredValue* msg); |
475 | static const ::tensorflow::TupleValue& tuple_value(const StructuredValue* msg); |
476 | static const ::tensorflow::DictValue& dict_value(const StructuredValue* msg); |
477 | static const ::tensorflow::NamedTupleValue& named_tuple_value(const StructuredValue* msg); |
478 | }; |
479 | |
480 | const ::tensorflow::NoneValue& |
481 | StructuredValue::_Internal::none_value(const StructuredValue* msg) { |
482 | return *msg->kind_.none_value_; |
483 | } |
484 | const ::tensorflow::TensorShapeProto& |
485 | StructuredValue::_Internal::tensor_shape_value(const StructuredValue* msg) { |
486 | return *msg->kind_.tensor_shape_value_; |
487 | } |
488 | const ::tensorflow::TensorSpecProto& |
489 | StructuredValue::_Internal::tensor_spec_value(const StructuredValue* msg) { |
490 | return *msg->kind_.tensor_spec_value_; |
491 | } |
492 | const ::tensorflow::TypeSpecProto& |
493 | StructuredValue::_Internal::type_spec_value(const StructuredValue* msg) { |
494 | return *msg->kind_.type_spec_value_; |
495 | } |
496 | const ::tensorflow::BoundedTensorSpecProto& |
497 | StructuredValue::_Internal::bounded_tensor_spec_value(const StructuredValue* msg) { |
498 | return *msg->kind_.bounded_tensor_spec_value_; |
499 | } |
500 | const ::tensorflow::ListValue& |
501 | StructuredValue::_Internal::list_value(const StructuredValue* msg) { |
502 | return *msg->kind_.list_value_; |
503 | } |
504 | const ::tensorflow::TupleValue& |
505 | StructuredValue::_Internal::tuple_value(const StructuredValue* msg) { |
506 | return *msg->kind_.tuple_value_; |
507 | } |
508 | const ::tensorflow::DictValue& |
509 | StructuredValue::_Internal::dict_value(const StructuredValue* msg) { |
510 | return *msg->kind_.dict_value_; |
511 | } |
512 | const ::tensorflow::NamedTupleValue& |
513 | StructuredValue::_Internal::named_tuple_value(const StructuredValue* msg) { |
514 | return *msg->kind_.named_tuple_value_; |
515 | } |
516 | void StructuredValue::set_allocated_none_value(::tensorflow::NoneValue* none_value) { |
517 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
518 | clear_kind(); |
519 | if (none_value) { |
520 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
521 | if (message_arena != submessage_arena) { |
522 | none_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
523 | message_arena, none_value, submessage_arena); |
524 | } |
525 | set_has_none_value(); |
526 | kind_.none_value_ = none_value; |
527 | } |
528 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.none_value) |
529 | } |
530 | void StructuredValue::set_allocated_tensor_shape_value(::tensorflow::TensorShapeProto* tensor_shape_value) { |
531 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
532 | clear_kind(); |
533 | if (tensor_shape_value) { |
534 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
535 | reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor_shape_value)->GetArena(); |
536 | if (message_arena != submessage_arena) { |
537 | tensor_shape_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
538 | message_arena, tensor_shape_value, submessage_arena); |
539 | } |
540 | set_has_tensor_shape_value(); |
541 | kind_.tensor_shape_value_ = tensor_shape_value; |
542 | } |
543 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.tensor_shape_value) |
544 | } |
545 | void StructuredValue::clear_tensor_shape_value() { |
546 | if (has_tensor_shape_value()) { |
547 | delete kind_.tensor_shape_value_; |
548 | clear_has_kind(); |
549 | } |
550 | } |
551 | void StructuredValue::set_allocated_tensor_spec_value(::tensorflow::TensorSpecProto* tensor_spec_value) { |
552 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
553 | clear_kind(); |
554 | if (tensor_spec_value) { |
555 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
556 | if (message_arena != submessage_arena) { |
557 | tensor_spec_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
558 | message_arena, tensor_spec_value, submessage_arena); |
559 | } |
560 | set_has_tensor_spec_value(); |
561 | kind_.tensor_spec_value_ = tensor_spec_value; |
562 | } |
563 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.tensor_spec_value) |
564 | } |
565 | void StructuredValue::set_allocated_type_spec_value(::tensorflow::TypeSpecProto* type_spec_value) { |
566 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
567 | clear_kind(); |
568 | if (type_spec_value) { |
569 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
570 | if (message_arena != submessage_arena) { |
571 | type_spec_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
572 | message_arena, type_spec_value, submessage_arena); |
573 | } |
574 | set_has_type_spec_value(); |
575 | kind_.type_spec_value_ = type_spec_value; |
576 | } |
577 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.type_spec_value) |
578 | } |
579 | void StructuredValue::set_allocated_bounded_tensor_spec_value(::tensorflow::BoundedTensorSpecProto* bounded_tensor_spec_value) { |
580 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
581 | clear_kind(); |
582 | if (bounded_tensor_spec_value) { |
583 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
584 | if (message_arena != submessage_arena) { |
585 | bounded_tensor_spec_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
586 | message_arena, bounded_tensor_spec_value, submessage_arena); |
587 | } |
588 | set_has_bounded_tensor_spec_value(); |
589 | kind_.bounded_tensor_spec_value_ = bounded_tensor_spec_value; |
590 | } |
591 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.bounded_tensor_spec_value) |
592 | } |
593 | void StructuredValue::set_allocated_list_value(::tensorflow::ListValue* list_value) { |
594 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
595 | clear_kind(); |
596 | if (list_value) { |
597 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
598 | if (message_arena != submessage_arena) { |
599 | list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
600 | message_arena, list_value, submessage_arena); |
601 | } |
602 | set_has_list_value(); |
603 | kind_.list_value_ = list_value; |
604 | } |
605 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.list_value) |
606 | } |
607 | void StructuredValue::set_allocated_tuple_value(::tensorflow::TupleValue* tuple_value) { |
608 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
609 | clear_kind(); |
610 | if (tuple_value) { |
611 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
612 | if (message_arena != submessage_arena) { |
613 | tuple_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
614 | message_arena, tuple_value, submessage_arena); |
615 | } |
616 | set_has_tuple_value(); |
617 | kind_.tuple_value_ = tuple_value; |
618 | } |
619 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.tuple_value) |
620 | } |
621 | void StructuredValue::set_allocated_dict_value(::tensorflow::DictValue* dict_value) { |
622 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
623 | clear_kind(); |
624 | if (dict_value) { |
625 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
626 | if (message_arena != submessage_arena) { |
627 | dict_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
628 | message_arena, dict_value, submessage_arena); |
629 | } |
630 | set_has_dict_value(); |
631 | kind_.dict_value_ = dict_value; |
632 | } |
633 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.dict_value) |
634 | } |
635 | void StructuredValue::set_allocated_named_tuple_value(::tensorflow::NamedTupleValue* named_tuple_value) { |
636 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
637 | clear_kind(); |
638 | if (named_tuple_value) { |
639 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; |
640 | if (message_arena != submessage_arena) { |
641 | named_tuple_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
642 | message_arena, named_tuple_value, submessage_arena); |
643 | } |
644 | set_has_named_tuple_value(); |
645 | kind_.named_tuple_value_ = named_tuple_value; |
646 | } |
647 | // @@protoc_insertion_point(field_set_allocated:tensorflow.StructuredValue.named_tuple_value) |
648 | } |
649 | StructuredValue::StructuredValue() |
650 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
651 | SharedCtor(); |
652 | // @@protoc_insertion_point(constructor:tensorflow.StructuredValue) |
653 | } |
654 | StructuredValue::StructuredValue(const StructuredValue& from) |
655 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
656 | _internal_metadata_(nullptr) { |
657 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
658 | clear_has_kind(); |
659 | switch (from.kind_case()) { |
660 | case kNoneValue: { |
661 | mutable_none_value()->::tensorflow::NoneValue::MergeFrom(from.none_value()); |
662 | break; |
663 | } |
664 | case kFloat64Value: { |
665 | set_float64_value(from.float64_value()); |
666 | break; |
667 | } |
668 | case kInt64Value: { |
669 | set_int64_value(from.int64_value()); |
670 | break; |
671 | } |
672 | case kStringValue: { |
673 | set_string_value(from.string_value()); |
674 | break; |
675 | } |
676 | case kBoolValue: { |
677 | set_bool_value(from.bool_value()); |
678 | break; |
679 | } |
680 | case kTensorShapeValue: { |
681 | mutable_tensor_shape_value()->::tensorflow::TensorShapeProto::MergeFrom(from.tensor_shape_value()); |
682 | break; |
683 | } |
684 | case kTensorDtypeValue: { |
685 | set_tensor_dtype_value(from.tensor_dtype_value()); |
686 | break; |
687 | } |
688 | case kTensorSpecValue: { |
689 | mutable_tensor_spec_value()->::tensorflow::TensorSpecProto::MergeFrom(from.tensor_spec_value()); |
690 | break; |
691 | } |
692 | case kTypeSpecValue: { |
693 | mutable_type_spec_value()->::tensorflow::TypeSpecProto::MergeFrom(from.type_spec_value()); |
694 | break; |
695 | } |
696 | case kBoundedTensorSpecValue: { |
697 | mutable_bounded_tensor_spec_value()->::tensorflow::BoundedTensorSpecProto::MergeFrom(from.bounded_tensor_spec_value()); |
698 | break; |
699 | } |
700 | case kListValue: { |
701 | mutable_list_value()->::tensorflow::ListValue::MergeFrom(from.list_value()); |
702 | break; |
703 | } |
704 | case kTupleValue: { |
705 | mutable_tuple_value()->::tensorflow::TupleValue::MergeFrom(from.tuple_value()); |
706 | break; |
707 | } |
708 | case kDictValue: { |
709 | mutable_dict_value()->::tensorflow::DictValue::MergeFrom(from.dict_value()); |
710 | break; |
711 | } |
712 | case kNamedTupleValue: { |
713 | mutable_named_tuple_value()->::tensorflow::NamedTupleValue::MergeFrom(from.named_tuple_value()); |
714 | break; |
715 | } |
716 | case KIND_NOT_SET: { |
717 | break; |
718 | } |
719 | } |
720 | // @@protoc_insertion_point(copy_constructor:tensorflow.StructuredValue) |
721 | } |
722 | |
723 | void StructuredValue::SharedCtor() { |
724 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
725 | clear_has_kind(); |
726 | } |
727 | |
728 | StructuredValue::~StructuredValue() { |
729 | // @@protoc_insertion_point(destructor:tensorflow.StructuredValue) |
730 | SharedDtor(); |
731 | } |
732 | |
733 | void StructuredValue::SharedDtor() { |
734 | if (has_kind()) { |
735 | clear_kind(); |
736 | } |
737 | } |
738 | |
739 | void StructuredValue::SetCachedSize(int size) const { |
740 | _cached_size_.Set(size); |
741 | } |
742 | const StructuredValue& StructuredValue::default_instance() { |
743 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
744 | return *internal_default_instance(); |
745 | } |
746 | |
747 | |
748 | void StructuredValue::clear_kind() { |
749 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.StructuredValue) |
750 | switch (kind_case()) { |
751 | case kNoneValue: { |
752 | delete kind_.none_value_; |
753 | break; |
754 | } |
755 | case kFloat64Value: { |
756 | // No need to clear |
757 | break; |
758 | } |
759 | case kInt64Value: { |
760 | // No need to clear |
761 | break; |
762 | } |
763 | case kStringValue: { |
764 | kind_.string_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
765 | break; |
766 | } |
767 | case kBoolValue: { |
768 | // No need to clear |
769 | break; |
770 | } |
771 | case kTensorShapeValue: { |
772 | delete kind_.tensor_shape_value_; |
773 | break; |
774 | } |
775 | case kTensorDtypeValue: { |
776 | // No need to clear |
777 | break; |
778 | } |
779 | case kTensorSpecValue: { |
780 | delete kind_.tensor_spec_value_; |
781 | break; |
782 | } |
783 | case kTypeSpecValue: { |
784 | delete kind_.type_spec_value_; |
785 | break; |
786 | } |
787 | case kBoundedTensorSpecValue: { |
788 | delete kind_.bounded_tensor_spec_value_; |
789 | break; |
790 | } |
791 | case kListValue: { |
792 | delete kind_.list_value_; |
793 | break; |
794 | } |
795 | case kTupleValue: { |
796 | delete kind_.tuple_value_; |
797 | break; |
798 | } |
799 | case kDictValue: { |
800 | delete kind_.dict_value_; |
801 | break; |
802 | } |
803 | case kNamedTupleValue: { |
804 | delete kind_.named_tuple_value_; |
805 | break; |
806 | } |
807 | case KIND_NOT_SET: { |
808 | break; |
809 | } |
810 | } |
811 | _oneof_case_[0] = KIND_NOT_SET; |
812 | } |
813 | |
814 | |
815 | void StructuredValue::Clear() { |
816 | // @@protoc_insertion_point(message_clear_start:tensorflow.StructuredValue) |
817 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
818 | // Prevent compiler warnings about cached_has_bits being unused |
819 | (void) cached_has_bits; |
820 | |
821 | clear_kind(); |
822 | _internal_metadata_.Clear(); |
823 | } |
824 | |
825 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
826 | const char* StructuredValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
827 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
828 | while (!ctx->Done(&ptr)) { |
829 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
830 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
831 | CHK_(ptr); |
832 | switch (tag >> 3) { |
833 | // .tensorflow.NoneValue none_value = 1; |
834 | case 1: |
835 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
836 | ptr = ctx->ParseMessage(mutable_none_value(), ptr); |
837 | CHK_(ptr); |
838 | } else goto handle_unusual; |
839 | continue; |
840 | // double float64_value = 11; |
841 | case 11: |
842 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 89)) { |
843 | set_float64_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); |
844 | ptr += sizeof(double); |
845 | } else goto handle_unusual; |
846 | continue; |
847 | // sint64 int64_value = 12; |
848 | case 12: |
849 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { |
850 | set_int64_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag64(&ptr)); |
851 | CHK_(ptr); |
852 | } else goto handle_unusual; |
853 | continue; |
854 | // string string_value = 13; |
855 | case 13: |
856 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { |
857 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_string_value(), ptr, ctx, "tensorflow.StructuredValue.string_value" ); |
858 | CHK_(ptr); |
859 | } else goto handle_unusual; |
860 | continue; |
861 | // bool bool_value = 14; |
862 | case 14: |
863 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { |
864 | set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
865 | CHK_(ptr); |
866 | } else goto handle_unusual; |
867 | continue; |
868 | // .tensorflow.TensorShapeProto tensor_shape_value = 31; |
869 | case 31: |
870 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 250)) { |
871 | ptr = ctx->ParseMessage(mutable_tensor_shape_value(), ptr); |
872 | CHK_(ptr); |
873 | } else goto handle_unusual; |
874 | continue; |
875 | // .tensorflow.DataType tensor_dtype_value = 32; |
876 | case 32: |
877 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { |
878 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
879 | CHK_(ptr); |
880 | set_tensor_dtype_value(static_cast<::tensorflow::DataType>(val)); |
881 | } else goto handle_unusual; |
882 | continue; |
883 | // .tensorflow.TensorSpecProto tensor_spec_value = 33; |
884 | case 33: |
885 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
886 | ptr = ctx->ParseMessage(mutable_tensor_spec_value(), ptr); |
887 | CHK_(ptr); |
888 | } else goto handle_unusual; |
889 | continue; |
890 | // .tensorflow.TypeSpecProto type_spec_value = 34; |
891 | case 34: |
892 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
893 | ptr = ctx->ParseMessage(mutable_type_spec_value(), ptr); |
894 | CHK_(ptr); |
895 | } else goto handle_unusual; |
896 | continue; |
897 | // .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; |
898 | case 35: |
899 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
900 | ptr = ctx->ParseMessage(mutable_bounded_tensor_spec_value(), ptr); |
901 | CHK_(ptr); |
902 | } else goto handle_unusual; |
903 | continue; |
904 | // .tensorflow.ListValue list_value = 51; |
905 | case 51: |
906 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 154)) { |
907 | ptr = ctx->ParseMessage(mutable_list_value(), ptr); |
908 | CHK_(ptr); |
909 | } else goto handle_unusual; |
910 | continue; |
911 | // .tensorflow.TupleValue tuple_value = 52; |
912 | case 52: |
913 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 162)) { |
914 | ptr = ctx->ParseMessage(mutable_tuple_value(), ptr); |
915 | CHK_(ptr); |
916 | } else goto handle_unusual; |
917 | continue; |
918 | // .tensorflow.DictValue dict_value = 53; |
919 | case 53: |
920 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 170)) { |
921 | ptr = ctx->ParseMessage(mutable_dict_value(), ptr); |
922 | CHK_(ptr); |
923 | } else goto handle_unusual; |
924 | continue; |
925 | // .tensorflow.NamedTupleValue named_tuple_value = 54; |
926 | case 54: |
927 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 178)) { |
928 | ptr = ctx->ParseMessage(mutable_named_tuple_value(), ptr); |
929 | CHK_(ptr); |
930 | } else goto handle_unusual; |
931 | continue; |
932 | default: { |
933 | handle_unusual: |
934 | if ((tag & 7) == 4 || tag == 0) { |
935 | ctx->SetLastTag(tag); |
936 | goto success; |
937 | } |
938 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
939 | CHK_(ptr != nullptr); |
940 | continue; |
941 | } |
942 | } // switch |
943 | } // while |
944 | success: |
945 | return ptr; |
946 | failure: |
947 | ptr = nullptr; |
948 | goto success; |
949 | #undef CHK_ |
950 | } |
951 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
952 | bool StructuredValue::MergePartialFromCodedStream( |
953 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
954 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
955 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
956 | // @@protoc_insertion_point(parse_start:tensorflow.StructuredValue) |
957 | for (;;) { |
958 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
959 | tag = p.first; |
960 | if (!p.second) goto handle_unusual; |
961 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
962 | // .tensorflow.NoneValue none_value = 1; |
963 | case 1: { |
964 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
965 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
966 | input, mutable_none_value())); |
967 | } else { |
968 | goto handle_unusual; |
969 | } |
970 | break; |
971 | } |
972 | |
973 | // double float64_value = 11; |
974 | case 11: { |
975 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (89 & 0xFF)) { |
976 | clear_kind(); |
977 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
978 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
979 | input, &kind_.float64_value_))); |
980 | set_has_float64_value(); |
981 | } else { |
982 | goto handle_unusual; |
983 | } |
984 | break; |
985 | } |
986 | |
987 | // sint64 int64_value = 12; |
988 | case 12: { |
989 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) { |
990 | clear_kind(); |
991 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
992 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_SINT64>( |
993 | input, &kind_.int64_value_))); |
994 | set_has_int64_value(); |
995 | } else { |
996 | goto handle_unusual; |
997 | } |
998 | break; |
999 | } |
1000 | |
1001 | // string string_value = 13; |
1002 | case 13: { |
1003 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (106 & 0xFF)) { |
1004 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1005 | input, this->mutable_string_value())); |
1006 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1007 | this->string_value().data(), static_cast<int>(this->string_value().length()), |
1008 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1009 | "tensorflow.StructuredValue.string_value" )); |
1010 | } else { |
1011 | goto handle_unusual; |
1012 | } |
1013 | break; |
1014 | } |
1015 | |
1016 | // bool bool_value = 14; |
1017 | case 14: { |
1018 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (112 & 0xFF)) { |
1019 | clear_kind(); |
1020 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1021 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
1022 | input, &kind_.bool_value_))); |
1023 | set_has_bool_value(); |
1024 | } else { |
1025 | goto handle_unusual; |
1026 | } |
1027 | break; |
1028 | } |
1029 | |
1030 | // .tensorflow.TensorShapeProto tensor_shape_value = 31; |
1031 | case 31: { |
1032 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (250 & 0xFF)) { |
1033 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1034 | input, mutable_tensor_shape_value())); |
1035 | } else { |
1036 | goto handle_unusual; |
1037 | } |
1038 | break; |
1039 | } |
1040 | |
1041 | // .tensorflow.DataType tensor_dtype_value = 32; |
1042 | case 32: { |
1043 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (256 & 0xFF)) { |
1044 | int value = 0; |
1045 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1046 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
1047 | input, &value))); |
1048 | set_tensor_dtype_value(static_cast< ::tensorflow::DataType >(value)); |
1049 | } else { |
1050 | goto handle_unusual; |
1051 | } |
1052 | break; |
1053 | } |
1054 | |
1055 | // .tensorflow.TensorSpecProto tensor_spec_value = 33; |
1056 | case 33: { |
1057 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (266 & 0xFF)) { |
1058 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1059 | input, mutable_tensor_spec_value())); |
1060 | } else { |
1061 | goto handle_unusual; |
1062 | } |
1063 | break; |
1064 | } |
1065 | |
1066 | // .tensorflow.TypeSpecProto type_spec_value = 34; |
1067 | case 34: { |
1068 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (274 & 0xFF)) { |
1069 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1070 | input, mutable_type_spec_value())); |
1071 | } else { |
1072 | goto handle_unusual; |
1073 | } |
1074 | break; |
1075 | } |
1076 | |
1077 | // .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; |
1078 | case 35: { |
1079 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (282 & 0xFF)) { |
1080 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1081 | input, mutable_bounded_tensor_spec_value())); |
1082 | } else { |
1083 | goto handle_unusual; |
1084 | } |
1085 | break; |
1086 | } |
1087 | |
1088 | // .tensorflow.ListValue list_value = 51; |
1089 | case 51: { |
1090 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (410 & 0xFF)) { |
1091 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1092 | input, mutable_list_value())); |
1093 | } else { |
1094 | goto handle_unusual; |
1095 | } |
1096 | break; |
1097 | } |
1098 | |
1099 | // .tensorflow.TupleValue tuple_value = 52; |
1100 | case 52: { |
1101 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (418 & 0xFF)) { |
1102 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1103 | input, mutable_tuple_value())); |
1104 | } else { |
1105 | goto handle_unusual; |
1106 | } |
1107 | break; |
1108 | } |
1109 | |
1110 | // .tensorflow.DictValue dict_value = 53; |
1111 | case 53: { |
1112 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (426 & 0xFF)) { |
1113 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1114 | input, mutable_dict_value())); |
1115 | } else { |
1116 | goto handle_unusual; |
1117 | } |
1118 | break; |
1119 | } |
1120 | |
1121 | // .tensorflow.NamedTupleValue named_tuple_value = 54; |
1122 | case 54: { |
1123 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (434 & 0xFF)) { |
1124 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1125 | input, mutable_named_tuple_value())); |
1126 | } else { |
1127 | goto handle_unusual; |
1128 | } |
1129 | break; |
1130 | } |
1131 | |
1132 | default: { |
1133 | handle_unusual: |
1134 | if (tag == 0) { |
1135 | goto success; |
1136 | } |
1137 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1138 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1139 | break; |
1140 | } |
1141 | } |
1142 | } |
1143 | success: |
1144 | // @@protoc_insertion_point(parse_success:tensorflow.StructuredValue) |
1145 | return true; |
1146 | failure: |
1147 | // @@protoc_insertion_point(parse_failure:tensorflow.StructuredValue) |
1148 | return false; |
1149 | #undef DO_ |
1150 | } |
1151 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1152 | |
1153 | void StructuredValue::SerializeWithCachedSizes( |
1154 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1155 | // @@protoc_insertion_point(serialize_start:tensorflow.StructuredValue) |
1156 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1157 | (void) cached_has_bits; |
1158 | |
1159 | // .tensorflow.NoneValue none_value = 1; |
1160 | if (has_none_value()) { |
1161 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1162 | 1, _Internal::none_value(this), output); |
1163 | } |
1164 | |
1165 | // double float64_value = 11; |
1166 | if (has_float64_value()) { |
1167 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(11, this->float64_value(), output); |
1168 | } |
1169 | |
1170 | // sint64 int64_value = 12; |
1171 | if (has_int64_value()) { |
1172 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt64(12, this->int64_value(), output); |
1173 | } |
1174 | |
1175 | // string string_value = 13; |
1176 | if (has_string_value()) { |
1177 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1178 | this->string_value().data(), static_cast<int>(this->string_value().length()), |
1179 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1180 | "tensorflow.StructuredValue.string_value" ); |
1181 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1182 | 13, this->string_value(), output); |
1183 | } |
1184 | |
1185 | // bool bool_value = 14; |
1186 | if (has_bool_value()) { |
1187 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(14, this->bool_value(), output); |
1188 | } |
1189 | |
1190 | // .tensorflow.TensorShapeProto tensor_shape_value = 31; |
1191 | if (has_tensor_shape_value()) { |
1192 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1193 | 31, _Internal::tensor_shape_value(this), output); |
1194 | } |
1195 | |
1196 | // .tensorflow.DataType tensor_dtype_value = 32; |
1197 | if (has_tensor_dtype_value()) { |
1198 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
1199 | 32, this->tensor_dtype_value(), output); |
1200 | } |
1201 | |
1202 | // .tensorflow.TensorSpecProto tensor_spec_value = 33; |
1203 | if (has_tensor_spec_value()) { |
1204 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1205 | 33, _Internal::tensor_spec_value(this), output); |
1206 | } |
1207 | |
1208 | // .tensorflow.TypeSpecProto type_spec_value = 34; |
1209 | if (has_type_spec_value()) { |
1210 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1211 | 34, _Internal::type_spec_value(this), output); |
1212 | } |
1213 | |
1214 | // .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; |
1215 | if (has_bounded_tensor_spec_value()) { |
1216 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1217 | 35, _Internal::bounded_tensor_spec_value(this), output); |
1218 | } |
1219 | |
1220 | // .tensorflow.ListValue list_value = 51; |
1221 | if (has_list_value()) { |
1222 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1223 | 51, _Internal::list_value(this), output); |
1224 | } |
1225 | |
1226 | // .tensorflow.TupleValue tuple_value = 52; |
1227 | if (has_tuple_value()) { |
1228 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1229 | 52, _Internal::tuple_value(this), output); |
1230 | } |
1231 | |
1232 | // .tensorflow.DictValue dict_value = 53; |
1233 | if (has_dict_value()) { |
1234 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1235 | 53, _Internal::dict_value(this), output); |
1236 | } |
1237 | |
1238 | // .tensorflow.NamedTupleValue named_tuple_value = 54; |
1239 | if (has_named_tuple_value()) { |
1240 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1241 | 54, _Internal::named_tuple_value(this), output); |
1242 | } |
1243 | |
1244 | if (_internal_metadata_.have_unknown_fields()) { |
1245 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1246 | _internal_metadata_.unknown_fields(), output); |
1247 | } |
1248 | // @@protoc_insertion_point(serialize_end:tensorflow.StructuredValue) |
1249 | } |
1250 | |
1251 | ::PROTOBUF_NAMESPACE_ID::uint8* StructuredValue::InternalSerializeWithCachedSizesToArray( |
1252 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1253 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.StructuredValue) |
1254 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1255 | (void) cached_has_bits; |
1256 | |
1257 | // .tensorflow.NoneValue none_value = 1; |
1258 | if (has_none_value()) { |
1259 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1260 | InternalWriteMessageToArray( |
1261 | 1, _Internal::none_value(this), target); |
1262 | } |
1263 | |
1264 | // double float64_value = 11; |
1265 | if (has_float64_value()) { |
1266 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(11, this->float64_value(), target); |
1267 | } |
1268 | |
1269 | // sint64 int64_value = 12; |
1270 | if (has_int64_value()) { |
1271 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt64ToArray(12, this->int64_value(), target); |
1272 | } |
1273 | |
1274 | // string string_value = 13; |
1275 | if (has_string_value()) { |
1276 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1277 | this->string_value().data(), static_cast<int>(this->string_value().length()), |
1278 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1279 | "tensorflow.StructuredValue.string_value" ); |
1280 | target = |
1281 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1282 | 13, this->string_value(), target); |
1283 | } |
1284 | |
1285 | // bool bool_value = 14; |
1286 | if (has_bool_value()) { |
1287 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->bool_value(), target); |
1288 | } |
1289 | |
1290 | // .tensorflow.TensorShapeProto tensor_shape_value = 31; |
1291 | if (has_tensor_shape_value()) { |
1292 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1293 | InternalWriteMessageToArray( |
1294 | 31, _Internal::tensor_shape_value(this), target); |
1295 | } |
1296 | |
1297 | // .tensorflow.DataType tensor_dtype_value = 32; |
1298 | if (has_tensor_dtype_value()) { |
1299 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
1300 | 32, this->tensor_dtype_value(), target); |
1301 | } |
1302 | |
1303 | // .tensorflow.TensorSpecProto tensor_spec_value = 33; |
1304 | if (has_tensor_spec_value()) { |
1305 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1306 | InternalWriteMessageToArray( |
1307 | 33, _Internal::tensor_spec_value(this), target); |
1308 | } |
1309 | |
1310 | // .tensorflow.TypeSpecProto type_spec_value = 34; |
1311 | if (has_type_spec_value()) { |
1312 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1313 | InternalWriteMessageToArray( |
1314 | 34, _Internal::type_spec_value(this), target); |
1315 | } |
1316 | |
1317 | // .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; |
1318 | if (has_bounded_tensor_spec_value()) { |
1319 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1320 | InternalWriteMessageToArray( |
1321 | 35, _Internal::bounded_tensor_spec_value(this), target); |
1322 | } |
1323 | |
1324 | // .tensorflow.ListValue list_value = 51; |
1325 | if (has_list_value()) { |
1326 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1327 | InternalWriteMessageToArray( |
1328 | 51, _Internal::list_value(this), target); |
1329 | } |
1330 | |
1331 | // .tensorflow.TupleValue tuple_value = 52; |
1332 | if (has_tuple_value()) { |
1333 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1334 | InternalWriteMessageToArray( |
1335 | 52, _Internal::tuple_value(this), target); |
1336 | } |
1337 | |
1338 | // .tensorflow.DictValue dict_value = 53; |
1339 | if (has_dict_value()) { |
1340 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1341 | InternalWriteMessageToArray( |
1342 | 53, _Internal::dict_value(this), target); |
1343 | } |
1344 | |
1345 | // .tensorflow.NamedTupleValue named_tuple_value = 54; |
1346 | if (has_named_tuple_value()) { |
1347 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1348 | InternalWriteMessageToArray( |
1349 | 54, _Internal::named_tuple_value(this), target); |
1350 | } |
1351 | |
1352 | if (_internal_metadata_.have_unknown_fields()) { |
1353 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1354 | _internal_metadata_.unknown_fields(), target); |
1355 | } |
1356 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.StructuredValue) |
1357 | return target; |
1358 | } |
1359 | |
1360 | size_t StructuredValue::ByteSizeLong() const { |
1361 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.StructuredValue) |
1362 | size_t total_size = 0; |
1363 | |
1364 | if (_internal_metadata_.have_unknown_fields()) { |
1365 | total_size += |
1366 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1367 | _internal_metadata_.unknown_fields()); |
1368 | } |
1369 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1370 | // Prevent compiler warnings about cached_has_bits being unused |
1371 | (void) cached_has_bits; |
1372 | |
1373 | switch (kind_case()) { |
1374 | // .tensorflow.NoneValue none_value = 1; |
1375 | case kNoneValue: { |
1376 | total_size += 1 + |
1377 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1378 | *kind_.none_value_); |
1379 | break; |
1380 | } |
1381 | // double float64_value = 11; |
1382 | case kFloat64Value: { |
1383 | total_size += 1 + 8; |
1384 | break; |
1385 | } |
1386 | // sint64 int64_value = 12; |
1387 | case kInt64Value: { |
1388 | total_size += 1 + |
1389 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt64Size( |
1390 | this->int64_value()); |
1391 | break; |
1392 | } |
1393 | // string string_value = 13; |
1394 | case kStringValue: { |
1395 | total_size += 1 + |
1396 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1397 | this->string_value()); |
1398 | break; |
1399 | } |
1400 | // bool bool_value = 14; |
1401 | case kBoolValue: { |
1402 | total_size += 1 + 1; |
1403 | break; |
1404 | } |
1405 | // .tensorflow.TensorShapeProto tensor_shape_value = 31; |
1406 | case kTensorShapeValue: { |
1407 | total_size += 2 + |
1408 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1409 | *kind_.tensor_shape_value_); |
1410 | break; |
1411 | } |
1412 | // .tensorflow.DataType tensor_dtype_value = 32; |
1413 | case kTensorDtypeValue: { |
1414 | total_size += 2 + |
1415 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->tensor_dtype_value()); |
1416 | break; |
1417 | } |
1418 | // .tensorflow.TensorSpecProto tensor_spec_value = 33; |
1419 | case kTensorSpecValue: { |
1420 | total_size += 2 + |
1421 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1422 | *kind_.tensor_spec_value_); |
1423 | break; |
1424 | } |
1425 | // .tensorflow.TypeSpecProto type_spec_value = 34; |
1426 | case kTypeSpecValue: { |
1427 | total_size += 2 + |
1428 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1429 | *kind_.type_spec_value_); |
1430 | break; |
1431 | } |
1432 | // .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35; |
1433 | case kBoundedTensorSpecValue: { |
1434 | total_size += 2 + |
1435 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1436 | *kind_.bounded_tensor_spec_value_); |
1437 | break; |
1438 | } |
1439 | // .tensorflow.ListValue list_value = 51; |
1440 | case kListValue: { |
1441 | total_size += 2 + |
1442 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1443 | *kind_.list_value_); |
1444 | break; |
1445 | } |
1446 | // .tensorflow.TupleValue tuple_value = 52; |
1447 | case kTupleValue: { |
1448 | total_size += 2 + |
1449 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1450 | *kind_.tuple_value_); |
1451 | break; |
1452 | } |
1453 | // .tensorflow.DictValue dict_value = 53; |
1454 | case kDictValue: { |
1455 | total_size += 2 + |
1456 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1457 | *kind_.dict_value_); |
1458 | break; |
1459 | } |
1460 | // .tensorflow.NamedTupleValue named_tuple_value = 54; |
1461 | case kNamedTupleValue: { |
1462 | total_size += 2 + |
1463 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1464 | *kind_.named_tuple_value_); |
1465 | break; |
1466 | } |
1467 | case KIND_NOT_SET: { |
1468 | break; |
1469 | } |
1470 | } |
1471 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1472 | SetCachedSize(cached_size); |
1473 | return total_size; |
1474 | } |
1475 | |
1476 | void StructuredValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1477 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.StructuredValue) |
1478 | GOOGLE_DCHECK_NE(&from, this); |
1479 | const StructuredValue* source = |
1480 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredValue>( |
1481 | &from); |
1482 | if (source == nullptr) { |
1483 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.StructuredValue) |
1484 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1485 | } else { |
1486 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.StructuredValue) |
1487 | MergeFrom(*source); |
1488 | } |
1489 | } |
1490 | |
1491 | void StructuredValue::MergeFrom(const StructuredValue& from) { |
1492 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.StructuredValue) |
1493 | GOOGLE_DCHECK_NE(&from, this); |
1494 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1495 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1496 | (void) cached_has_bits; |
1497 | |
1498 | switch (from.kind_case()) { |
1499 | case kNoneValue: { |
1500 | mutable_none_value()->::tensorflow::NoneValue::MergeFrom(from.none_value()); |
1501 | break; |
1502 | } |
1503 | case kFloat64Value: { |
1504 | set_float64_value(from.float64_value()); |
1505 | break; |
1506 | } |
1507 | case kInt64Value: { |
1508 | set_int64_value(from.int64_value()); |
1509 | break; |
1510 | } |
1511 | case kStringValue: { |
1512 | set_string_value(from.string_value()); |
1513 | break; |
1514 | } |
1515 | case kBoolValue: { |
1516 | set_bool_value(from.bool_value()); |
1517 | break; |
1518 | } |
1519 | case kTensorShapeValue: { |
1520 | mutable_tensor_shape_value()->::tensorflow::TensorShapeProto::MergeFrom(from.tensor_shape_value()); |
1521 | break; |
1522 | } |
1523 | case kTensorDtypeValue: { |
1524 | set_tensor_dtype_value(from.tensor_dtype_value()); |
1525 | break; |
1526 | } |
1527 | case kTensorSpecValue: { |
1528 | mutable_tensor_spec_value()->::tensorflow::TensorSpecProto::MergeFrom(from.tensor_spec_value()); |
1529 | break; |
1530 | } |
1531 | case kTypeSpecValue: { |
1532 | mutable_type_spec_value()->::tensorflow::TypeSpecProto::MergeFrom(from.type_spec_value()); |
1533 | break; |
1534 | } |
1535 | case kBoundedTensorSpecValue: { |
1536 | mutable_bounded_tensor_spec_value()->::tensorflow::BoundedTensorSpecProto::MergeFrom(from.bounded_tensor_spec_value()); |
1537 | break; |
1538 | } |
1539 | case kListValue: { |
1540 | mutable_list_value()->::tensorflow::ListValue::MergeFrom(from.list_value()); |
1541 | break; |
1542 | } |
1543 | case kTupleValue: { |
1544 | mutable_tuple_value()->::tensorflow::TupleValue::MergeFrom(from.tuple_value()); |
1545 | break; |
1546 | } |
1547 | case kDictValue: { |
1548 | mutable_dict_value()->::tensorflow::DictValue::MergeFrom(from.dict_value()); |
1549 | break; |
1550 | } |
1551 | case kNamedTupleValue: { |
1552 | mutable_named_tuple_value()->::tensorflow::NamedTupleValue::MergeFrom(from.named_tuple_value()); |
1553 | break; |
1554 | } |
1555 | case KIND_NOT_SET: { |
1556 | break; |
1557 | } |
1558 | } |
1559 | } |
1560 | |
1561 | void StructuredValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1562 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.StructuredValue) |
1563 | if (&from == this) return; |
1564 | Clear(); |
1565 | MergeFrom(from); |
1566 | } |
1567 | |
1568 | void StructuredValue::CopyFrom(const StructuredValue& from) { |
1569 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.StructuredValue) |
1570 | if (&from == this) return; |
1571 | Clear(); |
1572 | MergeFrom(from); |
1573 | } |
1574 | |
1575 | bool StructuredValue::IsInitialized() const { |
1576 | return true; |
1577 | } |
1578 | |
1579 | void StructuredValue::InternalSwap(StructuredValue* other) { |
1580 | using std::swap; |
1581 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1582 | swap(kind_, other->kind_); |
1583 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
1584 | } |
1585 | |
1586 | ::PROTOBUF_NAMESPACE_ID::Metadata StructuredValue::GetMetadata() const { |
1587 | return GetMetadataStatic(); |
1588 | } |
1589 | |
1590 | |
1591 | // =================================================================== |
1592 | |
1593 | void NoneValue::InitAsDefaultInstance() { |
1594 | } |
1595 | class NoneValue::_Internal { |
1596 | public: |
1597 | }; |
1598 | |
1599 | NoneValue::NoneValue() |
1600 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1601 | SharedCtor(); |
1602 | // @@protoc_insertion_point(constructor:tensorflow.NoneValue) |
1603 | } |
1604 | NoneValue::NoneValue(const NoneValue& from) |
1605 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1606 | _internal_metadata_(nullptr) { |
1607 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1608 | // @@protoc_insertion_point(copy_constructor:tensorflow.NoneValue) |
1609 | } |
1610 | |
1611 | void NoneValue::SharedCtor() { |
1612 | } |
1613 | |
1614 | NoneValue::~NoneValue() { |
1615 | // @@protoc_insertion_point(destructor:tensorflow.NoneValue) |
1616 | SharedDtor(); |
1617 | } |
1618 | |
1619 | void NoneValue::SharedDtor() { |
1620 | } |
1621 | |
1622 | void NoneValue::SetCachedSize(int size) const { |
1623 | _cached_size_.Set(size); |
1624 | } |
1625 | const NoneValue& NoneValue::default_instance() { |
1626 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NoneValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
1627 | return *internal_default_instance(); |
1628 | } |
1629 | |
1630 | |
1631 | void NoneValue::Clear() { |
1632 | // @@protoc_insertion_point(message_clear_start:tensorflow.NoneValue) |
1633 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1634 | // Prevent compiler warnings about cached_has_bits being unused |
1635 | (void) cached_has_bits; |
1636 | |
1637 | _internal_metadata_.Clear(); |
1638 | } |
1639 | |
1640 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1641 | const char* NoneValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1642 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1643 | while (!ctx->Done(&ptr)) { |
1644 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1645 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1646 | CHK_(ptr); |
1647 | switch (tag >> 3) { |
1648 | default: { |
1649 | if ((tag & 7) == 4 || tag == 0) { |
1650 | ctx->SetLastTag(tag); |
1651 | goto success; |
1652 | } |
1653 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1654 | CHK_(ptr != nullptr); |
1655 | continue; |
1656 | } |
1657 | } // switch |
1658 | } // while |
1659 | success: |
1660 | return ptr; |
1661 | failure: |
1662 | ptr = nullptr; |
1663 | goto success; |
1664 | #undef CHK_ |
1665 | } |
1666 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1667 | bool NoneValue::MergePartialFromCodedStream( |
1668 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1669 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1670 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1671 | // @@protoc_insertion_point(parse_start:tensorflow.NoneValue) |
1672 | for (;;) { |
1673 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1674 | tag = p.first; |
1675 | if (!p.second) goto handle_unusual; |
1676 | handle_unusual: |
1677 | if (tag == 0) { |
1678 | goto success; |
1679 | } |
1680 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1681 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1682 | } |
1683 | success: |
1684 | // @@protoc_insertion_point(parse_success:tensorflow.NoneValue) |
1685 | return true; |
1686 | failure: |
1687 | // @@protoc_insertion_point(parse_failure:tensorflow.NoneValue) |
1688 | return false; |
1689 | #undef DO_ |
1690 | } |
1691 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1692 | |
1693 | void NoneValue::SerializeWithCachedSizes( |
1694 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1695 | // @@protoc_insertion_point(serialize_start:tensorflow.NoneValue) |
1696 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1697 | (void) cached_has_bits; |
1698 | |
1699 | if (_internal_metadata_.have_unknown_fields()) { |
1700 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1701 | _internal_metadata_.unknown_fields(), output); |
1702 | } |
1703 | // @@protoc_insertion_point(serialize_end:tensorflow.NoneValue) |
1704 | } |
1705 | |
1706 | ::PROTOBUF_NAMESPACE_ID::uint8* NoneValue::InternalSerializeWithCachedSizesToArray( |
1707 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1708 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NoneValue) |
1709 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1710 | (void) cached_has_bits; |
1711 | |
1712 | if (_internal_metadata_.have_unknown_fields()) { |
1713 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1714 | _internal_metadata_.unknown_fields(), target); |
1715 | } |
1716 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NoneValue) |
1717 | return target; |
1718 | } |
1719 | |
1720 | size_t NoneValue::ByteSizeLong() const { |
1721 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.NoneValue) |
1722 | size_t total_size = 0; |
1723 | |
1724 | if (_internal_metadata_.have_unknown_fields()) { |
1725 | total_size += |
1726 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1727 | _internal_metadata_.unknown_fields()); |
1728 | } |
1729 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1730 | // Prevent compiler warnings about cached_has_bits being unused |
1731 | (void) cached_has_bits; |
1732 | |
1733 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1734 | SetCachedSize(cached_size); |
1735 | return total_size; |
1736 | } |
1737 | |
1738 | void NoneValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1739 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NoneValue) |
1740 | GOOGLE_DCHECK_NE(&from, this); |
1741 | const NoneValue* source = |
1742 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NoneValue>( |
1743 | &from); |
1744 | if (source == nullptr) { |
1745 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NoneValue) |
1746 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1747 | } else { |
1748 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NoneValue) |
1749 | MergeFrom(*source); |
1750 | } |
1751 | } |
1752 | |
1753 | void NoneValue::MergeFrom(const NoneValue& from) { |
1754 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NoneValue) |
1755 | GOOGLE_DCHECK_NE(&from, this); |
1756 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1757 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1758 | (void) cached_has_bits; |
1759 | |
1760 | } |
1761 | |
1762 | void NoneValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1763 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NoneValue) |
1764 | if (&from == this) return; |
1765 | Clear(); |
1766 | MergeFrom(from); |
1767 | } |
1768 | |
1769 | void NoneValue::CopyFrom(const NoneValue& from) { |
1770 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NoneValue) |
1771 | if (&from == this) return; |
1772 | Clear(); |
1773 | MergeFrom(from); |
1774 | } |
1775 | |
1776 | bool NoneValue::IsInitialized() const { |
1777 | return true; |
1778 | } |
1779 | |
1780 | void NoneValue::InternalSwap(NoneValue* other) { |
1781 | using std::swap; |
1782 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1783 | } |
1784 | |
1785 | ::PROTOBUF_NAMESPACE_ID::Metadata NoneValue::GetMetadata() const { |
1786 | return GetMetadataStatic(); |
1787 | } |
1788 | |
1789 | |
1790 | // =================================================================== |
1791 | |
1792 | void ListValue::InitAsDefaultInstance() { |
1793 | } |
1794 | class ListValue::_Internal { |
1795 | public: |
1796 | }; |
1797 | |
1798 | ListValue::ListValue() |
1799 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1800 | SharedCtor(); |
1801 | // @@protoc_insertion_point(constructor:tensorflow.ListValue) |
1802 | } |
1803 | ListValue::ListValue(const ListValue& from) |
1804 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1805 | _internal_metadata_(nullptr), |
1806 | values_(from.values_) { |
1807 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1808 | // @@protoc_insertion_point(copy_constructor:tensorflow.ListValue) |
1809 | } |
1810 | |
1811 | void ListValue::SharedCtor() { |
1812 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
1813 | } |
1814 | |
1815 | ListValue::~ListValue() { |
1816 | // @@protoc_insertion_point(destructor:tensorflow.ListValue) |
1817 | SharedDtor(); |
1818 | } |
1819 | |
1820 | void ListValue::SharedDtor() { |
1821 | } |
1822 | |
1823 | void ListValue::SetCachedSize(int size) const { |
1824 | _cached_size_.Set(size); |
1825 | } |
1826 | const ListValue& ListValue::default_instance() { |
1827 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
1828 | return *internal_default_instance(); |
1829 | } |
1830 | |
1831 | |
1832 | void ListValue::Clear() { |
1833 | // @@protoc_insertion_point(message_clear_start:tensorflow.ListValue) |
1834 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1835 | // Prevent compiler warnings about cached_has_bits being unused |
1836 | (void) cached_has_bits; |
1837 | |
1838 | values_.Clear(); |
1839 | _internal_metadata_.Clear(); |
1840 | } |
1841 | |
1842 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1843 | const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1844 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1845 | while (!ctx->Done(&ptr)) { |
1846 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1847 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1848 | CHK_(ptr); |
1849 | switch (tag >> 3) { |
1850 | // repeated .tensorflow.StructuredValue values = 1; |
1851 | case 1: |
1852 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1853 | ptr -= 1; |
1854 | do { |
1855 | ptr += 1; |
1856 | ptr = ctx->ParseMessage(add_values(), ptr); |
1857 | CHK_(ptr); |
1858 | if (!ctx->DataAvailable(ptr)) break; |
1859 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
1860 | } else goto handle_unusual; |
1861 | continue; |
1862 | default: { |
1863 | handle_unusual: |
1864 | if ((tag & 7) == 4 || tag == 0) { |
1865 | ctx->SetLastTag(tag); |
1866 | goto success; |
1867 | } |
1868 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1869 | CHK_(ptr != nullptr); |
1870 | continue; |
1871 | } |
1872 | } // switch |
1873 | } // while |
1874 | success: |
1875 | return ptr; |
1876 | failure: |
1877 | ptr = nullptr; |
1878 | goto success; |
1879 | #undef CHK_ |
1880 | } |
1881 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1882 | bool ListValue::MergePartialFromCodedStream( |
1883 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1884 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1885 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1886 | // @@protoc_insertion_point(parse_start:tensorflow.ListValue) |
1887 | for (;;) { |
1888 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1889 | tag = p.first; |
1890 | if (!p.second) goto handle_unusual; |
1891 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1892 | // repeated .tensorflow.StructuredValue values = 1; |
1893 | case 1: { |
1894 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1895 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1896 | input, add_values())); |
1897 | } else { |
1898 | goto handle_unusual; |
1899 | } |
1900 | break; |
1901 | } |
1902 | |
1903 | default: { |
1904 | handle_unusual: |
1905 | if (tag == 0) { |
1906 | goto success; |
1907 | } |
1908 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1909 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1910 | break; |
1911 | } |
1912 | } |
1913 | } |
1914 | success: |
1915 | // @@protoc_insertion_point(parse_success:tensorflow.ListValue) |
1916 | return true; |
1917 | failure: |
1918 | // @@protoc_insertion_point(parse_failure:tensorflow.ListValue) |
1919 | return false; |
1920 | #undef DO_ |
1921 | } |
1922 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1923 | |
1924 | void ListValue::SerializeWithCachedSizes( |
1925 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1926 | // @@protoc_insertion_point(serialize_start:tensorflow.ListValue) |
1927 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1928 | (void) cached_has_bits; |
1929 | |
1930 | // repeated .tensorflow.StructuredValue values = 1; |
1931 | for (unsigned int i = 0, |
1932 | n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
1933 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1934 | 1, |
1935 | this->values(static_cast<int>(i)), |
1936 | output); |
1937 | } |
1938 | |
1939 | if (_internal_metadata_.have_unknown_fields()) { |
1940 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1941 | _internal_metadata_.unknown_fields(), output); |
1942 | } |
1943 | // @@protoc_insertion_point(serialize_end:tensorflow.ListValue) |
1944 | } |
1945 | |
1946 | ::PROTOBUF_NAMESPACE_ID::uint8* ListValue::InternalSerializeWithCachedSizesToArray( |
1947 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1948 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ListValue) |
1949 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1950 | (void) cached_has_bits; |
1951 | |
1952 | // repeated .tensorflow.StructuredValue values = 1; |
1953 | for (unsigned int i = 0, |
1954 | n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
1955 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1956 | InternalWriteMessageToArray( |
1957 | 1, this->values(static_cast<int>(i)), target); |
1958 | } |
1959 | |
1960 | if (_internal_metadata_.have_unknown_fields()) { |
1961 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1962 | _internal_metadata_.unknown_fields(), target); |
1963 | } |
1964 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ListValue) |
1965 | return target; |
1966 | } |
1967 | |
1968 | size_t ListValue::ByteSizeLong() const { |
1969 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.ListValue) |
1970 | size_t total_size = 0; |
1971 | |
1972 | if (_internal_metadata_.have_unknown_fields()) { |
1973 | total_size += |
1974 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1975 | _internal_metadata_.unknown_fields()); |
1976 | } |
1977 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1978 | // Prevent compiler warnings about cached_has_bits being unused |
1979 | (void) cached_has_bits; |
1980 | |
1981 | // repeated .tensorflow.StructuredValue values = 1; |
1982 | { |
1983 | unsigned int count = static_cast<unsigned int>(this->values_size()); |
1984 | total_size += 1UL * count; |
1985 | for (unsigned int i = 0; i < count; i++) { |
1986 | total_size += |
1987 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1988 | this->values(static_cast<int>(i))); |
1989 | } |
1990 | } |
1991 | |
1992 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1993 | SetCachedSize(cached_size); |
1994 | return total_size; |
1995 | } |
1996 | |
1997 | void ListValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1998 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ListValue) |
1999 | GOOGLE_DCHECK_NE(&from, this); |
2000 | const ListValue* source = |
2001 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListValue>( |
2002 | &from); |
2003 | if (source == nullptr) { |
2004 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ListValue) |
2005 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2006 | } else { |
2007 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ListValue) |
2008 | MergeFrom(*source); |
2009 | } |
2010 | } |
2011 | |
2012 | void ListValue::MergeFrom(const ListValue& from) { |
2013 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ListValue) |
2014 | GOOGLE_DCHECK_NE(&from, this); |
2015 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2016 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2017 | (void) cached_has_bits; |
2018 | |
2019 | values_.MergeFrom(from.values_); |
2020 | } |
2021 | |
2022 | void ListValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2023 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ListValue) |
2024 | if (&from == this) return; |
2025 | Clear(); |
2026 | MergeFrom(from); |
2027 | } |
2028 | |
2029 | void ListValue::CopyFrom(const ListValue& from) { |
2030 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ListValue) |
2031 | if (&from == this) return; |
2032 | Clear(); |
2033 | MergeFrom(from); |
2034 | } |
2035 | |
2036 | bool ListValue::IsInitialized() const { |
2037 | return true; |
2038 | } |
2039 | |
2040 | void ListValue::InternalSwap(ListValue* other) { |
2041 | using std::swap; |
2042 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2043 | CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); |
2044 | } |
2045 | |
2046 | ::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const { |
2047 | return GetMetadataStatic(); |
2048 | } |
2049 | |
2050 | |
2051 | // =================================================================== |
2052 | |
2053 | void TupleValue::InitAsDefaultInstance() { |
2054 | } |
2055 | class TupleValue::_Internal { |
2056 | public: |
2057 | }; |
2058 | |
2059 | TupleValue::TupleValue() |
2060 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2061 | SharedCtor(); |
2062 | // @@protoc_insertion_point(constructor:tensorflow.TupleValue) |
2063 | } |
2064 | TupleValue::TupleValue(const TupleValue& from) |
2065 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2066 | _internal_metadata_(nullptr), |
2067 | values_(from.values_) { |
2068 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2069 | // @@protoc_insertion_point(copy_constructor:tensorflow.TupleValue) |
2070 | } |
2071 | |
2072 | void TupleValue::SharedCtor() { |
2073 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
2074 | } |
2075 | |
2076 | TupleValue::~TupleValue() { |
2077 | // @@protoc_insertion_point(destructor:tensorflow.TupleValue) |
2078 | SharedDtor(); |
2079 | } |
2080 | |
2081 | void TupleValue::SharedDtor() { |
2082 | } |
2083 | |
2084 | void TupleValue::SetCachedSize(int size) const { |
2085 | _cached_size_.Set(size); |
2086 | } |
2087 | const TupleValue& TupleValue::default_instance() { |
2088 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
2089 | return *internal_default_instance(); |
2090 | } |
2091 | |
2092 | |
2093 | void TupleValue::Clear() { |
2094 | // @@protoc_insertion_point(message_clear_start:tensorflow.TupleValue) |
2095 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2096 | // Prevent compiler warnings about cached_has_bits being unused |
2097 | (void) cached_has_bits; |
2098 | |
2099 | values_.Clear(); |
2100 | _internal_metadata_.Clear(); |
2101 | } |
2102 | |
2103 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2104 | const char* TupleValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2105 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2106 | while (!ctx->Done(&ptr)) { |
2107 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2108 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2109 | CHK_(ptr); |
2110 | switch (tag >> 3) { |
2111 | // repeated .tensorflow.StructuredValue values = 1; |
2112 | case 1: |
2113 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
2114 | ptr -= 1; |
2115 | do { |
2116 | ptr += 1; |
2117 | ptr = ctx->ParseMessage(add_values(), ptr); |
2118 | CHK_(ptr); |
2119 | if (!ctx->DataAvailable(ptr)) break; |
2120 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
2121 | } else goto handle_unusual; |
2122 | continue; |
2123 | default: { |
2124 | handle_unusual: |
2125 | if ((tag & 7) == 4 || tag == 0) { |
2126 | ctx->SetLastTag(tag); |
2127 | goto success; |
2128 | } |
2129 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2130 | CHK_(ptr != nullptr); |
2131 | continue; |
2132 | } |
2133 | } // switch |
2134 | } // while |
2135 | success: |
2136 | return ptr; |
2137 | failure: |
2138 | ptr = nullptr; |
2139 | goto success; |
2140 | #undef CHK_ |
2141 | } |
2142 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2143 | bool TupleValue::MergePartialFromCodedStream( |
2144 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2145 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2146 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2147 | // @@protoc_insertion_point(parse_start:tensorflow.TupleValue) |
2148 | for (;;) { |
2149 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2150 | tag = p.first; |
2151 | if (!p.second) goto handle_unusual; |
2152 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2153 | // repeated .tensorflow.StructuredValue values = 1; |
2154 | case 1: { |
2155 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
2156 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
2157 | input, add_values())); |
2158 | } else { |
2159 | goto handle_unusual; |
2160 | } |
2161 | break; |
2162 | } |
2163 | |
2164 | default: { |
2165 | handle_unusual: |
2166 | if (tag == 0) { |
2167 | goto success; |
2168 | } |
2169 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2170 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2171 | break; |
2172 | } |
2173 | } |
2174 | } |
2175 | success: |
2176 | // @@protoc_insertion_point(parse_success:tensorflow.TupleValue) |
2177 | return true; |
2178 | failure: |
2179 | // @@protoc_insertion_point(parse_failure:tensorflow.TupleValue) |
2180 | return false; |
2181 | #undef DO_ |
2182 | } |
2183 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2184 | |
2185 | void TupleValue::SerializeWithCachedSizes( |
2186 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2187 | // @@protoc_insertion_point(serialize_start:tensorflow.TupleValue) |
2188 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2189 | (void) cached_has_bits; |
2190 | |
2191 | // repeated .tensorflow.StructuredValue values = 1; |
2192 | for (unsigned int i = 0, |
2193 | n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
2194 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2195 | 1, |
2196 | this->values(static_cast<int>(i)), |
2197 | output); |
2198 | } |
2199 | |
2200 | if (_internal_metadata_.have_unknown_fields()) { |
2201 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2202 | _internal_metadata_.unknown_fields(), output); |
2203 | } |
2204 | // @@protoc_insertion_point(serialize_end:tensorflow.TupleValue) |
2205 | } |
2206 | |
2207 | ::PROTOBUF_NAMESPACE_ID::uint8* TupleValue::InternalSerializeWithCachedSizesToArray( |
2208 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2209 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TupleValue) |
2210 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2211 | (void) cached_has_bits; |
2212 | |
2213 | // repeated .tensorflow.StructuredValue values = 1; |
2214 | for (unsigned int i = 0, |
2215 | n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
2216 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2217 | InternalWriteMessageToArray( |
2218 | 1, this->values(static_cast<int>(i)), target); |
2219 | } |
2220 | |
2221 | if (_internal_metadata_.have_unknown_fields()) { |
2222 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2223 | _internal_metadata_.unknown_fields(), target); |
2224 | } |
2225 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TupleValue) |
2226 | return target; |
2227 | } |
2228 | |
2229 | size_t TupleValue::ByteSizeLong() const { |
2230 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.TupleValue) |
2231 | size_t total_size = 0; |
2232 | |
2233 | if (_internal_metadata_.have_unknown_fields()) { |
2234 | total_size += |
2235 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2236 | _internal_metadata_.unknown_fields()); |
2237 | } |
2238 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2239 | // Prevent compiler warnings about cached_has_bits being unused |
2240 | (void) cached_has_bits; |
2241 | |
2242 | // repeated .tensorflow.StructuredValue values = 1; |
2243 | { |
2244 | unsigned int count = static_cast<unsigned int>(this->values_size()); |
2245 | total_size += 1UL * count; |
2246 | for (unsigned int i = 0; i < count; i++) { |
2247 | total_size += |
2248 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2249 | this->values(static_cast<int>(i))); |
2250 | } |
2251 | } |
2252 | |
2253 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2254 | SetCachedSize(cached_size); |
2255 | return total_size; |
2256 | } |
2257 | |
2258 | void TupleValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2259 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TupleValue) |
2260 | GOOGLE_DCHECK_NE(&from, this); |
2261 | const TupleValue* source = |
2262 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TupleValue>( |
2263 | &from); |
2264 | if (source == nullptr) { |
2265 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TupleValue) |
2266 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2267 | } else { |
2268 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TupleValue) |
2269 | MergeFrom(*source); |
2270 | } |
2271 | } |
2272 | |
2273 | void TupleValue::MergeFrom(const TupleValue& from) { |
2274 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TupleValue) |
2275 | GOOGLE_DCHECK_NE(&from, this); |
2276 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2277 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2278 | (void) cached_has_bits; |
2279 | |
2280 | values_.MergeFrom(from.values_); |
2281 | } |
2282 | |
2283 | void TupleValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2284 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TupleValue) |
2285 | if (&from == this) return; |
2286 | Clear(); |
2287 | MergeFrom(from); |
2288 | } |
2289 | |
2290 | void TupleValue::CopyFrom(const TupleValue& from) { |
2291 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TupleValue) |
2292 | if (&from == this) return; |
2293 | Clear(); |
2294 | MergeFrom(from); |
2295 | } |
2296 | |
2297 | bool TupleValue::IsInitialized() const { |
2298 | return true; |
2299 | } |
2300 | |
2301 | void TupleValue::InternalSwap(TupleValue* other) { |
2302 | using std::swap; |
2303 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2304 | CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); |
2305 | } |
2306 | |
2307 | ::PROTOBUF_NAMESPACE_ID::Metadata TupleValue::GetMetadata() const { |
2308 | return GetMetadataStatic(); |
2309 | } |
2310 | |
2311 | |
2312 | // =================================================================== |
2313 | |
2314 | DictValue_FieldsEntry_DoNotUse::DictValue_FieldsEntry_DoNotUse() {} |
2315 | DictValue_FieldsEntry_DoNotUse::DictValue_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2316 | : SuperType(arena) {} |
2317 | void DictValue_FieldsEntry_DoNotUse::MergeFrom(const DictValue_FieldsEntry_DoNotUse& other) { |
2318 | MergeFromInternal(other); |
2319 | } |
2320 | ::PROTOBUF_NAMESPACE_ID::Metadata DictValue_FieldsEntry_DoNotUse::GetMetadata() const { |
2321 | return GetMetadataStatic(); |
2322 | } |
2323 | void DictValue_FieldsEntry_DoNotUse::MergeFrom( |
2324 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
2325 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
2326 | } |
2327 | |
2328 | |
2329 | // =================================================================== |
2330 | |
2331 | void DictValue::InitAsDefaultInstance() { |
2332 | } |
2333 | class DictValue::_Internal { |
2334 | public: |
2335 | }; |
2336 | |
2337 | DictValue::DictValue() |
2338 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2339 | SharedCtor(); |
2340 | // @@protoc_insertion_point(constructor:tensorflow.DictValue) |
2341 | } |
2342 | DictValue::DictValue(const DictValue& from) |
2343 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2344 | _internal_metadata_(nullptr) { |
2345 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2346 | fields_.MergeFrom(from.fields_); |
2347 | // @@protoc_insertion_point(copy_constructor:tensorflow.DictValue) |
2348 | } |
2349 | |
2350 | void DictValue::SharedCtor() { |
2351 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
2352 | } |
2353 | |
2354 | DictValue::~DictValue() { |
2355 | // @@protoc_insertion_point(destructor:tensorflow.DictValue) |
2356 | SharedDtor(); |
2357 | } |
2358 | |
2359 | void DictValue::SharedDtor() { |
2360 | } |
2361 | |
2362 | void DictValue::SetCachedSize(int size) const { |
2363 | _cached_size_.Set(size); |
2364 | } |
2365 | const DictValue& DictValue::default_instance() { |
2366 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
2367 | return *internal_default_instance(); |
2368 | } |
2369 | |
2370 | |
2371 | void DictValue::Clear() { |
2372 | // @@protoc_insertion_point(message_clear_start:tensorflow.DictValue) |
2373 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2374 | // Prevent compiler warnings about cached_has_bits being unused |
2375 | (void) cached_has_bits; |
2376 | |
2377 | fields_.Clear(); |
2378 | _internal_metadata_.Clear(); |
2379 | } |
2380 | |
2381 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2382 | const char* DictValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2383 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2384 | while (!ctx->Done(&ptr)) { |
2385 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2386 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2387 | CHK_(ptr); |
2388 | switch (tag >> 3) { |
2389 | // map<string, .tensorflow.StructuredValue> fields = 1; |
2390 | case 1: |
2391 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
2392 | ptr -= 1; |
2393 | do { |
2394 | ptr += 1; |
2395 | ptr = ctx->ParseMessage(&fields_, ptr); |
2396 | CHK_(ptr); |
2397 | if (!ctx->DataAvailable(ptr)) break; |
2398 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
2399 | } else goto handle_unusual; |
2400 | continue; |
2401 | default: { |
2402 | handle_unusual: |
2403 | if ((tag & 7) == 4 || tag == 0) { |
2404 | ctx->SetLastTag(tag); |
2405 | goto success; |
2406 | } |
2407 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2408 | CHK_(ptr != nullptr); |
2409 | continue; |
2410 | } |
2411 | } // switch |
2412 | } // while |
2413 | success: |
2414 | return ptr; |
2415 | failure: |
2416 | ptr = nullptr; |
2417 | goto success; |
2418 | #undef CHK_ |
2419 | } |
2420 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2421 | bool DictValue::MergePartialFromCodedStream( |
2422 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2423 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2424 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2425 | // @@protoc_insertion_point(parse_start:tensorflow.DictValue) |
2426 | for (;;) { |
2427 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2428 | tag = p.first; |
2429 | if (!p.second) goto handle_unusual; |
2430 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2431 | // map<string, .tensorflow.StructuredValue> fields = 1; |
2432 | case 1: { |
2433 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
2434 | DictValue_FieldsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
2435 | DictValue_FieldsEntry_DoNotUse, |
2436 | std::string, ::tensorflow::StructuredValue, |
2437 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
2438 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
2439 | 0 >, |
2440 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue > > parser(&fields_); |
2441 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
2442 | input, &parser)); |
2443 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2444 | parser.key().data(), static_cast<int>(parser.key().length()), |
2445 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2446 | "tensorflow.DictValue.FieldsEntry.key" )); |
2447 | } else { |
2448 | goto handle_unusual; |
2449 | } |
2450 | break; |
2451 | } |
2452 | |
2453 | default: { |
2454 | handle_unusual: |
2455 | if (tag == 0) { |
2456 | goto success; |
2457 | } |
2458 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2459 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2460 | break; |
2461 | } |
2462 | } |
2463 | } |
2464 | success: |
2465 | // @@protoc_insertion_point(parse_success:tensorflow.DictValue) |
2466 | return true; |
2467 | failure: |
2468 | // @@protoc_insertion_point(parse_failure:tensorflow.DictValue) |
2469 | return false; |
2470 | #undef DO_ |
2471 | } |
2472 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2473 | |
2474 | void DictValue::SerializeWithCachedSizes( |
2475 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2476 | // @@protoc_insertion_point(serialize_start:tensorflow.DictValue) |
2477 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2478 | (void) cached_has_bits; |
2479 | |
2480 | // map<string, .tensorflow.StructuredValue> fields = 1; |
2481 | if (!this->fields().empty()) { |
2482 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_pointer |
2483 | ConstPtr; |
2484 | typedef ConstPtr SortItem; |
2485 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
2486 | struct Utf8Check { |
2487 | static void Check(ConstPtr p) { |
2488 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2489 | p->first.data(), static_cast<int>(p->first.length()), |
2490 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2491 | "tensorflow.DictValue.FieldsEntry.key" ); |
2492 | } |
2493 | }; |
2494 | |
2495 | if (output->IsSerializationDeterministic() && |
2496 | this->fields().size() > 1) { |
2497 | ::std::unique_ptr<SortItem[]> items( |
2498 | new SortItem[this->fields().size()]); |
2499 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::size_type size_type; |
2500 | size_type n = 0; |
2501 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_iterator |
2502 | it = this->fields().begin(); |
2503 | it != this->fields().end(); ++it, ++n) { |
2504 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2505 | } |
2506 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2507 | for (size_type i = 0; i < n; i++) { |
2508 | DictValue_FieldsEntry_DoNotUse::Funcs::SerializeToCodedStream(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
2509 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
2510 | } |
2511 | } else { |
2512 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_iterator |
2513 | it = this->fields().begin(); |
2514 | it != this->fields().end(); ++it) { |
2515 | DictValue_FieldsEntry_DoNotUse::Funcs::SerializeToCodedStream(1, it->first, it->second, output); |
2516 | Utf8Check::Check(&(*it)); |
2517 | } |
2518 | } |
2519 | } |
2520 | |
2521 | if (_internal_metadata_.have_unknown_fields()) { |
2522 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2523 | _internal_metadata_.unknown_fields(), output); |
2524 | } |
2525 | // @@protoc_insertion_point(serialize_end:tensorflow.DictValue) |
2526 | } |
2527 | |
2528 | ::PROTOBUF_NAMESPACE_ID::uint8* DictValue::InternalSerializeWithCachedSizesToArray( |
2529 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2530 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.DictValue) |
2531 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2532 | (void) cached_has_bits; |
2533 | |
2534 | // map<string, .tensorflow.StructuredValue> fields = 1; |
2535 | if (!this->fields().empty()) { |
2536 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_pointer |
2537 | ConstPtr; |
2538 | typedef ConstPtr SortItem; |
2539 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
2540 | struct Utf8Check { |
2541 | static void Check(ConstPtr p) { |
2542 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2543 | p->first.data(), static_cast<int>(p->first.length()), |
2544 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2545 | "tensorflow.DictValue.FieldsEntry.key" ); |
2546 | } |
2547 | }; |
2548 | |
2549 | if (false && |
2550 | this->fields().size() > 1) { |
2551 | ::std::unique_ptr<SortItem[]> items( |
2552 | new SortItem[this->fields().size()]); |
2553 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::size_type size_type; |
2554 | size_type n = 0; |
2555 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_iterator |
2556 | it = this->fields().begin(); |
2557 | it != this->fields().end(); ++it, ++n) { |
2558 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2559 | } |
2560 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2561 | for (size_type i = 0; i < n; i++) { |
2562 | target = DictValue_FieldsEntry_DoNotUse::Funcs::SerializeToArray(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
2563 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
2564 | } |
2565 | } else { |
2566 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_iterator |
2567 | it = this->fields().begin(); |
2568 | it != this->fields().end(); ++it) { |
2569 | target = DictValue_FieldsEntry_DoNotUse::Funcs::SerializeToArray(1, it->first, it->second, target); |
2570 | Utf8Check::Check(&(*it)); |
2571 | } |
2572 | } |
2573 | } |
2574 | |
2575 | if (_internal_metadata_.have_unknown_fields()) { |
2576 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2577 | _internal_metadata_.unknown_fields(), target); |
2578 | } |
2579 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.DictValue) |
2580 | return target; |
2581 | } |
2582 | |
2583 | size_t DictValue::ByteSizeLong() const { |
2584 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.DictValue) |
2585 | size_t total_size = 0; |
2586 | |
2587 | if (_internal_metadata_.have_unknown_fields()) { |
2588 | total_size += |
2589 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2590 | _internal_metadata_.unknown_fields()); |
2591 | } |
2592 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2593 | // Prevent compiler warnings about cached_has_bits being unused |
2594 | (void) cached_has_bits; |
2595 | |
2596 | // map<string, .tensorflow.StructuredValue> fields = 1; |
2597 | total_size += 1 * |
2598 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->fields_size()); |
2599 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::StructuredValue >::const_iterator |
2600 | it = this->fields().begin(); |
2601 | it != this->fields().end(); ++it) { |
2602 | total_size += DictValue_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
2603 | } |
2604 | |
2605 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2606 | SetCachedSize(cached_size); |
2607 | return total_size; |
2608 | } |
2609 | |
2610 | void DictValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2611 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.DictValue) |
2612 | GOOGLE_DCHECK_NE(&from, this); |
2613 | const DictValue* source = |
2614 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DictValue>( |
2615 | &from); |
2616 | if (source == nullptr) { |
2617 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.DictValue) |
2618 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2619 | } else { |
2620 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.DictValue) |
2621 | MergeFrom(*source); |
2622 | } |
2623 | } |
2624 | |
2625 | void DictValue::MergeFrom(const DictValue& from) { |
2626 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.DictValue) |
2627 | GOOGLE_DCHECK_NE(&from, this); |
2628 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2629 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2630 | (void) cached_has_bits; |
2631 | |
2632 | fields_.MergeFrom(from.fields_); |
2633 | } |
2634 | |
2635 | void DictValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2636 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.DictValue) |
2637 | if (&from == this) return; |
2638 | Clear(); |
2639 | MergeFrom(from); |
2640 | } |
2641 | |
2642 | void DictValue::CopyFrom(const DictValue& from) { |
2643 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.DictValue) |
2644 | if (&from == this) return; |
2645 | Clear(); |
2646 | MergeFrom(from); |
2647 | } |
2648 | |
2649 | bool DictValue::IsInitialized() const { |
2650 | return true; |
2651 | } |
2652 | |
2653 | void DictValue::InternalSwap(DictValue* other) { |
2654 | using std::swap; |
2655 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2656 | fields_.Swap(&other->fields_); |
2657 | } |
2658 | |
2659 | ::PROTOBUF_NAMESPACE_ID::Metadata DictValue::GetMetadata() const { |
2660 | return GetMetadataStatic(); |
2661 | } |
2662 | |
2663 | |
2664 | // =================================================================== |
2665 | |
2666 | void PairValue::InitAsDefaultInstance() { |
2667 | ::tensorflow::_PairValue_default_instance_._instance.get_mutable()->value_ = const_cast< ::tensorflow::StructuredValue*>( |
2668 | ::tensorflow::StructuredValue::internal_default_instance()); |
2669 | } |
2670 | class PairValue::_Internal { |
2671 | public: |
2672 | static const ::tensorflow::StructuredValue& value(const PairValue* msg); |
2673 | }; |
2674 | |
2675 | const ::tensorflow::StructuredValue& |
2676 | PairValue::_Internal::value(const PairValue* msg) { |
2677 | return *msg->value_; |
2678 | } |
2679 | PairValue::PairValue() |
2680 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2681 | SharedCtor(); |
2682 | // @@protoc_insertion_point(constructor:tensorflow.PairValue) |
2683 | } |
2684 | PairValue::PairValue(const PairValue& from) |
2685 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2686 | _internal_metadata_(nullptr) { |
2687 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2688 | key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2689 | if (!from.key().empty()) { |
2690 | key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_); |
2691 | } |
2692 | if (from.has_value()) { |
2693 | value_ = new ::tensorflow::StructuredValue(*from.value_); |
2694 | } else { |
2695 | value_ = nullptr; |
2696 | } |
2697 | // @@protoc_insertion_point(copy_constructor:tensorflow.PairValue) |
2698 | } |
2699 | |
2700 | void PairValue::SharedCtor() { |
2701 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
2702 | key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2703 | value_ = nullptr; |
2704 | } |
2705 | |
2706 | PairValue::~PairValue() { |
2707 | // @@protoc_insertion_point(destructor:tensorflow.PairValue) |
2708 | SharedDtor(); |
2709 | } |
2710 | |
2711 | void PairValue::SharedDtor() { |
2712 | key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2713 | if (this != internal_default_instance()) delete value_; |
2714 | } |
2715 | |
2716 | void PairValue::SetCachedSize(int size) const { |
2717 | _cached_size_.Set(size); |
2718 | } |
2719 | const PairValue& PairValue::default_instance() { |
2720 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
2721 | return *internal_default_instance(); |
2722 | } |
2723 | |
2724 | |
2725 | void PairValue::Clear() { |
2726 | // @@protoc_insertion_point(message_clear_start:tensorflow.PairValue) |
2727 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2728 | // Prevent compiler warnings about cached_has_bits being unused |
2729 | (void) cached_has_bits; |
2730 | |
2731 | key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2732 | if (GetArenaNoVirtual() == nullptr && value_ != nullptr) { |
2733 | delete value_; |
2734 | } |
2735 | value_ = nullptr; |
2736 | _internal_metadata_.Clear(); |
2737 | } |
2738 | |
2739 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2740 | const char* PairValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2741 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2742 | while (!ctx->Done(&ptr)) { |
2743 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2744 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2745 | CHK_(ptr); |
2746 | switch (tag >> 3) { |
2747 | // string key = 1; |
2748 | case 1: |
2749 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
2750 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_key(), ptr, ctx, "tensorflow.PairValue.key" ); |
2751 | CHK_(ptr); |
2752 | } else goto handle_unusual; |
2753 | continue; |
2754 | // .tensorflow.StructuredValue value = 2; |
2755 | case 2: |
2756 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
2757 | ptr = ctx->ParseMessage(mutable_value(), ptr); |
2758 | CHK_(ptr); |
2759 | } else goto handle_unusual; |
2760 | continue; |
2761 | default: { |
2762 | handle_unusual: |
2763 | if ((tag & 7) == 4 || tag == 0) { |
2764 | ctx->SetLastTag(tag); |
2765 | goto success; |
2766 | } |
2767 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2768 | CHK_(ptr != nullptr); |
2769 | continue; |
2770 | } |
2771 | } // switch |
2772 | } // while |
2773 | success: |
2774 | return ptr; |
2775 | failure: |
2776 | ptr = nullptr; |
2777 | goto success; |
2778 | #undef CHK_ |
2779 | } |
2780 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2781 | bool PairValue::MergePartialFromCodedStream( |
2782 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2783 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2784 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2785 | // @@protoc_insertion_point(parse_start:tensorflow.PairValue) |
2786 | for (;;) { |
2787 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2788 | tag = p.first; |
2789 | if (!p.second) goto handle_unusual; |
2790 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2791 | // string key = 1; |
2792 | case 1: { |
2793 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
2794 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
2795 | input, this->mutable_key())); |
2796 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2797 | this->key().data(), static_cast<int>(this->key().length()), |
2798 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2799 | "tensorflow.PairValue.key" )); |
2800 | } else { |
2801 | goto handle_unusual; |
2802 | } |
2803 | break; |
2804 | } |
2805 | |
2806 | // .tensorflow.StructuredValue value = 2; |
2807 | case 2: { |
2808 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
2809 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
2810 | input, mutable_value())); |
2811 | } else { |
2812 | goto handle_unusual; |
2813 | } |
2814 | break; |
2815 | } |
2816 | |
2817 | default: { |
2818 | handle_unusual: |
2819 | if (tag == 0) { |
2820 | goto success; |
2821 | } |
2822 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2823 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2824 | break; |
2825 | } |
2826 | } |
2827 | } |
2828 | success: |
2829 | // @@protoc_insertion_point(parse_success:tensorflow.PairValue) |
2830 | return true; |
2831 | failure: |
2832 | // @@protoc_insertion_point(parse_failure:tensorflow.PairValue) |
2833 | return false; |
2834 | #undef DO_ |
2835 | } |
2836 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2837 | |
2838 | void PairValue::SerializeWithCachedSizes( |
2839 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2840 | // @@protoc_insertion_point(serialize_start:tensorflow.PairValue) |
2841 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2842 | (void) cached_has_bits; |
2843 | |
2844 | // string key = 1; |
2845 | if (this->key().size() > 0) { |
2846 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2847 | this->key().data(), static_cast<int>(this->key().length()), |
2848 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2849 | "tensorflow.PairValue.key" ); |
2850 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
2851 | 1, this->key(), output); |
2852 | } |
2853 | |
2854 | // .tensorflow.StructuredValue value = 2; |
2855 | if (this->has_value()) { |
2856 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2857 | 2, _Internal::value(this), output); |
2858 | } |
2859 | |
2860 | if (_internal_metadata_.have_unknown_fields()) { |
2861 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2862 | _internal_metadata_.unknown_fields(), output); |
2863 | } |
2864 | // @@protoc_insertion_point(serialize_end:tensorflow.PairValue) |
2865 | } |
2866 | |
2867 | ::PROTOBUF_NAMESPACE_ID::uint8* PairValue::InternalSerializeWithCachedSizesToArray( |
2868 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2869 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.PairValue) |
2870 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2871 | (void) cached_has_bits; |
2872 | |
2873 | // string key = 1; |
2874 | if (this->key().size() > 0) { |
2875 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2876 | this->key().data(), static_cast<int>(this->key().length()), |
2877 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2878 | "tensorflow.PairValue.key" ); |
2879 | target = |
2880 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2881 | 1, this->key(), target); |
2882 | } |
2883 | |
2884 | // .tensorflow.StructuredValue value = 2; |
2885 | if (this->has_value()) { |
2886 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2887 | InternalWriteMessageToArray( |
2888 | 2, _Internal::value(this), target); |
2889 | } |
2890 | |
2891 | if (_internal_metadata_.have_unknown_fields()) { |
2892 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2893 | _internal_metadata_.unknown_fields(), target); |
2894 | } |
2895 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.PairValue) |
2896 | return target; |
2897 | } |
2898 | |
2899 | size_t PairValue::ByteSizeLong() const { |
2900 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.PairValue) |
2901 | size_t total_size = 0; |
2902 | |
2903 | if (_internal_metadata_.have_unknown_fields()) { |
2904 | total_size += |
2905 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2906 | _internal_metadata_.unknown_fields()); |
2907 | } |
2908 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2909 | // Prevent compiler warnings about cached_has_bits being unused |
2910 | (void) cached_has_bits; |
2911 | |
2912 | // string key = 1; |
2913 | if (this->key().size() > 0) { |
2914 | total_size += 1 + |
2915 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2916 | this->key()); |
2917 | } |
2918 | |
2919 | // .tensorflow.StructuredValue value = 2; |
2920 | if (this->has_value()) { |
2921 | total_size += 1 + |
2922 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2923 | *value_); |
2924 | } |
2925 | |
2926 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2927 | SetCachedSize(cached_size); |
2928 | return total_size; |
2929 | } |
2930 | |
2931 | void PairValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2932 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.PairValue) |
2933 | GOOGLE_DCHECK_NE(&from, this); |
2934 | const PairValue* source = |
2935 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<PairValue>( |
2936 | &from); |
2937 | if (source == nullptr) { |
2938 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.PairValue) |
2939 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2940 | } else { |
2941 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.PairValue) |
2942 | MergeFrom(*source); |
2943 | } |
2944 | } |
2945 | |
2946 | void PairValue::MergeFrom(const PairValue& from) { |
2947 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.PairValue) |
2948 | GOOGLE_DCHECK_NE(&from, this); |
2949 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2950 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2951 | (void) cached_has_bits; |
2952 | |
2953 | if (from.key().size() > 0) { |
2954 | |
2955 | key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_); |
2956 | } |
2957 | if (from.has_value()) { |
2958 | mutable_value()->::tensorflow::StructuredValue::MergeFrom(from.value()); |
2959 | } |
2960 | } |
2961 | |
2962 | void PairValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2963 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.PairValue) |
2964 | if (&from == this) return; |
2965 | Clear(); |
2966 | MergeFrom(from); |
2967 | } |
2968 | |
2969 | void PairValue::CopyFrom(const PairValue& from) { |
2970 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.PairValue) |
2971 | if (&from == this) return; |
2972 | Clear(); |
2973 | MergeFrom(from); |
2974 | } |
2975 | |
2976 | bool PairValue::IsInitialized() const { |
2977 | return true; |
2978 | } |
2979 | |
2980 | void PairValue::InternalSwap(PairValue* other) { |
2981 | using std::swap; |
2982 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2983 | key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2984 | GetArenaNoVirtual()); |
2985 | swap(value_, other->value_); |
2986 | } |
2987 | |
2988 | ::PROTOBUF_NAMESPACE_ID::Metadata PairValue::GetMetadata() const { |
2989 | return GetMetadataStatic(); |
2990 | } |
2991 | |
2992 | |
2993 | // =================================================================== |
2994 | |
2995 | void NamedTupleValue::InitAsDefaultInstance() { |
2996 | } |
2997 | class NamedTupleValue::_Internal { |
2998 | public: |
2999 | }; |
3000 | |
3001 | NamedTupleValue::NamedTupleValue() |
3002 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3003 | SharedCtor(); |
3004 | // @@protoc_insertion_point(constructor:tensorflow.NamedTupleValue) |
3005 | } |
3006 | NamedTupleValue::NamedTupleValue(const NamedTupleValue& from) |
3007 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3008 | _internal_metadata_(nullptr), |
3009 | values_(from.values_) { |
3010 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3011 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3012 | if (!from.name().empty()) { |
3013 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
3014 | } |
3015 | // @@protoc_insertion_point(copy_constructor:tensorflow.NamedTupleValue) |
3016 | } |
3017 | |
3018 | void NamedTupleValue::SharedCtor() { |
3019 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
3020 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3021 | } |
3022 | |
3023 | NamedTupleValue::~NamedTupleValue() { |
3024 | // @@protoc_insertion_point(destructor:tensorflow.NamedTupleValue) |
3025 | SharedDtor(); |
3026 | } |
3027 | |
3028 | void NamedTupleValue::SharedDtor() { |
3029 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3030 | } |
3031 | |
3032 | void NamedTupleValue::SetCachedSize(int size) const { |
3033 | _cached_size_.Set(size); |
3034 | } |
3035 | const NamedTupleValue& NamedTupleValue::default_instance() { |
3036 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
3037 | return *internal_default_instance(); |
3038 | } |
3039 | |
3040 | |
3041 | void NamedTupleValue::Clear() { |
3042 | // @@protoc_insertion_point(message_clear_start:tensorflow.NamedTupleValue) |
3043 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3044 | // Prevent compiler warnings about cached_has_bits being unused |
3045 | (void) cached_has_bits; |
3046 | |
3047 | values_.Clear(); |
3048 | name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3049 | _internal_metadata_.Clear(); |
3050 | } |
3051 | |
3052 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3053 | const char* NamedTupleValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3054 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3055 | while (!ctx->Done(&ptr)) { |
3056 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3057 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3058 | CHK_(ptr); |
3059 | switch (tag >> 3) { |
3060 | // string name = 1; |
3061 | case 1: |
3062 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3063 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.NamedTupleValue.name" ); |
3064 | CHK_(ptr); |
3065 | } else goto handle_unusual; |
3066 | continue; |
3067 | // repeated .tensorflow.PairValue values = 2; |
3068 | case 2: |
3069 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3070 | ptr -= 1; |
3071 | do { |
3072 | ptr += 1; |
3073 | ptr = ctx->ParseMessage(add_values(), ptr); |
3074 | CHK_(ptr); |
3075 | if (!ctx->DataAvailable(ptr)) break; |
3076 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
3077 | } else goto handle_unusual; |
3078 | continue; |
3079 | default: { |
3080 | handle_unusual: |
3081 | if ((tag & 7) == 4 || tag == 0) { |
3082 | ctx->SetLastTag(tag); |
3083 | goto success; |
3084 | } |
3085 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3086 | CHK_(ptr != nullptr); |
3087 | continue; |
3088 | } |
3089 | } // switch |
3090 | } // while |
3091 | success: |
3092 | return ptr; |
3093 | failure: |
3094 | ptr = nullptr; |
3095 | goto success; |
3096 | #undef CHK_ |
3097 | } |
3098 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3099 | bool NamedTupleValue::MergePartialFromCodedStream( |
3100 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3101 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3102 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3103 | // @@protoc_insertion_point(parse_start:tensorflow.NamedTupleValue) |
3104 | for (;;) { |
3105 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3106 | tag = p.first; |
3107 | if (!p.second) goto handle_unusual; |
3108 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3109 | // string name = 1; |
3110 | case 1: { |
3111 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3112 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3113 | input, this->mutable_name())); |
3114 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3115 | this->name().data(), static_cast<int>(this->name().length()), |
3116 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3117 | "tensorflow.NamedTupleValue.name" )); |
3118 | } else { |
3119 | goto handle_unusual; |
3120 | } |
3121 | break; |
3122 | } |
3123 | |
3124 | // repeated .tensorflow.PairValue values = 2; |
3125 | case 2: { |
3126 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3127 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3128 | input, add_values())); |
3129 | } else { |
3130 | goto handle_unusual; |
3131 | } |
3132 | break; |
3133 | } |
3134 | |
3135 | default: { |
3136 | handle_unusual: |
3137 | if (tag == 0) { |
3138 | goto success; |
3139 | } |
3140 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3141 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3142 | break; |
3143 | } |
3144 | } |
3145 | } |
3146 | success: |
3147 | // @@protoc_insertion_point(parse_success:tensorflow.NamedTupleValue) |
3148 | return true; |
3149 | failure: |
3150 | // @@protoc_insertion_point(parse_failure:tensorflow.NamedTupleValue) |
3151 | return false; |
3152 | #undef DO_ |
3153 | } |
3154 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3155 | |
3156 | void NamedTupleValue::SerializeWithCachedSizes( |
3157 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3158 | // @@protoc_insertion_point(serialize_start:tensorflow.NamedTupleValue) |
3159 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3160 | (void) cached_has_bits; |
3161 | |
3162 | // string name = 1; |
3163 | if (this->name().size() > 0) { |
3164 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3165 | this->name().data(), static_cast<int>(this->name().length()), |
3166 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3167 | "tensorflow.NamedTupleValue.name" ); |
3168 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3169 | 1, this->name(), output); |
3170 | } |
3171 | |
3172 | // repeated .tensorflow.PairValue values = 2; |
3173 | for (unsigned int i = 0, |
3174 | n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
3175 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3176 | 2, |
3177 | this->values(static_cast<int>(i)), |
3178 | output); |
3179 | } |
3180 | |
3181 | if (_internal_metadata_.have_unknown_fields()) { |
3182 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3183 | _internal_metadata_.unknown_fields(), output); |
3184 | } |
3185 | // @@protoc_insertion_point(serialize_end:tensorflow.NamedTupleValue) |
3186 | } |
3187 | |
3188 | ::PROTOBUF_NAMESPACE_ID::uint8* NamedTupleValue::InternalSerializeWithCachedSizesToArray( |
3189 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3190 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NamedTupleValue) |
3191 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3192 | (void) cached_has_bits; |
3193 | |
3194 | // string name = 1; |
3195 | if (this->name().size() > 0) { |
3196 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3197 | this->name().data(), static_cast<int>(this->name().length()), |
3198 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3199 | "tensorflow.NamedTupleValue.name" ); |
3200 | target = |
3201 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
3202 | 1, this->name(), target); |
3203 | } |
3204 | |
3205 | // repeated .tensorflow.PairValue values = 2; |
3206 | for (unsigned int i = 0, |
3207 | n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
3208 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3209 | InternalWriteMessageToArray( |
3210 | 2, this->values(static_cast<int>(i)), target); |
3211 | } |
3212 | |
3213 | if (_internal_metadata_.have_unknown_fields()) { |
3214 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3215 | _internal_metadata_.unknown_fields(), target); |
3216 | } |
3217 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NamedTupleValue) |
3218 | return target; |
3219 | } |
3220 | |
3221 | size_t NamedTupleValue::ByteSizeLong() const { |
3222 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.NamedTupleValue) |
3223 | size_t total_size = 0; |
3224 | |
3225 | if (_internal_metadata_.have_unknown_fields()) { |
3226 | total_size += |
3227 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3228 | _internal_metadata_.unknown_fields()); |
3229 | } |
3230 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3231 | // Prevent compiler warnings about cached_has_bits being unused |
3232 | (void) cached_has_bits; |
3233 | |
3234 | // repeated .tensorflow.PairValue values = 2; |
3235 | { |
3236 | unsigned int count = static_cast<unsigned int>(this->values_size()); |
3237 | total_size += 1UL * count; |
3238 | for (unsigned int i = 0; i < count; i++) { |
3239 | total_size += |
3240 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3241 | this->values(static_cast<int>(i))); |
3242 | } |
3243 | } |
3244 | |
3245 | // string name = 1; |
3246 | if (this->name().size() > 0) { |
3247 | total_size += 1 + |
3248 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3249 | this->name()); |
3250 | } |
3251 | |
3252 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3253 | SetCachedSize(cached_size); |
3254 | return total_size; |
3255 | } |
3256 | |
3257 | void NamedTupleValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3258 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NamedTupleValue) |
3259 | GOOGLE_DCHECK_NE(&from, this); |
3260 | const NamedTupleValue* source = |
3261 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NamedTupleValue>( |
3262 | &from); |
3263 | if (source == nullptr) { |
3264 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NamedTupleValue) |
3265 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3266 | } else { |
3267 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NamedTupleValue) |
3268 | MergeFrom(*source); |
3269 | } |
3270 | } |
3271 | |
3272 | void NamedTupleValue::MergeFrom(const NamedTupleValue& from) { |
3273 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NamedTupleValue) |
3274 | GOOGLE_DCHECK_NE(&from, this); |
3275 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3276 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3277 | (void) cached_has_bits; |
3278 | |
3279 | values_.MergeFrom(from.values_); |
3280 | if (from.name().size() > 0) { |
3281 | |
3282 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
3283 | } |
3284 | } |
3285 | |
3286 | void NamedTupleValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3287 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NamedTupleValue) |
3288 | if (&from == this) return; |
3289 | Clear(); |
3290 | MergeFrom(from); |
3291 | } |
3292 | |
3293 | void NamedTupleValue::CopyFrom(const NamedTupleValue& from) { |
3294 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NamedTupleValue) |
3295 | if (&from == this) return; |
3296 | Clear(); |
3297 | MergeFrom(from); |
3298 | } |
3299 | |
3300 | bool NamedTupleValue::IsInitialized() const { |
3301 | return true; |
3302 | } |
3303 | |
3304 | void NamedTupleValue::InternalSwap(NamedTupleValue* other) { |
3305 | using std::swap; |
3306 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3307 | CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); |
3308 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3309 | GetArenaNoVirtual()); |
3310 | } |
3311 | |
3312 | ::PROTOBUF_NAMESPACE_ID::Metadata NamedTupleValue::GetMetadata() const { |
3313 | return GetMetadataStatic(); |
3314 | } |
3315 | |
3316 | |
3317 | // =================================================================== |
3318 | |
3319 | void TensorSpecProto::InitAsDefaultInstance() { |
3320 | ::tensorflow::_TensorSpecProto_default_instance_._instance.get_mutable()->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( |
3321 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
3322 | } |
3323 | class TensorSpecProto::_Internal { |
3324 | public: |
3325 | static const ::tensorflow::TensorShapeProto& shape(const TensorSpecProto* msg); |
3326 | }; |
3327 | |
3328 | const ::tensorflow::TensorShapeProto& |
3329 | TensorSpecProto::_Internal::shape(const TensorSpecProto* msg) { |
3330 | return *msg->shape_; |
3331 | } |
3332 | void TensorSpecProto::clear_shape() { |
3333 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
3334 | delete shape_; |
3335 | } |
3336 | shape_ = nullptr; |
3337 | } |
3338 | TensorSpecProto::TensorSpecProto() |
3339 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3340 | SharedCtor(); |
3341 | // @@protoc_insertion_point(constructor:tensorflow.TensorSpecProto) |
3342 | } |
3343 | TensorSpecProto::TensorSpecProto(const TensorSpecProto& from) |
3344 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3345 | _internal_metadata_(nullptr) { |
3346 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3347 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3348 | if (!from.name().empty()) { |
3349 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
3350 | } |
3351 | if (from.has_shape()) { |
3352 | shape_ = new ::tensorflow::TensorShapeProto(*from.shape_); |
3353 | } else { |
3354 | shape_ = nullptr; |
3355 | } |
3356 | dtype_ = from.dtype_; |
3357 | // @@protoc_insertion_point(copy_constructor:tensorflow.TensorSpecProto) |
3358 | } |
3359 | |
3360 | void TensorSpecProto::SharedCtor() { |
3361 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
3362 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3363 | ::memset(&shape_, 0, static_cast<size_t>( |
3364 | reinterpret_cast<char*>(&dtype_) - |
3365 | reinterpret_cast<char*>(&shape_)) + sizeof(dtype_)); |
3366 | } |
3367 | |
3368 | TensorSpecProto::~TensorSpecProto() { |
3369 | // @@protoc_insertion_point(destructor:tensorflow.TensorSpecProto) |
3370 | SharedDtor(); |
3371 | } |
3372 | |
3373 | void TensorSpecProto::SharedDtor() { |
3374 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3375 | if (this != internal_default_instance()) delete shape_; |
3376 | } |
3377 | |
3378 | void TensorSpecProto::SetCachedSize(int size) const { |
3379 | _cached_size_.Set(size); |
3380 | } |
3381 | const TensorSpecProto& TensorSpecProto::default_instance() { |
3382 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
3383 | return *internal_default_instance(); |
3384 | } |
3385 | |
3386 | |
3387 | void TensorSpecProto::Clear() { |
3388 | // @@protoc_insertion_point(message_clear_start:tensorflow.TensorSpecProto) |
3389 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3390 | // Prevent compiler warnings about cached_has_bits being unused |
3391 | (void) cached_has_bits; |
3392 | |
3393 | name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3394 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
3395 | delete shape_; |
3396 | } |
3397 | shape_ = nullptr; |
3398 | dtype_ = 0; |
3399 | _internal_metadata_.Clear(); |
3400 | } |
3401 | |
3402 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3403 | const char* TensorSpecProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3404 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3405 | while (!ctx->Done(&ptr)) { |
3406 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3407 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3408 | CHK_(ptr); |
3409 | switch (tag >> 3) { |
3410 | // string name = 1; |
3411 | case 1: |
3412 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3413 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.TensorSpecProto.name" ); |
3414 | CHK_(ptr); |
3415 | } else goto handle_unusual; |
3416 | continue; |
3417 | // .tensorflow.TensorShapeProto shape = 2; |
3418 | case 2: |
3419 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3420 | ptr = ctx->ParseMessage(mutable_shape(), ptr); |
3421 | CHK_(ptr); |
3422 | } else goto handle_unusual; |
3423 | continue; |
3424 | // .tensorflow.DataType dtype = 3; |
3425 | case 3: |
3426 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
3427 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3428 | CHK_(ptr); |
3429 | set_dtype(static_cast<::tensorflow::DataType>(val)); |
3430 | } else goto handle_unusual; |
3431 | continue; |
3432 | default: { |
3433 | handle_unusual: |
3434 | if ((tag & 7) == 4 || tag == 0) { |
3435 | ctx->SetLastTag(tag); |
3436 | goto success; |
3437 | } |
3438 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3439 | CHK_(ptr != nullptr); |
3440 | continue; |
3441 | } |
3442 | } // switch |
3443 | } // while |
3444 | success: |
3445 | return ptr; |
3446 | failure: |
3447 | ptr = nullptr; |
3448 | goto success; |
3449 | #undef CHK_ |
3450 | } |
3451 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3452 | bool TensorSpecProto::MergePartialFromCodedStream( |
3453 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3454 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3455 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3456 | // @@protoc_insertion_point(parse_start:tensorflow.TensorSpecProto) |
3457 | for (;;) { |
3458 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3459 | tag = p.first; |
3460 | if (!p.second) goto handle_unusual; |
3461 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3462 | // string name = 1; |
3463 | case 1: { |
3464 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3465 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3466 | input, this->mutable_name())); |
3467 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3468 | this->name().data(), static_cast<int>(this->name().length()), |
3469 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3470 | "tensorflow.TensorSpecProto.name" )); |
3471 | } else { |
3472 | goto handle_unusual; |
3473 | } |
3474 | break; |
3475 | } |
3476 | |
3477 | // .tensorflow.TensorShapeProto shape = 2; |
3478 | case 2: { |
3479 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3480 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3481 | input, mutable_shape())); |
3482 | } else { |
3483 | goto handle_unusual; |
3484 | } |
3485 | break; |
3486 | } |
3487 | |
3488 | // .tensorflow.DataType dtype = 3; |
3489 | case 3: { |
3490 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
3491 | int value = 0; |
3492 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3493 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
3494 | input, &value))); |
3495 | set_dtype(static_cast< ::tensorflow::DataType >(value)); |
3496 | } else { |
3497 | goto handle_unusual; |
3498 | } |
3499 | break; |
3500 | } |
3501 | |
3502 | default: { |
3503 | handle_unusual: |
3504 | if (tag == 0) { |
3505 | goto success; |
3506 | } |
3507 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3508 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3509 | break; |
3510 | } |
3511 | } |
3512 | } |
3513 | success: |
3514 | // @@protoc_insertion_point(parse_success:tensorflow.TensorSpecProto) |
3515 | return true; |
3516 | failure: |
3517 | // @@protoc_insertion_point(parse_failure:tensorflow.TensorSpecProto) |
3518 | return false; |
3519 | #undef DO_ |
3520 | } |
3521 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3522 | |
3523 | void TensorSpecProto::SerializeWithCachedSizes( |
3524 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3525 | // @@protoc_insertion_point(serialize_start:tensorflow.TensorSpecProto) |
3526 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3527 | (void) cached_has_bits; |
3528 | |
3529 | // string name = 1; |
3530 | if (this->name().size() > 0) { |
3531 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3532 | this->name().data(), static_cast<int>(this->name().length()), |
3533 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3534 | "tensorflow.TensorSpecProto.name" ); |
3535 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3536 | 1, this->name(), output); |
3537 | } |
3538 | |
3539 | // .tensorflow.TensorShapeProto shape = 2; |
3540 | if (this->has_shape()) { |
3541 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3542 | 2, _Internal::shape(this), output); |
3543 | } |
3544 | |
3545 | // .tensorflow.DataType dtype = 3; |
3546 | if (this->dtype() != 0) { |
3547 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
3548 | 3, this->dtype(), output); |
3549 | } |
3550 | |
3551 | if (_internal_metadata_.have_unknown_fields()) { |
3552 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3553 | _internal_metadata_.unknown_fields(), output); |
3554 | } |
3555 | // @@protoc_insertion_point(serialize_end:tensorflow.TensorSpecProto) |
3556 | } |
3557 | |
3558 | ::PROTOBUF_NAMESPACE_ID::uint8* TensorSpecProto::InternalSerializeWithCachedSizesToArray( |
3559 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3560 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorSpecProto) |
3561 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3562 | (void) cached_has_bits; |
3563 | |
3564 | // string name = 1; |
3565 | if (this->name().size() > 0) { |
3566 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3567 | this->name().data(), static_cast<int>(this->name().length()), |
3568 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3569 | "tensorflow.TensorSpecProto.name" ); |
3570 | target = |
3571 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
3572 | 1, this->name(), target); |
3573 | } |
3574 | |
3575 | // .tensorflow.TensorShapeProto shape = 2; |
3576 | if (this->has_shape()) { |
3577 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3578 | InternalWriteMessageToArray( |
3579 | 2, _Internal::shape(this), target); |
3580 | } |
3581 | |
3582 | // .tensorflow.DataType dtype = 3; |
3583 | if (this->dtype() != 0) { |
3584 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
3585 | 3, this->dtype(), target); |
3586 | } |
3587 | |
3588 | if (_internal_metadata_.have_unknown_fields()) { |
3589 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3590 | _internal_metadata_.unknown_fields(), target); |
3591 | } |
3592 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorSpecProto) |
3593 | return target; |
3594 | } |
3595 | |
3596 | size_t TensorSpecProto::ByteSizeLong() const { |
3597 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorSpecProto) |
3598 | size_t total_size = 0; |
3599 | |
3600 | if (_internal_metadata_.have_unknown_fields()) { |
3601 | total_size += |
3602 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3603 | _internal_metadata_.unknown_fields()); |
3604 | } |
3605 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3606 | // Prevent compiler warnings about cached_has_bits being unused |
3607 | (void) cached_has_bits; |
3608 | |
3609 | // string name = 1; |
3610 | if (this->name().size() > 0) { |
3611 | total_size += 1 + |
3612 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3613 | this->name()); |
3614 | } |
3615 | |
3616 | // .tensorflow.TensorShapeProto shape = 2; |
3617 | if (this->has_shape()) { |
3618 | total_size += 1 + |
3619 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3620 | *shape_); |
3621 | } |
3622 | |
3623 | // .tensorflow.DataType dtype = 3; |
3624 | if (this->dtype() != 0) { |
3625 | total_size += 1 + |
3626 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->dtype()); |
3627 | } |
3628 | |
3629 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3630 | SetCachedSize(cached_size); |
3631 | return total_size; |
3632 | } |
3633 | |
3634 | void TensorSpecProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3635 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorSpecProto) |
3636 | GOOGLE_DCHECK_NE(&from, this); |
3637 | const TensorSpecProto* source = |
3638 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TensorSpecProto>( |
3639 | &from); |
3640 | if (source == nullptr) { |
3641 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorSpecProto) |
3642 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3643 | } else { |
3644 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorSpecProto) |
3645 | MergeFrom(*source); |
3646 | } |
3647 | } |
3648 | |
3649 | void TensorSpecProto::MergeFrom(const TensorSpecProto& from) { |
3650 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorSpecProto) |
3651 | GOOGLE_DCHECK_NE(&from, this); |
3652 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3653 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3654 | (void) cached_has_bits; |
3655 | |
3656 | if (from.name().size() > 0) { |
3657 | |
3658 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
3659 | } |
3660 | if (from.has_shape()) { |
3661 | mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); |
3662 | } |
3663 | if (from.dtype() != 0) { |
3664 | set_dtype(from.dtype()); |
3665 | } |
3666 | } |
3667 | |
3668 | void TensorSpecProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3669 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorSpecProto) |
3670 | if (&from == this) return; |
3671 | Clear(); |
3672 | MergeFrom(from); |
3673 | } |
3674 | |
3675 | void TensorSpecProto::CopyFrom(const TensorSpecProto& from) { |
3676 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorSpecProto) |
3677 | if (&from == this) return; |
3678 | Clear(); |
3679 | MergeFrom(from); |
3680 | } |
3681 | |
3682 | bool TensorSpecProto::IsInitialized() const { |
3683 | return true; |
3684 | } |
3685 | |
3686 | void TensorSpecProto::InternalSwap(TensorSpecProto* other) { |
3687 | using std::swap; |
3688 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3689 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3690 | GetArenaNoVirtual()); |
3691 | swap(shape_, other->shape_); |
3692 | swap(dtype_, other->dtype_); |
3693 | } |
3694 | |
3695 | ::PROTOBUF_NAMESPACE_ID::Metadata TensorSpecProto::GetMetadata() const { |
3696 | return GetMetadataStatic(); |
3697 | } |
3698 | |
3699 | |
3700 | // =================================================================== |
3701 | |
3702 | void BoundedTensorSpecProto::InitAsDefaultInstance() { |
3703 | ::tensorflow::_BoundedTensorSpecProto_default_instance_._instance.get_mutable()->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( |
3704 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
3705 | ::tensorflow::_BoundedTensorSpecProto_default_instance_._instance.get_mutable()->minimum_ = const_cast< ::tensorflow::TensorProto*>( |
3706 | ::tensorflow::TensorProto::internal_default_instance()); |
3707 | ::tensorflow::_BoundedTensorSpecProto_default_instance_._instance.get_mutable()->maximum_ = const_cast< ::tensorflow::TensorProto*>( |
3708 | ::tensorflow::TensorProto::internal_default_instance()); |
3709 | } |
3710 | class BoundedTensorSpecProto::_Internal { |
3711 | public: |
3712 | static const ::tensorflow::TensorShapeProto& shape(const BoundedTensorSpecProto* msg); |
3713 | static const ::tensorflow::TensorProto& minimum(const BoundedTensorSpecProto* msg); |
3714 | static const ::tensorflow::TensorProto& maximum(const BoundedTensorSpecProto* msg); |
3715 | }; |
3716 | |
3717 | const ::tensorflow::TensorShapeProto& |
3718 | BoundedTensorSpecProto::_Internal::shape(const BoundedTensorSpecProto* msg) { |
3719 | return *msg->shape_; |
3720 | } |
3721 | const ::tensorflow::TensorProto& |
3722 | BoundedTensorSpecProto::_Internal::minimum(const BoundedTensorSpecProto* msg) { |
3723 | return *msg->minimum_; |
3724 | } |
3725 | const ::tensorflow::TensorProto& |
3726 | BoundedTensorSpecProto::_Internal::maximum(const BoundedTensorSpecProto* msg) { |
3727 | return *msg->maximum_; |
3728 | } |
3729 | void BoundedTensorSpecProto::clear_shape() { |
3730 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
3731 | delete shape_; |
3732 | } |
3733 | shape_ = nullptr; |
3734 | } |
3735 | void BoundedTensorSpecProto::clear_minimum() { |
3736 | if (GetArenaNoVirtual() == nullptr && minimum_ != nullptr) { |
3737 | delete minimum_; |
3738 | } |
3739 | minimum_ = nullptr; |
3740 | } |
3741 | void BoundedTensorSpecProto::clear_maximum() { |
3742 | if (GetArenaNoVirtual() == nullptr && maximum_ != nullptr) { |
3743 | delete maximum_; |
3744 | } |
3745 | maximum_ = nullptr; |
3746 | } |
3747 | BoundedTensorSpecProto::BoundedTensorSpecProto() |
3748 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3749 | SharedCtor(); |
3750 | // @@protoc_insertion_point(constructor:tensorflow.BoundedTensorSpecProto) |
3751 | } |
3752 | BoundedTensorSpecProto::BoundedTensorSpecProto(const BoundedTensorSpecProto& from) |
3753 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3754 | _internal_metadata_(nullptr) { |
3755 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3756 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3757 | if (!from.name().empty()) { |
3758 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
3759 | } |
3760 | if (from.has_shape()) { |
3761 | shape_ = new ::tensorflow::TensorShapeProto(*from.shape_); |
3762 | } else { |
3763 | shape_ = nullptr; |
3764 | } |
3765 | if (from.has_minimum()) { |
3766 | minimum_ = new ::tensorflow::TensorProto(*from.minimum_); |
3767 | } else { |
3768 | minimum_ = nullptr; |
3769 | } |
3770 | if (from.has_maximum()) { |
3771 | maximum_ = new ::tensorflow::TensorProto(*from.maximum_); |
3772 | } else { |
3773 | maximum_ = nullptr; |
3774 | } |
3775 | dtype_ = from.dtype_; |
3776 | // @@protoc_insertion_point(copy_constructor:tensorflow.BoundedTensorSpecProto) |
3777 | } |
3778 | |
3779 | void BoundedTensorSpecProto::SharedCtor() { |
3780 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
3781 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3782 | ::memset(&shape_, 0, static_cast<size_t>( |
3783 | reinterpret_cast<char*>(&dtype_) - |
3784 | reinterpret_cast<char*>(&shape_)) + sizeof(dtype_)); |
3785 | } |
3786 | |
3787 | BoundedTensorSpecProto::~BoundedTensorSpecProto() { |
3788 | // @@protoc_insertion_point(destructor:tensorflow.BoundedTensorSpecProto) |
3789 | SharedDtor(); |
3790 | } |
3791 | |
3792 | void BoundedTensorSpecProto::SharedDtor() { |
3793 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3794 | if (this != internal_default_instance()) delete shape_; |
3795 | if (this != internal_default_instance()) delete minimum_; |
3796 | if (this != internal_default_instance()) delete maximum_; |
3797 | } |
3798 | |
3799 | void BoundedTensorSpecProto::SetCachedSize(int size) const { |
3800 | _cached_size_.Set(size); |
3801 | } |
3802 | const BoundedTensorSpecProto& BoundedTensorSpecProto::default_instance() { |
3803 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BoundedTensorSpecProto_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
3804 | return *internal_default_instance(); |
3805 | } |
3806 | |
3807 | |
3808 | void BoundedTensorSpecProto::Clear() { |
3809 | // @@protoc_insertion_point(message_clear_start:tensorflow.BoundedTensorSpecProto) |
3810 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3811 | // Prevent compiler warnings about cached_has_bits being unused |
3812 | (void) cached_has_bits; |
3813 | |
3814 | name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3815 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
3816 | delete shape_; |
3817 | } |
3818 | shape_ = nullptr; |
3819 | if (GetArenaNoVirtual() == nullptr && minimum_ != nullptr) { |
3820 | delete minimum_; |
3821 | } |
3822 | minimum_ = nullptr; |
3823 | if (GetArenaNoVirtual() == nullptr && maximum_ != nullptr) { |
3824 | delete maximum_; |
3825 | } |
3826 | maximum_ = nullptr; |
3827 | dtype_ = 0; |
3828 | _internal_metadata_.Clear(); |
3829 | } |
3830 | |
3831 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3832 | const char* BoundedTensorSpecProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3833 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3834 | while (!ctx->Done(&ptr)) { |
3835 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3836 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3837 | CHK_(ptr); |
3838 | switch (tag >> 3) { |
3839 | // string name = 1; |
3840 | case 1: |
3841 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3842 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.BoundedTensorSpecProto.name" ); |
3843 | CHK_(ptr); |
3844 | } else goto handle_unusual; |
3845 | continue; |
3846 | // .tensorflow.TensorShapeProto shape = 2; |
3847 | case 2: |
3848 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3849 | ptr = ctx->ParseMessage(mutable_shape(), ptr); |
3850 | CHK_(ptr); |
3851 | } else goto handle_unusual; |
3852 | continue; |
3853 | // .tensorflow.DataType dtype = 3; |
3854 | case 3: |
3855 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
3856 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3857 | CHK_(ptr); |
3858 | set_dtype(static_cast<::tensorflow::DataType>(val)); |
3859 | } else goto handle_unusual; |
3860 | continue; |
3861 | // .tensorflow.TensorProto minimum = 4; |
3862 | case 4: |
3863 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
3864 | ptr = ctx->ParseMessage(mutable_minimum(), ptr); |
3865 | CHK_(ptr); |
3866 | } else goto handle_unusual; |
3867 | continue; |
3868 | // .tensorflow.TensorProto maximum = 5; |
3869 | case 5: |
3870 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
3871 | ptr = ctx->ParseMessage(mutable_maximum(), ptr); |
3872 | CHK_(ptr); |
3873 | } else goto handle_unusual; |
3874 | continue; |
3875 | default: { |
3876 | handle_unusual: |
3877 | if ((tag & 7) == 4 || tag == 0) { |
3878 | ctx->SetLastTag(tag); |
3879 | goto success; |
3880 | } |
3881 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3882 | CHK_(ptr != nullptr); |
3883 | continue; |
3884 | } |
3885 | } // switch |
3886 | } // while |
3887 | success: |
3888 | return ptr; |
3889 | failure: |
3890 | ptr = nullptr; |
3891 | goto success; |
3892 | #undef CHK_ |
3893 | } |
3894 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3895 | bool BoundedTensorSpecProto::MergePartialFromCodedStream( |
3896 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3897 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3898 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3899 | // @@protoc_insertion_point(parse_start:tensorflow.BoundedTensorSpecProto) |
3900 | for (;;) { |
3901 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3902 | tag = p.first; |
3903 | if (!p.second) goto handle_unusual; |
3904 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3905 | // string name = 1; |
3906 | case 1: { |
3907 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3908 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3909 | input, this->mutable_name())); |
3910 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3911 | this->name().data(), static_cast<int>(this->name().length()), |
3912 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3913 | "tensorflow.BoundedTensorSpecProto.name" )); |
3914 | } else { |
3915 | goto handle_unusual; |
3916 | } |
3917 | break; |
3918 | } |
3919 | |
3920 | // .tensorflow.TensorShapeProto shape = 2; |
3921 | case 2: { |
3922 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3923 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3924 | input, mutable_shape())); |
3925 | } else { |
3926 | goto handle_unusual; |
3927 | } |
3928 | break; |
3929 | } |
3930 | |
3931 | // .tensorflow.DataType dtype = 3; |
3932 | case 3: { |
3933 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
3934 | int value = 0; |
3935 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3936 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
3937 | input, &value))); |
3938 | set_dtype(static_cast< ::tensorflow::DataType >(value)); |
3939 | } else { |
3940 | goto handle_unusual; |
3941 | } |
3942 | break; |
3943 | } |
3944 | |
3945 | // .tensorflow.TensorProto minimum = 4; |
3946 | case 4: { |
3947 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
3948 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3949 | input, mutable_minimum())); |
3950 | } else { |
3951 | goto handle_unusual; |
3952 | } |
3953 | break; |
3954 | } |
3955 | |
3956 | // .tensorflow.TensorProto maximum = 5; |
3957 | case 5: { |
3958 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
3959 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3960 | input, mutable_maximum())); |
3961 | } else { |
3962 | goto handle_unusual; |
3963 | } |
3964 | break; |
3965 | } |
3966 | |
3967 | default: { |
3968 | handle_unusual: |
3969 | if (tag == 0) { |
3970 | goto success; |
3971 | } |
3972 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3973 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3974 | break; |
3975 | } |
3976 | } |
3977 | } |
3978 | success: |
3979 | // @@protoc_insertion_point(parse_success:tensorflow.BoundedTensorSpecProto) |
3980 | return true; |
3981 | failure: |
3982 | // @@protoc_insertion_point(parse_failure:tensorflow.BoundedTensorSpecProto) |
3983 | return false; |
3984 | #undef DO_ |
3985 | } |
3986 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3987 | |
3988 | void BoundedTensorSpecProto::SerializeWithCachedSizes( |
3989 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3990 | // @@protoc_insertion_point(serialize_start:tensorflow.BoundedTensorSpecProto) |
3991 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3992 | (void) cached_has_bits; |
3993 | |
3994 | // string name = 1; |
3995 | if (this->name().size() > 0) { |
3996 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3997 | this->name().data(), static_cast<int>(this->name().length()), |
3998 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3999 | "tensorflow.BoundedTensorSpecProto.name" ); |
4000 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4001 | 1, this->name(), output); |
4002 | } |
4003 | |
4004 | // .tensorflow.TensorShapeProto shape = 2; |
4005 | if (this->has_shape()) { |
4006 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4007 | 2, _Internal::shape(this), output); |
4008 | } |
4009 | |
4010 | // .tensorflow.DataType dtype = 3; |
4011 | if (this->dtype() != 0) { |
4012 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
4013 | 3, this->dtype(), output); |
4014 | } |
4015 | |
4016 | // .tensorflow.TensorProto minimum = 4; |
4017 | if (this->has_minimum()) { |
4018 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4019 | 4, _Internal::minimum(this), output); |
4020 | } |
4021 | |
4022 | // .tensorflow.TensorProto maximum = 5; |
4023 | if (this->has_maximum()) { |
4024 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4025 | 5, _Internal::maximum(this), output); |
4026 | } |
4027 | |
4028 | if (_internal_metadata_.have_unknown_fields()) { |
4029 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
4030 | _internal_metadata_.unknown_fields(), output); |
4031 | } |
4032 | // @@protoc_insertion_point(serialize_end:tensorflow.BoundedTensorSpecProto) |
4033 | } |
4034 | |
4035 | ::PROTOBUF_NAMESPACE_ID::uint8* BoundedTensorSpecProto::InternalSerializeWithCachedSizesToArray( |
4036 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
4037 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.BoundedTensorSpecProto) |
4038 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4039 | (void) cached_has_bits; |
4040 | |
4041 | // string name = 1; |
4042 | if (this->name().size() > 0) { |
4043 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4044 | this->name().data(), static_cast<int>(this->name().length()), |
4045 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4046 | "tensorflow.BoundedTensorSpecProto.name" ); |
4047 | target = |
4048 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4049 | 1, this->name(), target); |
4050 | } |
4051 | |
4052 | // .tensorflow.TensorShapeProto shape = 2; |
4053 | if (this->has_shape()) { |
4054 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4055 | InternalWriteMessageToArray( |
4056 | 2, _Internal::shape(this), target); |
4057 | } |
4058 | |
4059 | // .tensorflow.DataType dtype = 3; |
4060 | if (this->dtype() != 0) { |
4061 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
4062 | 3, this->dtype(), target); |
4063 | } |
4064 | |
4065 | // .tensorflow.TensorProto minimum = 4; |
4066 | if (this->has_minimum()) { |
4067 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4068 | InternalWriteMessageToArray( |
4069 | 4, _Internal::minimum(this), target); |
4070 | } |
4071 | |
4072 | // .tensorflow.TensorProto maximum = 5; |
4073 | if (this->has_maximum()) { |
4074 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4075 | InternalWriteMessageToArray( |
4076 | 5, _Internal::maximum(this), target); |
4077 | } |
4078 | |
4079 | if (_internal_metadata_.have_unknown_fields()) { |
4080 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
4081 | _internal_metadata_.unknown_fields(), target); |
4082 | } |
4083 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.BoundedTensorSpecProto) |
4084 | return target; |
4085 | } |
4086 | |
4087 | size_t BoundedTensorSpecProto::ByteSizeLong() const { |
4088 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.BoundedTensorSpecProto) |
4089 | size_t total_size = 0; |
4090 | |
4091 | if (_internal_metadata_.have_unknown_fields()) { |
4092 | total_size += |
4093 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
4094 | _internal_metadata_.unknown_fields()); |
4095 | } |
4096 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4097 | // Prevent compiler warnings about cached_has_bits being unused |
4098 | (void) cached_has_bits; |
4099 | |
4100 | // string name = 1; |
4101 | if (this->name().size() > 0) { |
4102 | total_size += 1 + |
4103 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4104 | this->name()); |
4105 | } |
4106 | |
4107 | // .tensorflow.TensorShapeProto shape = 2; |
4108 | if (this->has_shape()) { |
4109 | total_size += 1 + |
4110 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4111 | *shape_); |
4112 | } |
4113 | |
4114 | // .tensorflow.TensorProto minimum = 4; |
4115 | if (this->has_minimum()) { |
4116 | total_size += 1 + |
4117 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4118 | *minimum_); |
4119 | } |
4120 | |
4121 | // .tensorflow.TensorProto maximum = 5; |
4122 | if (this->has_maximum()) { |
4123 | total_size += 1 + |
4124 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4125 | *maximum_); |
4126 | } |
4127 | |
4128 | // .tensorflow.DataType dtype = 3; |
4129 | if (this->dtype() != 0) { |
4130 | total_size += 1 + |
4131 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->dtype()); |
4132 | } |
4133 | |
4134 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
4135 | SetCachedSize(cached_size); |
4136 | return total_size; |
4137 | } |
4138 | |
4139 | void BoundedTensorSpecProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4140 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.BoundedTensorSpecProto) |
4141 | GOOGLE_DCHECK_NE(&from, this); |
4142 | const BoundedTensorSpecProto* source = |
4143 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BoundedTensorSpecProto>( |
4144 | &from); |
4145 | if (source == nullptr) { |
4146 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.BoundedTensorSpecProto) |
4147 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
4148 | } else { |
4149 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.BoundedTensorSpecProto) |
4150 | MergeFrom(*source); |
4151 | } |
4152 | } |
4153 | |
4154 | void BoundedTensorSpecProto::MergeFrom(const BoundedTensorSpecProto& from) { |
4155 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.BoundedTensorSpecProto) |
4156 | GOOGLE_DCHECK_NE(&from, this); |
4157 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4158 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4159 | (void) cached_has_bits; |
4160 | |
4161 | if (from.name().size() > 0) { |
4162 | |
4163 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
4164 | } |
4165 | if (from.has_shape()) { |
4166 | mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); |
4167 | } |
4168 | if (from.has_minimum()) { |
4169 | mutable_minimum()->::tensorflow::TensorProto::MergeFrom(from.minimum()); |
4170 | } |
4171 | if (from.has_maximum()) { |
4172 | mutable_maximum()->::tensorflow::TensorProto::MergeFrom(from.maximum()); |
4173 | } |
4174 | if (from.dtype() != 0) { |
4175 | set_dtype(from.dtype()); |
4176 | } |
4177 | } |
4178 | |
4179 | void BoundedTensorSpecProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4180 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.BoundedTensorSpecProto) |
4181 | if (&from == this) return; |
4182 | Clear(); |
4183 | MergeFrom(from); |
4184 | } |
4185 | |
4186 | void BoundedTensorSpecProto::CopyFrom(const BoundedTensorSpecProto& from) { |
4187 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.BoundedTensorSpecProto) |
4188 | if (&from == this) return; |
4189 | Clear(); |
4190 | MergeFrom(from); |
4191 | } |
4192 | |
4193 | bool BoundedTensorSpecProto::IsInitialized() const { |
4194 | return true; |
4195 | } |
4196 | |
4197 | void BoundedTensorSpecProto::InternalSwap(BoundedTensorSpecProto* other) { |
4198 | using std::swap; |
4199 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4200 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4201 | GetArenaNoVirtual()); |
4202 | swap(shape_, other->shape_); |
4203 | swap(minimum_, other->minimum_); |
4204 | swap(maximum_, other->maximum_); |
4205 | swap(dtype_, other->dtype_); |
4206 | } |
4207 | |
4208 | ::PROTOBUF_NAMESPACE_ID::Metadata BoundedTensorSpecProto::GetMetadata() const { |
4209 | return GetMetadataStatic(); |
4210 | } |
4211 | |
4212 | |
4213 | // =================================================================== |
4214 | |
4215 | void TypeSpecProto::InitAsDefaultInstance() { |
4216 | ::tensorflow::_TypeSpecProto_default_instance_._instance.get_mutable()->type_state_ = const_cast< ::tensorflow::StructuredValue*>( |
4217 | ::tensorflow::StructuredValue::internal_default_instance()); |
4218 | } |
4219 | class TypeSpecProto::_Internal { |
4220 | public: |
4221 | static const ::tensorflow::StructuredValue& type_state(const TypeSpecProto* msg); |
4222 | }; |
4223 | |
4224 | const ::tensorflow::StructuredValue& |
4225 | TypeSpecProto::_Internal::type_state(const TypeSpecProto* msg) { |
4226 | return *msg->type_state_; |
4227 | } |
4228 | TypeSpecProto::TypeSpecProto() |
4229 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
4230 | SharedCtor(); |
4231 | // @@protoc_insertion_point(constructor:tensorflow.TypeSpecProto) |
4232 | } |
4233 | TypeSpecProto::TypeSpecProto(const TypeSpecProto& from) |
4234 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
4235 | _internal_metadata_(nullptr) { |
4236 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4237 | type_spec_class_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4238 | if (!from.type_spec_class_name().empty()) { |
4239 | type_spec_class_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_spec_class_name_); |
4240 | } |
4241 | if (from.has_type_state()) { |
4242 | type_state_ = new ::tensorflow::StructuredValue(*from.type_state_); |
4243 | } else { |
4244 | type_state_ = nullptr; |
4245 | } |
4246 | ::memcpy(&type_spec_class_, &from.type_spec_class_, |
4247 | static_cast<size_t>(reinterpret_cast<char*>(&num_flat_components_) - |
4248 | reinterpret_cast<char*>(&type_spec_class_)) + sizeof(num_flat_components_)); |
4249 | // @@protoc_insertion_point(copy_constructor:tensorflow.TypeSpecProto) |
4250 | } |
4251 | |
4252 | void TypeSpecProto::SharedCtor() { |
4253 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
4254 | type_spec_class_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4255 | ::memset(&type_state_, 0, static_cast<size_t>( |
4256 | reinterpret_cast<char*>(&num_flat_components_) - |
4257 | reinterpret_cast<char*>(&type_state_)) + sizeof(num_flat_components_)); |
4258 | } |
4259 | |
4260 | TypeSpecProto::~TypeSpecProto() { |
4261 | // @@protoc_insertion_point(destructor:tensorflow.TypeSpecProto) |
4262 | SharedDtor(); |
4263 | } |
4264 | |
4265 | void TypeSpecProto::SharedDtor() { |
4266 | type_spec_class_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4267 | if (this != internal_default_instance()) delete type_state_; |
4268 | } |
4269 | |
4270 | void TypeSpecProto::SetCachedSize(int size) const { |
4271 | _cached_size_.Set(size); |
4272 | } |
4273 | const TypeSpecProto& TypeSpecProto::default_instance() { |
4274 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base); |
4275 | return *internal_default_instance(); |
4276 | } |
4277 | |
4278 | |
4279 | void TypeSpecProto::Clear() { |
4280 | // @@protoc_insertion_point(message_clear_start:tensorflow.TypeSpecProto) |
4281 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4282 | // Prevent compiler warnings about cached_has_bits being unused |
4283 | (void) cached_has_bits; |
4284 | |
4285 | type_spec_class_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4286 | if (GetArenaNoVirtual() == nullptr && type_state_ != nullptr) { |
4287 | delete type_state_; |
4288 | } |
4289 | type_state_ = nullptr; |
4290 | ::memset(&type_spec_class_, 0, static_cast<size_t>( |
4291 | reinterpret_cast<char*>(&num_flat_components_) - |
4292 | reinterpret_cast<char*>(&type_spec_class_)) + sizeof(num_flat_components_)); |
4293 | _internal_metadata_.Clear(); |
4294 | } |
4295 | |
4296 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4297 | const char* TypeSpecProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
4298 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
4299 | while (!ctx->Done(&ptr)) { |
4300 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4301 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
4302 | CHK_(ptr); |
4303 | switch (tag >> 3) { |
4304 | // .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; |
4305 | case 1: |
4306 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
4307 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
4308 | CHK_(ptr); |
4309 | set_type_spec_class(static_cast<::tensorflow::TypeSpecProto_TypeSpecClass>(val)); |
4310 | } else goto handle_unusual; |
4311 | continue; |
4312 | // .tensorflow.StructuredValue type_state = 2; |
4313 | case 2: |
4314 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
4315 | ptr = ctx->ParseMessage(mutable_type_state(), ptr); |
4316 | CHK_(ptr); |
4317 | } else goto handle_unusual; |
4318 | continue; |
4319 | // string type_spec_class_name = 3; |
4320 | case 3: |
4321 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
4322 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_spec_class_name(), ptr, ctx, "tensorflow.TypeSpecProto.type_spec_class_name" ); |
4323 | CHK_(ptr); |
4324 | } else goto handle_unusual; |
4325 | continue; |
4326 | // int32 num_flat_components = 4; |
4327 | case 4: |
4328 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
4329 | num_flat_components_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
4330 | CHK_(ptr); |
4331 | } else goto handle_unusual; |
4332 | continue; |
4333 | default: { |
4334 | handle_unusual: |
4335 | if ((tag & 7) == 4 || tag == 0) { |
4336 | ctx->SetLastTag(tag); |
4337 | goto success; |
4338 | } |
4339 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
4340 | CHK_(ptr != nullptr); |
4341 | continue; |
4342 | } |
4343 | } // switch |
4344 | } // while |
4345 | success: |
4346 | return ptr; |
4347 | failure: |
4348 | ptr = nullptr; |
4349 | goto success; |
4350 | #undef CHK_ |
4351 | } |
4352 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4353 | bool TypeSpecProto::MergePartialFromCodedStream( |
4354 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
4355 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
4356 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4357 | // @@protoc_insertion_point(parse_start:tensorflow.TypeSpecProto) |
4358 | for (;;) { |
4359 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
4360 | tag = p.first; |
4361 | if (!p.second) goto handle_unusual; |
4362 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
4363 | // .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; |
4364 | case 1: { |
4365 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
4366 | int value = 0; |
4367 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
4368 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
4369 | input, &value))); |
4370 | set_type_spec_class(static_cast< ::tensorflow::TypeSpecProto_TypeSpecClass >(value)); |
4371 | } else { |
4372 | goto handle_unusual; |
4373 | } |
4374 | break; |
4375 | } |
4376 | |
4377 | // .tensorflow.StructuredValue type_state = 2; |
4378 | case 2: { |
4379 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
4380 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
4381 | input, mutable_type_state())); |
4382 | } else { |
4383 | goto handle_unusual; |
4384 | } |
4385 | break; |
4386 | } |
4387 | |
4388 | // string type_spec_class_name = 3; |
4389 | case 3: { |
4390 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
4391 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
4392 | input, this->mutable_type_spec_class_name())); |
4393 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4394 | this->type_spec_class_name().data(), static_cast<int>(this->type_spec_class_name().length()), |
4395 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
4396 | "tensorflow.TypeSpecProto.type_spec_class_name" )); |
4397 | } else { |
4398 | goto handle_unusual; |
4399 | } |
4400 | break; |
4401 | } |
4402 | |
4403 | // int32 num_flat_components = 4; |
4404 | case 4: { |
4405 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
4406 | |
4407 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
4408 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
4409 | input, &num_flat_components_))); |
4410 | } else { |
4411 | goto handle_unusual; |
4412 | } |
4413 | break; |
4414 | } |
4415 | |
4416 | default: { |
4417 | handle_unusual: |
4418 | if (tag == 0) { |
4419 | goto success; |
4420 | } |
4421 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
4422 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
4423 | break; |
4424 | } |
4425 | } |
4426 | } |
4427 | success: |
4428 | // @@protoc_insertion_point(parse_success:tensorflow.TypeSpecProto) |
4429 | return true; |
4430 | failure: |
4431 | // @@protoc_insertion_point(parse_failure:tensorflow.TypeSpecProto) |
4432 | return false; |
4433 | #undef DO_ |
4434 | } |
4435 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4436 | |
4437 | void TypeSpecProto::SerializeWithCachedSizes( |
4438 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
4439 | // @@protoc_insertion_point(serialize_start:tensorflow.TypeSpecProto) |
4440 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4441 | (void) cached_has_bits; |
4442 | |
4443 | // .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; |
4444 | if (this->type_spec_class() != 0) { |
4445 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
4446 | 1, this->type_spec_class(), output); |
4447 | } |
4448 | |
4449 | // .tensorflow.StructuredValue type_state = 2; |
4450 | if (this->has_type_state()) { |
4451 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4452 | 2, _Internal::type_state(this), output); |
4453 | } |
4454 | |
4455 | // string type_spec_class_name = 3; |
4456 | if (this->type_spec_class_name().size() > 0) { |
4457 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4458 | this->type_spec_class_name().data(), static_cast<int>(this->type_spec_class_name().length()), |
4459 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4460 | "tensorflow.TypeSpecProto.type_spec_class_name" ); |
4461 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4462 | 3, this->type_spec_class_name(), output); |
4463 | } |
4464 | |
4465 | // int32 num_flat_components = 4; |
4466 | if (this->num_flat_components() != 0) { |
4467 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->num_flat_components(), output); |
4468 | } |
4469 | |
4470 | if (_internal_metadata_.have_unknown_fields()) { |
4471 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
4472 | _internal_metadata_.unknown_fields(), output); |
4473 | } |
4474 | // @@protoc_insertion_point(serialize_end:tensorflow.TypeSpecProto) |
4475 | } |
4476 | |
4477 | ::PROTOBUF_NAMESPACE_ID::uint8* TypeSpecProto::InternalSerializeWithCachedSizesToArray( |
4478 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
4479 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TypeSpecProto) |
4480 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4481 | (void) cached_has_bits; |
4482 | |
4483 | // .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; |
4484 | if (this->type_spec_class() != 0) { |
4485 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
4486 | 1, this->type_spec_class(), target); |
4487 | } |
4488 | |
4489 | // .tensorflow.StructuredValue type_state = 2; |
4490 | if (this->has_type_state()) { |
4491 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4492 | InternalWriteMessageToArray( |
4493 | 2, _Internal::type_state(this), target); |
4494 | } |
4495 | |
4496 | // string type_spec_class_name = 3; |
4497 | if (this->type_spec_class_name().size() > 0) { |
4498 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4499 | this->type_spec_class_name().data(), static_cast<int>(this->type_spec_class_name().length()), |
4500 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4501 | "tensorflow.TypeSpecProto.type_spec_class_name" ); |
4502 | target = |
4503 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4504 | 3, this->type_spec_class_name(), target); |
4505 | } |
4506 | |
4507 | // int32 num_flat_components = 4; |
4508 | if (this->num_flat_components() != 0) { |
4509 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->num_flat_components(), target); |
4510 | } |
4511 | |
4512 | if (_internal_metadata_.have_unknown_fields()) { |
4513 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
4514 | _internal_metadata_.unknown_fields(), target); |
4515 | } |
4516 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TypeSpecProto) |
4517 | return target; |
4518 | } |
4519 | |
4520 | size_t TypeSpecProto::ByteSizeLong() const { |
4521 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.TypeSpecProto) |
4522 | size_t total_size = 0; |
4523 | |
4524 | if (_internal_metadata_.have_unknown_fields()) { |
4525 | total_size += |
4526 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
4527 | _internal_metadata_.unknown_fields()); |
4528 | } |
4529 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4530 | // Prevent compiler warnings about cached_has_bits being unused |
4531 | (void) cached_has_bits; |
4532 | |
4533 | // string type_spec_class_name = 3; |
4534 | if (this->type_spec_class_name().size() > 0) { |
4535 | total_size += 1 + |
4536 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4537 | this->type_spec_class_name()); |
4538 | } |
4539 | |
4540 | // .tensorflow.StructuredValue type_state = 2; |
4541 | if (this->has_type_state()) { |
4542 | total_size += 1 + |
4543 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4544 | *type_state_); |
4545 | } |
4546 | |
4547 | // .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; |
4548 | if (this->type_spec_class() != 0) { |
4549 | total_size += 1 + |
4550 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type_spec_class()); |
4551 | } |
4552 | |
4553 | // int32 num_flat_components = 4; |
4554 | if (this->num_flat_components() != 0) { |
4555 | total_size += 1 + |
4556 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
4557 | this->num_flat_components()); |
4558 | } |
4559 | |
4560 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
4561 | SetCachedSize(cached_size); |
4562 | return total_size; |
4563 | } |
4564 | |
4565 | void TypeSpecProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4566 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TypeSpecProto) |
4567 | GOOGLE_DCHECK_NE(&from, this); |
4568 | const TypeSpecProto* source = |
4569 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TypeSpecProto>( |
4570 | &from); |
4571 | if (source == nullptr) { |
4572 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TypeSpecProto) |
4573 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
4574 | } else { |
4575 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TypeSpecProto) |
4576 | MergeFrom(*source); |
4577 | } |
4578 | } |
4579 | |
4580 | void TypeSpecProto::MergeFrom(const TypeSpecProto& from) { |
4581 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TypeSpecProto) |
4582 | GOOGLE_DCHECK_NE(&from, this); |
4583 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4584 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4585 | (void) cached_has_bits; |
4586 | |
4587 | if (from.type_spec_class_name().size() > 0) { |
4588 | |
4589 | type_spec_class_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_spec_class_name_); |
4590 | } |
4591 | if (from.has_type_state()) { |
4592 | mutable_type_state()->::tensorflow::StructuredValue::MergeFrom(from.type_state()); |
4593 | } |
4594 | if (from.type_spec_class() != 0) { |
4595 | set_type_spec_class(from.type_spec_class()); |
4596 | } |
4597 | if (from.num_flat_components() != 0) { |
4598 | set_num_flat_components(from.num_flat_components()); |
4599 | } |
4600 | } |
4601 | |
4602 | void TypeSpecProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4603 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TypeSpecProto) |
4604 | if (&from == this) return; |
4605 | Clear(); |
4606 | MergeFrom(from); |
4607 | } |
4608 | |
4609 | void TypeSpecProto::CopyFrom(const TypeSpecProto& from) { |
4610 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TypeSpecProto) |
4611 | if (&from == this) return; |
4612 | Clear(); |
4613 | MergeFrom(from); |
4614 | } |
4615 | |
4616 | bool TypeSpecProto::IsInitialized() const { |
4617 | return true; |
4618 | } |
4619 | |
4620 | void TypeSpecProto::InternalSwap(TypeSpecProto* other) { |
4621 | using std::swap; |
4622 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4623 | type_spec_class_name_.Swap(&other->type_spec_class_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4624 | GetArenaNoVirtual()); |
4625 | swap(type_state_, other->type_state_); |
4626 | swap(type_spec_class_, other->type_spec_class_); |
4627 | swap(num_flat_components_, other->num_flat_components_); |
4628 | } |
4629 | |
4630 | ::PROTOBUF_NAMESPACE_ID::Metadata TypeSpecProto::GetMetadata() const { |
4631 | return GetMetadataStatic(); |
4632 | } |
4633 | |
4634 | |
4635 | // @@protoc_insertion_point(namespace_scope) |
4636 | } // namespace tensorflow |
4637 | PROTOBUF_NAMESPACE_OPEN |
4638 | template<> PROTOBUF_NOINLINE ::tensorflow::StructuredValue* Arena::CreateMaybeMessage< ::tensorflow::StructuredValue >(Arena* arena) { |
4639 | return Arena::CreateInternal< ::tensorflow::StructuredValue >(arena); |
4640 | } |
4641 | template<> PROTOBUF_NOINLINE ::tensorflow::NoneValue* Arena::CreateMaybeMessage< ::tensorflow::NoneValue >(Arena* arena) { |
4642 | return Arena::CreateInternal< ::tensorflow::NoneValue >(arena); |
4643 | } |
4644 | template<> PROTOBUF_NOINLINE ::tensorflow::ListValue* Arena::CreateMaybeMessage< ::tensorflow::ListValue >(Arena* arena) { |
4645 | return Arena::CreateInternal< ::tensorflow::ListValue >(arena); |
4646 | } |
4647 | template<> PROTOBUF_NOINLINE ::tensorflow::TupleValue* Arena::CreateMaybeMessage< ::tensorflow::TupleValue >(Arena* arena) { |
4648 | return Arena::CreateInternal< ::tensorflow::TupleValue >(arena); |
4649 | } |
4650 | template<> PROTOBUF_NOINLINE ::tensorflow::DictValue_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::DictValue_FieldsEntry_DoNotUse >(Arena* arena) { |
4651 | return Arena::CreateInternal< ::tensorflow::DictValue_FieldsEntry_DoNotUse >(arena); |
4652 | } |
4653 | template<> PROTOBUF_NOINLINE ::tensorflow::DictValue* Arena::CreateMaybeMessage< ::tensorflow::DictValue >(Arena* arena) { |
4654 | return Arena::CreateInternal< ::tensorflow::DictValue >(arena); |
4655 | } |
4656 | template<> PROTOBUF_NOINLINE ::tensorflow::PairValue* Arena::CreateMaybeMessage< ::tensorflow::PairValue >(Arena* arena) { |
4657 | return Arena::CreateInternal< ::tensorflow::PairValue >(arena); |
4658 | } |
4659 | template<> PROTOBUF_NOINLINE ::tensorflow::NamedTupleValue* Arena::CreateMaybeMessage< ::tensorflow::NamedTupleValue >(Arena* arena) { |
4660 | return Arena::CreateInternal< ::tensorflow::NamedTupleValue >(arena); |
4661 | } |
4662 | template<> PROTOBUF_NOINLINE ::tensorflow::TensorSpecProto* Arena::CreateMaybeMessage< ::tensorflow::TensorSpecProto >(Arena* arena) { |
4663 | return Arena::CreateInternal< ::tensorflow::TensorSpecProto >(arena); |
4664 | } |
4665 | template<> PROTOBUF_NOINLINE ::tensorflow::BoundedTensorSpecProto* Arena::CreateMaybeMessage< ::tensorflow::BoundedTensorSpecProto >(Arena* arena) { |
4666 | return Arena::CreateInternal< ::tensorflow::BoundedTensorSpecProto >(arena); |
4667 | } |
4668 | template<> PROTOBUF_NOINLINE ::tensorflow::TypeSpecProto* Arena::CreateMaybeMessage< ::tensorflow::TypeSpecProto >(Arena* arena) { |
4669 | return Arena::CreateInternal< ::tensorflow::TypeSpecProto >(arena); |
4670 | } |
4671 | PROTOBUF_NAMESPACE_CLOSE |
4672 | |
4673 | // @@protoc_insertion_point(global_scope) |
4674 | #include <google/protobuf/port_undef.inc> |
4675 | |