github.com/craicoverflow/tyk@v2.9.6-rc3+incompatible/coprocess/bindings/cpp/coprocess_common.pb.cc (about) 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: coprocess_common.proto 3 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION 5 #include "coprocess_common.pb.h" 6 7 #include <algorithm> 8 9 #include <google/protobuf/stubs/common.h> 10 #include <google/protobuf/stubs/port.h> 11 #include <google/protobuf/stubs/once.h> 12 #include <google/protobuf/io/coded_stream.h> 13 #include <google/protobuf/wire_format_lite_inl.h> 14 #include <google/protobuf/descriptor.h> 15 #include <google/protobuf/generated_message_reflection.h> 16 #include <google/protobuf/reflection_ops.h> 17 #include <google/protobuf/wire_format.h> 18 // @@protoc_insertion_point(includes) 19 20 namespace coprocess { 21 22 namespace { 23 24 const ::google::protobuf::Descriptor* StringSlice_descriptor_ = NULL; 25 const ::google::protobuf::internal::GeneratedMessageReflection* 26 StringSlice_reflection_ = NULL; 27 const ::google::protobuf::EnumDescriptor* HookType_descriptor_ = NULL; 28 29 } // namespace 30 31 32 void protobuf_AssignDesc_coprocess_5fcommon_2eproto() GOOGLE_ATTRIBUTE_COLD; 33 void protobuf_AssignDesc_coprocess_5fcommon_2eproto() { 34 protobuf_AddDesc_coprocess_5fcommon_2eproto(); 35 const ::google::protobuf::FileDescriptor* file = 36 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( 37 "coprocess_common.proto"); 38 GOOGLE_CHECK(file != NULL); 39 StringSlice_descriptor_ = file->message_type(0); 40 static const int StringSlice_offsets_[1] = { 41 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StringSlice, items_), 42 }; 43 StringSlice_reflection_ = 44 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( 45 StringSlice_descriptor_, 46 StringSlice::internal_default_instance(), 47 StringSlice_offsets_, 48 -1, 49 -1, 50 -1, 51 sizeof(StringSlice), 52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StringSlice, _internal_metadata_)); 53 HookType_descriptor_ = file->enum_type(0); 54 } 55 56 namespace { 57 58 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); 59 void protobuf_AssignDescriptorsOnce() { 60 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, 61 &protobuf_AssignDesc_coprocess_5fcommon_2eproto); 62 } 63 64 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; 65 void protobuf_RegisterTypes(const ::std::string&) { 66 protobuf_AssignDescriptorsOnce(); 67 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( 68 StringSlice_descriptor_, StringSlice::internal_default_instance()); 69 } 70 71 } // namespace 72 73 void protobuf_ShutdownFile_coprocess_5fcommon_2eproto() { 74 StringSlice_default_instance_.Shutdown(); 75 delete StringSlice_reflection_; 76 } 77 78 void protobuf_InitDefaults_coprocess_5fcommon_2eproto_impl() { 79 GOOGLE_PROTOBUF_VERIFY_VERSION; 80 81 ::google::protobuf::internal::GetEmptyString(); 82 StringSlice_default_instance_.DefaultConstruct(); 83 StringSlice_default_instance_.get_mutable()->InitAsDefaultInstance(); 84 } 85 86 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_coprocess_5fcommon_2eproto_once_); 87 void protobuf_InitDefaults_coprocess_5fcommon_2eproto() { 88 ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_coprocess_5fcommon_2eproto_once_, 89 &protobuf_InitDefaults_coprocess_5fcommon_2eproto_impl); 90 } 91 void protobuf_AddDesc_coprocess_5fcommon_2eproto_impl() { 92 GOOGLE_PROTOBUF_VERIFY_VERSION; 93 94 protobuf_InitDefaults_coprocess_5fcommon_2eproto(); 95 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( 96 "\n\026coprocess_common.proto\022\tcoprocess\"\034\n\013S" 97 "tringSlice\022\r\n\005items\030\001 \003(\t*O\n\010HookType\022\013\n" 98 "\007Unknown\020\000\022\007\n\003Pre\020\001\022\010\n\004Post\020\002\022\017\n\013PostKey" 99 "Auth\020\003\022\022\n\016CustomKeyCheck\020\004b\006proto3", 154); 100 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( 101 "coprocess_common.proto", &protobuf_RegisterTypes); 102 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_coprocess_5fcommon_2eproto); 103 } 104 105 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_coprocess_5fcommon_2eproto_once_); 106 void protobuf_AddDesc_coprocess_5fcommon_2eproto() { 107 ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_coprocess_5fcommon_2eproto_once_, 108 &protobuf_AddDesc_coprocess_5fcommon_2eproto_impl); 109 } 110 // Force AddDescriptors() to be called at static initialization time. 111 struct StaticDescriptorInitializer_coprocess_5fcommon_2eproto { 112 StaticDescriptorInitializer_coprocess_5fcommon_2eproto() { 113 protobuf_AddDesc_coprocess_5fcommon_2eproto(); 114 } 115 } static_descriptor_initializer_coprocess_5fcommon_2eproto_; 116 const ::google::protobuf::EnumDescriptor* HookType_descriptor() { 117 protobuf_AssignDescriptorsOnce(); 118 return HookType_descriptor_; 119 } 120 bool HookType_IsValid(int value) { 121 switch (value) { 122 case 0: 123 case 1: 124 case 2: 125 case 3: 126 case 4: 127 return true; 128 default: 129 return false; 130 } 131 } 132 133 134 namespace { 135 136 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; 137 static void MergeFromFail(int line) { 138 ::google::protobuf::internal::MergeFromFail(__FILE__, line); 139 } 140 141 } // namespace 142 143 144 // =================================================================== 145 146 #if !defined(_MSC_VER) || _MSC_VER >= 1900 147 const int StringSlice::kItemsFieldNumber; 148 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 149 150 StringSlice::StringSlice() 151 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 152 if (this != internal_default_instance()) protobuf_InitDefaults_coprocess_5fcommon_2eproto(); 153 SharedCtor(); 154 // @@protoc_insertion_point(constructor:coprocess.StringSlice) 155 } 156 157 void StringSlice::InitAsDefaultInstance() { 158 } 159 160 StringSlice::StringSlice(const StringSlice& from) 161 : ::google::protobuf::Message(), 162 _internal_metadata_(NULL) { 163 SharedCtor(); 164 UnsafeMergeFrom(from); 165 // @@protoc_insertion_point(copy_constructor:coprocess.StringSlice) 166 } 167 168 void StringSlice::SharedCtor() { 169 _cached_size_ = 0; 170 } 171 172 StringSlice::~StringSlice() { 173 // @@protoc_insertion_point(destructor:coprocess.StringSlice) 174 SharedDtor(); 175 } 176 177 void StringSlice::SharedDtor() { 178 } 179 180 void StringSlice::SetCachedSize(int size) const { 181 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); 182 _cached_size_ = size; 183 GOOGLE_SAFE_CONCURRENT_WRITES_END(); 184 } 185 const ::google::protobuf::Descriptor* StringSlice::descriptor() { 186 protobuf_AssignDescriptorsOnce(); 187 return StringSlice_descriptor_; 188 } 189 190 const StringSlice& StringSlice::default_instance() { 191 protobuf_InitDefaults_coprocess_5fcommon_2eproto(); 192 return *internal_default_instance(); 193 } 194 195 ::google::protobuf::internal::ExplicitlyConstructed<StringSlice> StringSlice_default_instance_; 196 197 StringSlice* StringSlice::New(::google::protobuf::Arena* arena) const { 198 StringSlice* n = new StringSlice; 199 if (arena != NULL) { 200 arena->Own(n); 201 } 202 return n; 203 } 204 205 void StringSlice::Clear() { 206 // @@protoc_insertion_point(message_clear_start:coprocess.StringSlice) 207 items_.Clear(); 208 } 209 210 bool StringSlice::MergePartialFromCodedStream( 211 ::google::protobuf::io::CodedInputStream* input) { 212 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 213 ::google::protobuf::uint32 tag; 214 // @@protoc_insertion_point(parse_start:coprocess.StringSlice) 215 for (;;) { 216 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); 217 tag = p.first; 218 if (!p.second) goto handle_unusual; 219 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 220 // repeated string items = 1; 221 case 1: { 222 if (tag == 10) { 223 parse_items: 224 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 225 input, this->add_items())); 226 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 227 this->items(this->items_size() - 1).data(), 228 this->items(this->items_size() - 1).length(), 229 ::google::protobuf::internal::WireFormatLite::PARSE, 230 "coprocess.StringSlice.items")); 231 } else { 232 goto handle_unusual; 233 } 234 if (input->ExpectTag(10)) goto parse_items; 235 if (input->ExpectAtEnd()) goto success; 236 break; 237 } 238 239 default: { 240 handle_unusual: 241 if (tag == 0 || 242 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == 243 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { 244 goto success; 245 } 246 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); 247 break; 248 } 249 } 250 } 251 success: 252 // @@protoc_insertion_point(parse_success:coprocess.StringSlice) 253 return true; 254 failure: 255 // @@protoc_insertion_point(parse_failure:coprocess.StringSlice) 256 return false; 257 #undef DO_ 258 } 259 260 void StringSlice::SerializeWithCachedSizes( 261 ::google::protobuf::io::CodedOutputStream* output) const { 262 // @@protoc_insertion_point(serialize_start:coprocess.StringSlice) 263 // repeated string items = 1; 264 for (int i = 0; i < this->items_size(); i++) { 265 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 266 this->items(i).data(), this->items(i).length(), 267 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 268 "coprocess.StringSlice.items"); 269 ::google::protobuf::internal::WireFormatLite::WriteString( 270 1, this->items(i), output); 271 } 272 273 // @@protoc_insertion_point(serialize_end:coprocess.StringSlice) 274 } 275 276 ::google::protobuf::uint8* StringSlice::InternalSerializeWithCachedSizesToArray( 277 bool deterministic, ::google::protobuf::uint8* target) const { 278 (void)deterministic; // Unused 279 // @@protoc_insertion_point(serialize_to_array_start:coprocess.StringSlice) 280 // repeated string items = 1; 281 for (int i = 0; i < this->items_size(); i++) { 282 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 283 this->items(i).data(), this->items(i).length(), 284 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 285 "coprocess.StringSlice.items"); 286 target = ::google::protobuf::internal::WireFormatLite:: 287 WriteStringToArray(1, this->items(i), target); 288 } 289 290 // @@protoc_insertion_point(serialize_to_array_end:coprocess.StringSlice) 291 return target; 292 } 293 294 size_t StringSlice::ByteSizeLong() const { 295 // @@protoc_insertion_point(message_byte_size_start:coprocess.StringSlice) 296 size_t total_size = 0; 297 298 // repeated string items = 1; 299 total_size += 1 * 300 ::google::protobuf::internal::FromIntSize(this->items_size()); 301 for (int i = 0; i < this->items_size(); i++) { 302 total_size += ::google::protobuf::internal::WireFormatLite::StringSize( 303 this->items(i)); 304 } 305 306 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 307 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); 308 _cached_size_ = cached_size; 309 GOOGLE_SAFE_CONCURRENT_WRITES_END(); 310 return total_size; 311 } 312 313 void StringSlice::MergeFrom(const ::google::protobuf::Message& from) { 314 // @@protoc_insertion_point(generalized_merge_from_start:coprocess.StringSlice) 315 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); 316 const StringSlice* source = 317 ::google::protobuf::internal::DynamicCastToGenerated<const StringSlice>( 318 &from); 319 if (source == NULL) { 320 // @@protoc_insertion_point(generalized_merge_from_cast_fail:coprocess.StringSlice) 321 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 322 } else { 323 // @@protoc_insertion_point(generalized_merge_from_cast_success:coprocess.StringSlice) 324 UnsafeMergeFrom(*source); 325 } 326 } 327 328 void StringSlice::MergeFrom(const StringSlice& from) { 329 // @@protoc_insertion_point(class_specific_merge_from_start:coprocess.StringSlice) 330 if (GOOGLE_PREDICT_TRUE(&from != this)) { 331 UnsafeMergeFrom(from); 332 } else { 333 MergeFromFail(__LINE__); 334 } 335 } 336 337 void StringSlice::UnsafeMergeFrom(const StringSlice& from) { 338 GOOGLE_DCHECK(&from != this); 339 items_.UnsafeMergeFrom(from.items_); 340 } 341 342 void StringSlice::CopyFrom(const ::google::protobuf::Message& from) { 343 // @@protoc_insertion_point(generalized_copy_from_start:coprocess.StringSlice) 344 if (&from == this) return; 345 Clear(); 346 MergeFrom(from); 347 } 348 349 void StringSlice::CopyFrom(const StringSlice& from) { 350 // @@protoc_insertion_point(class_specific_copy_from_start:coprocess.StringSlice) 351 if (&from == this) return; 352 Clear(); 353 UnsafeMergeFrom(from); 354 } 355 356 bool StringSlice::IsInitialized() const { 357 358 return true; 359 } 360 361 void StringSlice::Swap(StringSlice* other) { 362 if (other == this) return; 363 InternalSwap(other); 364 } 365 void StringSlice::InternalSwap(StringSlice* other) { 366 items_.UnsafeArenaSwap(&other->items_); 367 _internal_metadata_.Swap(&other->_internal_metadata_); 368 std::swap(_cached_size_, other->_cached_size_); 369 } 370 371 ::google::protobuf::Metadata StringSlice::GetMetadata() const { 372 protobuf_AssignDescriptorsOnce(); 373 ::google::protobuf::Metadata metadata; 374 metadata.descriptor = StringSlice_descriptor_; 375 metadata.reflection = StringSlice_reflection_; 376 return metadata; 377 } 378 379 #if PROTOBUF_INLINE_NOT_IN_HEADERS 380 // StringSlice 381 382 // repeated string items = 1; 383 int StringSlice::items_size() const { 384 return items_.size(); 385 } 386 void StringSlice::clear_items() { 387 items_.Clear(); 388 } 389 const ::std::string& StringSlice::items(int index) const { 390 // @@protoc_insertion_point(field_get:coprocess.StringSlice.items) 391 return items_.Get(index); 392 } 393 ::std::string* StringSlice::mutable_items(int index) { 394 // @@protoc_insertion_point(field_mutable:coprocess.StringSlice.items) 395 return items_.Mutable(index); 396 } 397 void StringSlice::set_items(int index, const ::std::string& value) { 398 // @@protoc_insertion_point(field_set:coprocess.StringSlice.items) 399 items_.Mutable(index)->assign(value); 400 } 401 void StringSlice::set_items(int index, const char* value) { 402 items_.Mutable(index)->assign(value); 403 // @@protoc_insertion_point(field_set_char:coprocess.StringSlice.items) 404 } 405 void StringSlice::set_items(int index, const char* value, size_t size) { 406 items_.Mutable(index)->assign( 407 reinterpret_cast<const char*>(value), size); 408 // @@protoc_insertion_point(field_set_pointer:coprocess.StringSlice.items) 409 } 410 ::std::string* StringSlice::add_items() { 411 // @@protoc_insertion_point(field_add_mutable:coprocess.StringSlice.items) 412 return items_.Add(); 413 } 414 void StringSlice::add_items(const ::std::string& value) { 415 items_.Add()->assign(value); 416 // @@protoc_insertion_point(field_add:coprocess.StringSlice.items) 417 } 418 void StringSlice::add_items(const char* value) { 419 items_.Add()->assign(value); 420 // @@protoc_insertion_point(field_add_char:coprocess.StringSlice.items) 421 } 422 void StringSlice::add_items(const char* value, size_t size) { 423 items_.Add()->assign(reinterpret_cast<const char*>(value), size); 424 // @@protoc_insertion_point(field_add_pointer:coprocess.StringSlice.items) 425 } 426 const ::google::protobuf::RepeatedPtrField< ::std::string>& 427 StringSlice::items() const { 428 // @@protoc_insertion_point(field_list:coprocess.StringSlice.items) 429 return items_; 430 } 431 ::google::protobuf::RepeatedPtrField< ::std::string>* 432 StringSlice::mutable_items() { 433 // @@protoc_insertion_point(field_mutable_list:coprocess.StringSlice.items) 434 return &items_; 435 } 436 437 inline const StringSlice* StringSlice::internal_default_instance() { 438 return &StringSlice_default_instance_.get(); 439 } 440 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS 441 442 // @@protoc_insertion_point(namespace_scope) 443 444 } // namespace coprocess 445 446 // @@protoc_insertion_point(global_scope)