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

#include "proto/services/serviceRequest.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)

namespace protobuf_proto_2fclients_2fclient_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fclients_2fclient_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ClientList;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fclients_2fclient_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Client;
}  // namespace protobuf_proto_2fclients_2fclient_2eproto
namespace protobuf_proto_2fdevices_2fdevice_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fdevices_2fdevice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Device;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fdevices_2fdevice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DeviceList;
}  // namespace protobuf_proto_2fdevices_2fdevice_2eproto
namespace protobuf_proto_2fdevices_2ftopicDemux_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fdevices_2ftopicDemux_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TopicDemux;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fdevices_2ftopicDemux_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TopicDemuxList;
}  // namespace protobuf_proto_2fdevices_2ftopicDemux_2eproto
namespace protobuf_proto_2fdevices_2ftopicMux_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fdevices_2ftopicMux_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TopicMux;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fdevices_2ftopicMux_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TopicMuxList;
}  // namespace protobuf_proto_2fdevices_2ftopicMux_2eproto
namespace protobuf_proto_2fprocessing_2flockstepProcessing_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fprocessing_2flockstepProcessing_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_LockstepProcessingRequest;
}  // namespace protobuf_proto_2fprocessing_2flockstepProcessing_2eproto
namespace protobuf_proto_2fprocessing_2fprocessingModule_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fprocessing_2fprocessingModule_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ProcessingModuleList;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fprocessing_2fprocessingModule_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_ProcessingModule;
}  // namespace protobuf_proto_2fprocessing_2fprocessingModule_2eproto
namespace protobuf_proto_2fservices_2frequest_2ftopicSubscription_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fservices_2frequest_2ftopicSubscription_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TopicSubscription;
}  // namespace protobuf_proto_2fservices_2frequest_2ftopicSubscription_2eproto
namespace protobuf_proto_2fsessions_2fsession_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fsessions_2fsession_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_SessionList;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_proto_2fsessions_2fsession_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Session;
}  // namespace protobuf_proto_2fsessions_2fsession_2eproto
namespace ubii {
namespace services {
class ServiceRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ServiceRequest>
      _instance;
  const ::ubii::clients::Client* client_;
  const ::ubii::devices::Device* device_;
  const ::ubii::services::request::TopicSubscription* topic_subscription_;
  const ::ubii::sessions::Session* session_;
  const ::ubii::sessions::SessionList* session_list_;
  const ::ubii::processing::ProcessingModule* processing_module_;
  const ::ubii::processing::ProcessingModuleList* processing_module_list_;
  const ::ubii::devices::TopicMux* topic_mux_;
  const ::ubii::devices::TopicMuxList* topic_mux_list_;
  const ::ubii::devices::TopicDemux* topic_demux_;
  const ::ubii::devices::TopicDemuxList* topic_demux_list_;
  const ::ubii::clients::ClientList* client_list_;
  const ::ubii::devices::DeviceList* device_list_;
  const ::ubii::processing::LockstepProcessingRequest* lockstep_processing_request_;
} _ServiceRequest_default_instance_;
}  // namespace services
}  // namespace ubii
namespace protobuf_proto_2fservices_2fserviceRequest_2eproto {
static void InitDefaultsServiceRequest() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::ubii::services::_ServiceRequest_default_instance_;
    new (ptr) ::ubii::services::ServiceRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::ubii::services::ServiceRequest::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<14> scc_info_ServiceRequest =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 14, InitDefaultsServiceRequest}, {
      &protobuf_proto_2fclients_2fclient_2eproto::scc_info_Client.base,
      &protobuf_proto_2fdevices_2fdevice_2eproto::scc_info_Device.base,
      &protobuf_proto_2fservices_2frequest_2ftopicSubscription_2eproto::scc_info_TopicSubscription.base,
      &protobuf_proto_2fsessions_2fsession_2eproto::scc_info_Session.base,
      &protobuf_proto_2fsessions_2fsession_2eproto::scc_info_SessionList.base,
      &protobuf_proto_2fprocessing_2fprocessingModule_2eproto::scc_info_ProcessingModule.base,
      &protobuf_proto_2fprocessing_2fprocessingModule_2eproto::scc_info_ProcessingModuleList.base,
      &protobuf_proto_2fdevices_2ftopicMux_2eproto::scc_info_TopicMux.base,
      &protobuf_proto_2fdevices_2ftopicMux_2eproto::scc_info_TopicMuxList.base,
      &protobuf_proto_2fdevices_2ftopicDemux_2eproto::scc_info_TopicDemux.base,
      &protobuf_proto_2fdevices_2ftopicDemux_2eproto::scc_info_TopicDemuxList.base,
      &protobuf_proto_2fclients_2fclient_2eproto::scc_info_ClientList.base,
      &protobuf_proto_2fdevices_2fdevice_2eproto::scc_info_DeviceList.base,
      &protobuf_proto_2fprocessing_2flockstepProcessing_2eproto::scc_info_LockstepProcessingRequest.base,}};

