loomplan.pb.cc 33.6 KB
Newer Older
Stanislav Bohm's avatar
Stanislav Bohm committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: loomplan.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "loomplan.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)

namespace loomplan {

void protobuf_ShutdownFile_loomplan_2eproto() {
  delete Task::default_instance_;
20 21
  delete Resource::default_instance_;
  delete ResourceRequest::default_instance_;
Stanislav Bohm's avatar
Stanislav Bohm committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
  delete Plan::default_instance_;
}

#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
void protobuf_AddDesc_loomplan_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#else
void protobuf_AddDesc_loomplan_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#endif
  Task::default_instance_ = new Task();
38 39
  Resource::default_instance_ = new Resource();
  ResourceRequest::default_instance_ = new ResourceRequest();
Stanislav Bohm's avatar
Stanislav Bohm committed
40 41
  Plan::default_instance_ = new Plan();
  Task::default_instance_->InitAsDefaultInstance();
42 43
  Resource::default_instance_->InitAsDefaultInstance();
  ResourceRequest::default_instance_->InitAsDefaultInstance();
Stanislav Bohm's avatar
Stanislav Bohm committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  Plan::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_loomplan_2eproto);
}

#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_loomplan_2eproto_once_);
void protobuf_AddDesc_loomplan_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_loomplan_2eproto_once_,
                 &protobuf_AddDesc_loomplan_2eproto_impl);
}
#else
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_loomplan_2eproto {
  StaticDescriptorInitializer_loomplan_2eproto() {
    protobuf_AddDesc_loomplan_2eproto();
  }
} static_descriptor_initializer_loomplan_2eproto_;
#endif

// ===================================================================

65
bool Task_Policy_IsValid(int value) {
Stanislav Bohm's avatar
Stanislav Bohm committed
66 67 68 69 70 71 72 73 74 75 76
  switch(value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
77 78 79 80 81 82
const Task_Policy Task::POLICY_STANDARD;
const Task_Policy Task::POLICY_SIMPLE;
const Task_Policy Task::POLICY_SCHEDULER;
const Task_Policy Task::Policy_MIN;
const Task_Policy Task::Policy_MAX;
const int Task::Policy_ARRAYSIZE;
Stanislav Bohm's avatar
Stanislav Bohm committed
83
#endif  // _MSC_VER
Stanislav Bohm's avatar
Stanislav Bohm committed
84 85 86 87
#ifndef _MSC_VER
const int Task::kTaskTypeFieldNumber;
const int Task::kConfigFieldNumber;
const int Task::kInputIdsFieldNumber;
88
const int Task::kPolicyFieldNumber;
89
const int Task::kResourceRequestIndexFieldNumber;
90
const int Task::kLabelFieldNumber;
Stanislav Bohm's avatar
Stanislav Bohm committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
#endif  // !_MSC_VER

Task::Task()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:loomplan.Task)
}

void Task::InitAsDefaultInstance() {
}

Task::Task(const Task& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:loomplan.Task)
}

void Task::SharedCtor() {
  ::google::protobuf::internal::GetEmptyString();
  _cached_size_ = 0;
  task_type_ = 0;
  config_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
114
  policy_ = 1;
115
  resource_request_index_ = -1;
116
  label_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Stanislav Bohm's avatar
Stanislav Bohm committed
117 118 119 120 121 122 123 124 125 126 127 128
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Task::~Task() {
  // @@protoc_insertion_point(destructor:loomplan.Task)
  SharedDtor();
}

void Task::SharedDtor() {
  if (config_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete config_;
  }
129 130 131
  if (label_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete label_;
  }
Stanislav Bohm's avatar
Stanislav Bohm committed
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  if (this != &default_instance()) {
  #else
  if (this != default_instance_) {
  #endif
  }
}

void Task::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Task& Task::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  protobuf_AddDesc_loomplan_2eproto();
#else
  if (default_instance_ == NULL) protobuf_AddDesc_loomplan_2eproto();
#endif
  return *default_instance_;
}

Task* Task::default_instance_ = NULL;

Task* Task::New() const {
  return new Task;
}

void Task::Clear() {
161
  if (_has_bits_[0 / 32] & 59) {
Stanislav Bohm's avatar
Stanislav Bohm committed
162 163 164 165 166 167
    task_type_ = 0;
    if (has_config()) {
      if (config_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        config_->clear();
      }
    }
168
    policy_ = 1;
169
    resource_request_index_ = -1;
170 171 172 173 174
    if (has_label()) {
      if (label_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        label_->clear();
      }
    }
Stanislav Bohm's avatar
Stanislav Bohm committed
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
  }
  input_ids_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->clear();
}

bool Task::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::StringOutputStream unknown_fields_string(
      mutable_unknown_fields());
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string);
  // @@protoc_insertion_point(parse_start:loomplan.Task)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required int32 task_type = 1;
      case 1: {
        if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &task_type_)));
          set_has_task_type();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_config;
        break;
      }

      // required bytes config = 2;
      case 2: {
        if (tag == 18) {
         parse_config:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_config()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_input_ids;
        break;
      }

      // repeated int32 input_ids = 3;
      case 3: {
        if (tag == 24) {
         parse_input_ids:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 24, input, this->mutable_input_ids())));
        } else if (tag == 26) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_input_ids())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_input_ids;
