// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: Contract.proto

#include "Contract.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_ComboLeg_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ComboLeg_ComboLeg_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_DeltaNeutralContract_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DeltaNeutralContract_DeltaNeutralContract_2eproto;
namespace protobuf {
class ContractDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Contract> _instance;
} _Contract_default_instance_;
}  // namespace protobuf
static void InitDefaultsscc_info_Contract_Contract_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::protobuf::_Contract_default_instance_;
    new (ptr) ::protobuf::Contract();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::protobuf::Contract::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Contract_Contract_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_Contract_Contract_2eproto}, {
      &scc_info_DeltaNeutralContract_DeltaNeutralContract_2eproto.base,
      &scc_info_ComboLeg_ComboLeg_2eproto.base,}};

static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_Contract_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_Contract_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_Contract_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_Contract_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, conid_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, symbol_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, sectype_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, lasttradedateorcontractmonth_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, strike_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, right_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, multiplier_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, exchange_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, primaryexch_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, currency_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, localsymbol_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, tradingclass_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, secidtype_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, secid_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, description_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, issuerid_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, deltaneutralcontract_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, includeexpired_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, combolegsdescrip_),
  PROTOBUF_FIELD_OFFSET(::protobuf::Contract, combolegs_),
  17,
  0,
  1,
  2,
  15,
  3,
  16,
  4,
  5,
  6,
  7,
  8,
  9,
  10,
  11,
  12,
  14,
  18,
  13,
  ~0u,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 25, sizeof(::protobuf::Contract)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_Contract_default_instance_),
};

