// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/appengine/v1/service.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "google/appengine/v1/service.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/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)

namespace google {
namespace appengine {
namespace v1 {

namespace {

const ::google::protobuf::Descriptor* Service_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Service_reflection_ = NULL;
const ::google::protobuf::Descriptor* TrafficSplit_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TrafficSplit_reflection_ = NULL;
const ::google::protobuf::Descriptor* TrafficSplit_AllocationsEntry_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* TrafficSplit_ShardBy_descriptor_ = NULL;

}  // namespace


void protobuf_AssignDesc_google_2fappengine_2fv1_2fservice_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AssignDesc_google_2fappengine_2fv1_2fservice_2eproto() {
  protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "google/appengine/v1/service.proto");
  GOOGLE_CHECK(file != NULL);
  Service_descriptor_ = file->message_type(0);
  static const int Service_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Service, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Service, id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Service, split_),
  };
  Service_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      Service_descriptor_,
      Service::internal_default_instance(),
      Service_offsets_,
      -1,
      -1,
      -1,
      sizeof(Service),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Service, _internal_metadata_));
  TrafficSplit_descriptor_ = file->message_type(1);
  static const int TrafficSplit_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrafficSplit, shard_by_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrafficSplit, allocations_),
  };
  TrafficSplit_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      TrafficSplit_descriptor_,
      TrafficSplit::internal_default_instance(),
      TrafficSplit_offsets_,
      -1,
      -1,
      -1,
      sizeof(TrafficSplit),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TrafficSplit, _internal_metadata_));
  TrafficSplit_AllocationsEntry_descriptor_ = TrafficSplit_descriptor_->nested_type(0);
  TrafficSplit_ShardBy_descriptor_ = TrafficSplit_descriptor_->enum_type(0);
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_google_2fappengine_2fv1_2fservice_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      Service_descriptor_, Service::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      TrafficSplit_descriptor_, TrafficSplit::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
        TrafficSplit_AllocationsEntry_descriptor_,
        ::google::protobuf::internal::MapEntry<
            ::std::string,
            double,
            ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
            ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE,
            0>::CreateDefaultInstance(
                TrafficSplit_AllocationsEntry_descriptor_));
}

}  // namespace

void protobuf_ShutdownFile_google_2fappengine_2fv1_2fservice_2eproto() {
  Service_default_instance_.Shutdown();
  delete Service_reflection_;
  TrafficSplit_default_instance_.Shutdown();
  delete TrafficSplit_reflection_;
}

void protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::api::protobuf_InitDefaults_google_2fapi_2fannotations_2eproto();
  ::google::protobuf::internal::GetEmptyString();
  Service_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  TrafficSplit_default_instance_.DefaultConstruct();
  Service_default_instance_.get_mutable()->InitAsDefaultInstance();
  TrafficSplit_default_instance_.get_mutable()->InitAsDefaultInstance();
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto_once_);
void protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto_once_,
                 &protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto_impl);
}
void protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto();
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n!google/appengine/v1/service.proto\022\023goo"
    "gle.appengine.v1\032\034google/api/annotations"
    ".proto\"U\n\007Service\022\014\n\004name\030\001 \001(\t\022\n\n\002id\030\002 "
    "\001(\t\0220\n\005split\030\003 \001(\0132!.google.appengine.v1"
    ".TrafficSplit\"\370\001\n\014TrafficSplit\022;\n\010shard_"
    "by\030\001 \001(\0162).google.appengine.v1.TrafficSp"
    "lit.ShardBy\022G\n\013allocations\030\002 \003(\01322.googl"
    "e.appengine.v1.TrafficSplit.AllocationsE"
    "ntry\0322\n\020AllocationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n"
    "\005value\030\002 \001(\001:\0028\001\".\n\007ShardBy\022\017\n\013UNSPECIFI"
    "ED\020\000\022\n\n\006COOKIE\020\001\022\006\n\002IP\020\002Bg\n\027com.google.a"
    "ppengine.v1B\014ServiceProtoP\001Z<google.gola"
    "ng.org/genproto/googleapis/appengine/v1;"
    "appengineb\006proto3", 537);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/appengine/v1/service.proto", &protobuf_RegisterTypes);
  ::google::api::protobuf_AddDesc_google_2fapi_2fannotations_2eproto();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fappengine_2fv1_2fservice_2eproto);
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto_once_);
void protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto_once_,
                 &protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto_impl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_google_2fappengine_2fv1_2fservice_2eproto {
  StaticDescriptorInitializer_google_2fappengine_2fv1_2fservice_2eproto() {
    protobuf_AddDesc_google_2fappengine_2fv1_2fservice_2eproto();
  }
} static_descriptor_initializer_google_2fappengine_2fv1_2fservice_2eproto_;