void InitDefaults() {
  ::google::protobuf::internal::InitSCC(&scc_info_ServiceRequest.base);
}

::google::protobuf::Metadata file_level_metadata[1];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::ubii::services::ServiceRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::ubii::services::ServiceRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::ubii::services::ServiceRequest, topic_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, client_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, device_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, topic_subscription_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, session_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, session_list_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, processing_module_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, processing_module_list_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, topic_mux_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, topic_mux_list_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, topic_demux_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, topic_demux_list_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, client_list_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, device_list_),
  offsetof(::ubii::services::ServiceRequestDefaultTypeInternal, lockstep_processing_request_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::ubii::services::ServiceRequest, type_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::ubii::services::ServiceRequest)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::ubii::services::_ServiceRequest_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  AssignDescriptors(
      "proto/services/serviceRequest.proto", schemas, file_default_instances, TableStruct::offsets,
      file_level_metadata, NULL, NULL);
}

void protobuf_AssignDescriptorsOnce() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n#proto/services/serviceRequest.proto\022\ru"
      "bii.services\032\032proto/clients/client.proto"
      "\032\032proto/devices/device.proto\032\034proto/devi"
      "ces/topicMux.proto\032\036proto/devices/topicD"
      "emux.proto\032\034proto/sessions/session.proto"
      "\032.proto/services/request/topicSubscripti"
      "on.proto\032\'proto/processing/processingMod"
      "ule.proto\032)proto/processing/lockstepProc"
      "essing.proto\"\252\006\n\016ServiceRequest\022\r\n\005topic"
      "\030\001 \001(\t\022&\n\006client\030\002 \001(\0132\024.ubii.clients.Cl"
      "ientH\000\022&\n\006device\030\003 \001(\0132\024.ubii.devices.De"
      "viceH\000\022F\n\022topic_subscription\030\004 \001(\0132(.ubi"
      "i.services.request.TopicSubscriptionH\000\022)"
      "\n\007session\030\005 \001(\0132\026.ubii.sessions.SessionH"
      "\000\0222\n\014session_list\030\006 \001(\0132\032.ubii.sessions."
      "SessionListH\000\022>\n\021processing_module\030\007 \001(\013"
      "2!.ubii.processing.ProcessingModuleH\000\022G\n"
      "\026processing_module_list\030\010 \001(\0132%.ubii.pro"
      "cessing.ProcessingModuleListH\000\022+\n\ttopic_"
      "mux\030\t \001(\0132\026.ubii.devices.TopicMuxH\000\0224\n\016t"
      "opic_mux_list\030\n \001(\0132\032.ubii.devices.Topic"
      "MuxListH\000\022/\n\013topic_demux\030\013 \001(\0132\030.ubii.de"
      "vices.TopicDemuxH\000\0228\n\020topic_demux_list\030\014"
      " \001(\0132\034.ubii.devices.TopicDemuxListH\000\022/\n\013"
      "client_list\030\r \001(\0132\030.ubii.clients.ClientL"
      "istH\000\022/\n\013device_list\030\016 \001(\0132\030.ubii.device"
      "s.DeviceListH\000\022Q\n\033lockstep_processing_re"
      "quest\030\017 \001(\0132*.ubii.processing.LockstepPr"
      "ocessingRequestH\000B\006\n\004typeb\006proto3"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 1153);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "proto/services/serviceRequest.proto", &protobuf_RegisterTypes);
  ::protobuf_proto_2fclients_2fclient_2eproto::AddDescriptors();
  ::protobuf_proto_2fdevices_2fdevice_2eproto::AddDescriptors();
  ::protobuf_proto_2fdevices_2ftopicMux_2eproto::AddDescriptors();
  ::protobuf_proto_2fdevices_2ftopicDemux_2eproto::AddDescriptors();
  ::protobuf_proto_2fsessions_2fsession_2eproto::AddDescriptors();
  ::protobuf_proto_2fservices_2frequest_2ftopicSubscription_2eproto::AddDescriptors();
  ::protobuf_proto_2fprocessing_2fprocessingModule_2eproto::AddDescriptors();
  ::protobuf_proto_2fprocessing_2flockstepProcessing_2eproto::AddDescriptors();
}