const char descriptor_table_protodef_Contract_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\016Contract.proto\022\010protobuf\032\016ComboLeg.pro"
  "to\032\032DeltaNeutralContract.proto\"\335\006\n\010Contr"
  "act\022\022\n\005conId\030\001 \001(\005H\000\210\001\001\022\023\n\006symbol\030\002 \001(\tH"
  "\001\210\001\001\022\024\n\007secType\030\003 \001(\tH\002\210\001\001\022)\n\034lastTradeD"
  "ateOrContractMonth\030\004 \001(\tH\003\210\001\001\022\023\n\006strike\030"
  "\005 \001(\001H\004\210\001\001\022\022\n\005right\030\006 \001(\tH\005\210\001\001\022\027\n\nmultip"
  "lier\030\007 \001(\001H\006\210\001\001\022\025\n\010exchange\030\010 \001(\tH\007\210\001\001\022\030"
  "\n\013primaryExch\030\t \001(\tH\010\210\001\001\022\025\n\010currency\030\n \001"
  "(\tH\t\210\001\001\022\030\n\013localSymbol\030\013 \001(\tH\n\210\001\001\022\031\n\014tra"
  "dingClass\030\014 \001(\tH\013\210\001\001\022\026\n\tsecIdType\030\r \001(\tH"
  "\014\210\001\001\022\022\n\005secId\030\016 \001(\tH\r\210\001\001\022\030\n\013description\030"
  "\017 \001(\tH\016\210\001\001\022\025\n\010issuerId\030\020 \001(\tH\017\210\001\001\022A\n\024del"
  "taNeutralContract\030\021 \001(\0132\036.protobuf.Delta"
  "NeutralContractH\020\210\001\001\022\033\n\016includeExpired\030\022"
  " \001(\010H\021\210\001\001\022\035\n\020comboLegsDescrip\030\023 \001(\tH\022\210\001\001"
  "\022%\n\tcomboLegs\030\024 \003(\0132\022.protobuf.ComboLegB"
  "\010\n\006_conIdB\t\n\007_symbolB\n\n\010_secTypeB\037\n\035_las"
  "tTradeDateOrContractMonthB\t\n\007_strikeB\010\n\006"
  "_rightB\r\n\013_multiplierB\013\n\t_exchangeB\016\n\014_p"
  "rimaryExchB\013\n\t_currencyB\016\n\014_localSymbolB"
  "\017\n\r_tradingClassB\014\n\n_secIdTypeB\010\n\006_secId"
  "B\016\n\014_descriptionB\013\n\t_issuerIdB\027\n\025_deltaN"
  "eutralContractB\021\n\017_includeExpiredB\023\n\021_co"
  "mboLegsDescripB\'\n\026com.ib.client.protobuf"
  "B\rContractProtob\006proto3"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_Contract_2eproto_deps[2] = {
  &::descriptor_table_ComboLeg_2eproto,
  &::descriptor_table_DeltaNeutralContract_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_Contract_2eproto_sccs[1] = {
  &scc_info_Contract_Contract_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_Contract_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Contract_2eproto = {
  false, false, descriptor_table_protodef_Contract_2eproto, "Contract.proto", 983,
  &descriptor_table_Contract_2eproto_once, descriptor_table_Contract_2eproto_sccs, descriptor_table_Contract_2eproto_deps, 1, 2,
  schemas, file_default_instances, TableStruct_Contract_2eproto::offsets,
  file_level_metadata_Contract_2eproto, 1, file_level_enum_descriptors_Contract_2eproto, file_level_service_descriptors_Contract_2eproto,
};

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_Contract_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_Contract_2eproto)), true);
namespace protobuf {

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

void Contract::InitAsDefaultInstance() {
  ::protobuf::_Contract_default_instance_._instance.get_mutable()->deltaneutralcontract_ = const_cast< ::protobuf::DeltaNeutralContract*>(
      ::protobuf::DeltaNeutralContract::internal_default_instance());
}
class Contract::_Internal {
 public:
  using HasBits = decltype(std::declval<Contract>()._has_bits_);
  static void set_has_conid(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static void set_has_symbol(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_sectype(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_lasttradedateorcontractmonth(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_strike(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static void set_has_right(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_multiplier(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static void set_has_exchange(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_primaryexch(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_currency(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_localsymbol(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_tradingclass(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_secidtype(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_secid(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_description(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_issuerid(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::protobuf::DeltaNeutralContract& deltaneutralcontract(const Contract* msg);
  static void set_has_deltaneutralcontract(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static void set_has_includeexpired(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static void set_has_combolegsdescrip(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
};

const ::protobuf::DeltaNeutralContract&
Contract::_Internal::deltaneutralcontract(const Contract* msg) {
  return *msg->deltaneutralcontract_;
}
void Contract::clear_deltaneutralcontract() {
  if (GetArena() == nullptr && deltaneutralcontract_ != nullptr) {
    delete deltaneutralcontract_;
  }
  deltaneutralcontract_ = nullptr;
  _has_bits_[0] &= ~0x00004000u;
}
void Contract::clear_combolegs() {
  combolegs_.Clear();
}
Contract::Contract(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
  combolegs_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:protobuf.Contract)
}
Contract::Contract(const Contract& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      combolegs_(from.combolegs_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  symbol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_symbol()) {
    symbol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_symbol(),
      GetArena());
  }
  sectype_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_sectype()) {
    sectype_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_sectype(),
      GetArena());
  }
  lasttradedateorcontractmonth_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_lasttradedateorcontractmonth()) {
    lasttradedateorcontractmonth_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_lasttradedateorcontractmonth(),
      GetArena());
  }
  right_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_right()) {
    right_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_right(),
      GetArena());
  }
  exchange_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_exchange()) {
    exchange_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_exchange(),
      GetArena());
  }
  primaryexch_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_primaryexch()) {
    primaryexch_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_primaryexch(),
      GetArena());
  }
  currency_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_currency()) {
    currency_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_currency(),
      GetArena());
  }
  localsymbol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_localsymbol()) {
    localsymbol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_localsymbol(),
      GetArena());
  }
  tradingclass_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_tradingclass()) {
    tradingclass_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tradingclass(),
      GetArena());
  }
  secidtype_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_secidtype()) {
    secidtype_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_secidtype(),
      GetArena());
  }
  secid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_secid()) {
    secid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_secid(),
      GetArena());
  }
  description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_description()) {
    description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_description(),
      GetArena());
  }
  issuerid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_issuerid()) {
    issuerid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_issuerid(),
      GetArena());
  }
  combolegsdescrip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_combolegsdescrip()) {
    combolegsdescrip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_combolegsdescrip(),
      GetArena());
  }
  if (from._internal_has_deltaneutralcontract()) {
    deltaneutralcontract_ = new ::protobuf::DeltaNeutralContract(*from.deltaneutralcontract_);
  } else {
    deltaneutralcontract_ = nullptr;
  }
  ::memcpy(&strike_, &from.strike_,
    static_cast<size_t>(reinterpret_cast<char*>(&includeexpired_) -
    reinterpret_cast<char*>(&strike_)) + sizeof(includeexpired_));
  // @@protoc_insertion_point(copy_constructor:protobuf.Contract)
}