namespace {

static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN;
static void MergeFromFail(int line) {
  ::google::protobuf::internal::MergeFromFail(__FILE__, line);
}

}  // namespace


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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Service::kNameFieldNumber;
const int Service::kIdFieldNumber;
const int Service::kSplitFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Service::Service()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.appengine.v1.Service)
}

void Service::InitAsDefaultInstance() {
  split_ = const_cast< ::google::appengine::v1::TrafficSplit*>(
      ::google::appengine::v1::TrafficSplit::internal_default_instance());
}

Service::Service(const Service& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:google.appengine.v1.Service)
}

void Service::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  split_ = NULL;
  _cached_size_ = 0;
}

Service::~Service() {
  // @@protoc_insertion_point(destructor:google.appengine.v1.Service)
  SharedDtor();
}

void Service::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != &Service_default_instance_.get()) {
    delete split_;
  }
}

void Service::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Service::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Service_descriptor_;
}

const Service& Service::default_instance() {
  protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<Service> Service_default_instance_;

Service* Service::New(::google::protobuf::Arena* arena) const {
  Service* n = new Service;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Service::Clear() {
// @@protoc_insertion_point(message_clear_start:google.appengine.v1.Service)
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && split_ != NULL) delete split_;
  split_ = NULL;
}

bool Service::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:google.appengine.v1.Service)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.appengine.v1.Service.name"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_id;
        break;
      }

      // optional string id = 2;
      case 2: {
        if (tag == 18) {
         parse_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_id()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->id().data(), this->id().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.appengine.v1.Service.id"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_split;
        break;
      }

      // optional .google.appengine.v1.TrafficSplit split = 3;
      case 3: {
        if (tag == 26) {
         parse_split:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_split()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

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

void Service::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.appengine.v1.Service)
  // optional string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.appengine.v1.Service.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // optional string id = 2;
  if (this->id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->id().data(), this->id().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.appengine.v1.Service.id");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->id(), output);
  }

  // optional .google.appengine.v1.TrafficSplit split = 3;
  if (this->has_split()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->split_, output);
  }

  // @@protoc_insertion_point(serialize_end:google.appengine.v1.Service)
}

::google::protobuf::uint8* Service::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.appengine.v1.Service)
  // optional string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.appengine.v1.Service.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional string id = 2;
  if (this->id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->id().data(), this->id().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.appengine.v1.Service.id");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->id(), target);
  }

  // optional .google.appengine.v1.TrafficSplit split = 3;
  if (this->has_split()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        3, *this->split_, false, target);
  }

  // @@protoc_insertion_point(serialize_to_array_end:google.appengine.v1.Service)
  return target;
}

size_t Service::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.appengine.v1.Service)
  size_t total_size = 0;

  // optional string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // optional string id = 2;
  if (this->id().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->id());
  }

  // optional .google.appengine.v1.TrafficSplit split = 3;
  if (this->has_split()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        *this->split_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Service::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.appengine.v1.Service)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const Service* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Service>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.appengine.v1.Service)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.appengine.v1.Service)
    UnsafeMergeFrom(*source);
  }
}

void Service::MergeFrom(const Service& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.appengine.v1.Service)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void Service::UnsafeMergeFrom(const Service& from) {
  GOOGLE_DCHECK(&from != this);
  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.id().size() > 0) {

    id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.id_);
  }
  if (from.has_split()) {
    mutable_split()->::google::appengine::v1::TrafficSplit::MergeFrom(from.split());
  }
}

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

void Service::CopyFrom(const Service& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.appengine.v1.Service)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool Service::IsInitialized() const {

  return true;
}