237
        if (input->ExpectTag(32)) goto parse_policy;
Stanislav Bohm's avatar
Stanislav Bohm committed
238 239 240
        break;
      }

241
      // optional .loomplan.Task.Policy policy = 4 [default = POLICY_STANDARD];
Stanislav Bohm's avatar
Stanislav Bohm committed
242 243
      case 4: {
        if (tag == 32) {
244
         parse_policy:
Stanislav Bohm's avatar
Stanislav Bohm committed
245 246 247 248
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
249 250
          if (::loomplan::Task_Policy_IsValid(value)) {
            set_policy(static_cast< ::loomplan::Task_Policy >(value));
Stanislav Bohm's avatar
Stanislav Bohm committed
251 252 253 254 255 256 257
          } else {
            unknown_fields_stream.WriteVarint32(tag);
            unknown_fields_stream.WriteVarint32(value);
          }
        } else {
          goto handle_unusual;
        }
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
        if (input->ExpectTag(40)) goto parse_resource_request_index;
        break;
      }

      // optional int32 resource_request_index = 5 [default = -1];
      case 5: {
        if (tag == 40) {
         parse_resource_request_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &resource_request_index_)));
          set_has_resource_request_index();
        } else {
          goto handle_unusual;
        }
273 274 275 276 277 278 279 280 281 282 283 284 285
        if (input->ExpectTag(98)) goto parse_label;
        break;
      }

      // optional string label = 12;
      case 12: {
        if (tag == 98) {
         parse_label:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_label()));
        } else {
          goto handle_unusual;
        }
Stanislav Bohm's avatar
Stanislav Bohm committed
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:loomplan.Task)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:loomplan.Task)
  return false;
#undef DO_
}

void Task::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:loomplan.Task)
  // required int32 task_type = 1;
  if (has_task_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->task_type(), output);
  }

  // required bytes config = 2;
  if (has_config()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      2, this->config(), output);
  }

  // repeated int32 input_ids = 3;
  for (int i = 0; i < this->input_ids_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      3, this->input_ids(i), output);
  }

332 333
  // optional .loomplan.Task.Policy policy = 4 [default = POLICY_STANDARD];
  if (has_policy()) {
Stanislav Bohm's avatar
Stanislav Bohm committed
334
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
335
      4, this->policy(), output);
Stanislav Bohm's avatar
Stanislav Bohm committed
336 337
  }

338 339 340 341 342
  // optional int32 resource_request_index = 5 [default = -1];
  if (has_resource_request_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->resource_request_index(), output);
  }

343 344 345 346 347 348
  // optional string label = 12;
  if (has_label()) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      12, this->label(), output);
  }

Stanislav Bohm's avatar
Stanislav Bohm committed
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
  output->WriteRaw(unknown_fields().data(),
                   unknown_fields().size());
  // @@protoc_insertion_point(serialize_end:loomplan.Task)
}

int Task::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 task_type = 1;
    if (has_task_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->task_type());
    }

    // required bytes config = 2;
    if (has_config()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->config());
    }

372 373
    // optional .loomplan.Task.Policy policy = 4 [default = POLICY_STANDARD];
    if (has_policy()) {
Stanislav Bohm's avatar
Stanislav Bohm committed
374
      total_size += 1 +
375
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->policy());
Stanislav Bohm's avatar
Stanislav Bohm committed
376 377
    }

378 379 380 381 382 383 384
    // optional int32 resource_request_index = 5 [default = -1];
    if (has_resource_request_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->resource_request_index());
    }

385 386 387 388 389 390 391
    // optional string label = 12;
    if (has_label()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->label());
    }