void Contract::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Contract_Contract_2eproto.base);
  symbol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  sectype_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  lasttradedateorcontractmonth_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  right_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  exchange_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  primaryexch_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  currency_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  localsymbol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  tradingclass_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  secidtype_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  secid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  issuerid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  combolegsdescrip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&deltaneutralcontract_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&includeexpired_) -
      reinterpret_cast<char*>(&deltaneutralcontract_)) + sizeof(includeexpired_));
}

Contract::~Contract() {
  // @@protoc_insertion_point(destructor:protobuf.Contract)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void Contract::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  symbol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  sectype_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  lasttradedateorcontractmonth_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  right_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  exchange_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  primaryexch_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  currency_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  localsymbol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  tradingclass_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  secidtype_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  secid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  issuerid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  combolegsdescrip_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete deltaneutralcontract_;
}

void Contract::ArenaDtor(void* object) {
  Contract* _this = reinterpret_cast< Contract* >(object);
  (void)_this;
}
void Contract::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Contract::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const Contract& Contract::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Contract_Contract_2eproto.base);
  return *internal_default_instance();
}


void Contract::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf.Contract)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  combolegs_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      symbol_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      sectype_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      lasttradedateorcontractmonth_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      right_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      exchange_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000020u) {
      primaryexch_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000040u) {
      currency_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000080u) {
      localsymbol_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x00007f00u) {
    if (cached_has_bits & 0x00000100u) {
      tradingclass_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000200u) {
      secidtype_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000400u) {
      secid_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000800u) {
      description_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00001000u) {
      issuerid_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00002000u) {
      combolegsdescrip_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00004000u) {
      if (GetArena() == nullptr && deltaneutralcontract_ != nullptr) {
        delete deltaneutralcontract_;
      }
      deltaneutralcontract_ = nullptr;
    }
  }
  strike_ = 0;
  if (cached_has_bits & 0x00070000u) {
    ::memset(&multiplier_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&includeexpired_) -
        reinterpret_cast<char*>(&multiplier_)) + sizeof(includeexpired_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Contract::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // int32 conId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_conid(&has_bits);
          conid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string symbol = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_symbol();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.symbol"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string secType = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_sectype();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.secType"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string lastTradeDateOrContractMonth = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_lasttradedateorcontractmonth();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.lastTradeDateOrContractMonth"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // double strike = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 41)) {
          _Internal::set_has_strike(&has_bits);
          strike_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // string right = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          auto str = _internal_mutable_right();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.right"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // double multiplier = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 57)) {
          _Internal::set_has_multiplier(&has_bits);
          multiplier_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // string exchange = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
          auto str = _internal_mutable_exchange();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.exchange"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string primaryExch = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
          auto str = _internal_mutable_primaryexch();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.primaryExch"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string currency = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
          auto str = _internal_mutable_currency();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.currency"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string localSymbol = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
          auto str = _internal_mutable_localsymbol();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.localSymbol"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string tradingClass = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) {
          auto str = _internal_mutable_tradingclass();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.tradingClass"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string secIdType = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) {
          auto str = _internal_mutable_secidtype();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.secIdType"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string secId = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) {
          auto str = _internal_mutable_secid();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.secId"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string description = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
          auto str = _internal_mutable_description();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.description"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string issuerId = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 130)) {
          auto str = _internal_mutable_issuerid();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.issuerId"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .protobuf.DeltaNeutralContract deltaNeutralContract = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_deltaneutralcontract(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bool includeExpired = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) {
          _Internal::set_has_includeexpired(&has_bits);
          includeexpired_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string comboLegsDescrip = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 154)) {
          auto str = _internal_mutable_combolegsdescrip();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.Contract.comboLegsDescrip"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .protobuf.ComboLeg comboLegs = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 162)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_combolegs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<162>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* Contract::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf.Contract)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 conId = 1;
  if (_internal_has_conid()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_conid(), target);
  }

  // string symbol = 2;
  if (_internal_has_symbol()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_symbol().data(), static_cast<int>(this->_internal_symbol().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.symbol");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_symbol(), target);
  }

  // string secType = 3;
  if (_internal_has_sectype()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_sectype().data(), static_cast<int>(this->_internal_sectype().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.secType");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_sectype(), target);
  }

  // string lastTradeDateOrContractMonth = 4;
  if (_internal_has_lasttradedateorcontractmonth()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_lasttradedateorcontractmonth().data(), static_cast<int>(this->_internal_lasttradedateorcontractmonth().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.lastTradeDateOrContractMonth");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_lasttradedateorcontractmonth(), target);
  }

  // double strike = 5;
  if (_internal_has_strike()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(5, this->_internal_strike(), target);
  }

  // string right = 6;
  if (_internal_has_right()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_right().data(), static_cast<int>(this->_internal_right().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.right");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_right(), target);
  }

  // double multiplier = 7;
  if (_internal_has_multiplier()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(7, this->_internal_multiplier(), target);
  }

  // string exchange = 8;
  if (_internal_has_exchange()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_exchange().data(), static_cast<int>(this->_internal_exchange().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.exchange");
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_exchange(), target);
  }

  // string primaryExch = 9;
  if (_internal_has_primaryexch()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_primaryexch().data(), static_cast<int>(this->_internal_primaryexch().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.primaryExch");
    target = stream->WriteStringMaybeAliased(
        9, this->_internal_primaryexch(), target);
  }

  // string currency = 10;
  if (_internal_has_currency()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_currency().data(), static_cast<int>(this->_internal_currency().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.currency");
    target = stream->WriteStringMaybeAliased(
        10, this->_internal_currency(), target);
  }

  // string localSymbol = 11;
  if (_internal_has_localsymbol()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_localsymbol().data(), static_cast<int>(this->_internal_localsymbol().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.localSymbol");
    target = stream->WriteStringMaybeAliased(
        11, this->_internal_localsymbol(), target);
  }

  // string tradingClass = 12;
  if (_internal_has_tradingclass()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_tradingclass().data(), static_cast<int>(this->_internal_tradingclass().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.tradingClass");
    target = stream->WriteStringMaybeAliased(
        12, this->_internal_tradingclass(), target);
  }

  // string secIdType = 13;
  if (_internal_has_secidtype()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_secidtype().data(), static_cast<int>(this->_internal_secidtype().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.secIdType");
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_secidtype(), target);
  }

  // string secId = 14;
  if (_internal_has_secid()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_secid().data(), static_cast<int>(this->_internal_secid().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.secId");
    target = stream->WriteStringMaybeAliased(
        14, this->_internal_secid(), target);
  }

  // string description = 15;
  if (_internal_has_description()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_description().data(), static_cast<int>(this->_internal_description().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.description");
    target = stream->WriteStringMaybeAliased(
        15, this->_internal_description(), target);
  }

  // string issuerId = 16;
  if (_internal_has_issuerid()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_issuerid().data(), static_cast<int>(this->_internal_issuerid().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.issuerId");
    target = stream->WriteStringMaybeAliased(
        16, this->_internal_issuerid(), target);
  }

  // .protobuf.DeltaNeutralContract deltaNeutralContract = 17;
  if (_internal_has_deltaneutralcontract()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        17, _Internal::deltaneutralcontract(this), target, stream);
  }

  // bool includeExpired = 18;
  if (_internal_has_includeexpired()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_includeexpired(), target);
  }

  // string comboLegsDescrip = 19;
  if (_internal_has_combolegsdescrip()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_combolegsdescrip().data(), static_cast<int>(this->_internal_combolegsdescrip().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "protobuf.Contract.comboLegsDescrip");
    target = stream->WriteStringMaybeAliased(
        19, this->_internal_combolegsdescrip(), target);
  }

  // repeated .protobuf.ComboLeg comboLegs = 20;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_combolegs_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, this->_internal_combolegs(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf.Contract)
  return target;
}

size_t Contract::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf.Contract)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .protobuf.ComboLeg comboLegs = 20;
  total_size += 2UL * this->_internal_combolegs_size();
  for (const auto& msg : this->combolegs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // string symbol = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_symbol());
    }

    // string secType = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_sectype());
    }

    // string lastTradeDateOrContractMonth = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_lasttradedateorcontractmonth());
    }

    // string right = 6;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_right());
    }

    // string exchange = 8;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_exchange());
    }

    // string primaryExch = 9;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_primaryexch());
    }

    // string currency = 10;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_currency());
    }

    // string localSymbol = 11;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_localsymbol());
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // string tradingClass = 12;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_tradingclass());
    }

    // string secIdType = 13;
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_secidtype());
    }

    // string secId = 14;
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_secid());
    }

    // string description = 15;
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_description());
    }

    // string issuerId = 16;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_issuerid());
    }

    // string comboLegsDescrip = 19;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_combolegsdescrip());
    }

    // .protobuf.DeltaNeutralContract deltaNeutralContract = 17;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *deltaneutralcontract_);
    }

    // double strike = 5;
    if (cached_has_bits & 0x00008000u) {
      total_size += 1 + 8;
    }

  }
  if (cached_has_bits & 0x00070000u) {
    // double multiplier = 7;
    if (cached_has_bits & 0x00010000u) {
      total_size += 1 + 8;
    }

    // int32 conId = 1;
    if (cached_has_bits & 0x00020000u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_conid());
    }

    // bool includeExpired = 18;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 + 1;
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Contract::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:protobuf.Contract)
  GOOGLE_DCHECK_NE(&from, this);
  const Contract* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Contract>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf.Contract)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf.Contract)
    MergeFrom(*source);
  }
}