void Service::Swap(Service* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Service::InternalSwap(Service* other) {
  name_.Swap(&other->name_);
  id_.Swap(&other->id_);
  std::swap(split_, other->split_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Service::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Service_descriptor_;
  metadata.reflection = Service_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Service

// optional string name = 1;
void Service::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
const ::std::string& Service::name() const {
  // @@protoc_insertion_point(field_get:google.appengine.v1.Service.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Service::set_name(const ::std::string& value) {
  
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.appengine.v1.Service.name)
}
void Service::set_name(const char* value) {
  
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.appengine.v1.Service.name)
}
void Service::set_name(const char* value, size_t size) {
  
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.appengine.v1.Service.name)
}
::std::string* Service::mutable_name() {
  
  // @@protoc_insertion_point(field_mutable:google.appengine.v1.Service.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Service::release_name() {
  // @@protoc_insertion_point(field_release:google.appengine.v1.Service.name)
  
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Service::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    
  } else {
    
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:google.appengine.v1.Service.name)
}

// optional string id = 2;
void Service::clear_id() {
  id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
const ::std::string& Service::id() const {
  // @@protoc_insertion_point(field_get:google.appengine.v1.Service.id)
  return id_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Service::set_id(const ::std::string& value) {
  
  id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.appengine.v1.Service.id)
}
void Service::set_id(const char* value) {
  
  id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.appengine.v1.Service.id)
}
void Service::set_id(const char* value, size_t size) {
  
  id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.appengine.v1.Service.id)
}
::std::string* Service::mutable_id() {
  
  // @@protoc_insertion_point(field_mutable:google.appengine.v1.Service.id)
  return id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Service::release_id() {
  // @@protoc_insertion_point(field_release:google.appengine.v1.Service.id)
  
  return id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Service::set_allocated_id(::std::string* id) {
  if (id != NULL) {
    
  } else {
    
  }
  id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), id);
  // @@protoc_insertion_point(field_set_allocated:google.appengine.v1.Service.id)
}

// optional .google.appengine.v1.TrafficSplit split = 3;
bool Service::has_split() const {
  return this != internal_default_instance() && split_ != NULL;
}
void Service::clear_split() {
  if (GetArenaNoVirtual() == NULL && split_ != NULL) delete split_;
  split_ = NULL;
}
const ::google::appengine::v1::TrafficSplit& Service::split() const {
  // @@protoc_insertion_point(field_get:google.appengine.v1.Service.split)
  return split_ != NULL ? *split_
                         : *::google::appengine::v1::TrafficSplit::internal_default_instance();
}
::google::appengine::v1::TrafficSplit* Service::mutable_split() {
  
  if (split_ == NULL) {
    split_ = new ::google::appengine::v1::TrafficSplit;
  }
  // @@protoc_insertion_point(field_mutable:google.appengine.v1.Service.split)
  return split_;
}
::google::appengine::v1::TrafficSplit* Service::release_split() {
  // @@protoc_insertion_point(field_release:google.appengine.v1.Service.split)
  
  ::google::appengine::v1::TrafficSplit* temp = split_;
  split_ = NULL;
  return temp;
}
void Service::set_allocated_split(::google::appengine::v1::TrafficSplit* split) {
  delete split_;
  split_ = split;
  if (split) {
    
  } else {
    
  }
  // @@protoc_insertion_point(field_set_allocated:google.appengine.v1.Service.split)
}

inline const Service* Service::internal_default_instance() {
  return &Service_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* TrafficSplit_ShardBy_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TrafficSplit_ShardBy_descriptor_;
}
bool TrafficSplit_ShardBy_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TrafficSplit_ShardBy TrafficSplit::UNSPECIFIED;
const TrafficSplit_ShardBy TrafficSplit::COOKIE;
const TrafficSplit_ShardBy TrafficSplit::IP;
const TrafficSplit_ShardBy TrafficSplit::ShardBy_MIN;
const TrafficSplit_ShardBy TrafficSplit::ShardBy_MAX;
const int TrafficSplit::ShardBy_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TrafficSplit::kShardByFieldNumber;
const int TrafficSplit::kAllocationsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TrafficSplit::TrafficSplit()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.appengine.v1.TrafficSplit)
}