Stanislav Bohm's avatar
Stanislav Bohm committed
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
  }
  // repeated int32 input_ids = 3;
  {
    int data_size = 0;
    for (int i = 0; i < this->input_ids_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->input_ids(i));
    }
    total_size += 1 * this->input_ids_size() + data_size;
  }

  total_size += unknown_fields().size();

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Task::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const Task*>(&from));
}

void Task::MergeFrom(const Task& from) {
  GOOGLE_CHECK_NE(&from, this);
  input_ids_.MergeFrom(from.input_ids_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_task_type()) {
      set_task_type(from.task_type());
    }
    if (from.has_config()) {
      set_config(from.config());
    }
426 427
    if (from.has_policy()) {
      set_policy(from.policy());
Stanislav Bohm's avatar
Stanislav Bohm committed
428
    }
429 430 431
    if (from.has_resource_request_index()) {
      set_resource_request_index(from.resource_request_index());
    }
432 433 434
    if (from.has_label()) {
      set_label(from.label());
    }
Stanislav Bohm's avatar
Stanislav Bohm committed
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455
  }
  mutable_unknown_fields()->append(from.unknown_fields());
}

void Task::CopyFrom(const Task& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Task::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;

  return true;
}

void Task::Swap(Task* other) {
  if (other != this) {
    std::swap(task_type_, other->task_type_);
    std::swap(config_, other->config_);
    input_ids_.Swap(&other->input_ids_);
456
    std::swap(policy_, other->policy_);
457
    std::swap(resource_request_index_, other->resource_request_index_);
458
    std::swap(label_, other->label_);
Stanislav Bohm's avatar
Stanislav Bohm committed
459 460 461 462 463 464 465 466 467 468 469 470 471 472
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.swap(other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::std::string Task::GetTypeName() const {
  return "loomplan.Task";
}


// ===================================================================

#ifndef _MSC_VER
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899
const int Resource::kResourceTypeFieldNumber;
const int Resource::kValueFieldNumber;
#endif  // !_MSC_VER

Resource::Resource()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:loomplan.Resource)
}

void Resource::InitAsDefaultInstance() {
}

Resource::Resource(const Resource& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:loomplan.Resource)
}

void Resource::SharedCtor() {
  _cached_size_ = 0;
  resource_type_ = 0;
  value_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Resource::~Resource() {
  // @@protoc_insertion_point(destructor:loomplan.Resource)
  SharedDtor();
}

void Resource::SharedDtor() {
  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  if (this != &default_instance()) {
  #else
  if (this != default_instance_) {
  #endif
  }
}

void Resource::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Resource& Resource::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  protobuf_AddDesc_loomplan_2eproto();
#else
  if (default_instance_ == NULL) protobuf_AddDesc_loomplan_2eproto();
#endif
  return *default_instance_;
}

Resource* Resource::default_instance_ = NULL;

Resource* Resource::New() const {
  return new Resource;
}

void Resource::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<Resource*>(16)->f) - \
   reinterpret_cast<char*>(16))

#define ZR_(first, last) do {                              \
    size_t f = OFFSET_OF_FIELD_(first);                    \
    size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
    ::memset(&first, 0, n);                                \
  } while (0)

  ZR_(resource_type_, value_);

#undef OFFSET_OF_FIELD_
#undef ZR_

  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->clear();
}

bool Resource::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::StringOutputStream unknown_fields_string(
      mutable_unknown_fields());
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string);
  // @@protoc_insertion_point(parse_start:loomplan.Resource)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required int32 resource_type = 1;
      case 1: {
        if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &resource_type_)));
          set_has_resource_type();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_value;
        break;
      }

      // required int32 value = 2;
      case 2: {
        if (tag == 16) {
         parse_value:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &value_)));
          set_has_value();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:loomplan.Resource)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:loomplan.Resource)
  return false;
#undef DO_
}

void Resource::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:loomplan.Resource)
  // required int32 resource_type = 1;
  if (has_resource_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->resource_type(), output);
  }

  // required int32 value = 2;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->value(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   unknown_fields().size());
  // @@protoc_insertion_point(serialize_end:loomplan.Resource)
}

int Resource::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 resource_type = 1;
    if (has_resource_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->resource_type());
    }

    // required int32 value = 2;
    if (has_value()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->value());
    }

  }
  total_size += unknown_fields().size();

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Resource::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const Resource*>(&from));
}

