1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/dataset_metadata.proto |
3 | |
4 | #include "tensorflow/core/framework/dataset_metadata.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 | namespace tensorflow { |
19 | namespace data { |
20 | class MetadataDefaultTypeInternal { |
21 | public: |
22 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Metadata> _instance; |
23 | } _Metadata_default_instance_; |
24 | } // namespace data |
25 | } // namespace tensorflow |
26 | static void InitDefaultsscc_info_Metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto() { |
27 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
28 | |
29 | { |
30 | void* ptr = &::tensorflow::data::_Metadata_default_instance_; |
31 | new (ptr) ::tensorflow::data::Metadata(); |
32 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
33 | } |
34 | ::tensorflow::data::Metadata::InitAsDefaultInstance(); |
35 | } |
36 | |
37 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto = |
38 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto}, {}}; |
39 | |
40 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto[1]; |
41 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto = nullptr; |
42 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto = nullptr; |
43 | |
44 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
45 | ~0u, // no _has_bits_ |
46 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Metadata, _internal_metadata_), |
47 | ~0u, // no _extensions_ |
48 | ~0u, // no _oneof_case_ |
49 | ~0u, // no _weak_field_map_ |
50 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Metadata, name_), |
51 | }; |
52 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
53 | { 0, -1, sizeof(::tensorflow::data::Metadata)}, |
54 | }; |
55 | |
56 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
57 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_Metadata_default_instance_), |
58 | }; |
59 | |
60 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
61 | "\n0tensorflow/core/framework/dataset_meta" |
62 | "data.proto\022\017tensorflow.data\"\030\n\010Metadata\022" |
63 | "\014\n\004name\030\001 \001(\014BYZWgithub.com/tensorflow/t" |
64 | "ensorflow/tensorflow/go/core/framework/d" |
65 | "ataset_metadata_go_protob\006proto3" |
66 | ; |
67 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_deps[1] = { |
68 | }; |
69 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_sccs[1] = { |
70 | &scc_info_Metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto.base, |
71 | }; |
72 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_once; |
73 | static bool descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_initialized = false; |
74 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto = { |
75 | &descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto, "tensorflow/core/framework/dataset_metadata.proto" , 192, |
76 | &descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto_deps, 1, 0, |
77 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto::offsets, |
78 | file_level_metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto, 1, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto, |
79 | }; |
80 | |
81 | // Force running AddDescriptors() at dynamic initialization time. |
82 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto), true); |
83 | namespace tensorflow { |
84 | namespace data { |
85 | |
86 | // =================================================================== |
87 | |
88 | void Metadata::InitAsDefaultInstance() { |
89 | } |
90 | class Metadata::_Internal { |
91 | public: |
92 | }; |
93 | |
94 | Metadata::Metadata() |
95 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
96 | SharedCtor(); |
97 | // @@protoc_insertion_point(constructor:tensorflow.data.Metadata) |
98 | } |
99 | Metadata::Metadata(const Metadata& from) |
100 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
101 | _internal_metadata_(nullptr) { |
102 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
103 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
104 | if (!from.name().empty()) { |
105 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
106 | } |
107 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.Metadata) |
108 | } |
109 | |
110 | void Metadata::SharedCtor() { |
111 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto.base); |
112 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
113 | } |
114 | |
115 | Metadata::~Metadata() { |
116 | // @@protoc_insertion_point(destructor:tensorflow.data.Metadata) |
117 | SharedDtor(); |
118 | } |
119 | |
120 | void Metadata::SharedDtor() { |
121 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
122 | } |
123 | |
124 | void Metadata::SetCachedSize(int size) const { |
125 | _cached_size_.Set(size); |
126 | } |
127 | const Metadata& Metadata::default_instance() { |
128 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Metadata_tensorflow_2fcore_2fframework_2fdataset_5fmetadata_2eproto.base); |
129 | return *internal_default_instance(); |
130 | } |
131 | |
132 | |
133 | void Metadata::Clear() { |
134 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.Metadata) |
135 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
136 | // Prevent compiler warnings about cached_has_bits being unused |
137 | (void) cached_has_bits; |
138 | |
139 | name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
140 | _internal_metadata_.Clear(); |
141 | } |
142 | |
143 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
144 | const char* Metadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
145 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
146 | while (!ctx->Done(&ptr)) { |
147 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
148 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
149 | CHK_(ptr); |
150 | switch (tag >> 3) { |
151 | // bytes name = 1; |
152 | case 1: |
153 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
154 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_name(), ptr, ctx); |
155 | CHK_(ptr); |
156 | } else goto handle_unusual; |
157 | continue; |
158 | default: { |
159 | handle_unusual: |
160 | if ((tag & 7) == 4 || tag == 0) { |
161 | ctx->SetLastTag(tag); |
162 | goto success; |
163 | } |
164 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
165 | CHK_(ptr != nullptr); |
166 | continue; |
167 | } |
168 | } // switch |
169 | } // while |
170 | success: |
171 | return ptr; |
172 | failure: |
173 | ptr = nullptr; |
174 | goto success; |
175 | #undef CHK_ |
176 | } |
177 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
178 | bool Metadata::MergePartialFromCodedStream( |
179 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
180 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
181 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
182 | // @@protoc_insertion_point(parse_start:tensorflow.data.Metadata) |
183 | for (;;) { |
184 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
185 | tag = p.first; |
186 | if (!p.second) goto handle_unusual; |
187 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
188 | // bytes name = 1; |
189 | case 1: { |
190 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
191 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
192 | input, this->mutable_name())); |
193 | } else { |
194 | goto handle_unusual; |
195 | } |
196 | break; |
197 | } |
198 | |
199 | default: { |
200 | handle_unusual: |
201 | if (tag == 0) { |
202 | goto success; |
203 | } |
204 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
205 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
206 | break; |
207 | } |
208 | } |
209 | } |
210 | success: |
211 | // @@protoc_insertion_point(parse_success:tensorflow.data.Metadata) |
212 | return true; |
213 | failure: |
214 | // @@protoc_insertion_point(parse_failure:tensorflow.data.Metadata) |
215 | return false; |
216 | #undef DO_ |
217 | } |
218 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
219 | |
220 | void Metadata::SerializeWithCachedSizes( |
221 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
222 | // @@protoc_insertion_point(serialize_start:tensorflow.data.Metadata) |
223 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
224 | (void) cached_has_bits; |
225 | |
226 | // bytes name = 1; |
227 | if (this->name().size() > 0) { |
228 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
229 | 1, this->name(), output); |
230 | } |
231 | |
232 | if (_internal_metadata_.have_unknown_fields()) { |
233 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
234 | _internal_metadata_.unknown_fields(), output); |
235 | } |
236 | // @@protoc_insertion_point(serialize_end:tensorflow.data.Metadata) |
237 | } |
238 | |
239 | ::PROTOBUF_NAMESPACE_ID::uint8* Metadata::InternalSerializeWithCachedSizesToArray( |
240 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
241 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.Metadata) |
242 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
243 | (void) cached_has_bits; |
244 | |
245 | // bytes name = 1; |
246 | if (this->name().size() > 0) { |
247 | target = |
248 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
249 | 1, this->name(), target); |
250 | } |
251 | |
252 | if (_internal_metadata_.have_unknown_fields()) { |
253 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
254 | _internal_metadata_.unknown_fields(), target); |
255 | } |
256 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.Metadata) |
257 | return target; |
258 | } |
259 | |
260 | size_t Metadata::ByteSizeLong() const { |
261 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.Metadata) |
262 | size_t total_size = 0; |
263 | |
264 | if (_internal_metadata_.have_unknown_fields()) { |
265 | total_size += |
266 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
267 | _internal_metadata_.unknown_fields()); |
268 | } |
269 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
270 | // Prevent compiler warnings about cached_has_bits being unused |
271 | (void) cached_has_bits; |
272 | |
273 | // bytes name = 1; |
274 | if (this->name().size() > 0) { |
275 | total_size += 1 + |
276 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
277 | this->name()); |
278 | } |
279 | |
280 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
281 | SetCachedSize(cached_size); |
282 | return total_size; |
283 | } |
284 | |
285 | void Metadata::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
286 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.Metadata) |
287 | GOOGLE_DCHECK_NE(&from, this); |
288 | const Metadata* source = |
289 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Metadata>( |
290 | &from); |
291 | if (source == nullptr) { |
292 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.Metadata) |
293 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
294 | } else { |
295 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.Metadata) |
296 | MergeFrom(*source); |
297 | } |
298 | } |
299 | |
300 | void Metadata::MergeFrom(const Metadata& from) { |
301 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.Metadata) |
302 | GOOGLE_DCHECK_NE(&from, this); |
303 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
304 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
305 | (void) cached_has_bits; |
306 | |
307 | if (from.name().size() > 0) { |
308 | |
309 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
310 | } |
311 | } |
312 | |
313 | void Metadata::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
314 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.Metadata) |
315 | if (&from == this) return; |
316 | Clear(); |
317 | MergeFrom(from); |
318 | } |
319 | |
320 | void Metadata::CopyFrom(const Metadata& from) { |
321 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.Metadata) |
322 | if (&from == this) return; |
323 | Clear(); |
324 | MergeFrom(from); |
325 | } |
326 | |
327 | bool Metadata::IsInitialized() const { |
328 | return true; |
329 | } |
330 | |
331 | void Metadata::InternalSwap(Metadata* other) { |
332 | using std::swap; |
333 | _internal_metadata_.Swap(&other->_internal_metadata_); |
334 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
335 | GetArenaNoVirtual()); |
336 | } |
337 | |
338 | ::PROTOBUF_NAMESPACE_ID::Metadata Metadata::GetMetadata() const { |
339 | return GetMetadataStatic(); |
340 | } |
341 | |
342 | |
343 | // @@protoc_insertion_point(namespace_scope) |
344 | } // namespace data |
345 | } // namespace tensorflow |
346 | PROTOBUF_NAMESPACE_OPEN |
347 | template<> PROTOBUF_NOINLINE ::tensorflow::data::Metadata* Arena::CreateMaybeMessage< ::tensorflow::data::Metadata >(Arena* arena) { |
348 | return Arena::CreateInternal< ::tensorflow::data::Metadata >(arena); |
349 | } |
350 | PROTOBUF_NAMESPACE_CLOSE |
351 | |
352 | // @@protoc_insertion_point(global_scope) |
353 | #include <google/protobuf/port_undef.inc> |
354 | |