void Contract::MergeFrom(const Contract& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:protobuf.Contract)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  combolegs_.MergeFrom(from.combolegs_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_symbol(from._internal_symbol());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_sectype(from._internal_sectype());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_lasttradedateorcontractmonth(from._internal_lasttradedateorcontractmonth());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_right(from._internal_right());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_set_exchange(from._internal_exchange());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_set_primaryexch(from._internal_primaryexch());
    }
    if (cached_has_bits & 0x00000040u) {
      _internal_set_currency(from._internal_currency());
    }
    if (cached_has_bits & 0x00000080u) {
      _internal_set_localsymbol(from._internal_localsymbol());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _internal_set_tradingclass(from._internal_tradingclass());
    }
    if (cached_has_bits & 0x00000200u) {
      _internal_set_secidtype(from._internal_secidtype());
    }
    if (cached_has_bits & 0x00000400u) {
      _internal_set_secid(from._internal_secid());
    }
    if (cached_has_bits & 0x00000800u) {
      _internal_set_description(from._internal_description());
    }
    if (cached_has_bits & 0x00001000u) {
      _internal_set_issuerid(from._internal_issuerid());
    }
    if (cached_has_bits & 0x00002000u) {
      _internal_set_combolegsdescrip(from._internal_combolegsdescrip());
    }
    if (cached_has_bits & 0x00004000u) {
      _internal_mutable_deltaneutralcontract()->::protobuf::DeltaNeutralContract::MergeFrom(from._internal_deltaneutralcontract());
    }
    if (cached_has_bits & 0x00008000u) {
      strike_ = from.strike_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00070000u) {
    if (cached_has_bits & 0x00010000u) {
      multiplier_ = from.multiplier_;
    }
    if (cached_has_bits & 0x00020000u) {
      conid_ = from.conid_;
    }
    if (cached_has_bits & 0x00040000u) {
      includeexpired_ = from.includeexpired_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void Contract::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:protobuf.Contract)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Contract::CopyFrom(const Contract& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:protobuf.Contract)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Contract::IsInitialized() const {
  return true;
}

void Contract::InternalSwap(Contract* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  combolegs_.InternalSwap(&other->combolegs_);
  symbol_.Swap(&other->symbol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  sectype_.Swap(&other->sectype_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  lasttradedateorcontractmonth_.Swap(&other->lasttradedateorcontractmonth_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  right_.Swap(&other->right_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  exchange_.Swap(&other->exchange_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  primaryexch_.Swap(&other->primaryexch_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  currency_.Swap(&other->currency_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  localsymbol_.Swap(&other->localsymbol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  tradingclass_.Swap(&other->tradingclass_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  secidtype_.Swap(&other->secidtype_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  secid_.Swap(&other->secid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  description_.Swap(&other->description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  issuerid_.Swap(&other->issuerid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  combolegsdescrip_.Swap(&other->combolegsdescrip_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Contract, includeexpired_)
      + sizeof(Contract::includeexpired_)
      - PROTOBUF_FIELD_OFFSET(Contract, deltaneutralcontract_)>(
          reinterpret_cast<char*>(&deltaneutralcontract_),
          reinterpret_cast<char*>(&other->deltaneutralcontract_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Contract::GetMetadata() const {
  return GetMetadataStatic();
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace protobuf
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::protobuf::Contract* Arena::CreateMaybeMessage< ::protobuf::Contract >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf::Contract >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
