1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/full_type.proto |
3 | |
4 | #include "tensorflow/core/framework/full_type.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_2fframework_2ffull_5ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto; |
19 | namespace tensorflow { |
20 | class FullTypeDefDefaultTypeInternal { |
21 | public: |
22 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<FullTypeDef> _instance; |
23 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr s_; |
24 | ::PROTOBUF_NAMESPACE_ID::int64 i_; |
25 | } _FullTypeDef_default_instance_; |
26 | } // namespace tensorflow |
27 | static void InitDefaultsscc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto() { |
28 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
29 | |
30 | { |
31 | void* ptr = &::tensorflow::_FullTypeDef_default_instance_; |
32 | new (ptr) ::tensorflow::FullTypeDef(); |
33 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
34 | } |
35 | ::tensorflow::FullTypeDef::InitAsDefaultInstance(); |
36 | } |
37 | |
38 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto = |
39 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto}, {}}; |
40 | |
41 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto[1]; |
42 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto[1]; |
43 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto = nullptr; |
44 | |
45 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
46 | ~0u, // no _has_bits_ |
47 | PROTOBUF_FIELD_OFFSET(::tensorflow::FullTypeDef, _internal_metadata_), |
48 | ~0u, // no _extensions_ |
49 | PROTOBUF_FIELD_OFFSET(::tensorflow::FullTypeDef, _oneof_case_[0]), |
50 | ~0u, // no _weak_field_map_ |
51 | PROTOBUF_FIELD_OFFSET(::tensorflow::FullTypeDef, type_id_), |
52 | PROTOBUF_FIELD_OFFSET(::tensorflow::FullTypeDef, args_), |
53 | offsetof(::tensorflow::FullTypeDefDefaultTypeInternal, s_), |
54 | offsetof(::tensorflow::FullTypeDefDefaultTypeInternal, i_), |
55 | PROTOBUF_FIELD_OFFSET(::tensorflow::FullTypeDef, attr_), |
56 | }; |
57 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
58 | { 0, -1, sizeof(::tensorflow::FullTypeDef)}, |
59 | }; |
60 | |
61 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
62 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_FullTypeDef_default_instance_), |
63 | }; |
64 | |
65 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
66 | "\n)tensorflow/core/framework/full_type.pr" |
67 | "oto\022\ntensorflow\"\177\n\013FullTypeDef\022\'\n\007type_i" |
68 | "d\030\001 \001(\0162\026.tensorflow.FullTypeId\022%\n\004args\030" |
69 | "\002 \003(\0132\027.tensorflow.FullTypeDef\022\013\n\001s\030\003 \001(" |
70 | "\tH\000\022\013\n\001i\030\004 \001(\003H\000B\006\n\004attr*\303\004\n\nFullTypeId\022" |
71 | "\r\n\tTFT_UNSET\020\000\022\013\n\007TFT_VAR\020\001\022\013\n\007TFT_ANY\020\002" |
72 | "\022\017\n\013TFT_PRODUCT\020\003\022\r\n\tTFT_NAMED\020\004\022\020\n\014TFT_" |
73 | "FOR_EACH\020\024\022\020\n\014TFT_CALLABLE\020d\022\017\n\nTFT_TENS" |
74 | "OR\020\350\007\022\016\n\tTFT_ARRAY\020\351\007\022\021\n\014TFT_OPTIONAL\020\352\007" |
75 | "\022\020\n\013TFT_LITERAL\020\353\007\022\020\n\013TFT_ENCODED\020\354\007\022\r\n\010" |
76 | "TFT_BOOL\020\310\001\022\016\n\tTFT_UINT8\020\311\001\022\017\n\nTFT_UINT1" |
77 | "6\020\312\001\022\017\n\nTFT_UINT32\020\313\001\022\017\n\nTFT_UINT64\020\314\001\022\r" |
78 | "\n\010TFT_INT8\020\315\001\022\016\n\tTFT_INT16\020\316\001\022\016\n\tTFT_INT" |
79 | "32\020\317\001\022\016\n\tTFT_INT64\020\320\001\022\r\n\010TFT_HALF\020\321\001\022\016\n\t" |
80 | "TFT_FLOAT\020\322\001\022\017\n\nTFT_DOUBLE\020\323\001\022\021\n\014TFT_BFL" |
81 | "OAT16\020\327\001\022\022\n\rTFT_COMPLEX64\020\324\001\022\023\n\016TFT_COMP" |
82 | "LEX128\020\325\001\022\017\n\nTFT_STRING\020\326\001\022\020\n\013TFT_DATASE" |
83 | "T\020\366N\022\017\n\nTFT_RAGGED\020\367N\022\021\n\014TFT_ITERATOR\020\370N" |
84 | "\022\023\n\016TFT_MUTEX_LOCK\020\332O\022\027\n\022TFT_LEGACY_VARI" |
85 | "ANT\020\333OB\201\001\n\030org.tensorflow.frameworkB\016Ful" |
86 | "lTypeProtosP\001ZPgithub.com/tensorflow/ten" |
87 | "sorflow/tensorflow/go/core/framework/ful" |
88 | "l_type_go_proto\370\001\001b\006proto3" |
89 | ; |
90 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_deps[1] = { |
91 | }; |
92 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_sccs[1] = { |
93 | &scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto.base, |
94 | }; |
95 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_once; |
96 | static bool descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_initialized = false; |
97 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto = { |
98 | &descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto, "tensorflow/core/framework/full_type.proto" , 906, |
99 | &descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto_deps, 1, 0, |
100 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto::offsets, |
101 | file_level_metadata_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto, 1, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto, |
102 | }; |
103 | |
104 | // Force running AddDescriptors() at dynamic initialization time. |
105 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto), true); |
106 | namespace tensorflow { |
107 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FullTypeId_descriptor() { |
108 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto); |
109 | return file_level_enum_descriptors_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto[0]; |
110 | } |
111 | bool FullTypeId_IsValid(int value) { |
112 | switch (value) { |
113 | case 0: |
114 | case 1: |
115 | case 2: |
116 | case 3: |
117 | case 4: |
118 | case 20: |
119 | case 100: |
120 | case 200: |
121 | case 201: |
122 | case 202: |
123 | case 203: |
124 | case 204: |
125 | case 205: |
126 | case 206: |
127 | case 207: |
128 | case 208: |
129 | case 209: |
130 | case 210: |
131 | case 211: |
132 | case 212: |
133 | case 213: |
134 | case 214: |
135 | case 215: |
136 | case 1000: |
137 | case 1001: |
138 | case 1002: |
139 | case 1003: |
140 | case 1004: |
141 | case 10102: |
142 | case 10103: |
143 | case 10104: |
144 | case 10202: |
145 | case 10203: |
146 | return true; |
147 | default: |
148 | return false; |
149 | } |
150 | } |
151 | |
152 | |
153 | // =================================================================== |
154 | |
155 | void FullTypeDef::InitAsDefaultInstance() { |
156 | ::tensorflow::_FullTypeDef_default_instance_.s_.UnsafeSetDefault( |
157 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
158 | ::tensorflow::_FullTypeDef_default_instance_.i_ = PROTOBUF_LONGLONG(0); |
159 | } |
160 | class FullTypeDef::_Internal { |
161 | public: |
162 | }; |
163 | |
164 | FullTypeDef::FullTypeDef() |
165 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
166 | SharedCtor(); |
167 | // @@protoc_insertion_point(constructor:tensorflow.FullTypeDef) |
168 | } |
169 | FullTypeDef::FullTypeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
170 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
171 | _internal_metadata_(arena), |
172 | args_(arena) { |
173 | SharedCtor(); |
174 | RegisterArenaDtor(arena); |
175 | // @@protoc_insertion_point(arena_constructor:tensorflow.FullTypeDef) |
176 | } |
177 | FullTypeDef::FullTypeDef(const FullTypeDef& from) |
178 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
179 | _internal_metadata_(nullptr), |
180 | args_(from.args_) { |
181 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
182 | type_id_ = from.type_id_; |
183 | clear_has_attr(); |
184 | switch (from.attr_case()) { |
185 | case kS: { |
186 | set_s(from.s()); |
187 | break; |
188 | } |
189 | case kI: { |
190 | set_i(from.i()); |
191 | break; |
192 | } |
193 | case ATTR_NOT_SET: { |
194 | break; |
195 | } |
196 | } |
197 | // @@protoc_insertion_point(copy_constructor:tensorflow.FullTypeDef) |
198 | } |
199 | |
200 | void FullTypeDef::SharedCtor() { |
201 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto.base); |
202 | type_id_ = 0; |
203 | clear_has_attr(); |
204 | } |
205 | |
206 | FullTypeDef::~FullTypeDef() { |
207 | // @@protoc_insertion_point(destructor:tensorflow.FullTypeDef) |
208 | SharedDtor(); |
209 | } |
210 | |
211 | void FullTypeDef::SharedDtor() { |
212 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
213 | if (has_attr()) { |
214 | clear_attr(); |
215 | } |
216 | } |
217 | |
218 | void FullTypeDef::ArenaDtor(void* object) { |
219 | FullTypeDef* _this = reinterpret_cast< FullTypeDef* >(object); |
220 | (void)_this; |
221 | } |
222 | void FullTypeDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
223 | } |
224 | void FullTypeDef::SetCachedSize(int size) const { |
225 | _cached_size_.Set(size); |
226 | } |
227 | const FullTypeDef& FullTypeDef::default_instance() { |
228 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto.base); |
229 | return *internal_default_instance(); |
230 | } |
231 | |
232 | |
233 | void FullTypeDef::clear_attr() { |
234 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.FullTypeDef) |
235 | switch (attr_case()) { |
236 | case kS: { |
237 | attr_.s_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
238 | GetArenaNoVirtual()); |
239 | break; |
240 | } |
241 | case kI: { |
242 | // No need to clear |
243 | break; |
244 | } |
245 | case ATTR_NOT_SET: { |
246 | break; |
247 | } |
248 | } |
249 | _oneof_case_[0] = ATTR_NOT_SET; |
250 | } |
251 | |
252 | |
253 | void FullTypeDef::Clear() { |
254 | // @@protoc_insertion_point(message_clear_start:tensorflow.FullTypeDef) |
255 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
256 | // Prevent compiler warnings about cached_has_bits being unused |
257 | (void) cached_has_bits; |
258 | |
259 | args_.Clear(); |
260 | type_id_ = 0; |
261 | clear_attr(); |
262 | _internal_metadata_.Clear(); |
263 | } |
264 | |
265 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
266 | const char* FullTypeDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
267 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
268 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
269 | while (!ctx->Done(&ptr)) { |
270 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
271 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
272 | CHK_(ptr); |
273 | switch (tag >> 3) { |
274 | // .tensorflow.FullTypeId type_id = 1; |
275 | case 1: |
276 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
277 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
278 | CHK_(ptr); |
279 | set_type_id(static_cast<::tensorflow::FullTypeId>(val)); |
280 | } else goto handle_unusual; |
281 | continue; |
282 | // repeated .tensorflow.FullTypeDef args = 2; |
283 | case 2: |
284 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
285 | ptr -= 1; |
286 | do { |
287 | ptr += 1; |
288 | ptr = ctx->ParseMessage(add_args(), ptr); |
289 | CHK_(ptr); |
290 | if (!ctx->DataAvailable(ptr)) break; |
291 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
292 | } else goto handle_unusual; |
293 | continue; |
294 | // string s = 3; |
295 | case 3: |
296 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
297 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_s(), ptr, ctx, "tensorflow.FullTypeDef.s" ); |
298 | CHK_(ptr); |
299 | } else goto handle_unusual; |
300 | continue; |
301 | // int64 i = 4; |
302 | case 4: |
303 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
304 | set_i(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
305 | CHK_(ptr); |
306 | } else goto handle_unusual; |
307 | continue; |
308 | default: { |
309 | handle_unusual: |
310 | if ((tag & 7) == 4 || tag == 0) { |
311 | ctx->SetLastTag(tag); |
312 | goto success; |
313 | } |
314 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
315 | CHK_(ptr != nullptr); |
316 | continue; |
317 | } |
318 | } // switch |
319 | } // while |
320 | success: |
321 | return ptr; |
322 | failure: |
323 | ptr = nullptr; |
324 | goto success; |
325 | #undef CHK_ |
326 | } |
327 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
328 | bool FullTypeDef::MergePartialFromCodedStream( |
329 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
330 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
331 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
332 | // @@protoc_insertion_point(parse_start:tensorflow.FullTypeDef) |
333 | for (;;) { |
334 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
335 | tag = p.first; |
336 | if (!p.second) goto handle_unusual; |
337 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
338 | // .tensorflow.FullTypeId type_id = 1; |
339 | case 1: { |
340 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
341 | int value = 0; |
342 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
343 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
344 | input, &value))); |
345 | set_type_id(static_cast< ::tensorflow::FullTypeId >(value)); |
346 | } else { |
347 | goto handle_unusual; |
348 | } |
349 | break; |
350 | } |
351 | |
352 | // repeated .tensorflow.FullTypeDef args = 2; |
353 | case 2: { |
354 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
355 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
356 | input, add_args())); |
357 | } else { |
358 | goto handle_unusual; |
359 | } |
360 | break; |
361 | } |
362 | |
363 | // string s = 3; |
364 | case 3: { |
365 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
366 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
367 | input, this->mutable_s())); |
368 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
369 | this->s().data(), static_cast<int>(this->s().length()), |
370 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
371 | "tensorflow.FullTypeDef.s" )); |
372 | } else { |
373 | goto handle_unusual; |
374 | } |
375 | break; |
376 | } |
377 | |
378 | // int64 i = 4; |
379 | case 4: { |
380 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
381 | clear_attr(); |
382 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
383 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
384 | input, &attr_.i_))); |
385 | set_has_i(); |
386 | } else { |
387 | goto handle_unusual; |
388 | } |
389 | break; |
390 | } |
391 | |
392 | default: { |
393 | handle_unusual: |
394 | if (tag == 0) { |
395 | goto success; |
396 | } |
397 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
398 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
399 | break; |
400 | } |
401 | } |
402 | } |
403 | success: |
404 | // @@protoc_insertion_point(parse_success:tensorflow.FullTypeDef) |
405 | return true; |
406 | failure: |
407 | // @@protoc_insertion_point(parse_failure:tensorflow.FullTypeDef) |
408 | return false; |
409 | #undef DO_ |
410 | } |
411 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
412 | |
413 | void FullTypeDef::SerializeWithCachedSizes( |
414 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
415 | // @@protoc_insertion_point(serialize_start:tensorflow.FullTypeDef) |
416 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
417 | (void) cached_has_bits; |
418 | |
419 | // .tensorflow.FullTypeId type_id = 1; |
420 | if (this->type_id() != 0) { |
421 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
422 | 1, this->type_id(), output); |
423 | } |
424 | |
425 | // repeated .tensorflow.FullTypeDef args = 2; |
426 | for (unsigned int i = 0, |
427 | n = static_cast<unsigned int>(this->args_size()); i < n; i++) { |
428 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
429 | 2, |
430 | this->args(static_cast<int>(i)), |
431 | output); |
432 | } |
433 | |
434 | // string s = 3; |
435 | if (has_s()) { |
436 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
437 | this->s().data(), static_cast<int>(this->s().length()), |
438 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
439 | "tensorflow.FullTypeDef.s" ); |
440 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
441 | 3, this->s(), output); |
442 | } |
443 | |
444 | // int64 i = 4; |
445 | if (has_i()) { |
446 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->i(), output); |
447 | } |
448 | |
449 | if (_internal_metadata_.have_unknown_fields()) { |
450 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
451 | _internal_metadata_.unknown_fields(), output); |
452 | } |
453 | // @@protoc_insertion_point(serialize_end:tensorflow.FullTypeDef) |
454 | } |
455 | |
456 | ::PROTOBUF_NAMESPACE_ID::uint8* FullTypeDef::InternalSerializeWithCachedSizesToArray( |
457 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
458 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FullTypeDef) |
459 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
460 | (void) cached_has_bits; |
461 | |
462 | // .tensorflow.FullTypeId type_id = 1; |
463 | if (this->type_id() != 0) { |
464 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
465 | 1, this->type_id(), target); |
466 | } |
467 | |
468 | // repeated .tensorflow.FullTypeDef args = 2; |
469 | for (unsigned int i = 0, |
470 | n = static_cast<unsigned int>(this->args_size()); i < n; i++) { |
471 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
472 | InternalWriteMessageToArray( |
473 | 2, this->args(static_cast<int>(i)), target); |
474 | } |
475 | |
476 | // string s = 3; |
477 | if (has_s()) { |
478 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
479 | this->s().data(), static_cast<int>(this->s().length()), |
480 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
481 | "tensorflow.FullTypeDef.s" ); |
482 | target = |
483 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
484 | 3, this->s(), target); |
485 | } |
486 | |
487 | // int64 i = 4; |
488 | if (has_i()) { |
489 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->i(), target); |
490 | } |
491 | |
492 | if (_internal_metadata_.have_unknown_fields()) { |
493 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
494 | _internal_metadata_.unknown_fields(), target); |
495 | } |
496 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FullTypeDef) |
497 | return target; |
498 | } |
499 | |
500 | size_t FullTypeDef::ByteSizeLong() const { |
501 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.FullTypeDef) |
502 | size_t total_size = 0; |
503 | |
504 | if (_internal_metadata_.have_unknown_fields()) { |
505 | total_size += |
506 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
507 | _internal_metadata_.unknown_fields()); |
508 | } |
509 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
510 | // Prevent compiler warnings about cached_has_bits being unused |
511 | (void) cached_has_bits; |
512 | |
513 | // repeated .tensorflow.FullTypeDef args = 2; |
514 | { |
515 | unsigned int count = static_cast<unsigned int>(this->args_size()); |
516 | total_size += 1UL * count; |
517 | for (unsigned int i = 0; i < count; i++) { |
518 | total_size += |
519 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
520 | this->args(static_cast<int>(i))); |
521 | } |
522 | } |
523 | |
524 | // .tensorflow.FullTypeId type_id = 1; |
525 | if (this->type_id() != 0) { |
526 | total_size += 1 + |
527 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type_id()); |
528 | } |
529 | |
530 | switch (attr_case()) { |
531 | // string s = 3; |
532 | case kS: { |
533 | total_size += 1 + |
534 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
535 | this->s()); |
536 | break; |
537 | } |
538 | // int64 i = 4; |
539 | case kI: { |
540 | total_size += 1 + |
541 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
542 | this->i()); |
543 | break; |
544 | } |
545 | case ATTR_NOT_SET: { |
546 | break; |
547 | } |
548 | } |
549 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
550 | SetCachedSize(cached_size); |
551 | return total_size; |
552 | } |
553 | |
554 | void FullTypeDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
555 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FullTypeDef) |
556 | GOOGLE_DCHECK_NE(&from, this); |
557 | const FullTypeDef* source = |
558 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FullTypeDef>( |
559 | &from); |
560 | if (source == nullptr) { |
561 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FullTypeDef) |
562 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
563 | } else { |
564 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FullTypeDef) |
565 | MergeFrom(*source); |
566 | } |
567 | } |
568 | |
569 | void FullTypeDef::MergeFrom(const FullTypeDef& from) { |
570 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FullTypeDef) |
571 | GOOGLE_DCHECK_NE(&from, this); |
572 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
573 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
574 | (void) cached_has_bits; |
575 | |
576 | args_.MergeFrom(from.args_); |
577 | if (from.type_id() != 0) { |
578 | set_type_id(from.type_id()); |
579 | } |
580 | switch (from.attr_case()) { |
581 | case kS: { |
582 | set_s(from.s()); |
583 | break; |
584 | } |
585 | case kI: { |
586 | set_i(from.i()); |
587 | break; |
588 | } |
589 | case ATTR_NOT_SET: { |
590 | break; |
591 | } |
592 | } |
593 | } |
594 | |
595 | void FullTypeDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
596 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FullTypeDef) |
597 | if (&from == this) return; |
598 | Clear(); |
599 | MergeFrom(from); |
600 | } |
601 | |
602 | void FullTypeDef::CopyFrom(const FullTypeDef& from) { |
603 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FullTypeDef) |
604 | if (&from == this) return; |
605 | Clear(); |
606 | MergeFrom(from); |
607 | } |
608 | |
609 | bool FullTypeDef::IsInitialized() const { |
610 | return true; |
611 | } |
612 | |
613 | void FullTypeDef::InternalSwap(FullTypeDef* other) { |
614 | using std::swap; |
615 | _internal_metadata_.Swap(&other->_internal_metadata_); |
616 | CastToBase(&args_)->InternalSwap(CastToBase(&other->args_)); |
617 | swap(type_id_, other->type_id_); |
618 | swap(attr_, other->attr_); |
619 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
620 | } |
621 | |
622 | ::PROTOBUF_NAMESPACE_ID::Metadata FullTypeDef::GetMetadata() const { |
623 | return GetMetadataStatic(); |
624 | } |
625 | |
626 | |
627 | // @@protoc_insertion_point(namespace_scope) |
628 | } // namespace tensorflow |
629 | PROTOBUF_NAMESPACE_OPEN |
630 | template<> PROTOBUF_NOINLINE ::tensorflow::FullTypeDef* Arena::CreateMaybeMessage< ::tensorflow::FullTypeDef >(Arena* arena) { |
631 | return Arena::CreateMessageInternal< ::tensorflow::FullTypeDef >(arena); |
632 | } |
633 | PROTOBUF_NAMESPACE_CLOSE |
634 | |
635 | // @@protoc_insertion_point(global_scope) |
636 | #include <google/protobuf/port_undef.inc> |
637 | |