void Resource::MergeFrom(const Resource& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_resource_type()) {
      set_resource_type(from.resource_type());
    }
    if (from.has_value()) {
      set_value(from.value());
    }
  }
  mutable_unknown_fields()->append(from.unknown_fields());
}

void Resource::CopyFrom(const Resource& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Resource::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;

  return true;
}

void Resource::Swap(Resource* other) {
  if (other != this) {
    std::swap(resource_type_, other->resource_type_);
    std::swap(value_, other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.swap(other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::std::string Resource::GetTypeName() const {
  return "loomplan.Resource";
}


// ===================================================================

#ifndef _MSC_VER
const int ResourceRequest::kResourcesFieldNumber;
#endif  // !_MSC_VER

ResourceRequest::ResourceRequest()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:loomplan.ResourceRequest)
}

void ResourceRequest::InitAsDefaultInstance() {
}

ResourceRequest::ResourceRequest(const ResourceRequest& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:loomplan.ResourceRequest)
}

void ResourceRequest::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ResourceRequest::~ResourceRequest() {
  // @@protoc_insertion_point(destructor:loomplan.ResourceRequest)
  SharedDtor();
}

void ResourceRequest::SharedDtor() {
  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  if (this != &default_instance()) {
  #else
  if (this != default_instance_) {
  #endif
  }
}

void ResourceRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ResourceRequest& ResourceRequest::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  protobuf_AddDesc_loomplan_2eproto();
#else
  if (default_instance_ == NULL) protobuf_AddDesc_loomplan_2eproto();
#endif
  return *default_instance_;
}

ResourceRequest* ResourceRequest::default_instance_ = NULL;

ResourceRequest* ResourceRequest::New() const {
  return new ResourceRequest;
}

void ResourceRequest::Clear() {
  resources_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->clear();
}

bool ResourceRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::StringOutputStream unknown_fields_string(
      mutable_unknown_fields());
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string);
  // @@protoc_insertion_point(parse_start:loomplan.ResourceRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .loomplan.Resource resources = 1;
      case 1: {
        if (tag == 10) {
         parse_resources:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_resources()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(10)) goto parse_resources;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:loomplan.ResourceRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:loomplan.ResourceRequest)
  return false;
#undef DO_
}

void ResourceRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:loomplan.ResourceRequest)
  // repeated .loomplan.Resource resources = 1;
  for (int i = 0; i < this->resources_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      1, this->resources(i), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   unknown_fields().size());
  // @@protoc_insertion_point(serialize_end:loomplan.ResourceRequest)
}

int ResourceRequest::ByteSize() const {
  int total_size = 0;

  // repeated .loomplan.Resource resources = 1;
  total_size += 1 * this->resources_size();
  for (int i = 0; i < this->resources_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->resources(i));
  }

  total_size += unknown_fields().size();

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ResourceRequest::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const ResourceRequest*>(&from));
}

void ResourceRequest::MergeFrom(const ResourceRequest& from) {
  GOOGLE_CHECK_NE(&from, this);
  resources_.MergeFrom(from.resources_);
  mutable_unknown_fields()->append(from.unknown_fields());
}