void AddDescriptors() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;
}  // namespace protobuf_proto_2fservices_2fserviceRequest_2eproto
namespace ubii {
namespace services {

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

void ServiceRequest::InitAsDefaultInstance() {
  ::ubii::services::_ServiceRequest_default_instance_.client_ = const_cast< ::ubii::clients::Client*>(
      ::ubii::clients::Client::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.device_ = const_cast< ::ubii::devices::Device*>(
      ::ubii::devices::Device::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.topic_subscription_ = const_cast< ::ubii::services::request::TopicSubscription*>(
      ::ubii::services::request::TopicSubscription::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.session_ = const_cast< ::ubii::sessions::Session*>(
      ::ubii::sessions::Session::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.session_list_ = const_cast< ::ubii::sessions::SessionList*>(
      ::ubii::sessions::SessionList::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.processing_module_ = const_cast< ::ubii::processing::ProcessingModule*>(
      ::ubii::processing::ProcessingModule::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.processing_module_list_ = const_cast< ::ubii::processing::ProcessingModuleList*>(
      ::ubii::processing::ProcessingModuleList::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.topic_mux_ = const_cast< ::ubii::devices::TopicMux*>(
      ::ubii::devices::TopicMux::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.topic_mux_list_ = const_cast< ::ubii::devices::TopicMuxList*>(
      ::ubii::devices::TopicMuxList::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.topic_demux_ = const_cast< ::ubii::devices::TopicDemux*>(
      ::ubii::devices::TopicDemux::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.topic_demux_list_ = const_cast< ::ubii::devices::TopicDemuxList*>(
      ::ubii::devices::TopicDemuxList::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.client_list_ = const_cast< ::ubii::clients::ClientList*>(
      ::ubii::clients::ClientList::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.device_list_ = const_cast< ::ubii::devices::DeviceList*>(
      ::ubii::devices::DeviceList::internal_default_instance());
  ::ubii::services::_ServiceRequest_default_instance_.lockstep_processing_request_ = const_cast< ::ubii::processing::LockstepProcessingRequest*>(
      ::ubii::processing::LockstepProcessingRequest::internal_default_instance());
}
void ServiceRequest::set_allocated_client(::ubii::clients::Client* client) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (client) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      client = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, client, submessage_arena);
    }
    set_has_client();
    type_.client_ = client;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.client)
}
void ServiceRequest::clear_client() {
  if (has_client()) {
    delete type_.client_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_device(::ubii::devices::Device* device) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (device) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      device = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, device, submessage_arena);
    }
    set_has_device();
    type_.device_ = device;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.device)
}
void ServiceRequest::clear_device() {
  if (has_device()) {
    delete type_.device_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_topic_subscription(::ubii::services::request::TopicSubscription* topic_subscription) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (topic_subscription) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      topic_subscription = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, topic_subscription, submessage_arena);
    }
    set_has_topic_subscription();
    type_.topic_subscription_ = topic_subscription;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.topic_subscription)
}
void ServiceRequest::clear_topic_subscription() {
  if (has_topic_subscription()) {
    delete type_.topic_subscription_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_session(::ubii::sessions::Session* session) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (session) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      session = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, session, submessage_arena);
    }
    set_has_session();
    type_.session_ = session;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.session)
}
void ServiceRequest::clear_session() {
  if (has_session()) {
    delete type_.session_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_session_list(::ubii::sessions::SessionList* session_list) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (session_list) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      session_list = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, session_list, submessage_arena);
    }
    set_has_session_list();
    type_.session_list_ = session_list;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.session_list)
}
void ServiceRequest::clear_session_list() {
  if (has_session_list()) {
    delete type_.session_list_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_processing_module(::ubii::processing::ProcessingModule* processing_module) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (processing_module) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      processing_module = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, processing_module, submessage_arena);
    }
    set_has_processing_module();
    type_.processing_module_ = processing_module;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.processing_module)
}
void ServiceRequest::clear_processing_module() {
  if (has_processing_module()) {
    delete type_.processing_module_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_processing_module_list(::ubii::processing::ProcessingModuleList* processing_module_list) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (processing_module_list) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      processing_module_list = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, processing_module_list, submessage_arena);
    }
    set_has_processing_module_list();
    type_.processing_module_list_ = processing_module_list;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.processing_module_list)
}
void ServiceRequest::clear_processing_module_list() {
  if (has_processing_module_list()) {
    delete type_.processing_module_list_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_topic_mux(::ubii::devices::TopicMux* topic_mux) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (topic_mux) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      topic_mux = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, topic_mux, submessage_arena);
    }
    set_has_topic_mux();
    type_.topic_mux_ = topic_mux;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.topic_mux)
}
void ServiceRequest::clear_topic_mux() {
  if (has_topic_mux()) {
    delete type_.topic_mux_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_topic_mux_list(::ubii::devices::TopicMuxList* topic_mux_list) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (topic_mux_list) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      topic_mux_list = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, topic_mux_list, submessage_arena);
    }
    set_has_topic_mux_list();
    type_.topic_mux_list_ = topic_mux_list;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.topic_mux_list)
}
void ServiceRequest::clear_topic_mux_list() {
  if (has_topic_mux_list()) {
    delete type_.topic_mux_list_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_topic_demux(::ubii::devices::TopicDemux* topic_demux) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (topic_demux) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      topic_demux = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, topic_demux, submessage_arena);
    }
    set_has_topic_demux();
    type_.topic_demux_ = topic_demux;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.topic_demux)
}
void ServiceRequest::clear_topic_demux() {
  if (has_topic_demux()) {
    delete type_.topic_demux_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_topic_demux_list(::ubii::devices::TopicDemuxList* topic_demux_list) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (topic_demux_list) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      topic_demux_list = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, topic_demux_list, submessage_arena);
    }
    set_has_topic_demux_list();
    type_.topic_demux_list_ = topic_demux_list;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.topic_demux_list)
}
void ServiceRequest::clear_topic_demux_list() {
  if (has_topic_demux_list()) {
    delete type_.topic_demux_list_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_client_list(::ubii::clients::ClientList* client_list) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (client_list) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      client_list = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, client_list, submessage_arena);
    }
    set_has_client_list();
    type_.client_list_ = client_list;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.client_list)
}
void ServiceRequest::clear_client_list() {
  if (has_client_list()) {
    delete type_.client_list_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_device_list(::ubii::devices::DeviceList* device_list) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (device_list) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      device_list = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, device_list, submessage_arena);
    }
    set_has_device_list();
    type_.device_list_ = device_list;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.device_list)
}
void ServiceRequest::clear_device_list() {
  if (has_device_list()) {
    delete type_.device_list_;
    clear_has_type();
  }
}
void ServiceRequest::set_allocated_lockstep_processing_request(::ubii::processing::LockstepProcessingRequest* lockstep_processing_request) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_type();
  if (lockstep_processing_request) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      lockstep_processing_request = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, lockstep_processing_request, submessage_arena);
    }
    set_has_lockstep_processing_request();
    type_.lockstep_processing_request_ = lockstep_processing_request;
  }
  // @@protoc_insertion_point(field_set_allocated:ubii.services.ServiceRequest.lockstep_processing_request)
}
void ServiceRequest::clear_lockstep_processing_request() {
  if (has_lockstep_processing_request()) {
    delete type_.lockstep_processing_request_;
    clear_has_type();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ServiceRequest::kTopicFieldNumber;
const int ServiceRequest::kClientFieldNumber;
const int ServiceRequest::kDeviceFieldNumber;
const int ServiceRequest::kTopicSubscriptionFieldNumber;
const int ServiceRequest::kSessionFieldNumber;
const int ServiceRequest::kSessionListFieldNumber;
const int ServiceRequest::kProcessingModuleFieldNumber;
const int ServiceRequest::kProcessingModuleListFieldNumber;
const int ServiceRequest::kTopicMuxFieldNumber;
const int ServiceRequest::kTopicMuxListFieldNumber;
const int ServiceRequest::kTopicDemuxFieldNumber;
const int ServiceRequest::kTopicDemuxListFieldNumber;
const int ServiceRequest::kClientListFieldNumber;
const int ServiceRequest::kDeviceListFieldNumber;
const int ServiceRequest::kLockstepProcessingRequestFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ServiceRequest::ServiceRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_proto_2fservices_2fserviceRequest_2eproto::scc_info_ServiceRequest.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:ubii.services.ServiceRequest)
}
ServiceRequest::ServiceRequest(const ServiceRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  topic_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.topic().size() > 0) {
    topic_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.topic_);
  }
  clear_has_type();
  switch (from.type_case()) {
    case kClient: {
      mutable_client()->::ubii::clients::Client::MergeFrom(from.client());
      break;
    }
    case kDevice: {
      mutable_device()->::ubii::devices::Device::MergeFrom(from.device());
      break;
    }
    case kTopicSubscription: {
      mutable_topic_subscription()->::ubii::services::request::TopicSubscription::MergeFrom(from.topic_subscription());
      break;
    }
    case kSession: {
      mutable_session()->::ubii::sessions::Session::MergeFrom(from.session());
      break;
    }
    case kSessionList: {
      mutable_session_list()->::ubii::sessions::SessionList::MergeFrom(from.session_list());
      break;
    }
    case kProcessingModule: {
      mutable_processing_module()->::ubii::processing::ProcessingModule::MergeFrom(from.processing_module());
      break;
    }
    case kProcessingModuleList: {
      mutable_processing_module_list()->::ubii::processing::ProcessingModuleList::MergeFrom(from.processing_module_list());
      break;
    }
    case kTopicMux: {
      mutable_topic_mux()->::ubii::devices::TopicMux::MergeFrom(from.topic_mux());
      break;
    }
    case kTopicMuxList: {
      mutable_topic_mux_list()->::ubii::devices::TopicMuxList::MergeFrom(from.topic_mux_list());
      break;
    }
    case kTopicDemux: {
      mutable_topic_demux()->::ubii::devices::TopicDemux::MergeFrom(from.topic_demux());
      break;
    }
    case kTopicDemuxList: {
      mutable_topic_demux_list()->::ubii::devices::TopicDemuxList::MergeFrom(from.topic_demux_list());
      break;
    }
    case kClientList: {
      mutable_client_list()->::ubii::clients::ClientList::MergeFrom(from.client_list());
      break;
    }
    case kDeviceList: {
      mutable_device_list()->::ubii::devices::DeviceList::MergeFrom(from.device_list());
      break;
    }
    case kLockstepProcessingRequest: {
      mutable_lockstep_processing_request()->::ubii::processing::LockstepProcessingRequest::MergeFrom(from.lockstep_processing_request());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:ubii.services.ServiceRequest)
}