void TrafficSplit::InitAsDefaultInstance() {
}

TrafficSplit::TrafficSplit(const TrafficSplit& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:google.appengine.v1.TrafficSplit)
}

void TrafficSplit::SharedCtor() {
  allocations_.SetAssignDescriptorCallback(
      protobuf_AssignDescriptorsOnce);
  allocations_.SetEntryDescriptor(
      &::google::appengine::v1::TrafficSplit_AllocationsEntry_descriptor_);
  shard_by_ = 0;
  _cached_size_ = 0;
}

TrafficSplit::~TrafficSplit() {
  // @@protoc_insertion_point(destructor:google.appengine.v1.TrafficSplit)
  SharedDtor();
}

void TrafficSplit::SharedDtor() {
}

void TrafficSplit::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TrafficSplit::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TrafficSplit_descriptor_;
}

const TrafficSplit& TrafficSplit::default_instance() {
  protobuf_InitDefaults_google_2fappengine_2fv1_2fservice_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<TrafficSplit> TrafficSplit_default_instance_;

TrafficSplit* TrafficSplit::New(::google::protobuf::Arena* arena) const {
  TrafficSplit* n = new TrafficSplit;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void TrafficSplit::Clear() {
// @@protoc_insertion_point(message_clear_start:google.appengine.v1.TrafficSplit)
  shard_by_ = 0;
  allocations_.Clear();
}

bool TrafficSplit::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:google.appengine.v1.TrafficSplit)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          set_shard_by(static_cast< ::google::appengine::v1::TrafficSplit_ShardBy >(value));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_allocations;
        break;
      }

      // map<string, double> allocations = 2;
      case 2: {
        if (tag == 18) {
         parse_allocations:
          DO_(input->IncrementRecursionDepth());
         parse_loop_allocations:
          TrafficSplit_AllocationsEntry::Parser< ::google::protobuf::internal::MapField<
              ::std::string, double,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE,
              0 >,
            ::google::protobuf::Map< ::std::string, double > > parser(&allocations_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), parser.key().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.appengine.v1.TrafficSplit.AllocationsEntry.key"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_loop_allocations;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectAtEnd()) goto success;
        break;
      }

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

void TrafficSplit::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.appengine.v1.TrafficSplit)
  // optional .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
  if (this->shard_by() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->shard_by(), output);
  }

  // map<string, double> allocations = 2;
  if (!this->allocations().empty()) {
    typedef ::google::protobuf::Map< ::std::string, double >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), p->first.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.appengine.v1.TrafficSplit.AllocationsEntry.key");
      }
    };

    if (output->IsSerializationDeterminstic() &&
        this->allocations().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->allocations().size()]);
      typedef ::google::protobuf::Map< ::std::string, double >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, double >::const_iterator
          it = this->allocations().begin();
          it != this->allocations().end(); ++it, ++n) {
        items[n] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[n], Less());
      ::google::protobuf::scoped_ptr<TrafficSplit_AllocationsEntry> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(allocations_.NewEntryWrapper(
            items[i]->first, items[i]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            2, *entry, output);
        Utf8Check::Check(items[i]);
      }
    } else {
      ::google::protobuf::scoped_ptr<TrafficSplit_AllocationsEntry> entry;
      for (::google::protobuf::Map< ::std::string, double >::const_iterator
          it = this->allocations().begin();
          it != this->allocations().end(); ++it) {
        entry.reset(allocations_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            2, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  // @@protoc_insertion_point(serialize_end:google.appengine.v1.TrafficSplit)
}

::google::protobuf::uint8* TrafficSplit::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.appengine.v1.TrafficSplit)
  // optional .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
  if (this->shard_by() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->shard_by(), target);
  }

  // map<string, double> allocations = 2;
  if (!this->allocations().empty()) {
    typedef ::google::protobuf::Map< ::std::string, double >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), p->first.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.appengine.v1.TrafficSplit.AllocationsEntry.key");
      }
    };

    if (deterministic &&
        this->allocations().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->allocations().size()]);
      typedef ::google::protobuf::Map< ::std::string, double >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, double >::const_iterator
          it = this->allocations().begin();
          it != this->allocations().end(); ++it, ++n) {
        items[n] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[n], Less());
      ::google::protobuf::scoped_ptr<TrafficSplit_AllocationsEntry> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(allocations_.NewEntryWrapper(
            items[i]->first, items[i]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       2, *entry, deterministic, target);
;
        Utf8Check::Check(items[i]);
      }
    } else {
      ::google::protobuf::scoped_ptr<TrafficSplit_AllocationsEntry> entry;
      for (::google::protobuf::Map< ::std::string, double >::const_iterator
          it = this->allocations().begin();
          it != this->allocations().end(); ++it) {
        entry.reset(allocations_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       2, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  // @@protoc_insertion_point(serialize_to_array_end:google.appengine.v1.TrafficSplit)
  return target;
}

size_t TrafficSplit::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.appengine.v1.TrafficSplit)
  size_t total_size = 0;

  // optional .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
  if (this->shard_by() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->shard_by());
  }

  // map<string, double> allocations = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->allocations_size());
  {
    ::google::protobuf::scoped_ptr<TrafficSplit_AllocationsEntry> entry;
    for (::google::protobuf::Map< ::std::string, double >::const_iterator
        it = this->allocations().begin();
        it != this->allocations().end(); ++it) {
      entry.reset(allocations_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TrafficSplit::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.appengine.v1.TrafficSplit)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const TrafficSplit* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TrafficSplit>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.appengine.v1.TrafficSplit)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.appengine.v1.TrafficSplit)
    UnsafeMergeFrom(*source);
  }
}