void ResourceRequest::CopyFrom(const ResourceRequest& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ResourceRequest::IsInitialized() const {

  if (!::google::protobuf::internal::AllAreInitialized(this->resources())) return false;
  return true;
}

void ResourceRequest::Swap(ResourceRequest* other) {
  if (other != this) {
    resources_.Swap(&other->resources_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.swap(other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::std::string ResourceRequest::GetTypeName() const {
  return "loomplan.ResourceRequest";
}


// ===================================================================

#ifndef _MSC_VER
const int Plan::kResourceRequestsFieldNumber;
Stanislav Bohm's avatar
Stanislav Bohm committed
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959
const int Plan::kTasksFieldNumber;
const int Plan::kResultIdsFieldNumber;
#endif  // !_MSC_VER

Plan::Plan()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:loomplan.Plan)
}

void Plan::InitAsDefaultInstance() {
}

Plan::Plan(const Plan& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:loomplan.Plan)
}

void Plan::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Plan::~Plan() {
  // @@protoc_insertion_point(destructor:loomplan.Plan)
  SharedDtor();
}

void Plan::SharedDtor() {
  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  if (this != &default_instance()) {
  #else
  if (this != default_instance_) {
  #endif
  }
}

void Plan::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Plan& Plan::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  protobuf_AddDesc_loomplan_2eproto();
#else
  if (default_instance_ == NULL) protobuf_AddDesc_loomplan_2eproto();
#endif
  return *default_instance_;
}

Plan* Plan::default_instance_ = NULL;

Plan* Plan::New() const {
  return new Plan;
}

void Plan::Clear() {
960
  resource_requests_.Clear();
Stanislav Bohm's avatar
Stanislav Bohm committed
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980
  tasks_.Clear();
  result_ids_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->clear();
}

bool Plan::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::StringOutputStream unknown_fields_string(
      mutable_unknown_fields());
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string);
  // @@protoc_insertion_point(parse_start:loomplan.Plan)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
981 982 983 984 985 986 987 988 989 990 991 992 993 994
      // repeated .loomplan.ResourceRequest resource_requests = 1;
      case 1: {
        if (tag == 10) {
         parse_resource_requests:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_resource_requests()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(10)) goto parse_resource_requests;
        if (input->ExpectTag(18)) goto parse_tasks;
        break;
      }

Stanislav Bohm's avatar
Stanislav Bohm committed
995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
      // repeated .loomplan.Task tasks = 2;
      case 2: {
        if (tag == 18) {
         parse_tasks:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_tasks()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_tasks;
        if (input->ExpectTag(24)) goto parse_result_ids;
        break;
      }

      // repeated int32 result_ids = 3;
      case 3: {
        if (tag == 24) {
         parse_result_ids:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 24, input, this->mutable_result_ids())));
        } else if (tag == 26) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_result_ids())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_result_ids;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:loomplan.Plan)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:loomplan.Plan)
  return false;
#undef DO_
}

void Plan::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:loomplan.Plan)
1053 1054 1055 1056 1057 1058
  // repeated .loomplan.ResourceRequest resource_requests = 1;
  for (int i = 0; i < this->resource_requests_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      1, this->resource_requests(i), output);
  }

Stanislav Bohm's avatar
Stanislav Bohm committed
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078
  // repeated .loomplan.Task tasks = 2;
  for (int i = 0; i < this->tasks_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      2, this->tasks(i), output);
  }

  // repeated int32 result_ids = 3;
  for (int i = 0; i < this->result_ids_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      3, this->result_ids(i), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   unknown_fields().size());
  // @@protoc_insertion_point(serialize_end:loomplan.Plan)
}

int Plan::ByteSize() const {
  int total_size = 0;

1079 1080 1081 1082 1083 1084 1085 1086
  // repeated .loomplan.ResourceRequest resource_requests = 1;
  total_size += 1 * this->resource_requests_size();
  for (int i = 0; i < this->resource_requests_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->resource_requests(i));
  }

Stanislav Bohm's avatar
Stanislav Bohm committed
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119
  // repeated .loomplan.Task tasks = 2;
  total_size += 1 * this->tasks_size();
  for (int i = 0; i < this->tasks_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->tasks(i));
  }

  // repeated int32 result_ids = 3;
  {
    int data_size = 0;
    for (int i = 0; i < this->result_ids_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->result_ids(i));
    }
    total_size += 1 * this->result_ids_size() + data_size;
  }

  total_size += unknown_fields().size();

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Plan::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const Plan*>(&from));
}

void Plan::MergeFrom(const Plan& from) {
  GOOGLE_CHECK_NE(&from, this);
1120
  resource_requests_.MergeFrom(from.resource_requests_);
Stanislav Bohm's avatar
Stanislav Bohm committed
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133
  tasks_.MergeFrom(from.tasks_);
  result_ids_.MergeFrom(from.result_ids_);
  mutable_unknown_fields()->append(from.unknown_fields());
}

void Plan::CopyFrom(const Plan& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Plan::IsInitialized() const {

1134
  if (!::google::protobuf::internal::AllAreInitialized(this->resource_requests())) return false;
Stanislav Bohm's avatar
Stanislav Bohm committed
1135 1136 1137 1138 1139 1140
  if (!::google::protobuf::internal::AllAreInitialized(this->tasks())) return false;
  return true;
}

void Plan::Swap(Plan* other) {
  if (other != this) {
1141
    resource_requests_.Swap(&other->resource_requests_);
Stanislav Bohm's avatar
Stanislav Bohm committed
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159
    tasks_.Swap(&other->tasks_);
    result_ids_.Swap(&other->result_ids_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.swap(other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::std::string Plan::GetTypeName() const {
  return "loomplan.Plan";
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace loomplan

// @@protoc_insertion_point(global_scope)