void ServiceRequest::SharedCtor() {
  topic_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_type();
}

ServiceRequest::~ServiceRequest() {
  // @@protoc_insertion_point(destructor:ubii.services.ServiceRequest)
  SharedDtor();
}

void ServiceRequest::SharedDtor() {
  topic_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_type()) {
    clear_type();
  }
}

void ServiceRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ServiceRequest::descriptor() {
  ::protobuf_proto_2fservices_2fserviceRequest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_proto_2fservices_2fserviceRequest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ServiceRequest& ServiceRequest::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_proto_2fservices_2fserviceRequest_2eproto::scc_info_ServiceRequest.base);
  return *internal_default_instance();
}


void ServiceRequest::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:ubii.services.ServiceRequest)
  switch (type_case()) {
    case kClient: {
      delete type_.client_;
      break;
    }
    case kDevice: {
      delete type_.device_;
      break;
    }
    case kTopicSubscription: {
      delete type_.topic_subscription_;
      break;
    }
    case kSession: {
      delete type_.session_;
      break;
    }
    case kSessionList: {
      delete type_.session_list_;
      break;
    }
    case kProcessingModule: {
      delete type_.processing_module_;
      break;
    }
    case kProcessingModuleList: {
      delete type_.processing_module_list_;
      break;
    }
    case kTopicMux: {
      delete type_.topic_mux_;
      break;
    }
    case kTopicMuxList: {
      delete type_.topic_mux_list_;
      break;
    }
    case kTopicDemux: {
      delete type_.topic_demux_;
      break;
    }
    case kTopicDemuxList: {
      delete type_.topic_demux_list_;
      break;
    }
    case kClientList: {
      delete type_.client_list_;
      break;
    }
    case kDeviceList: {
      delete type_.device_list_;
      break;
    }
    case kLockstepProcessingRequest: {
      delete type_.lockstep_processing_request_;
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = TYPE_NOT_SET;
}


void ServiceRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:ubii.services.ServiceRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  topic_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_type();
  _internal_metadata_.Clear();
}