void TrafficSplit::MergeFrom(const TrafficSplit& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.appengine.v1.TrafficSplit)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void TrafficSplit::UnsafeMergeFrom(const TrafficSplit& from) {
  GOOGLE_DCHECK(&from != this);
  allocations_.MergeFrom(from.allocations_);
  if (from.shard_by() != 0) {
    set_shard_by(from.shard_by());
  }
}

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

void TrafficSplit::CopyFrom(const TrafficSplit& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.appengine.v1.TrafficSplit)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool TrafficSplit::IsInitialized() const {

  return true;
}

void TrafficSplit::Swap(TrafficSplit* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TrafficSplit::InternalSwap(TrafficSplit* other) {
  std::swap(shard_by_, other->shard_by_);
  allocations_.Swap(&other->allocations_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata TrafficSplit::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TrafficSplit_descriptor_;
  metadata.reflection = TrafficSplit_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// TrafficSplit

// optional .google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
void TrafficSplit::clear_shard_by() {
  shard_by_ = 0;
}
::google::appengine::v1::TrafficSplit_ShardBy TrafficSplit::shard_by() const {
  // @@protoc_insertion_point(field_get:google.appengine.v1.TrafficSplit.shard_by)
  return static_cast< ::google::appengine::v1::TrafficSplit_ShardBy >(shard_by_);
}
void TrafficSplit::set_shard_by(::google::appengine::v1::TrafficSplit_ShardBy value) {
  
  shard_by_ = value;
  // @@protoc_insertion_point(field_set:google.appengine.v1.TrafficSplit.shard_by)
}

// map<string, double> allocations = 2;
int TrafficSplit::allocations_size() const {
  return allocations_.size();
}
void TrafficSplit::clear_allocations() {
  allocations_.Clear();
}
 const ::google::protobuf::Map< ::std::string, double >&
TrafficSplit::allocations() const {
  // @@protoc_insertion_point(field_map:google.appengine.v1.TrafficSplit.allocations)
  return allocations_.GetMap();
}
 ::google::protobuf::Map< ::std::string, double >*
TrafficSplit::mutable_allocations() {
  // @@protoc_insertion_point(field_mutable_map:google.appengine.v1.TrafficSplit.allocations)
  return allocations_.MutableMap();
}

inline const TrafficSplit* TrafficSplit::internal_default_instance() {
  return &TrafficSplit_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// @@protoc_insertion_point(namespace_scope)

}  // namespace v1
}  // namespace appengine
}  // namespace google

// @@protoc_insertion_point(global_scope)
