1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/protobuf/data_service.proto |
3 | |
4 | #include "tensorflow/core/protobuf/data_service.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 ProcessingModeDefDefaultTypeInternal { |
21 | public: |
22 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProcessingModeDef> _instance; |
23 | } _ProcessingModeDef_default_instance_; |
24 | class DataServiceMetadataDefaultTypeInternal { |
25 | public: |
26 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DataServiceMetadata> _instance; |
27 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr element_spec_; |
28 | } _DataServiceMetadata_default_instance_; |
29 | class CrossTrainerCacheOptionsDefaultTypeInternal { |
30 | public: |
31 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CrossTrainerCacheOptions> _instance; |
32 | } _CrossTrainerCacheOptions_default_instance_; |
33 | class DataServiceConfigDefaultTypeInternal { |
34 | public: |
35 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DataServiceConfig> _instance; |
36 | } _DataServiceConfig_default_instance_; |
37 | } // namespace data |
38 | } // namespace tensorflow |
39 | static void InitDefaultsscc_info_CrossTrainerCacheOptions_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto() { |
40 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
41 | |
42 | { |
43 | void* ptr = &::tensorflow::data::_CrossTrainerCacheOptions_default_instance_; |
44 | new (ptr) ::tensorflow::data::CrossTrainerCacheOptions(); |
45 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
46 | } |
47 | ::tensorflow::data::CrossTrainerCacheOptions::InitAsDefaultInstance(); |
48 | } |
49 | |
50 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CrossTrainerCacheOptions_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = |
51 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CrossTrainerCacheOptions_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto}, {}}; |
52 | |
53 | static void InitDefaultsscc_info_DataServiceConfig_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto() { |
54 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
55 | |
56 | { |
57 | void* ptr = &::tensorflow::data::_DataServiceConfig_default_instance_; |
58 | new (ptr) ::tensorflow::data::DataServiceConfig(); |
59 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
60 | } |
61 | ::tensorflow::data::DataServiceConfig::InitAsDefaultInstance(); |
62 | } |
63 | |
64 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DataServiceConfig_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = |
65 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DataServiceConfig_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto}, {}}; |
66 | |
67 | static void InitDefaultsscc_info_DataServiceMetadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto() { |
68 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
69 | |
70 | { |
71 | void* ptr = &::tensorflow::data::_DataServiceMetadata_default_instance_; |
72 | new (ptr) ::tensorflow::data::DataServiceMetadata(); |
73 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
74 | } |
75 | ::tensorflow::data::DataServiceMetadata::InitAsDefaultInstance(); |
76 | } |
77 | |
78 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DataServiceMetadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = |
79 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DataServiceMetadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto}, {}}; |
80 | |
81 | static void InitDefaultsscc_info_ProcessingModeDef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto() { |
82 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
83 | |
84 | { |
85 | void* ptr = &::tensorflow::data::_ProcessingModeDef_default_instance_; |
86 | new (ptr) ::tensorflow::data::ProcessingModeDef(); |
87 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
88 | } |
89 | ::tensorflow::data::ProcessingModeDef::InitAsDefaultInstance(); |
90 | } |
91 | |
92 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProcessingModeDef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = |
93 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ProcessingModeDef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto}, {}}; |
94 | |
95 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto[4]; |
96 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto[3]; |
97 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = nullptr; |
98 | |
99 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
100 | ~0u, // no _has_bits_ |
101 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::ProcessingModeDef, _internal_metadata_), |
102 | ~0u, // no _extensions_ |
103 | ~0u, // no _oneof_case_ |
104 | ~0u, // no _weak_field_map_ |
105 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::ProcessingModeDef, sharding_policy_), |
106 | ~0u, // no _has_bits_ |
107 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceMetadata, _internal_metadata_), |
108 | ~0u, // no _extensions_ |
109 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceMetadata, _oneof_case_[0]), |
110 | ~0u, // no _weak_field_map_ |
111 | offsetof(::tensorflow::data::DataServiceMetadataDefaultTypeInternal, element_spec_), |
112 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceMetadata, compression_), |
113 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceMetadata, cardinality_), |
114 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceMetadata, optional_element_spec_), |
115 | ~0u, // no _has_bits_ |
116 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::CrossTrainerCacheOptions, _internal_metadata_), |
117 | ~0u, // no _extensions_ |
118 | ~0u, // no _oneof_case_ |
119 | ~0u, // no _weak_field_map_ |
120 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::CrossTrainerCacheOptions, trainer_id_), |
121 | ~0u, // no _has_bits_ |
122 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceConfig, _internal_metadata_), |
123 | ~0u, // no _extensions_ |
124 | ~0u, // no _oneof_case_ |
125 | ~0u, // no _weak_field_map_ |
126 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DataServiceConfig, deployment_mode_), |
127 | }; |
128 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
129 | { 0, -1, sizeof(::tensorflow::data::ProcessingModeDef)}, |
130 | { 6, -1, sizeof(::tensorflow::data::DataServiceMetadata)}, |
131 | { 15, -1, sizeof(::tensorflow::data::CrossTrainerCacheOptions)}, |
132 | { 21, -1, sizeof(::tensorflow::data::DataServiceConfig)}, |
133 | }; |
134 | |
135 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
136 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_ProcessingModeDef_default_instance_), |
137 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_DataServiceMetadata_default_instance_), |
138 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_CrossTrainerCacheOptions_default_instance_), |
139 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_DataServiceConfig_default_instance_), |
140 | }; |
141 | |
142 | const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
143 | "\n+tensorflow/core/protobuf/data_service." |
144 | "proto\022\017tensorflow.data\"\267\001\n\021ProcessingMod" |
145 | "eDef\022J\n\017sharding_policy\030\001 \001(\01621.tensorfl" |
146 | "ow.data.ProcessingModeDef.ShardingPolicy" |
147 | "\"V\n\016ShardingPolicy\022\007\n\003OFF\020\000\022\013\n\007DYNAMIC\020\001" |
148 | "\022\010\n\004FILE\020\002\022\010\n\004DATA\020\003\022\020\n\014FILE_OR_DATA\020\004\022\010" |
149 | "\n\004HINT\020\005\"\373\001\n\023DataServiceMetadata\022\026\n\014elem" |
150 | "ent_spec\030\001 \001(\014H\000\022E\n\013compression\030\002 \001(\01620." |
151 | "tensorflow.data.DataServiceMetadata.Comp" |
152 | "ression\022\023\n\013cardinality\030\003 \001(\003\"W\n\013Compress" |
153 | "ion\022\033\n\027COMPRESSION_UNSPECIFIED\020\000\022\023\n\017COMP" |
154 | "RESSION_OFF\020\001\022\026\n\022COMPRESSION_SNAPPY\020\002B\027\n" |
155 | "\025optional_element_spec\".\n\030CrossTrainerCa" |
156 | "cheOptions\022\022\n\ntrainer_id\030\001 \001(\t\"M\n\021DataSe" |
157 | "rviceConfig\0228\n\017deployment_mode\030\001 \001(\0162\037.t" |
158 | "ensorflow.data.DeploymentMode*\210\001\n\016Deploy" |
159 | "mentMode\022\037\n\033DEPLOYMENT_MODE_UNSPECIFIED\020" |
160 | "\000\022\035\n\031DEPLOYMENT_MODE_COLOCATED\020\001\022\032\n\026DEPL" |
161 | "OYMENT_MODE_REMOTE\020\002\022\032\n\026DEPLOYMENT_MODE_" |
162 | "HYBRID\020\003BWZUgithub.com/tensorflow/tensor" |
163 | "flow/tensorflow/go/core/protobuf/for_cor" |
164 | "e_protos_go_protob\006proto3" |
165 | ; |
166 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_deps[1] = { |
167 | }; |
168 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_sccs[4] = { |
169 | &scc_info_CrossTrainerCacheOptions_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base, |
170 | &scc_info_DataServiceConfig_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base, |
171 | &scc_info_DataServiceMetadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base, |
172 | &scc_info_ProcessingModeDef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base, |
173 | }; |
174 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_once; |
175 | static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_initialized = false; |
176 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = { |
177 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto, "tensorflow/core/protobuf/data_service.proto" , 865, |
178 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto_deps, 4, 0, |
179 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto::offsets, |
180 | file_level_metadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto, 4, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto, |
181 | }; |
182 | |
183 | // Force running AddDescriptors() at dynamic initialization time. |
184 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto), true); |
185 | namespace tensorflow { |
186 | namespace data { |
187 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ProcessingModeDef_ShardingPolicy_descriptor() { |
188 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto); |
189 | return file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto[0]; |
190 | } |
191 | bool ProcessingModeDef_ShardingPolicy_IsValid(int value) { |
192 | switch (value) { |
193 | case 0: |
194 | case 1: |
195 | case 2: |
196 | case 3: |
197 | case 4: |
198 | case 5: |
199 | return true; |
200 | default: |
201 | return false; |
202 | } |
203 | } |
204 | |
205 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
206 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::OFF; |
207 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::DYNAMIC; |
208 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::FILE; |
209 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::DATA; |
210 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::FILE_OR_DATA; |
211 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::HINT; |
212 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::ShardingPolicy_MIN; |
213 | constexpr ProcessingModeDef_ShardingPolicy ProcessingModeDef::ShardingPolicy_MAX; |
214 | constexpr int ProcessingModeDef::ShardingPolicy_ARRAYSIZE; |
215 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
216 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataServiceMetadata_Compression_descriptor() { |
217 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto); |
218 | return file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto[1]; |
219 | } |
220 | bool DataServiceMetadata_Compression_IsValid(int value) { |
221 | switch (value) { |
222 | case 0: |
223 | case 1: |
224 | case 2: |
225 | return true; |
226 | default: |
227 | return false; |
228 | } |
229 | } |
230 | |
231 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
232 | constexpr DataServiceMetadata_Compression DataServiceMetadata::COMPRESSION_UNSPECIFIED; |
233 | constexpr DataServiceMetadata_Compression DataServiceMetadata::COMPRESSION_OFF; |
234 | constexpr DataServiceMetadata_Compression DataServiceMetadata::COMPRESSION_SNAPPY; |
235 | constexpr DataServiceMetadata_Compression DataServiceMetadata::Compression_MIN; |
236 | constexpr DataServiceMetadata_Compression DataServiceMetadata::Compression_MAX; |
237 | constexpr int DataServiceMetadata::Compression_ARRAYSIZE; |
238 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
239 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeploymentMode_descriptor() { |
240 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto); |
241 | return file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto[2]; |
242 | } |
243 | bool DeploymentMode_IsValid(int value) { |
244 | switch (value) { |
245 | case 0: |
246 | case 1: |
247 | case 2: |
248 | case 3: |
249 | return true; |
250 | default: |
251 | return false; |
252 | } |
253 | } |
254 | |
255 | |
256 | // =================================================================== |
257 | |
258 | void ProcessingModeDef::InitAsDefaultInstance() { |
259 | } |
260 | class ProcessingModeDef::_Internal { |
261 | public: |
262 | }; |
263 | |
264 | ProcessingModeDef::ProcessingModeDef() |
265 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
266 | SharedCtor(); |
267 | // @@protoc_insertion_point(constructor:tensorflow.data.ProcessingModeDef) |
268 | } |
269 | ProcessingModeDef::ProcessingModeDef(const ProcessingModeDef& from) |
270 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
271 | _internal_metadata_(nullptr) { |
272 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
273 | sharding_policy_ = from.sharding_policy_; |
274 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.ProcessingModeDef) |
275 | } |
276 | |
277 | void ProcessingModeDef::SharedCtor() { |
278 | sharding_policy_ = 0; |
279 | } |
280 | |
281 | ProcessingModeDef::~ProcessingModeDef() { |
282 | // @@protoc_insertion_point(destructor:tensorflow.data.ProcessingModeDef) |
283 | SharedDtor(); |
284 | } |
285 | |
286 | void ProcessingModeDef::SharedDtor() { |
287 | } |
288 | |
289 | void ProcessingModeDef::SetCachedSize(int size) const { |
290 | _cached_size_.Set(size); |
291 | } |
292 | const ProcessingModeDef& ProcessingModeDef::default_instance() { |
293 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProcessingModeDef_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base); |
294 | return *internal_default_instance(); |
295 | } |
296 | |
297 | |
298 | void ProcessingModeDef::Clear() { |
299 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.ProcessingModeDef) |
300 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
301 | // Prevent compiler warnings about cached_has_bits being unused |
302 | (void) cached_has_bits; |
303 | |
304 | sharding_policy_ = 0; |
305 | _internal_metadata_.Clear(); |
306 | } |
307 | |
308 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
309 | const char* ProcessingModeDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
310 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
311 | while (!ctx->Done(&ptr)) { |
312 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
313 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
314 | CHK_(ptr); |
315 | switch (tag >> 3) { |
316 | // .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; |
317 | case 1: |
318 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
319 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
320 | CHK_(ptr); |
321 | set_sharding_policy(static_cast<::tensorflow::data::ProcessingModeDef_ShardingPolicy>(val)); |
322 | } else goto handle_unusual; |
323 | continue; |
324 | default: { |
325 | handle_unusual: |
326 | if ((tag & 7) == 4 || tag == 0) { |
327 | ctx->SetLastTag(tag); |
328 | goto success; |
329 | } |
330 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
331 | CHK_(ptr != nullptr); |
332 | continue; |
333 | } |
334 | } // switch |
335 | } // while |
336 | success: |
337 | return ptr; |
338 | failure: |
339 | ptr = nullptr; |
340 | goto success; |
341 | #undef CHK_ |
342 | } |
343 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
344 | bool ProcessingModeDef::MergePartialFromCodedStream( |
345 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
346 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
347 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
348 | // @@protoc_insertion_point(parse_start:tensorflow.data.ProcessingModeDef) |
349 | for (;;) { |
350 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
351 | tag = p.first; |
352 | if (!p.second) goto handle_unusual; |
353 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
354 | // .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; |
355 | case 1: { |
356 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
357 | int value = 0; |
358 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
359 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
360 | input, &value))); |
361 | set_sharding_policy(static_cast< ::tensorflow::data::ProcessingModeDef_ShardingPolicy >(value)); |
362 | } else { |
363 | goto handle_unusual; |
364 | } |
365 | break; |
366 | } |
367 | |
368 | default: { |
369 | handle_unusual: |
370 | if (tag == 0) { |
371 | goto success; |
372 | } |
373 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
374 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
375 | break; |
376 | } |
377 | } |
378 | } |
379 | success: |
380 | // @@protoc_insertion_point(parse_success:tensorflow.data.ProcessingModeDef) |
381 | return true; |
382 | failure: |
383 | // @@protoc_insertion_point(parse_failure:tensorflow.data.ProcessingModeDef) |
384 | return false; |
385 | #undef DO_ |
386 | } |
387 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
388 | |
389 | void ProcessingModeDef::SerializeWithCachedSizes( |
390 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
391 | // @@protoc_insertion_point(serialize_start:tensorflow.data.ProcessingModeDef) |
392 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
393 | (void) cached_has_bits; |
394 | |
395 | // .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; |
396 | if (this->sharding_policy() != 0) { |
397 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
398 | 1, this->sharding_policy(), output); |
399 | } |
400 | |
401 | if (_internal_metadata_.have_unknown_fields()) { |
402 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
403 | _internal_metadata_.unknown_fields(), output); |
404 | } |
405 | // @@protoc_insertion_point(serialize_end:tensorflow.data.ProcessingModeDef) |
406 | } |
407 | |
408 | ::PROTOBUF_NAMESPACE_ID::uint8* ProcessingModeDef::InternalSerializeWithCachedSizesToArray( |
409 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
410 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.ProcessingModeDef) |
411 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
412 | (void) cached_has_bits; |
413 | |
414 | // .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; |
415 | if (this->sharding_policy() != 0) { |
416 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
417 | 1, this->sharding_policy(), target); |
418 | } |
419 | |
420 | if (_internal_metadata_.have_unknown_fields()) { |
421 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
422 | _internal_metadata_.unknown_fields(), target); |
423 | } |
424 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.ProcessingModeDef) |
425 | return target; |
426 | } |
427 | |
428 | size_t ProcessingModeDef::ByteSizeLong() const { |
429 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.ProcessingModeDef) |
430 | size_t total_size = 0; |
431 | |
432 | if (_internal_metadata_.have_unknown_fields()) { |
433 | total_size += |
434 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
435 | _internal_metadata_.unknown_fields()); |
436 | } |
437 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
438 | // Prevent compiler warnings about cached_has_bits being unused |
439 | (void) cached_has_bits; |
440 | |
441 | // .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1; |
442 | if (this->sharding_policy() != 0) { |
443 | total_size += 1 + |
444 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->sharding_policy()); |
445 | } |
446 | |
447 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
448 | SetCachedSize(cached_size); |
449 | return total_size; |
450 | } |
451 | |
452 | void ProcessingModeDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
453 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.ProcessingModeDef) |
454 | GOOGLE_DCHECK_NE(&from, this); |
455 | const ProcessingModeDef* source = |
456 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ProcessingModeDef>( |
457 | &from); |
458 | if (source == nullptr) { |
459 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.ProcessingModeDef) |
460 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
461 | } else { |
462 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.ProcessingModeDef) |
463 | MergeFrom(*source); |
464 | } |
465 | } |
466 | |
467 | void ProcessingModeDef::MergeFrom(const ProcessingModeDef& from) { |
468 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.ProcessingModeDef) |
469 | GOOGLE_DCHECK_NE(&from, this); |
470 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
471 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
472 | (void) cached_has_bits; |
473 | |
474 | if (from.sharding_policy() != 0) { |
475 | set_sharding_policy(from.sharding_policy()); |
476 | } |
477 | } |
478 | |
479 | void ProcessingModeDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
480 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.ProcessingModeDef) |
481 | if (&from == this) return; |
482 | Clear(); |
483 | MergeFrom(from); |
484 | } |
485 | |
486 | void ProcessingModeDef::CopyFrom(const ProcessingModeDef& from) { |
487 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.ProcessingModeDef) |
488 | if (&from == this) return; |
489 | Clear(); |
490 | MergeFrom(from); |
491 | } |
492 | |
493 | bool ProcessingModeDef::IsInitialized() const { |
494 | return true; |
495 | } |
496 | |
497 | void ProcessingModeDef::InternalSwap(ProcessingModeDef* other) { |
498 | using std::swap; |
499 | _internal_metadata_.Swap(&other->_internal_metadata_); |
500 | swap(sharding_policy_, other->sharding_policy_); |
501 | } |
502 | |
503 | ::PROTOBUF_NAMESPACE_ID::Metadata ProcessingModeDef::GetMetadata() const { |
504 | return GetMetadataStatic(); |
505 | } |
506 | |
507 | |
508 | // =================================================================== |
509 | |
510 | void DataServiceMetadata::InitAsDefaultInstance() { |
511 | ::tensorflow::data::_DataServiceMetadata_default_instance_.element_spec_.UnsafeSetDefault( |
512 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
513 | } |
514 | class DataServiceMetadata::_Internal { |
515 | public: |
516 | }; |
517 | |
518 | DataServiceMetadata::DataServiceMetadata() |
519 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
520 | SharedCtor(); |
521 | // @@protoc_insertion_point(constructor:tensorflow.data.DataServiceMetadata) |
522 | } |
523 | DataServiceMetadata::DataServiceMetadata(const DataServiceMetadata& from) |
524 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
525 | _internal_metadata_(nullptr) { |
526 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
527 | ::memcpy(&cardinality_, &from.cardinality_, |
528 | static_cast<size_t>(reinterpret_cast<char*>(&compression_) - |
529 | reinterpret_cast<char*>(&cardinality_)) + sizeof(compression_)); |
530 | clear_has_optional_element_spec(); |
531 | switch (from.optional_element_spec_case()) { |
532 | case kElementSpec: { |
533 | set_element_spec(from.element_spec()); |
534 | break; |
535 | } |
536 | case OPTIONAL_ELEMENT_SPEC_NOT_SET: { |
537 | break; |
538 | } |
539 | } |
540 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.DataServiceMetadata) |
541 | } |
542 | |
543 | void DataServiceMetadata::SharedCtor() { |
544 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DataServiceMetadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base); |
545 | ::memset(&cardinality_, 0, static_cast<size_t>( |
546 | reinterpret_cast<char*>(&compression_) - |
547 | reinterpret_cast<char*>(&cardinality_)) + sizeof(compression_)); |
548 | clear_has_optional_element_spec(); |
549 | } |
550 | |
551 | DataServiceMetadata::~DataServiceMetadata() { |
552 | // @@protoc_insertion_point(destructor:tensorflow.data.DataServiceMetadata) |
553 | SharedDtor(); |
554 | } |
555 | |
556 | void DataServiceMetadata::SharedDtor() { |
557 | if (has_optional_element_spec()) { |
558 | clear_optional_element_spec(); |
559 | } |
560 | } |
561 | |
562 | void DataServiceMetadata::SetCachedSize(int size) const { |
563 | _cached_size_.Set(size); |
564 | } |
565 | const DataServiceMetadata& DataServiceMetadata::default_instance() { |
566 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DataServiceMetadata_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base); |
567 | return *internal_default_instance(); |
568 | } |
569 | |
570 | |
571 | void DataServiceMetadata::clear_optional_element_spec() { |
572 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.DataServiceMetadata) |
573 | switch (optional_element_spec_case()) { |
574 | case kElementSpec: { |
575 | optional_element_spec_.element_spec_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
576 | break; |
577 | } |
578 | case OPTIONAL_ELEMENT_SPEC_NOT_SET: { |
579 | break; |
580 | } |
581 | } |
582 | _oneof_case_[0] = OPTIONAL_ELEMENT_SPEC_NOT_SET; |
583 | } |
584 | |
585 | |
586 | void DataServiceMetadata::Clear() { |
587 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.DataServiceMetadata) |
588 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
589 | // Prevent compiler warnings about cached_has_bits being unused |
590 | (void) cached_has_bits; |
591 | |
592 | ::memset(&cardinality_, 0, static_cast<size_t>( |
593 | reinterpret_cast<char*>(&compression_) - |
594 | reinterpret_cast<char*>(&cardinality_)) + sizeof(compression_)); |
595 | clear_optional_element_spec(); |
596 | _internal_metadata_.Clear(); |
597 | } |
598 | |
599 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
600 | const char* DataServiceMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
601 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
602 | while (!ctx->Done(&ptr)) { |
603 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
604 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
605 | CHK_(ptr); |
606 | switch (tag >> 3) { |
607 | // bytes element_spec = 1; |
608 | case 1: |
609 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
610 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_element_spec(), ptr, ctx); |
611 | CHK_(ptr); |
612 | } else goto handle_unusual; |
613 | continue; |
614 | // .tensorflow.data.DataServiceMetadata.Compression compression = 2; |
615 | case 2: |
616 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
617 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
618 | CHK_(ptr); |
619 | set_compression(static_cast<::tensorflow::data::DataServiceMetadata_Compression>(val)); |
620 | } else goto handle_unusual; |
621 | continue; |
622 | // int64 cardinality = 3; |
623 | case 3: |
624 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
625 | cardinality_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
626 | CHK_(ptr); |
627 | } else goto handle_unusual; |
628 | continue; |
629 | default: { |
630 | handle_unusual: |
631 | if ((tag & 7) == 4 || tag == 0) { |
632 | ctx->SetLastTag(tag); |
633 | goto success; |
634 | } |
635 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
636 | CHK_(ptr != nullptr); |
637 | continue; |
638 | } |
639 | } // switch |
640 | } // while |
641 | success: |
642 | return ptr; |
643 | failure: |
644 | ptr = nullptr; |
645 | goto success; |
646 | #undef CHK_ |
647 | } |
648 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
649 | bool DataServiceMetadata::MergePartialFromCodedStream( |
650 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
651 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
652 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
653 | // @@protoc_insertion_point(parse_start:tensorflow.data.DataServiceMetadata) |
654 | for (;;) { |
655 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
656 | tag = p.first; |
657 | if (!p.second) goto handle_unusual; |
658 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
659 | // bytes element_spec = 1; |
660 | case 1: { |
661 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
662 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
663 | input, this->mutable_element_spec())); |
664 | } else { |
665 | goto handle_unusual; |
666 | } |
667 | break; |
668 | } |
669 | |
670 | // .tensorflow.data.DataServiceMetadata.Compression compression = 2; |
671 | case 2: { |
672 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
673 | int value = 0; |
674 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
675 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
676 | input, &value))); |
677 | set_compression(static_cast< ::tensorflow::data::DataServiceMetadata_Compression >(value)); |
678 | } else { |
679 | goto handle_unusual; |
680 | } |
681 | break; |
682 | } |
683 | |
684 | // int64 cardinality = 3; |
685 | case 3: { |
686 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
687 | |
688 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
689 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
690 | input, &cardinality_))); |
691 | } else { |
692 | goto handle_unusual; |
693 | } |
694 | break; |
695 | } |
696 | |
697 | default: { |
698 | handle_unusual: |
699 | if (tag == 0) { |
700 | goto success; |
701 | } |
702 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
703 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
704 | break; |
705 | } |
706 | } |
707 | } |
708 | success: |
709 | // @@protoc_insertion_point(parse_success:tensorflow.data.DataServiceMetadata) |
710 | return true; |
711 | failure: |
712 | // @@protoc_insertion_point(parse_failure:tensorflow.data.DataServiceMetadata) |
713 | return false; |
714 | #undef DO_ |
715 | } |
716 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
717 | |
718 | void DataServiceMetadata::SerializeWithCachedSizes( |
719 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
720 | // @@protoc_insertion_point(serialize_start:tensorflow.data.DataServiceMetadata) |
721 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
722 | (void) cached_has_bits; |
723 | |
724 | // bytes element_spec = 1; |
725 | if (has_element_spec()) { |
726 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
727 | 1, this->element_spec(), output); |
728 | } |
729 | |
730 | // .tensorflow.data.DataServiceMetadata.Compression compression = 2; |
731 | if (this->compression() != 0) { |
732 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
733 | 2, this->compression(), output); |
734 | } |
735 | |
736 | // int64 cardinality = 3; |
737 | if (this->cardinality() != 0) { |
738 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->cardinality(), output); |
739 | } |
740 | |
741 | if (_internal_metadata_.have_unknown_fields()) { |
742 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
743 | _internal_metadata_.unknown_fields(), output); |
744 | } |
745 | // @@protoc_insertion_point(serialize_end:tensorflow.data.DataServiceMetadata) |
746 | } |
747 | |
748 | ::PROTOBUF_NAMESPACE_ID::uint8* DataServiceMetadata::InternalSerializeWithCachedSizesToArray( |
749 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
750 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.DataServiceMetadata) |
751 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
752 | (void) cached_has_bits; |
753 | |
754 | // bytes element_spec = 1; |
755 | if (has_element_spec()) { |
756 | target = |
757 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
758 | 1, this->element_spec(), target); |
759 | } |
760 | |
761 | // .tensorflow.data.DataServiceMetadata.Compression compression = 2; |
762 | if (this->compression() != 0) { |
763 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
764 | 2, this->compression(), target); |
765 | } |
766 | |
767 | // int64 cardinality = 3; |
768 | if (this->cardinality() != 0) { |
769 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->cardinality(), target); |
770 | } |
771 | |
772 | if (_internal_metadata_.have_unknown_fields()) { |
773 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
774 | _internal_metadata_.unknown_fields(), target); |
775 | } |
776 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.DataServiceMetadata) |
777 | return target; |
778 | } |
779 | |
780 | size_t DataServiceMetadata::ByteSizeLong() const { |
781 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.DataServiceMetadata) |
782 | size_t total_size = 0; |
783 | |
784 | if (_internal_metadata_.have_unknown_fields()) { |
785 | total_size += |
786 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
787 | _internal_metadata_.unknown_fields()); |
788 | } |
789 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
790 | // Prevent compiler warnings about cached_has_bits being unused |
791 | (void) cached_has_bits; |
792 | |
793 | // int64 cardinality = 3; |
794 | if (this->cardinality() != 0) { |
795 | total_size += 1 + |
796 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
797 | this->cardinality()); |
798 | } |
799 | |
800 | // .tensorflow.data.DataServiceMetadata.Compression compression = 2; |
801 | if (this->compression() != 0) { |
802 | total_size += 1 + |
803 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->compression()); |
804 | } |
805 | |
806 | switch (optional_element_spec_case()) { |
807 | // bytes element_spec = 1; |
808 | case kElementSpec: { |
809 | total_size += 1 + |
810 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
811 | this->element_spec()); |
812 | break; |
813 | } |
814 | case OPTIONAL_ELEMENT_SPEC_NOT_SET: { |
815 | break; |
816 | } |
817 | } |
818 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
819 | SetCachedSize(cached_size); |
820 | return total_size; |
821 | } |
822 | |
823 | void DataServiceMetadata::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
824 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.DataServiceMetadata) |
825 | GOOGLE_DCHECK_NE(&from, this); |
826 | const DataServiceMetadata* source = |
827 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DataServiceMetadata>( |
828 | &from); |
829 | if (source == nullptr) { |
830 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.DataServiceMetadata) |
831 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
832 | } else { |
833 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.DataServiceMetadata) |
834 | MergeFrom(*source); |
835 | } |
836 | } |
837 | |
838 | void DataServiceMetadata::MergeFrom(const DataServiceMetadata& from) { |
839 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.DataServiceMetadata) |
840 | GOOGLE_DCHECK_NE(&from, this); |
841 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
842 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
843 | (void) cached_has_bits; |
844 | |
845 | if (from.cardinality() != 0) { |
846 | set_cardinality(from.cardinality()); |
847 | } |
848 | if (from.compression() != 0) { |
849 | set_compression(from.compression()); |
850 | } |
851 | switch (from.optional_element_spec_case()) { |
852 | case kElementSpec: { |
853 | set_element_spec(from.element_spec()); |
854 | break; |
855 | } |
856 | case OPTIONAL_ELEMENT_SPEC_NOT_SET: { |
857 | break; |
858 | } |
859 | } |
860 | } |
861 | |
862 | void DataServiceMetadata::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
863 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.DataServiceMetadata) |
864 | if (&from == this) return; |
865 | Clear(); |
866 | MergeFrom(from); |
867 | } |
868 | |
869 | void DataServiceMetadata::CopyFrom(const DataServiceMetadata& from) { |
870 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.DataServiceMetadata) |
871 | if (&from == this) return; |
872 | Clear(); |
873 | MergeFrom(from); |
874 | } |
875 | |
876 | bool DataServiceMetadata::IsInitialized() const { |
877 | return true; |
878 | } |
879 | |
880 | void DataServiceMetadata::InternalSwap(DataServiceMetadata* other) { |
881 | using std::swap; |
882 | _internal_metadata_.Swap(&other->_internal_metadata_); |
883 | swap(cardinality_, other->cardinality_); |
884 | swap(compression_, other->compression_); |
885 | swap(optional_element_spec_, other->optional_element_spec_); |
886 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
887 | } |
888 | |
889 | ::PROTOBUF_NAMESPACE_ID::Metadata DataServiceMetadata::GetMetadata() const { |
890 | return GetMetadataStatic(); |
891 | } |
892 | |
893 | |
894 | // =================================================================== |
895 | |
896 | void CrossTrainerCacheOptions::InitAsDefaultInstance() { |
897 | } |
898 | class CrossTrainerCacheOptions::_Internal { |
899 | public: |
900 | }; |
901 | |
902 | CrossTrainerCacheOptions::CrossTrainerCacheOptions() |
903 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
904 | SharedCtor(); |
905 | // @@protoc_insertion_point(constructor:tensorflow.data.CrossTrainerCacheOptions) |
906 | } |
907 | CrossTrainerCacheOptions::CrossTrainerCacheOptions(const CrossTrainerCacheOptions& from) |
908 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
909 | _internal_metadata_(nullptr) { |
910 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
911 | trainer_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
912 | if (!from.trainer_id().empty()) { |
913 | trainer_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.trainer_id_); |
914 | } |
915 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.CrossTrainerCacheOptions) |
916 | } |
917 | |
918 | void CrossTrainerCacheOptions::SharedCtor() { |
919 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CrossTrainerCacheOptions_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base); |
920 | trainer_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
921 | } |
922 | |
923 | CrossTrainerCacheOptions::~CrossTrainerCacheOptions() { |
924 | // @@protoc_insertion_point(destructor:tensorflow.data.CrossTrainerCacheOptions) |
925 | SharedDtor(); |
926 | } |
927 | |
928 | void CrossTrainerCacheOptions::SharedDtor() { |
929 | trainer_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
930 | } |
931 | |
932 | void CrossTrainerCacheOptions::SetCachedSize(int size) const { |
933 | _cached_size_.Set(size); |
934 | } |
935 | const CrossTrainerCacheOptions& CrossTrainerCacheOptions::default_instance() { |
936 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CrossTrainerCacheOptions_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base); |
937 | return *internal_default_instance(); |
938 | } |
939 | |
940 | |
941 | void CrossTrainerCacheOptions::Clear() { |
942 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.CrossTrainerCacheOptions) |
943 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
944 | // Prevent compiler warnings about cached_has_bits being unused |
945 | (void) cached_has_bits; |
946 | |
947 | trainer_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
948 | _internal_metadata_.Clear(); |
949 | } |
950 | |
951 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
952 | const char* CrossTrainerCacheOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
953 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
954 | while (!ctx->Done(&ptr)) { |
955 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
956 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
957 | CHK_(ptr); |
958 | switch (tag >> 3) { |
959 | // string trainer_id = 1; |
960 | case 1: |
961 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
962 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_trainer_id(), ptr, ctx, "tensorflow.data.CrossTrainerCacheOptions.trainer_id" ); |
963 | CHK_(ptr); |
964 | } else goto handle_unusual; |
965 | continue; |
966 | default: { |
967 | handle_unusual: |
968 | if ((tag & 7) == 4 || tag == 0) { |
969 | ctx->SetLastTag(tag); |
970 | goto success; |
971 | } |
972 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
973 | CHK_(ptr != nullptr); |
974 | continue; |
975 | } |
976 | } // switch |
977 | } // while |
978 | success: |
979 | return ptr; |
980 | failure: |
981 | ptr = nullptr; |
982 | goto success; |
983 | #undef CHK_ |
984 | } |
985 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
986 | bool CrossTrainerCacheOptions::MergePartialFromCodedStream( |
987 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
988 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
989 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
990 | // @@protoc_insertion_point(parse_start:tensorflow.data.CrossTrainerCacheOptions) |
991 | for (;;) { |
992 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
993 | tag = p.first; |
994 | if (!p.second) goto handle_unusual; |
995 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
996 | // string trainer_id = 1; |
997 | case 1: { |
998 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
999 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1000 | input, this->mutable_trainer_id())); |
1001 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1002 | this->trainer_id().data(), static_cast<int>(this->trainer_id().length()), |
1003 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1004 | "tensorflow.data.CrossTrainerCacheOptions.trainer_id" )); |
1005 | } else { |
1006 | goto handle_unusual; |
1007 | } |
1008 | break; |
1009 | } |
1010 | |
1011 | default: { |
1012 | handle_unusual: |
1013 | if (tag == 0) { |
1014 | goto success; |
1015 | } |
1016 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1017 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1018 | break; |
1019 | } |
1020 | } |
1021 | } |
1022 | success: |
1023 | // @@protoc_insertion_point(parse_success:tensorflow.data.CrossTrainerCacheOptions) |
1024 | return true; |
1025 | failure: |
1026 | // @@protoc_insertion_point(parse_failure:tensorflow.data.CrossTrainerCacheOptions) |
1027 | return false; |
1028 | #undef DO_ |
1029 | } |
1030 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1031 | |
1032 | void CrossTrainerCacheOptions::SerializeWithCachedSizes( |
1033 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1034 | // @@protoc_insertion_point(serialize_start:tensorflow.data.CrossTrainerCacheOptions) |
1035 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1036 | (void) cached_has_bits; |
1037 | |
1038 | // string trainer_id = 1; |
1039 | if (this->trainer_id().size() > 0) { |
1040 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1041 | this->trainer_id().data(), static_cast<int>(this->trainer_id().length()), |
1042 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1043 | "tensorflow.data.CrossTrainerCacheOptions.trainer_id" ); |
1044 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1045 | 1, this->trainer_id(), output); |
1046 | } |
1047 | |
1048 | if (_internal_metadata_.have_unknown_fields()) { |
1049 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1050 | _internal_metadata_.unknown_fields(), output); |
1051 | } |
1052 | // @@protoc_insertion_point(serialize_end:tensorflow.data.CrossTrainerCacheOptions) |
1053 | } |
1054 | |
1055 | ::PROTOBUF_NAMESPACE_ID::uint8* CrossTrainerCacheOptions::InternalSerializeWithCachedSizesToArray( |
1056 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1057 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.CrossTrainerCacheOptions) |
1058 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1059 | (void) cached_has_bits; |
1060 | |
1061 | // string trainer_id = 1; |
1062 | if (this->trainer_id().size() > 0) { |
1063 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1064 | this->trainer_id().data(), static_cast<int>(this->trainer_id().length()), |
1065 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1066 | "tensorflow.data.CrossTrainerCacheOptions.trainer_id" ); |
1067 | target = |
1068 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1069 | 1, this->trainer_id(), target); |
1070 | } |
1071 | |
1072 | if (_internal_metadata_.have_unknown_fields()) { |
1073 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1074 | _internal_metadata_.unknown_fields(), target); |
1075 | } |
1076 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.CrossTrainerCacheOptions) |
1077 | return target; |
1078 | } |
1079 | |
1080 | size_t CrossTrainerCacheOptions::ByteSizeLong() const { |
1081 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.CrossTrainerCacheOptions) |
1082 | size_t total_size = 0; |
1083 | |
1084 | if (_internal_metadata_.have_unknown_fields()) { |
1085 | total_size += |
1086 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1087 | _internal_metadata_.unknown_fields()); |
1088 | } |
1089 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1090 | // Prevent compiler warnings about cached_has_bits being unused |
1091 | (void) cached_has_bits; |
1092 | |
1093 | // string trainer_id = 1; |
1094 | if (this->trainer_id().size() > 0) { |
1095 | total_size += 1 + |
1096 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1097 | this->trainer_id()); |
1098 | } |
1099 | |
1100 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1101 | SetCachedSize(cached_size); |
1102 | return total_size; |
1103 | } |
1104 | |
1105 | void CrossTrainerCacheOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1106 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.CrossTrainerCacheOptions) |
1107 | GOOGLE_DCHECK_NE(&from, this); |
1108 | const CrossTrainerCacheOptions* source = |
1109 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CrossTrainerCacheOptions>( |
1110 | &from); |
1111 | if (source == nullptr) { |
1112 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.CrossTrainerCacheOptions) |
1113 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1114 | } else { |
1115 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.CrossTrainerCacheOptions) |
1116 | MergeFrom(*source); |
1117 | } |
1118 | } |
1119 | |
1120 | void CrossTrainerCacheOptions::MergeFrom(const CrossTrainerCacheOptions& from) { |
1121 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.CrossTrainerCacheOptions) |
1122 | GOOGLE_DCHECK_NE(&from, this); |
1123 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1124 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1125 | (void) cached_has_bits; |
1126 | |
1127 | if (from.trainer_id().size() > 0) { |
1128 | |
1129 | trainer_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.trainer_id_); |
1130 | } |
1131 | } |
1132 | |
1133 | void CrossTrainerCacheOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1134 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.CrossTrainerCacheOptions) |
1135 | if (&from == this) return; |
1136 | Clear(); |
1137 | MergeFrom(from); |
1138 | } |
1139 | |
1140 | void CrossTrainerCacheOptions::CopyFrom(const CrossTrainerCacheOptions& from) { |
1141 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.CrossTrainerCacheOptions) |
1142 | if (&from == this) return; |
1143 | Clear(); |
1144 | MergeFrom(from); |
1145 | } |
1146 | |
1147 | bool CrossTrainerCacheOptions::IsInitialized() const { |
1148 | return true; |
1149 | } |
1150 | |
1151 | void CrossTrainerCacheOptions::InternalSwap(CrossTrainerCacheOptions* other) { |
1152 | using std::swap; |
1153 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1154 | trainer_id_.Swap(&other->trainer_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1155 | GetArenaNoVirtual()); |
1156 | } |
1157 | |
1158 | ::PROTOBUF_NAMESPACE_ID::Metadata CrossTrainerCacheOptions::GetMetadata() const { |
1159 | return GetMetadataStatic(); |
1160 | } |
1161 | |
1162 | |
1163 | // =================================================================== |
1164 | |
1165 | void DataServiceConfig::InitAsDefaultInstance() { |
1166 | } |
1167 | class DataServiceConfig::_Internal { |
1168 | public: |
1169 | }; |
1170 | |
1171 | DataServiceConfig::DataServiceConfig() |
1172 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1173 | SharedCtor(); |
1174 | // @@protoc_insertion_point(constructor:tensorflow.data.DataServiceConfig) |
1175 | } |
1176 | DataServiceConfig::DataServiceConfig(const DataServiceConfig& from) |
1177 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1178 | _internal_metadata_(nullptr) { |
1179 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1180 | deployment_mode_ = from.deployment_mode_; |
1181 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.DataServiceConfig) |
1182 | } |
1183 | |
1184 | void DataServiceConfig::SharedCtor() { |
1185 | deployment_mode_ = 0; |
1186 | } |
1187 | |
1188 | DataServiceConfig::~DataServiceConfig() { |
1189 | // @@protoc_insertion_point(destructor:tensorflow.data.DataServiceConfig) |
1190 | SharedDtor(); |
1191 | } |
1192 | |
1193 | void DataServiceConfig::SharedDtor() { |
1194 | } |
1195 | |
1196 | void DataServiceConfig::SetCachedSize(int size) const { |
1197 | _cached_size_.Set(size); |
1198 | } |
1199 | const DataServiceConfig& DataServiceConfig::default_instance() { |
1200 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DataServiceConfig_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto.base); |
1201 | return *internal_default_instance(); |
1202 | } |
1203 | |
1204 | |
1205 | void DataServiceConfig::Clear() { |
1206 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.DataServiceConfig) |
1207 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1208 | // Prevent compiler warnings about cached_has_bits being unused |
1209 | (void) cached_has_bits; |
1210 | |
1211 | deployment_mode_ = 0; |
1212 | _internal_metadata_.Clear(); |
1213 | } |
1214 | |
1215 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1216 | const char* DataServiceConfig::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1217 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1218 | while (!ctx->Done(&ptr)) { |
1219 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1220 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1221 | CHK_(ptr); |
1222 | switch (tag >> 3) { |
1223 | // .tensorflow.data.DeploymentMode deployment_mode = 1; |
1224 | case 1: |
1225 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
1226 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1227 | CHK_(ptr); |
1228 | set_deployment_mode(static_cast<::tensorflow::data::DeploymentMode>(val)); |
1229 | } else goto handle_unusual; |
1230 | continue; |
1231 | default: { |
1232 | handle_unusual: |
1233 | if ((tag & 7) == 4 || tag == 0) { |
1234 | ctx->SetLastTag(tag); |
1235 | goto success; |
1236 | } |
1237 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1238 | CHK_(ptr != nullptr); |
1239 | continue; |
1240 | } |
1241 | } // switch |
1242 | } // while |
1243 | success: |
1244 | return ptr; |
1245 | failure: |
1246 | ptr = nullptr; |
1247 | goto success; |
1248 | #undef CHK_ |
1249 | } |
1250 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1251 | bool DataServiceConfig::MergePartialFromCodedStream( |
1252 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1253 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1254 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1255 | // @@protoc_insertion_point(parse_start:tensorflow.data.DataServiceConfig) |
1256 | for (;;) { |
1257 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1258 | tag = p.first; |
1259 | if (!p.second) goto handle_unusual; |
1260 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1261 | // .tensorflow.data.DeploymentMode deployment_mode = 1; |
1262 | case 1: { |
1263 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1264 | int value = 0; |
1265 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1266 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
1267 | input, &value))); |
1268 | set_deployment_mode(static_cast< ::tensorflow::data::DeploymentMode >(value)); |
1269 | } else { |
1270 | goto handle_unusual; |
1271 | } |
1272 | break; |
1273 | } |
1274 | |
1275 | default: { |
1276 | handle_unusual: |
1277 | if (tag == 0) { |
1278 | goto success; |
1279 | } |
1280 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1281 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1282 | break; |
1283 | } |
1284 | } |
1285 | } |
1286 | success: |
1287 | // @@protoc_insertion_point(parse_success:tensorflow.data.DataServiceConfig) |
1288 | return true; |
1289 | failure: |
1290 | // @@protoc_insertion_point(parse_failure:tensorflow.data.DataServiceConfig) |
1291 | return false; |
1292 | #undef DO_ |
1293 | } |
1294 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1295 | |
1296 | void DataServiceConfig::SerializeWithCachedSizes( |
1297 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1298 | // @@protoc_insertion_point(serialize_start:tensorflow.data.DataServiceConfig) |
1299 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1300 | (void) cached_has_bits; |
1301 | |
1302 | // .tensorflow.data.DeploymentMode deployment_mode = 1; |
1303 | if (this->deployment_mode() != 0) { |
1304 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
1305 | 1, this->deployment_mode(), output); |
1306 | } |
1307 | |
1308 | if (_internal_metadata_.have_unknown_fields()) { |
1309 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1310 | _internal_metadata_.unknown_fields(), output); |
1311 | } |
1312 | // @@protoc_insertion_point(serialize_end:tensorflow.data.DataServiceConfig) |
1313 | } |
1314 | |
1315 | ::PROTOBUF_NAMESPACE_ID::uint8* DataServiceConfig::InternalSerializeWithCachedSizesToArray( |
1316 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1317 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.DataServiceConfig) |
1318 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1319 | (void) cached_has_bits; |
1320 | |
1321 | // .tensorflow.data.DeploymentMode deployment_mode = 1; |
1322 | if (this->deployment_mode() != 0) { |
1323 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
1324 | 1, this->deployment_mode(), target); |
1325 | } |
1326 | |
1327 | if (_internal_metadata_.have_unknown_fields()) { |
1328 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1329 | _internal_metadata_.unknown_fields(), target); |
1330 | } |
1331 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.DataServiceConfig) |
1332 | return target; |
1333 | } |
1334 | |
1335 | size_t DataServiceConfig::ByteSizeLong() const { |
1336 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.DataServiceConfig) |
1337 | size_t total_size = 0; |
1338 | |
1339 | if (_internal_metadata_.have_unknown_fields()) { |
1340 | total_size += |
1341 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1342 | _internal_metadata_.unknown_fields()); |
1343 | } |
1344 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1345 | // Prevent compiler warnings about cached_has_bits being unused |
1346 | (void) cached_has_bits; |
1347 | |
1348 | // .tensorflow.data.DeploymentMode deployment_mode = 1; |
1349 | if (this->deployment_mode() != 0) { |
1350 | total_size += 1 + |
1351 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->deployment_mode()); |
1352 | } |
1353 | |
1354 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1355 | SetCachedSize(cached_size); |
1356 | return total_size; |
1357 | } |
1358 | |
1359 | void DataServiceConfig::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1360 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.DataServiceConfig) |
1361 | GOOGLE_DCHECK_NE(&from, this); |
1362 | const DataServiceConfig* source = |
1363 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DataServiceConfig>( |
1364 | &from); |
1365 | if (source == nullptr) { |
1366 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.DataServiceConfig) |
1367 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1368 | } else { |
1369 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.DataServiceConfig) |
1370 | MergeFrom(*source); |
1371 | } |
1372 | } |
1373 | |
1374 | void DataServiceConfig::MergeFrom(const DataServiceConfig& from) { |
1375 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.DataServiceConfig) |
1376 | GOOGLE_DCHECK_NE(&from, this); |
1377 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1378 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1379 | (void) cached_has_bits; |
1380 | |
1381 | if (from.deployment_mode() != 0) { |
1382 | set_deployment_mode(from.deployment_mode()); |
1383 | } |
1384 | } |
1385 | |
1386 | void DataServiceConfig::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1387 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.DataServiceConfig) |
1388 | if (&from == this) return; |
1389 | Clear(); |
1390 | MergeFrom(from); |
1391 | } |
1392 | |
1393 | void DataServiceConfig::CopyFrom(const DataServiceConfig& from) { |
1394 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.DataServiceConfig) |
1395 | if (&from == this) return; |
1396 | Clear(); |
1397 | MergeFrom(from); |
1398 | } |
1399 | |
1400 | bool DataServiceConfig::IsInitialized() const { |
1401 | return true; |
1402 | } |
1403 | |
1404 | void DataServiceConfig::InternalSwap(DataServiceConfig* other) { |
1405 | using std::swap; |
1406 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1407 | swap(deployment_mode_, other->deployment_mode_); |
1408 | } |
1409 | |
1410 | ::PROTOBUF_NAMESPACE_ID::Metadata DataServiceConfig::GetMetadata() const { |
1411 | return GetMetadataStatic(); |
1412 | } |
1413 | |
1414 | |
1415 | // @@protoc_insertion_point(namespace_scope) |
1416 | } // namespace data |
1417 | } // namespace tensorflow |
1418 | PROTOBUF_NAMESPACE_OPEN |
1419 | template<> PROTOBUF_NOINLINE ::tensorflow::data::ProcessingModeDef* Arena::CreateMaybeMessage< ::tensorflow::data::ProcessingModeDef >(Arena* arena) { |
1420 | return Arena::CreateInternal< ::tensorflow::data::ProcessingModeDef >(arena); |
1421 | } |
1422 | template<> PROTOBUF_NOINLINE ::tensorflow::data::DataServiceMetadata* Arena::CreateMaybeMessage< ::tensorflow::data::DataServiceMetadata >(Arena* arena) { |
1423 | return Arena::CreateInternal< ::tensorflow::data::DataServiceMetadata >(arena); |
1424 | } |
1425 | template<> PROTOBUF_NOINLINE ::tensorflow::data::CrossTrainerCacheOptions* Arena::CreateMaybeMessage< ::tensorflow::data::CrossTrainerCacheOptions >(Arena* arena) { |
1426 | return Arena::CreateInternal< ::tensorflow::data::CrossTrainerCacheOptions >(arena); |
1427 | } |
1428 | template<> PROTOBUF_NOINLINE ::tensorflow::data::DataServiceConfig* Arena::CreateMaybeMessage< ::tensorflow::data::DataServiceConfig >(Arena* arena) { |
1429 | return Arena::CreateInternal< ::tensorflow::data::DataServiceConfig >(arena); |
1430 | } |
1431 | PROTOBUF_NAMESPACE_CLOSE |
1432 | |
1433 | // @@protoc_insertion_point(global_scope) |
1434 | #include <google/protobuf/port_undef.inc> |
1435 | |