bool ServiceRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:ubii.services.ServiceRequest)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string topic = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_topic()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->topic().data(), static_cast<int>(this->topic().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "ubii.services.ServiceRequest.topic"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.clients.Client client = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_client()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.devices.Device device = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_device()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.services.request.TopicSubscription topic_subscription = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_topic_subscription()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.sessions.Session session = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_session()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.sessions.SessionList session_list = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_session_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.processing.ProcessingModule processing_module = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_processing_module()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.processing.ProcessingModuleList processing_module_list = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_processing_module_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.devices.TopicMux topic_mux = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_topic_mux()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.devices.TopicMuxList topic_mux_list = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_topic_mux_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.devices.TopicDemux topic_demux = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_topic_demux()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.devices.TopicDemuxList topic_demux_list = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_topic_demux_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.clients.ClientList client_list = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_client_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.devices.DeviceList device_list = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_device_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .ubii.processing.LockstepProcessingRequest lockstep_processing_request = 15;
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_lockstep_processing_request()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:ubii.services.ServiceRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:ubii.services.ServiceRequest)
  return false;
#undef DO_
}

void ServiceRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:ubii.services.ServiceRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string topic = 1;
  if (this->topic().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->topic().data(), static_cast<int>(this->topic().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "ubii.services.ServiceRequest.topic");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->topic(), output);
  }

  // .ubii.clients.Client client = 2;
  if (has_client()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->_internal_client(), output);
  }

  // .ubii.devices.Device device = 3;
  if (has_device()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_device(), output);
  }

  // .ubii.services.request.TopicSubscription topic_subscription = 4;
  if (has_topic_subscription()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_topic_subscription(), output);
  }

  // .ubii.sessions.Session session = 5;
  if (has_session()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->_internal_session(), output);
  }

  // .ubii.sessions.SessionList session_list = 6;
  if (has_session_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->_internal_session_list(), output);
  }

  // .ubii.processing.ProcessingModule processing_module = 7;
  if (has_processing_module()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, this->_internal_processing_module(), output);
  }

  // .ubii.processing.ProcessingModuleList processing_module_list = 8;
  if (has_processing_module_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->_internal_processing_module_list(), output);
  }

  // .ubii.devices.TopicMux topic_mux = 9;
  if (has_topic_mux()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, this->_internal_topic_mux(), output);
  }

  // .ubii.devices.TopicMuxList topic_mux_list = 10;
  if (has_topic_mux_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10, this->_internal_topic_mux_list(), output);
  }

  // .ubii.devices.TopicDemux topic_demux = 11;
  if (has_topic_demux()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, this->_internal_topic_demux(), output);
  }

  // .ubii.devices.TopicDemuxList topic_demux_list = 12;
  if (has_topic_demux_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      12, this->_internal_topic_demux_list(), output);
  }

  // .ubii.clients.ClientList client_list = 13;
  if (has_client_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13, this->_internal_client_list(), output);
  }

  // .ubii.devices.DeviceList device_list = 14;
  if (has_device_list()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      14, this->_internal_device_list(), output);
  }

  // .ubii.processing.LockstepProcessingRequest lockstep_processing_request = 15;
  if (has_lockstep_processing_request()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      15, this->_internal_lockstep_processing_request(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:ubii.services.ServiceRequest)
}

::google::protobuf::uint8* ServiceRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:ubii.services.ServiceRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string topic = 1;
  if (this->topic().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->topic().data(), static_cast<int>(this->topic().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "ubii.services.ServiceRequest.topic");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->topic(), target);
  }

  // .ubii.clients.Client client = 2;
  if (has_client()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->_internal_client(), deterministic, target);
  }

  // .ubii.devices.Device device = 3;
  if (has_device()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_device(), deterministic, target);
  }

  // .ubii.services.request.TopicSubscription topic_subscription = 4;
  if (has_topic_subscription()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_topic_subscription(), deterministic, target);
  }

  // .ubii.sessions.Session session = 5;
  if (has_session()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->_internal_session(), deterministic, target);
  }

  // .ubii.sessions.SessionList session_list = 6;
  if (has_session_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, this->_internal_session_list(), deterministic, target);
  }

  // .ubii.processing.ProcessingModule processing_module = 7;
  if (has_processing_module()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, this->_internal_processing_module(), deterministic, target);
  }

  // .ubii.processing.ProcessingModuleList processing_module_list = 8;
  if (has_processing_module_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        8, this->_internal_processing_module_list(), deterministic, target);
  }

  // .ubii.devices.TopicMux topic_mux = 9;
  if (has_topic_mux()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        9, this->_internal_topic_mux(), deterministic, target);
  }

  // .ubii.devices.TopicMuxList topic_mux_list = 10;
  if (has_topic_mux_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        10, this->_internal_topic_mux_list(), deterministic, target);
  }

  // .ubii.devices.TopicDemux topic_demux = 11;
  if (has_topic_demux()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, this->_internal_topic_demux(), deterministic, target);
  }

  // .ubii.devices.TopicDemuxList topic_demux_list = 12;
  if (has_topic_demux_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        12, this->_internal_topic_demux_list(), deterministic, target);
  }

  // .ubii.clients.ClientList client_list = 13;
  if (has_client_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        13, this->_internal_client_list(), deterministic, target);
  }

  // .ubii.devices.DeviceList device_list = 14;
  if (has_device_list()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        14, this->_internal_device_list(), deterministic, target);
  }

  // .ubii.processing.LockstepProcessingRequest lockstep_processing_request = 15;
  if (has_lockstep_processing_request()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        15, this->_internal_lockstep_processing_request(), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:ubii.services.ServiceRequest)
  return target;
}

size_t ServiceRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:ubii.services.ServiceRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string topic = 1;
  if (this->topic().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->topic());
  }

  switch (type_case()) {
    // .ubii.clients.Client client = 2;
    case kClient: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.client_);
      break;
    }
    // .ubii.devices.Device device = 3;
    case kDevice: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.device_);
      break;
    }
    // .ubii.services.request.TopicSubscription topic_subscription = 4;
    case kTopicSubscription: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.topic_subscription_);
      break;
    }
    // .ubii.sessions.Session session = 5;
    case kSession: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.session_);
      break;
    }
    // .ubii.sessions.SessionList session_list = 6;
    case kSessionList: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.session_list_);
      break;
    }
    // .ubii.processing.ProcessingModule processing_module = 7;
    case kProcessingModule: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.processing_module_);
      break;
    }
    // .ubii.processing.ProcessingModuleList processing_module_list = 8;
    case kProcessingModuleList: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.processing_module_list_);
      break;
    }
    // .ubii.devices.TopicMux topic_mux = 9;
    case kTopicMux: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.topic_mux_);
      break;
    }
    // .ubii.devices.TopicMuxList topic_mux_list = 10;
    case kTopicMuxList: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.topic_mux_list_);
      break;
    }
    // .ubii.devices.TopicDemux topic_demux = 11;
    case kTopicDemux: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.topic_demux_);
      break;
    }
    // .ubii.devices.TopicDemuxList topic_demux_list = 12;
    case kTopicDemuxList: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.topic_demux_list_);
      break;
    }
    // .ubii.clients.ClientList client_list = 13;
    case kClientList: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.client_list_);
      break;
    }
    // .ubii.devices.DeviceList device_list = 14;
    case kDeviceList: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.device_list_);
      break;
    }
    // .ubii.processing.LockstepProcessingRequest lockstep_processing_request = 15;
    case kLockstepProcessingRequest: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *type_.lockstep_processing_request_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void ServiceRequest::MergeFrom(const ServiceRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ubii.services.ServiceRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.topic().size() > 0) {

    topic_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.topic_);
  }
  switch (from.type_case()) {
    case kClient: {
      mutable_client()->::ubii::clients::Client::MergeFrom(from.client());
      break;
    }
    case kDevice: {
      mutable_device()->::ubii::devices::Device::MergeFrom(from.device());
      break;
    }
    case kTopicSubscription: {
      mutable_topic_subscription()->::ubii::services::request::TopicSubscription::MergeFrom(from.topic_subscription());
      break;
    }
    case kSession: {
      mutable_session()->::ubii::sessions::Session::MergeFrom(from.session());
      break;
    }
    case kSessionList: {
      mutable_session_list()->::ubii::sessions::SessionList::MergeFrom(from.session_list());
      break;
    }
    case kProcessingModule: {
      mutable_processing_module()->::ubii::processing::ProcessingModule::MergeFrom(from.processing_module());
      break;
    }
    case kProcessingModuleList: {
      mutable_processing_module_list()->::ubii::processing::ProcessingModuleList::MergeFrom(from.processing_module_list());
      break;
    }
    case kTopicMux: {
      mutable_topic_mux()->::ubii::devices::TopicMux::MergeFrom(from.topic_mux());
      break;
    }
    case kTopicMuxList: {
      mutable_topic_mux_list()->::ubii::devices::TopicMuxList::MergeFrom(from.topic_mux_list());
      break;
    }
    case kTopicDemux: {
      mutable_topic_demux()->::ubii::devices::TopicDemux::MergeFrom(from.topic_demux());
      break;
    }
    case kTopicDemuxList: {
      mutable_topic_demux_list()->::ubii::devices::TopicDemuxList::MergeFrom(from.topic_demux_list());
      break;
    }
    case kClientList: {
      mutable_client_list()->::ubii::clients::ClientList::MergeFrom(from.client_list());
      break;
    }
    case kDeviceList: {
      mutable_device_list()->::ubii::devices::DeviceList::MergeFrom(from.device_list());
      break;
    }
    case kLockstepProcessingRequest: {
      mutable_lockstep_processing_request()->::ubii::processing::LockstepProcessingRequest::MergeFrom(from.lockstep_processing_request());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
}

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

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

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

void ServiceRequest::Swap(ServiceRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ServiceRequest::InternalSwap(ServiceRequest* other) {
  using std::swap;
  topic_.Swap(&other->topic_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(type_, other->type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata ServiceRequest::GetMetadata() const {
  protobuf_proto_2fservices_2fserviceRequest_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_proto_2fservices_2fserviceRequest_2eproto::file_level_metadata[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace services
}  // namespace ubii
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::ubii::services::ServiceRequest* Arena::CreateMaybeMessage< ::ubii::services::ServiceRequest >(Arena* arena) {
  return Arena::CreateInternal< ::ubii::services::ServiceRequest >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
