This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhuyujia-webhopper/collector/adg-linux/gen/components/variations/proto/study.pb.cc
little_stone bd2d50cf35 code update
2022-05-05 20:41:28 +08:00

4698 lines
180 KiB
C++
Executable File

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: study.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "study.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/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
namespace variations {
class Study_Experiment_ParamDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Study_Experiment_Param> {
} _Study_Experiment_Param_default_instance_;
class Study_Experiment_FeatureAssociationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Study_Experiment_FeatureAssociation> {
} _Study_Experiment_FeatureAssociation_default_instance_;
class Study_Experiment_OverrideUIStringDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Study_Experiment_OverrideUIString> {
} _Study_Experiment_OverrideUIString_default_instance_;
class Study_ExperimentDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Study_Experiment> {
} _Study_Experiment_default_instance_;
class Study_FilterDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Study_Filter> {
} _Study_Filter_default_instance_;
class StudyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Study> {
} _Study_default_instance_;
namespace protobuf_study_2eproto {
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
const TableStruct::entries[] = {
{0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
const TableStruct::aux[] = {
::google::protobuf::internal::AuxillaryParseTableField(),
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
TableStruct::schema[] = {
{ NULL, NULL, 0, -1, -1, false },
{ NULL, NULL, 0, -1, -1, false },
{ NULL, NULL, 0, -1, -1, false },
{ NULL, NULL, 0, -1, -1, false },
{ NULL, NULL, 0, -1, -1, false },
{ NULL, NULL, 0, -1, -1, false },
};
void TableStruct::Shutdown() {
_Study_Experiment_Param_default_instance_.Shutdown();
_Study_Experiment_FeatureAssociation_default_instance_.Shutdown();
_Study_Experiment_OverrideUIString_default_instance_.Shutdown();
_Study_Experiment_default_instance_.Shutdown();
_Study_Filter_default_instance_.Shutdown();
_Study_default_instance_.Shutdown();
}
void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_Study_Experiment_Param_default_instance_.DefaultConstruct();
_Study_Experiment_FeatureAssociation_default_instance_.DefaultConstruct();
_Study_Experiment_OverrideUIString_default_instance_.DefaultConstruct();
_Study_Experiment_default_instance_.DefaultConstruct();
_Study_Filter_default_instance_.DefaultConstruct();
_Study_default_instance_.DefaultConstruct();
_Study_Experiment_default_instance_.get_mutable()->feature_association_ = const_cast< ::variations::Study_Experiment_FeatureAssociation*>(
::variations::Study_Experiment_FeatureAssociation::internal_default_instance());
_Study_default_instance_.get_mutable()->filter_ = const_cast< ::variations::Study_Filter*>(
::variations::Study_Filter::internal_default_instance());
}
void InitDefaults() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
}
void AddDescriptorsImpl() {
InitDefaults();
::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
} // namespace protobuf_study_2eproto
bool Study_Experiment_Type_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Study_Experiment_Type Study_Experiment::NORMAL;
const Study_Experiment_Type Study_Experiment::IGNORE_CHANGE;
const Study_Experiment_Type Study_Experiment::KILL_BEST_EFFORT;
const Study_Experiment_Type Study_Experiment::KILL_CRITICAL;
const Study_Experiment_Type Study_Experiment::Type_MIN;
const Study_Experiment_Type Study_Experiment::Type_MAX;
const int Study_Experiment::Type_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
bool Study_Consistency_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Study_Consistency Study::SESSION;
const Study_Consistency Study::PERMANENT;
const Study_Consistency Study::Consistency_MIN;
const Study_Consistency Study::Consistency_MAX;
const int Study::Consistency_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
bool Study_Channel_IsValid(int value) {
switch (value) {
case -1:
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Study_Channel Study::UNKNOWN;
const Study_Channel Study::CANARY;
const Study_Channel Study::DEV;
const Study_Channel Study::BETA;
const Study_Channel Study::STABLE;
const Study_Channel Study::Channel_MIN;
const Study_Channel Study::Channel_MAX;
const int Study::Channel_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
bool Study_Platform_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Study_Platform Study::PLATFORM_WINDOWS;
const Study_Platform Study::PLATFORM_MAC;
const Study_Platform Study::PLATFORM_LINUX;
const Study_Platform Study::PLATFORM_CHROMEOS;
const Study_Platform Study::PLATFORM_ANDROID;
const Study_Platform Study::PLATFORM_IOS;
const Study_Platform Study::PLATFORM_ANDROID_WEBVIEW;
const Study_Platform Study::PLATFORM_FUCHSIA;
const Study_Platform Study::Platform_MIN;
const Study_Platform Study::Platform_MAX;
const int Study::Platform_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
bool Study_FormFactor_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Study_FormFactor Study::DESKTOP;
const Study_FormFactor Study::PHONE;
const Study_FormFactor Study::TABLET;
const Study_FormFactor Study::KIOSK;
const Study_FormFactor Study::FormFactor_MIN;
const Study_FormFactor Study::FormFactor_MAX;
const int Study::FormFactor_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
bool Study_ActivationType_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Study_ActivationType Study::ACTIVATION_EXPLICIT;
const Study_ActivationType Study::ACTIVATION_AUTO;
const Study_ActivationType Study::ActivationType_MIN;
const Study_ActivationType Study::ActivationType_MAX;
const int Study::ActivationType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Study_Experiment_Param::kNameFieldNumber;
const int Study_Experiment_Param::kValueFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Study_Experiment_Param::Study_Experiment_Param()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_study_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:variations.Study.Experiment.Param)
}
Study_Experiment_Param::Study_Experiment_Param(const Study_Experiment_Param& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_value()) {
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
}
// @@protoc_insertion_point(copy_constructor:variations.Study.Experiment.Param)
}
void Study_Experiment_Param::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
Study_Experiment_Param::~Study_Experiment_Param() {
// @@protoc_insertion_point(destructor:variations.Study.Experiment.Param)
SharedDtor();
}
void Study_Experiment_Param::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_Param::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Study_Experiment_Param& Study_Experiment_Param::default_instance() {
protobuf_study_2eproto::InitDefaults();
return *internal_default_instance();
}
Study_Experiment_Param* Study_Experiment_Param::New(::google::protobuf::Arena* arena) const {
Study_Experiment_Param* n = new Study_Experiment_Param;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Study_Experiment_Param::Clear() {
// @@protoc_insertion_point(message_clear_start:variations.Study.Experiment.Param)
if (_has_bits_[0 / 32] & 3u) {
if (has_name()) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (has_value()) {
GOOGLE_DCHECK(!value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*value_.UnsafeRawStringPointer())->clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Study_Experiment_Param::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
&::google::protobuf::internal::InternalMetadataWithArenaLite::
mutable_unknown_fields));
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string, false);
// @@protoc_insertion_point(parse_start:variations.Study.Experiment.Param)
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)) {
// optional string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
} else {
goto handle_unusual;
}
break;
}
// optional string value = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_value()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:variations.Study.Experiment.Param)
return true;
failure:
// @@protoc_insertion_point(parse_failure:variations.Study.Experiment.Param)
return false;
#undef DO_
}
void Study_Experiment_Param::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:variations.Study.Experiment.Param)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
// optional string value = 2;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->value(), output);
}
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:variations.Study.Experiment.Param)
}
size_t Study_Experiment_Param::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:variations.Study.Experiment.Param)
size_t total_size = 0;
total_size += unknown_fields().size();
if (_has_bits_[0 / 32] & 3u) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional string value = 2;
if (has_value()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->value());
}
}
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 Study_Experiment_Param::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Study_Experiment_Param*>(&from));
}
void Study_Experiment_Param::MergeFrom(const Study_Experiment_Param& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:variations.Study.Experiment.Param)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_value();
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
}
}
}
void Study_Experiment_Param::CopyFrom(const Study_Experiment_Param& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:variations.Study.Experiment.Param)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Study_Experiment_Param::IsInitialized() const {
return true;
}
void Study_Experiment_Param::Swap(Study_Experiment_Param* other) {
if (other == this) return;
InternalSwap(other);
}
void Study_Experiment_Param::InternalSwap(Study_Experiment_Param* other) {
name_.Swap(&other->name_);
value_.Swap(&other->value_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::std::string Study_Experiment_Param::GetTypeName() const {
return "variations.Study.Experiment.Param";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Study_Experiment_Param
// optional string name = 1;
bool Study_Experiment_Param::has_name() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Study_Experiment_Param::set_has_name() {
_has_bits_[0] |= 0x00000001u;
}
void Study_Experiment_Param::clear_has_name() {
_has_bits_[0] &= ~0x00000001u;
}
void Study_Experiment_Param::clear_name() {
name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
const ::std::string& Study_Experiment_Param::name() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.Param.name)
return name_.GetNoArena();
}
void Study_Experiment_Param::set_name(const ::std::string& value) {
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.Param.name)
}
#if LANG_CXX11
void Study_Experiment_Param::set_name(::std::string&& value) {
set_has_name();
name_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.Param.name)
}
#endif
void Study_Experiment_Param::set_name(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.Param.name)
}
void Study_Experiment_Param::set_name(const char* value, size_t size) {
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.Param.name)
}
::std::string* Study_Experiment_Param::mutable_name() {
set_has_name();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.Param.name)
return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment_Param::release_name() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.Param.name)
clear_has_name();
return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_Param::set_allocated_name(::std::string* name) {
if (name != NULL) {
set_has_name();
} else {
clear_has_name();
}
name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.Param.name)
}
// optional string value = 2;
bool Study_Experiment_Param::has_value() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Study_Experiment_Param::set_has_value() {
_has_bits_[0] |= 0x00000002u;
}
void Study_Experiment_Param::clear_has_value() {
_has_bits_[0] &= ~0x00000002u;
}
void Study_Experiment_Param::clear_value() {
value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_value();
}
const ::std::string& Study_Experiment_Param::value() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.Param.value)
return value_.GetNoArena();
}
void Study_Experiment_Param::set_value(const ::std::string& value) {
set_has_value();
value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.Param.value)
}
#if LANG_CXX11
void Study_Experiment_Param::set_value(::std::string&& value) {
set_has_value();
value_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.Param.value)
}
#endif
void Study_Experiment_Param::set_value(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_value();
value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.Param.value)
}
void Study_Experiment_Param::set_value(const char* value, size_t size) {
set_has_value();
value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.Param.value)
}
::std::string* Study_Experiment_Param::mutable_value() {
set_has_value();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.Param.value)
return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment_Param::release_value() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.Param.value)
clear_has_value();
return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_Param::set_allocated_value(::std::string* value) {
if (value != NULL) {
set_has_value();
} else {
clear_has_value();
}
value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.Param.value)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Study_Experiment_FeatureAssociation::kEnableFeatureFieldNumber;
const int Study_Experiment_FeatureAssociation::kDisableFeatureFieldNumber;
const int Study_Experiment_FeatureAssociation::kForcingFeatureOnFieldNumber;
const int Study_Experiment_FeatureAssociation::kForcingFeatureOffFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Study_Experiment_FeatureAssociation::Study_Experiment_FeatureAssociation()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_study_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:variations.Study.Experiment.FeatureAssociation)
}
Study_Experiment_FeatureAssociation::Study_Experiment_FeatureAssociation(const Study_Experiment_FeatureAssociation& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
enable_feature_(from.enable_feature_),
disable_feature_(from.disable_feature_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
forcing_feature_on_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_forcing_feature_on()) {
forcing_feature_on_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.forcing_feature_on_);
}
forcing_feature_off_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_forcing_feature_off()) {
forcing_feature_off_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.forcing_feature_off_);
}
// @@protoc_insertion_point(copy_constructor:variations.Study.Experiment.FeatureAssociation)
}
void Study_Experiment_FeatureAssociation::SharedCtor() {
_cached_size_ = 0;
forcing_feature_on_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
forcing_feature_off_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
Study_Experiment_FeatureAssociation::~Study_Experiment_FeatureAssociation() {
// @@protoc_insertion_point(destructor:variations.Study.Experiment.FeatureAssociation)
SharedDtor();
}
void Study_Experiment_FeatureAssociation::SharedDtor() {
forcing_feature_on_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
forcing_feature_off_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_FeatureAssociation::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Study_Experiment_FeatureAssociation& Study_Experiment_FeatureAssociation::default_instance() {
protobuf_study_2eproto::InitDefaults();
return *internal_default_instance();
}
Study_Experiment_FeatureAssociation* Study_Experiment_FeatureAssociation::New(::google::protobuf::Arena* arena) const {
Study_Experiment_FeatureAssociation* n = new Study_Experiment_FeatureAssociation;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Study_Experiment_FeatureAssociation::Clear() {
// @@protoc_insertion_point(message_clear_start:variations.Study.Experiment.FeatureAssociation)
enable_feature_.Clear();
disable_feature_.Clear();
if (_has_bits_[0 / 32] & 3u) {
if (has_forcing_feature_on()) {
GOOGLE_DCHECK(!forcing_feature_on_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*forcing_feature_on_.UnsafeRawStringPointer())->clear();
}
if (has_forcing_feature_off()) {
GOOGLE_DCHECK(!forcing_feature_off_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*forcing_feature_off_.UnsafeRawStringPointer())->clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Study_Experiment_FeatureAssociation::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
&::google::protobuf::internal::InternalMetadataWithArenaLite::
mutable_unknown_fields));
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string, false);
// @@protoc_insertion_point(parse_start:variations.Study.Experiment.FeatureAssociation)
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)) {
// repeated string enable_feature = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_enable_feature()));
} else {
goto handle_unusual;
}
break;
}
// repeated string disable_feature = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_disable_feature()));
} else {
goto handle_unusual;
}
break;
}
// optional string forcing_feature_on = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_forcing_feature_on()));
} else {
goto handle_unusual;
}
break;
}
// optional string forcing_feature_off = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_forcing_feature_off()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:variations.Study.Experiment.FeatureAssociation)
return true;
failure:
// @@protoc_insertion_point(parse_failure:variations.Study.Experiment.FeatureAssociation)
return false;
#undef DO_
}
void Study_Experiment_FeatureAssociation::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:variations.Study.Experiment.FeatureAssociation)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated string enable_feature = 1;
for (int i = 0, n = this->enable_feature_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->enable_feature(i), output);
}
// repeated string disable_feature = 2;
for (int i = 0, n = this->disable_feature_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
2, this->disable_feature(i), output);
}
cached_has_bits = _has_bits_[0];
// optional string forcing_feature_on = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->forcing_feature_on(), output);
}
// optional string forcing_feature_off = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->forcing_feature_off(), output);
}
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:variations.Study.Experiment.FeatureAssociation)
}
size_t Study_Experiment_FeatureAssociation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:variations.Study.Experiment.FeatureAssociation)
size_t total_size = 0;
total_size += unknown_fields().size();
// repeated string enable_feature = 1;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->enable_feature_size());
for (int i = 0, n = this->enable_feature_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->enable_feature(i));
}
// repeated string disable_feature = 2;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->disable_feature_size());
for (int i = 0, n = this->disable_feature_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->disable_feature(i));
}
if (_has_bits_[0 / 32] & 3u) {
// optional string forcing_feature_on = 3;
if (has_forcing_feature_on()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->forcing_feature_on());
}
// optional string forcing_feature_off = 4;
if (has_forcing_feature_off()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->forcing_feature_off());
}
}
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 Study_Experiment_FeatureAssociation::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Study_Experiment_FeatureAssociation*>(&from));
}
void Study_Experiment_FeatureAssociation::MergeFrom(const Study_Experiment_FeatureAssociation& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:variations.Study.Experiment.FeatureAssociation)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
enable_feature_.MergeFrom(from.enable_feature_);
disable_feature_.MergeFrom(from.disable_feature_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_forcing_feature_on();
forcing_feature_on_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.forcing_feature_on_);
}
if (cached_has_bits & 0x00000002u) {
set_has_forcing_feature_off();
forcing_feature_off_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.forcing_feature_off_);
}
}
}
void Study_Experiment_FeatureAssociation::CopyFrom(const Study_Experiment_FeatureAssociation& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:variations.Study.Experiment.FeatureAssociation)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Study_Experiment_FeatureAssociation::IsInitialized() const {
return true;
}
void Study_Experiment_FeatureAssociation::Swap(Study_Experiment_FeatureAssociation* other) {
if (other == this) return;
InternalSwap(other);
}
void Study_Experiment_FeatureAssociation::InternalSwap(Study_Experiment_FeatureAssociation* other) {
enable_feature_.InternalSwap(&other->enable_feature_);
disable_feature_.InternalSwap(&other->disable_feature_);
forcing_feature_on_.Swap(&other->forcing_feature_on_);
forcing_feature_off_.Swap(&other->forcing_feature_off_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::std::string Study_Experiment_FeatureAssociation::GetTypeName() const {
return "variations.Study.Experiment.FeatureAssociation";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Study_Experiment_FeatureAssociation
// repeated string enable_feature = 1;
int Study_Experiment_FeatureAssociation::enable_feature_size() const {
return enable_feature_.size();
}
void Study_Experiment_FeatureAssociation::clear_enable_feature() {
enable_feature_.Clear();
}
const ::std::string& Study_Experiment_FeatureAssociation::enable_feature(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.FeatureAssociation.enable_feature)
return enable_feature_.Get(index);
}
::std::string* Study_Experiment_FeatureAssociation::mutable_enable_feature(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.FeatureAssociation.enable_feature)
return enable_feature_.Mutable(index);
}
void Study_Experiment_FeatureAssociation::set_enable_feature(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Experiment.FeatureAssociation.enable_feature)
enable_feature_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Experiment_FeatureAssociation::set_enable_feature(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Experiment.FeatureAssociation.enable_feature)
enable_feature_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Experiment_FeatureAssociation::set_enable_feature(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
enable_feature_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.FeatureAssociation.enable_feature)
}
void Study_Experiment_FeatureAssociation::set_enable_feature(int index, const char* value, size_t size) {
enable_feature_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.FeatureAssociation.enable_feature)
}
::std::string* Study_Experiment_FeatureAssociation::add_enable_feature() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Experiment.FeatureAssociation.enable_feature)
return enable_feature_.Add();
}
void Study_Experiment_FeatureAssociation::add_enable_feature(const ::std::string& value) {
enable_feature_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Experiment.FeatureAssociation.enable_feature)
}
#if LANG_CXX11
void Study_Experiment_FeatureAssociation::add_enable_feature(::std::string&& value) {
enable_feature_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Experiment.FeatureAssociation.enable_feature)
}
#endif
void Study_Experiment_FeatureAssociation::add_enable_feature(const char* value) {
GOOGLE_DCHECK(value != NULL);
enable_feature_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Experiment.FeatureAssociation.enable_feature)
}
void Study_Experiment_FeatureAssociation::add_enable_feature(const char* value, size_t size) {
enable_feature_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Experiment.FeatureAssociation.enable_feature)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Experiment_FeatureAssociation::enable_feature() const {
// @@protoc_insertion_point(field_list:variations.Study.Experiment.FeatureAssociation.enable_feature)
return enable_feature_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Experiment_FeatureAssociation::mutable_enable_feature() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Experiment.FeatureAssociation.enable_feature)
return &enable_feature_;
}
// repeated string disable_feature = 2;
int Study_Experiment_FeatureAssociation::disable_feature_size() const {
return disable_feature_.size();
}
void Study_Experiment_FeatureAssociation::clear_disable_feature() {
disable_feature_.Clear();
}
const ::std::string& Study_Experiment_FeatureAssociation::disable_feature(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.FeatureAssociation.disable_feature)
return disable_feature_.Get(index);
}
::std::string* Study_Experiment_FeatureAssociation::mutable_disable_feature(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.FeatureAssociation.disable_feature)
return disable_feature_.Mutable(index);
}
void Study_Experiment_FeatureAssociation::set_disable_feature(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Experiment.FeatureAssociation.disable_feature)
disable_feature_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Experiment_FeatureAssociation::set_disable_feature(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Experiment.FeatureAssociation.disable_feature)
disable_feature_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Experiment_FeatureAssociation::set_disable_feature(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
disable_feature_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.FeatureAssociation.disable_feature)
}
void Study_Experiment_FeatureAssociation::set_disable_feature(int index, const char* value, size_t size) {
disable_feature_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.FeatureAssociation.disable_feature)
}
::std::string* Study_Experiment_FeatureAssociation::add_disable_feature() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Experiment.FeatureAssociation.disable_feature)
return disable_feature_.Add();
}
void Study_Experiment_FeatureAssociation::add_disable_feature(const ::std::string& value) {
disable_feature_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Experiment.FeatureAssociation.disable_feature)
}
#if LANG_CXX11
void Study_Experiment_FeatureAssociation::add_disable_feature(::std::string&& value) {
disable_feature_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Experiment.FeatureAssociation.disable_feature)
}
#endif
void Study_Experiment_FeatureAssociation::add_disable_feature(const char* value) {
GOOGLE_DCHECK(value != NULL);
disable_feature_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Experiment.FeatureAssociation.disable_feature)
}
void Study_Experiment_FeatureAssociation::add_disable_feature(const char* value, size_t size) {
disable_feature_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Experiment.FeatureAssociation.disable_feature)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Experiment_FeatureAssociation::disable_feature() const {
// @@protoc_insertion_point(field_list:variations.Study.Experiment.FeatureAssociation.disable_feature)
return disable_feature_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Experiment_FeatureAssociation::mutable_disable_feature() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Experiment.FeatureAssociation.disable_feature)
return &disable_feature_;
}
// optional string forcing_feature_on = 3;
bool Study_Experiment_FeatureAssociation::has_forcing_feature_on() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Study_Experiment_FeatureAssociation::set_has_forcing_feature_on() {
_has_bits_[0] |= 0x00000001u;
}
void Study_Experiment_FeatureAssociation::clear_has_forcing_feature_on() {
_has_bits_[0] &= ~0x00000001u;
}
void Study_Experiment_FeatureAssociation::clear_forcing_feature_on() {
forcing_feature_on_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_forcing_feature_on();
}
const ::std::string& Study_Experiment_FeatureAssociation::forcing_feature_on() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
return forcing_feature_on_.GetNoArena();
}
void Study_Experiment_FeatureAssociation::set_forcing_feature_on(const ::std::string& value) {
set_has_forcing_feature_on();
forcing_feature_on_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
}
#if LANG_CXX11
void Study_Experiment_FeatureAssociation::set_forcing_feature_on(::std::string&& value) {
set_has_forcing_feature_on();
forcing_feature_on_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
}
#endif
void Study_Experiment_FeatureAssociation::set_forcing_feature_on(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_forcing_feature_on();
forcing_feature_on_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
}
void Study_Experiment_FeatureAssociation::set_forcing_feature_on(const char* value, size_t size) {
set_has_forcing_feature_on();
forcing_feature_on_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
}
::std::string* Study_Experiment_FeatureAssociation::mutable_forcing_feature_on() {
set_has_forcing_feature_on();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
return forcing_feature_on_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment_FeatureAssociation::release_forcing_feature_on() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
clear_has_forcing_feature_on();
return forcing_feature_on_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_FeatureAssociation::set_allocated_forcing_feature_on(::std::string* forcing_feature_on) {
if (forcing_feature_on != NULL) {
set_has_forcing_feature_on();
} else {
clear_has_forcing_feature_on();
}
forcing_feature_on_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), forcing_feature_on);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.FeatureAssociation.forcing_feature_on)
}
// optional string forcing_feature_off = 4;
bool Study_Experiment_FeatureAssociation::has_forcing_feature_off() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Study_Experiment_FeatureAssociation::set_has_forcing_feature_off() {
_has_bits_[0] |= 0x00000002u;
}
void Study_Experiment_FeatureAssociation::clear_has_forcing_feature_off() {
_has_bits_[0] &= ~0x00000002u;
}
void Study_Experiment_FeatureAssociation::clear_forcing_feature_off() {
forcing_feature_off_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_forcing_feature_off();
}
const ::std::string& Study_Experiment_FeatureAssociation::forcing_feature_off() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
return forcing_feature_off_.GetNoArena();
}
void Study_Experiment_FeatureAssociation::set_forcing_feature_off(const ::std::string& value) {
set_has_forcing_feature_off();
forcing_feature_off_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
}
#if LANG_CXX11
void Study_Experiment_FeatureAssociation::set_forcing_feature_off(::std::string&& value) {
set_has_forcing_feature_off();
forcing_feature_off_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
}
#endif
void Study_Experiment_FeatureAssociation::set_forcing_feature_off(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_forcing_feature_off();
forcing_feature_off_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
}
void Study_Experiment_FeatureAssociation::set_forcing_feature_off(const char* value, size_t size) {
set_has_forcing_feature_off();
forcing_feature_off_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
}
::std::string* Study_Experiment_FeatureAssociation::mutable_forcing_feature_off() {
set_has_forcing_feature_off();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
return forcing_feature_off_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment_FeatureAssociation::release_forcing_feature_off() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
clear_has_forcing_feature_off();
return forcing_feature_off_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_FeatureAssociation::set_allocated_forcing_feature_off(::std::string* forcing_feature_off) {
if (forcing_feature_off != NULL) {
set_has_forcing_feature_off();
} else {
clear_has_forcing_feature_off();
}
forcing_feature_off_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), forcing_feature_off);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.FeatureAssociation.forcing_feature_off)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Study_Experiment_OverrideUIString::kNameHashFieldNumber;
const int Study_Experiment_OverrideUIString::kValueFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Study_Experiment_OverrideUIString::Study_Experiment_OverrideUIString()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_study_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:variations.Study.Experiment.OverrideUIString)
}
Study_Experiment_OverrideUIString::Study_Experiment_OverrideUIString(const Study_Experiment_OverrideUIString& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_value()) {
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
}
name_hash_ = from.name_hash_;
// @@protoc_insertion_point(copy_constructor:variations.Study.Experiment.OverrideUIString)
}
void Study_Experiment_OverrideUIString::SharedCtor() {
_cached_size_ = 0;
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
name_hash_ = 0u;
}
Study_Experiment_OverrideUIString::~Study_Experiment_OverrideUIString() {
// @@protoc_insertion_point(destructor:variations.Study.Experiment.OverrideUIString)
SharedDtor();
}
void Study_Experiment_OverrideUIString::SharedDtor() {
value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_OverrideUIString::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Study_Experiment_OverrideUIString& Study_Experiment_OverrideUIString::default_instance() {
protobuf_study_2eproto::InitDefaults();
return *internal_default_instance();
}
Study_Experiment_OverrideUIString* Study_Experiment_OverrideUIString::New(::google::protobuf::Arena* arena) const {
Study_Experiment_OverrideUIString* n = new Study_Experiment_OverrideUIString;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Study_Experiment_OverrideUIString::Clear() {
// @@protoc_insertion_point(message_clear_start:variations.Study.Experiment.OverrideUIString)
if (has_value()) {
GOOGLE_DCHECK(!value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*value_.UnsafeRawStringPointer())->clear();
}
name_hash_ = 0u;
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Study_Experiment_OverrideUIString::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
&::google::protobuf::internal::InternalMetadataWithArenaLite::
mutable_unknown_fields));
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string, false);
// @@protoc_insertion_point(parse_start:variations.Study.Experiment.OverrideUIString)
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)) {
// optional fixed32 name_hash = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(13u)) {
set_has_name_hash();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
input, &name_hash_)));
} else {
goto handle_unusual;
}
break;
}
// optional string value = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_value()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:variations.Study.Experiment.OverrideUIString)
return true;
failure:
// @@protoc_insertion_point(parse_failure:variations.Study.Experiment.OverrideUIString)
return false;
#undef DO_
}
void Study_Experiment_OverrideUIString::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:variations.Study.Experiment.OverrideUIString)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional fixed32 name_hash = 1;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteFixed32(1, this->name_hash(), output);
}
// optional string value = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->value(), output);
}
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:variations.Study.Experiment.OverrideUIString)
}
size_t Study_Experiment_OverrideUIString::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:variations.Study.Experiment.OverrideUIString)
size_t total_size = 0;
total_size += unknown_fields().size();
if (_has_bits_[0 / 32] & 3u) {
// optional string value = 2;
if (has_value()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->value());
}
// optional fixed32 name_hash = 1;
if (has_name_hash()) {
total_size += 1 + 4;
}
}
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 Study_Experiment_OverrideUIString::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Study_Experiment_OverrideUIString*>(&from));
}
void Study_Experiment_OverrideUIString::MergeFrom(const Study_Experiment_OverrideUIString& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:variations.Study.Experiment.OverrideUIString)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_value();
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
}
if (cached_has_bits & 0x00000002u) {
name_hash_ = from.name_hash_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Study_Experiment_OverrideUIString::CopyFrom(const Study_Experiment_OverrideUIString& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:variations.Study.Experiment.OverrideUIString)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Study_Experiment_OverrideUIString::IsInitialized() const {
return true;
}
void Study_Experiment_OverrideUIString::Swap(Study_Experiment_OverrideUIString* other) {
if (other == this) return;
InternalSwap(other);
}
void Study_Experiment_OverrideUIString::InternalSwap(Study_Experiment_OverrideUIString* other) {
value_.Swap(&other->value_);
std::swap(name_hash_, other->name_hash_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::std::string Study_Experiment_OverrideUIString::GetTypeName() const {
return "variations.Study.Experiment.OverrideUIString";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Study_Experiment_OverrideUIString
// optional fixed32 name_hash = 1;
bool Study_Experiment_OverrideUIString::has_name_hash() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Study_Experiment_OverrideUIString::set_has_name_hash() {
_has_bits_[0] |= 0x00000002u;
}
void Study_Experiment_OverrideUIString::clear_has_name_hash() {
_has_bits_[0] &= ~0x00000002u;
}
void Study_Experiment_OverrideUIString::clear_name_hash() {
name_hash_ = 0u;
clear_has_name_hash();
}
::google::protobuf::uint32 Study_Experiment_OverrideUIString::name_hash() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.OverrideUIString.name_hash)
return name_hash_;
}
void Study_Experiment_OverrideUIString::set_name_hash(::google::protobuf::uint32 value) {
set_has_name_hash();
name_hash_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Experiment.OverrideUIString.name_hash)
}
// optional string value = 2;
bool Study_Experiment_OverrideUIString::has_value() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Study_Experiment_OverrideUIString::set_has_value() {
_has_bits_[0] |= 0x00000001u;
}
void Study_Experiment_OverrideUIString::clear_has_value() {
_has_bits_[0] &= ~0x00000001u;
}
void Study_Experiment_OverrideUIString::clear_value() {
value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_value();
}
const ::std::string& Study_Experiment_OverrideUIString::value() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.OverrideUIString.value)
return value_.GetNoArena();
}
void Study_Experiment_OverrideUIString::set_value(const ::std::string& value) {
set_has_value();
value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.OverrideUIString.value)
}
#if LANG_CXX11
void Study_Experiment_OverrideUIString::set_value(::std::string&& value) {
set_has_value();
value_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.OverrideUIString.value)
}
#endif
void Study_Experiment_OverrideUIString::set_value(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_value();
value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.OverrideUIString.value)
}
void Study_Experiment_OverrideUIString::set_value(const char* value, size_t size) {
set_has_value();
value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.OverrideUIString.value)
}
::std::string* Study_Experiment_OverrideUIString::mutable_value() {
set_has_value();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.OverrideUIString.value)
return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment_OverrideUIString::release_value() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.OverrideUIString.value)
clear_has_value();
return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment_OverrideUIString::set_allocated_value(::std::string* value) {
if (value != NULL) {
set_has_value();
} else {
clear_has_value();
}
value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.OverrideUIString.value)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Study_Experiment::kNameFieldNumber;
const int Study_Experiment::kProbabilityWeightFieldNumber;
const int Study_Experiment::kGoogleWebExperimentIdFieldNumber;
const int Study_Experiment::kGoogleWebTriggerExperimentIdFieldNumber;
const int Study_Experiment::kChromeSyncExperimentIdFieldNumber;
const int Study_Experiment::kFeatureAssociationFieldNumber;
const int Study_Experiment::kForcingFlagFieldNumber;
const int Study_Experiment::kParamFieldNumber;
const int Study_Experiment::kTypeFieldNumber;
const int Study_Experiment::kOverrideUiStringFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Study_Experiment::Study_Experiment()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_study_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:variations.Study.Experiment)
}
Study_Experiment::Study_Experiment(const Study_Experiment& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
param_(from.param_),
override_ui_string_(from.override_ui_string_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
forcing_flag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_forcing_flag()) {
forcing_flag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.forcing_flag_);
}
if (from.has_feature_association()) {
feature_association_ = new ::variations::Study_Experiment_FeatureAssociation(*from.feature_association_);
} else {
feature_association_ = NULL;
}
::memcpy(&google_web_experiment_id_, &from.google_web_experiment_id_,
static_cast<size_t>(reinterpret_cast<char*>(&chrome_sync_experiment_id_) -
reinterpret_cast<char*>(&google_web_experiment_id_)) + sizeof(chrome_sync_experiment_id_));
// @@protoc_insertion_point(copy_constructor:variations.Study.Experiment)
}
void Study_Experiment::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
forcing_flag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&feature_association_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&chrome_sync_experiment_id_) -
reinterpret_cast<char*>(&feature_association_)) + sizeof(chrome_sync_experiment_id_));
}
Study_Experiment::~Study_Experiment() {
// @@protoc_insertion_point(destructor:variations.Study.Experiment)
SharedDtor();
}
void Study_Experiment::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
forcing_flag_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) {
delete feature_association_;
}
}
void Study_Experiment::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Study_Experiment& Study_Experiment::default_instance() {
protobuf_study_2eproto::InitDefaults();
return *internal_default_instance();
}
Study_Experiment* Study_Experiment::New(::google::protobuf::Arena* arena) const {
Study_Experiment* n = new Study_Experiment;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Study_Experiment::Clear() {
// @@protoc_insertion_point(message_clear_start:variations.Study.Experiment)
param_.Clear();
override_ui_string_.Clear();
if (_has_bits_[0 / 32] & 7u) {
if (has_name()) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (has_forcing_flag()) {
GOOGLE_DCHECK(!forcing_flag_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*forcing_flag_.UnsafeRawStringPointer())->clear();
}
if (has_feature_association()) {
GOOGLE_DCHECK(feature_association_ != NULL);
feature_association_->::variations::Study_Experiment_FeatureAssociation::Clear();
}
}
if (_has_bits_[0 / 32] & 248u) {
::memset(&google_web_experiment_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&chrome_sync_experiment_id_) -
reinterpret_cast<char*>(&google_web_experiment_id_)) + sizeof(chrome_sync_experiment_id_));
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Study_Experiment::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
&::google::protobuf::internal::InternalMetadataWithArenaLite::
mutable_unknown_fields));
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string, false);
// @@protoc_insertion_point(parse_start:variations.Study.Experiment)
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)) {
// required string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
} else {
goto handle_unusual;
}
break;
}
// required uint32 probability_weight = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u)) {
set_has_probability_weight();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &probability_weight_)));
} else {
goto handle_unusual;
}
break;
}
// optional uint64 google_web_experiment_id = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u)) {
set_has_google_web_experiment_id();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &google_web_experiment_id_)));
} else {
goto handle_unusual;
}
break;
}
// optional string forcing_flag = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_forcing_flag()));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.Experiment.Param param = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_param()));
} else {
goto handle_unusual;
}
break;
}
// optional .variations.Study.Experiment.Type type = 7 [default = NORMAL];
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(56u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_Experiment_Type_IsValid(value)) {
set_type(static_cast< ::variations::Study_Experiment_Type >(value));
} else {
unknown_fields_stream.WriteVarint32(56u);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else {
goto handle_unusual;
}
break;
}
// optional uint64 google_web_trigger_experiment_id = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(64u)) {
set_has_google_web_trigger_experiment_id();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &google_web_trigger_experiment_id_)));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.Experiment.OverrideUIString override_ui_string = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(74u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_override_ui_string()));
} else {
goto handle_unusual;
}
break;
}
// optional uint64 chrome_sync_experiment_id = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(80u)) {
set_has_chrome_sync_experiment_id();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &chrome_sync_experiment_id_)));
} else {
goto handle_unusual;
}
break;
}
// optional .variations.Study.Experiment.FeatureAssociation feature_association = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(98u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_feature_association()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:variations.Study.Experiment)
return true;
failure:
// @@protoc_insertion_point(parse_failure:variations.Study.Experiment)
return false;
#undef DO_
}
void Study_Experiment::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:variations.Study.Experiment)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
// required uint32 probability_weight = 2;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->probability_weight(), output);
}
// optional uint64 google_web_experiment_id = 3;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->google_web_experiment_id(), output);
}
// optional string forcing_flag = 5;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5, this->forcing_flag(), output);
}
// repeated .variations.Study.Experiment.Param param = 6;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->param_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
6, this->param(static_cast<int>(i)), output);
}
// optional .variations.Study.Experiment.Type type = 7 [default = NORMAL];
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->type(), output);
}
// optional uint64 google_web_trigger_experiment_id = 8;
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(8, this->google_web_trigger_experiment_id(), output);
}
// repeated .variations.Study.Experiment.OverrideUIString override_ui_string = 9;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->override_ui_string_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
9, this->override_ui_string(static_cast<int>(i)), output);
}
// optional uint64 chrome_sync_experiment_id = 10;
if (cached_has_bits & 0x00000080u) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(10, this->chrome_sync_experiment_id(), output);
}
// optional .variations.Study.Experiment.FeatureAssociation feature_association = 12;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
12, *this->feature_association_, output);
}
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:variations.Study.Experiment)
}
size_t Study_Experiment::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:variations.Study.Experiment)
size_t total_size = 0;
if (has_name()) {
// required string name = 1;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
if (has_probability_weight()) {
// required uint32 probability_weight = 2;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->probability_weight());
}
return total_size;
}
size_t Study_Experiment::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:variations.Study.Experiment)
size_t total_size = 0;
total_size += unknown_fields().size();
if (((_has_bits_[0] & 0x00000011) ^ 0x00000011) == 0) { // All required fields are present.
// required string name = 1;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
// required uint32 probability_weight = 2;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->probability_weight());
} else {
total_size += RequiredFieldsByteSizeFallback();
}
// repeated .variations.Study.Experiment.Param param = 6;
{
unsigned int count = static_cast<unsigned int>(this->param_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->param(static_cast<int>(i)));
}
}
// repeated .variations.Study.Experiment.OverrideUIString override_ui_string = 9;
{
unsigned int count = static_cast<unsigned int>(this->override_ui_string_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->override_ui_string(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 14u) {
// optional string forcing_flag = 5;
if (has_forcing_flag()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->forcing_flag());
}
// optional .variations.Study.Experiment.FeatureAssociation feature_association = 12;
if (has_feature_association()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->feature_association_);
}
// optional uint64 google_web_experiment_id = 3;
if (has_google_web_experiment_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->google_web_experiment_id());
}
}
if (_has_bits_[0 / 32] & 224u) {
// optional .variations.Study.Experiment.Type type = 7 [default = NORMAL];
if (has_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
}
// optional uint64 google_web_trigger_experiment_id = 8;
if (has_google_web_trigger_experiment_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->google_web_trigger_experiment_id());
}
// optional uint64 chrome_sync_experiment_id = 10;
if (has_chrome_sync_experiment_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->chrome_sync_experiment_id());
}
}
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 Study_Experiment::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Study_Experiment*>(&from));
}
void Study_Experiment::MergeFrom(const Study_Experiment& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:variations.Study.Experiment)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
param_.MergeFrom(from.param_);
override_ui_string_.MergeFrom(from.override_ui_string_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 255u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_forcing_flag();
forcing_flag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.forcing_flag_);
}
if (cached_has_bits & 0x00000004u) {
mutable_feature_association()->::variations::Study_Experiment_FeatureAssociation::MergeFrom(from.feature_association());
}
if (cached_has_bits & 0x00000008u) {
google_web_experiment_id_ = from.google_web_experiment_id_;
}
if (cached_has_bits & 0x00000010u) {
probability_weight_ = from.probability_weight_;
}
if (cached_has_bits & 0x00000020u) {
type_ = from.type_;
}
if (cached_has_bits & 0x00000040u) {
google_web_trigger_experiment_id_ = from.google_web_trigger_experiment_id_;
}
if (cached_has_bits & 0x00000080u) {
chrome_sync_experiment_id_ = from.chrome_sync_experiment_id_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Study_Experiment::CopyFrom(const Study_Experiment& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:variations.Study.Experiment)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Study_Experiment::IsInitialized() const {
if ((_has_bits_[0] & 0x00000011) != 0x00000011) return false;
return true;
}
void Study_Experiment::Swap(Study_Experiment* other) {
if (other == this) return;
InternalSwap(other);
}
void Study_Experiment::InternalSwap(Study_Experiment* other) {
param_.InternalSwap(&other->param_);
override_ui_string_.InternalSwap(&other->override_ui_string_);
name_.Swap(&other->name_);
forcing_flag_.Swap(&other->forcing_flag_);
std::swap(feature_association_, other->feature_association_);
std::swap(google_web_experiment_id_, other->google_web_experiment_id_);
std::swap(probability_weight_, other->probability_weight_);
std::swap(type_, other->type_);
std::swap(google_web_trigger_experiment_id_, other->google_web_trigger_experiment_id_);
std::swap(chrome_sync_experiment_id_, other->chrome_sync_experiment_id_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::std::string Study_Experiment::GetTypeName() const {
return "variations.Study.Experiment";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Study_Experiment
// required string name = 1;
bool Study_Experiment::has_name() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Study_Experiment::set_has_name() {
_has_bits_[0] |= 0x00000001u;
}
void Study_Experiment::clear_has_name() {
_has_bits_[0] &= ~0x00000001u;
}
void Study_Experiment::clear_name() {
name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
const ::std::string& Study_Experiment::name() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.name)
return name_.GetNoArena();
}
void Study_Experiment::set_name(const ::std::string& value) {
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.name)
}
#if LANG_CXX11
void Study_Experiment::set_name(::std::string&& value) {
set_has_name();
name_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.name)
}
#endif
void Study_Experiment::set_name(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.name)
}
void Study_Experiment::set_name(const char* value, size_t size) {
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.name)
}
::std::string* Study_Experiment::mutable_name() {
set_has_name();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.name)
return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment::release_name() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.name)
clear_has_name();
return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment::set_allocated_name(::std::string* name) {
if (name != NULL) {
set_has_name();
} else {
clear_has_name();
}
name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.name)
}
// required uint32 probability_weight = 2;
bool Study_Experiment::has_probability_weight() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Study_Experiment::set_has_probability_weight() {
_has_bits_[0] |= 0x00000010u;
}
void Study_Experiment::clear_has_probability_weight() {
_has_bits_[0] &= ~0x00000010u;
}
void Study_Experiment::clear_probability_weight() {
probability_weight_ = 0u;
clear_has_probability_weight();
}
::google::protobuf::uint32 Study_Experiment::probability_weight() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.probability_weight)
return probability_weight_;
}
void Study_Experiment::set_probability_weight(::google::protobuf::uint32 value) {
set_has_probability_weight();
probability_weight_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Experiment.probability_weight)
}
// optional uint64 google_web_experiment_id = 3;
bool Study_Experiment::has_google_web_experiment_id() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Study_Experiment::set_has_google_web_experiment_id() {
_has_bits_[0] |= 0x00000008u;
}
void Study_Experiment::clear_has_google_web_experiment_id() {
_has_bits_[0] &= ~0x00000008u;
}
void Study_Experiment::clear_google_web_experiment_id() {
google_web_experiment_id_ = GOOGLE_ULONGLONG(0);
clear_has_google_web_experiment_id();
}
::google::protobuf::uint64 Study_Experiment::google_web_experiment_id() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.google_web_experiment_id)
return google_web_experiment_id_;
}
void Study_Experiment::set_google_web_experiment_id(::google::protobuf::uint64 value) {
set_has_google_web_experiment_id();
google_web_experiment_id_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Experiment.google_web_experiment_id)
}
// optional uint64 google_web_trigger_experiment_id = 8;
bool Study_Experiment::has_google_web_trigger_experiment_id() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Study_Experiment::set_has_google_web_trigger_experiment_id() {
_has_bits_[0] |= 0x00000040u;
}
void Study_Experiment::clear_has_google_web_trigger_experiment_id() {
_has_bits_[0] &= ~0x00000040u;
}
void Study_Experiment::clear_google_web_trigger_experiment_id() {
google_web_trigger_experiment_id_ = GOOGLE_ULONGLONG(0);
clear_has_google_web_trigger_experiment_id();
}
::google::protobuf::uint64 Study_Experiment::google_web_trigger_experiment_id() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.google_web_trigger_experiment_id)
return google_web_trigger_experiment_id_;
}
void Study_Experiment::set_google_web_trigger_experiment_id(::google::protobuf::uint64 value) {
set_has_google_web_trigger_experiment_id();
google_web_trigger_experiment_id_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Experiment.google_web_trigger_experiment_id)
}
// optional uint64 chrome_sync_experiment_id = 10;
bool Study_Experiment::has_chrome_sync_experiment_id() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Study_Experiment::set_has_chrome_sync_experiment_id() {
_has_bits_[0] |= 0x00000080u;
}
void Study_Experiment::clear_has_chrome_sync_experiment_id() {
_has_bits_[0] &= ~0x00000080u;
}
void Study_Experiment::clear_chrome_sync_experiment_id() {
chrome_sync_experiment_id_ = GOOGLE_ULONGLONG(0);
clear_has_chrome_sync_experiment_id();
}
::google::protobuf::uint64 Study_Experiment::chrome_sync_experiment_id() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.chrome_sync_experiment_id)
return chrome_sync_experiment_id_;
}
void Study_Experiment::set_chrome_sync_experiment_id(::google::protobuf::uint64 value) {
set_has_chrome_sync_experiment_id();
chrome_sync_experiment_id_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Experiment.chrome_sync_experiment_id)
}
// optional .variations.Study.Experiment.FeatureAssociation feature_association = 12;
bool Study_Experiment::has_feature_association() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Study_Experiment::set_has_feature_association() {
_has_bits_[0] |= 0x00000004u;
}
void Study_Experiment::clear_has_feature_association() {
_has_bits_[0] &= ~0x00000004u;
}
void Study_Experiment::clear_feature_association() {
if (feature_association_ != NULL) feature_association_->::variations::Study_Experiment_FeatureAssociation::Clear();
clear_has_feature_association();
}
const ::variations::Study_Experiment_FeatureAssociation& Study_Experiment::feature_association() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.feature_association)
return feature_association_ != NULL ? *feature_association_
: *::variations::Study_Experiment_FeatureAssociation::internal_default_instance();
}
::variations::Study_Experiment_FeatureAssociation* Study_Experiment::mutable_feature_association() {
set_has_feature_association();
if (feature_association_ == NULL) {
feature_association_ = new ::variations::Study_Experiment_FeatureAssociation;
}
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.feature_association)
return feature_association_;
}
::variations::Study_Experiment_FeatureAssociation* Study_Experiment::release_feature_association() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.feature_association)
clear_has_feature_association();
::variations::Study_Experiment_FeatureAssociation* temp = feature_association_;
feature_association_ = NULL;
return temp;
}
void Study_Experiment::set_allocated_feature_association(::variations::Study_Experiment_FeatureAssociation* feature_association) {
delete feature_association_;
feature_association_ = feature_association;
if (feature_association) {
set_has_feature_association();
} else {
clear_has_feature_association();
}
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.feature_association)
}
// optional string forcing_flag = 5;
bool Study_Experiment::has_forcing_flag() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Study_Experiment::set_has_forcing_flag() {
_has_bits_[0] |= 0x00000002u;
}
void Study_Experiment::clear_has_forcing_flag() {
_has_bits_[0] &= ~0x00000002u;
}
void Study_Experiment::clear_forcing_flag() {
forcing_flag_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_forcing_flag();
}
const ::std::string& Study_Experiment::forcing_flag() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.forcing_flag)
return forcing_flag_.GetNoArena();
}
void Study_Experiment::set_forcing_flag(const ::std::string& value) {
set_has_forcing_flag();
forcing_flag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Experiment.forcing_flag)
}
#if LANG_CXX11
void Study_Experiment::set_forcing_flag(::std::string&& value) {
set_has_forcing_flag();
forcing_flag_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Experiment.forcing_flag)
}
#endif
void Study_Experiment::set_forcing_flag(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_forcing_flag();
forcing_flag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Experiment.forcing_flag)
}
void Study_Experiment::set_forcing_flag(const char* value, size_t size) {
set_has_forcing_flag();
forcing_flag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Experiment.forcing_flag)
}
::std::string* Study_Experiment::mutable_forcing_flag() {
set_has_forcing_flag();
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.forcing_flag)
return forcing_flag_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Experiment::release_forcing_flag() {
// @@protoc_insertion_point(field_release:variations.Study.Experiment.forcing_flag)
clear_has_forcing_flag();
return forcing_flag_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Experiment::set_allocated_forcing_flag(::std::string* forcing_flag) {
if (forcing_flag != NULL) {
set_has_forcing_flag();
} else {
clear_has_forcing_flag();
}
forcing_flag_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), forcing_flag);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Experiment.forcing_flag)
}
// repeated .variations.Study.Experiment.Param param = 6;
int Study_Experiment::param_size() const {
return param_.size();
}
void Study_Experiment::clear_param() {
param_.Clear();
}
const ::variations::Study_Experiment_Param& Study_Experiment::param(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.param)
return param_.Get(index);
}
::variations::Study_Experiment_Param* Study_Experiment::mutable_param(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.param)
return param_.Mutable(index);
}
::variations::Study_Experiment_Param* Study_Experiment::add_param() {
// @@protoc_insertion_point(field_add:variations.Study.Experiment.param)
return param_.Add();
}
::google::protobuf::RepeatedPtrField< ::variations::Study_Experiment_Param >*
Study_Experiment::mutable_param() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Experiment.param)
return &param_;
}
const ::google::protobuf::RepeatedPtrField< ::variations::Study_Experiment_Param >&
Study_Experiment::param() const {
// @@protoc_insertion_point(field_list:variations.Study.Experiment.param)
return param_;
}
// optional .variations.Study.Experiment.Type type = 7 [default = NORMAL];
bool Study_Experiment::has_type() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Study_Experiment::set_has_type() {
_has_bits_[0] |= 0x00000020u;
}
void Study_Experiment::clear_has_type() {
_has_bits_[0] &= ~0x00000020u;
}
void Study_Experiment::clear_type() {
type_ = 0;
clear_has_type();
}
::variations::Study_Experiment_Type Study_Experiment::type() const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.type)
return static_cast< ::variations::Study_Experiment_Type >(type_);
}
void Study_Experiment::set_type(::variations::Study_Experiment_Type value) {
assert(::variations::Study_Experiment_Type_IsValid(value));
set_has_type();
type_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Experiment.type)
}
// repeated .variations.Study.Experiment.OverrideUIString override_ui_string = 9;
int Study_Experiment::override_ui_string_size() const {
return override_ui_string_.size();
}
void Study_Experiment::clear_override_ui_string() {
override_ui_string_.Clear();
}
const ::variations::Study_Experiment_OverrideUIString& Study_Experiment::override_ui_string(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Experiment.override_ui_string)
return override_ui_string_.Get(index);
}
::variations::Study_Experiment_OverrideUIString* Study_Experiment::mutable_override_ui_string(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Experiment.override_ui_string)
return override_ui_string_.Mutable(index);
}
::variations::Study_Experiment_OverrideUIString* Study_Experiment::add_override_ui_string() {
// @@protoc_insertion_point(field_add:variations.Study.Experiment.override_ui_string)
return override_ui_string_.Add();
}
::google::protobuf::RepeatedPtrField< ::variations::Study_Experiment_OverrideUIString >*
Study_Experiment::mutable_override_ui_string() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Experiment.override_ui_string)
return &override_ui_string_;
}
const ::google::protobuf::RepeatedPtrField< ::variations::Study_Experiment_OverrideUIString >&
Study_Experiment::override_ui_string() const {
// @@protoc_insertion_point(field_list:variations.Study.Experiment.override_ui_string)
return override_ui_string_;
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Study_Filter::kStartDateFieldNumber;
const int Study_Filter::kEndDateFieldNumber;
const int Study_Filter::kMinVersionFieldNumber;
const int Study_Filter::kMaxVersionFieldNumber;
const int Study_Filter::kChannelFieldNumber;
const int Study_Filter::kPlatformFieldNumber;
const int Study_Filter::kLocaleFieldNumber;
const int Study_Filter::kExcludeLocaleFieldNumber;
const int Study_Filter::kFormFactorFieldNumber;
const int Study_Filter::kExcludeFormFactorFieldNumber;
const int Study_Filter::kHardwareClassFieldNumber;
const int Study_Filter::kExcludeHardwareClassFieldNumber;
const int Study_Filter::kCountryFieldNumber;
const int Study_Filter::kExcludeCountryFieldNumber;
const int Study_Filter::kIsLowEndDeviceFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Study_Filter::Study_Filter()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_study_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:variations.Study.Filter)
}
Study_Filter::Study_Filter(const Study_Filter& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
channel_(from.channel_),
platform_(from.platform_),
locale_(from.locale_),
form_factor_(from.form_factor_),
hardware_class_(from.hardware_class_),
exclude_hardware_class_(from.exclude_hardware_class_),
country_(from.country_),
exclude_country_(from.exclude_country_),
exclude_locale_(from.exclude_locale_),
exclude_form_factor_(from.exclude_form_factor_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
min_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_min_version()) {
min_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.min_version_);
}
max_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_max_version()) {
max_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.max_version_);
}
::memcpy(&start_date_, &from.start_date_,
static_cast<size_t>(reinterpret_cast<char*>(&is_low_end_device_) -
reinterpret_cast<char*>(&start_date_)) + sizeof(is_low_end_device_));
// @@protoc_insertion_point(copy_constructor:variations.Study.Filter)
}
void Study_Filter::SharedCtor() {
_cached_size_ = 0;
min_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
max_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&start_date_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&is_low_end_device_) -
reinterpret_cast<char*>(&start_date_)) + sizeof(is_low_end_device_));
}
Study_Filter::~Study_Filter() {
// @@protoc_insertion_point(destructor:variations.Study.Filter)
SharedDtor();
}
void Study_Filter::SharedDtor() {
min_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
max_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Filter::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Study_Filter& Study_Filter::default_instance() {
protobuf_study_2eproto::InitDefaults();
return *internal_default_instance();
}
Study_Filter* Study_Filter::New(::google::protobuf::Arena* arena) const {
Study_Filter* n = new Study_Filter;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Study_Filter::Clear() {
// @@protoc_insertion_point(message_clear_start:variations.Study.Filter)
channel_.Clear();
platform_.Clear();
locale_.Clear();
form_factor_.Clear();
hardware_class_.Clear();
exclude_hardware_class_.Clear();
country_.Clear();
exclude_country_.Clear();
exclude_locale_.Clear();
exclude_form_factor_.Clear();
if (_has_bits_[0 / 32] & 3u) {
if (has_min_version()) {
GOOGLE_DCHECK(!min_version_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*min_version_.UnsafeRawStringPointer())->clear();
}
if (has_max_version()) {
GOOGLE_DCHECK(!max_version_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*max_version_.UnsafeRawStringPointer())->clear();
}
}
if (_has_bits_[0 / 32] & 28u) {
::memset(&start_date_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&is_low_end_device_) -
reinterpret_cast<char*>(&start_date_)) + sizeof(is_low_end_device_));
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Study_Filter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
&::google::protobuf::internal::InternalMetadataWithArenaLite::
mutable_unknown_fields));
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string, false);
// @@protoc_insertion_point(parse_start:variations.Study.Filter)
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)) {
// optional int64 start_date = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u)) {
set_has_start_date();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &start_date_)));
} else {
goto handle_unusual;
}
break;
}
// optional string min_version = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_min_version()));
} else {
goto handle_unusual;
}
break;
}
// optional string max_version = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_max_version()));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.Channel channel = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(32u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_Channel_IsValid(value)) {
add_channel(static_cast< ::variations::Study_Channel >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
input,
4,
::variations::Study_Channel_IsValid,
&unknown_fields_stream,
this->mutable_channel())));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.Platform platform = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(40u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_Platform_IsValid(value)) {
add_platform(static_cast< ::variations::Study_Platform >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
input,
5,
::variations::Study_Platform_IsValid,
&unknown_fields_stream,
this->mutable_platform())));
} else {
goto handle_unusual;
}
break;
}
// repeated string locale = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_locale()));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.FormFactor form_factor = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(56u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_FormFactor_IsValid(value)) {
add_form_factor(static_cast< ::variations::Study_FormFactor >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(58u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
input,
7,
::variations::Study_FormFactor_IsValid,
&unknown_fields_stream,
this->mutable_form_factor())));
} else {
goto handle_unusual;
}
break;
}
// repeated string hardware_class = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(66u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_hardware_class()));
} else {
goto handle_unusual;
}
break;
}
// repeated string exclude_hardware_class = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(74u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_exclude_hardware_class()));
} else {
goto handle_unusual;
}
break;
}
// repeated string country = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(82u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_country()));
} else {
goto handle_unusual;
}
break;
}
// repeated string exclude_country = 11;
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(90u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_exclude_country()));
} else {
goto handle_unusual;
}
break;
}
// repeated string exclude_locale = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(98u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_exclude_locale()));
} else {
goto handle_unusual;
}
break;
}
// optional int64 end_date = 13;
case 13: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(104u)) {
set_has_end_date();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &end_date_)));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.FormFactor exclude_form_factor = 14;
case 14: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(112u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_FormFactor_IsValid(value)) {
add_exclude_form_factor(static_cast< ::variations::Study_FormFactor >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(114u)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
input,
14,
::variations::Study_FormFactor_IsValid,
&unknown_fields_stream,
this->mutable_exclude_form_factor())));
} else {
goto handle_unusual;
}
break;
}
// optional bool is_low_end_device = 15;
case 15: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(120u)) {
set_has_is_low_end_device();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &is_low_end_device_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:variations.Study.Filter)
return true;
failure:
// @@protoc_insertion_point(parse_failure:variations.Study.Filter)
return false;
#undef DO_
}
void Study_Filter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:variations.Study.Filter)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int64 start_date = 1;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->start_date(), output);
}
// optional string min_version = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->min_version(), output);
}
// optional string max_version = 3;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->max_version(), output);
}
// repeated .variations.Study.Channel channel = 4;
for (int i = 0, n = this->channel_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
4, this->channel(i), output);
}
// repeated .variations.Study.Platform platform = 5;
for (int i = 0, n = this->platform_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
5, this->platform(i), output);
}
// repeated string locale = 6;
for (int i = 0, n = this->locale_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
6, this->locale(i), output);
}
// repeated .variations.Study.FormFactor form_factor = 7;
for (int i = 0, n = this->form_factor_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->form_factor(i), output);
}
// repeated string hardware_class = 8;
for (int i = 0, n = this->hardware_class_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
8, this->hardware_class(i), output);
}
// repeated string exclude_hardware_class = 9;
for (int i = 0, n = this->exclude_hardware_class_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
9, this->exclude_hardware_class(i), output);
}
// repeated string country = 10;
for (int i = 0, n = this->country_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
10, this->country(i), output);
}
// repeated string exclude_country = 11;
for (int i = 0, n = this->exclude_country_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
11, this->exclude_country(i), output);
}
// repeated string exclude_locale = 12;
for (int i = 0, n = this->exclude_locale_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
12, this->exclude_locale(i), output);
}
// optional int64 end_date = 13;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(13, this->end_date(), output);
}
// repeated .variations.Study.FormFactor exclude_form_factor = 14;
for (int i = 0, n = this->exclude_form_factor_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
14, this->exclude_form_factor(i), output);
}
// optional bool is_low_end_device = 15;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteBool(15, this->is_low_end_device(), output);
}
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:variations.Study.Filter)
}
size_t Study_Filter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:variations.Study.Filter)
size_t total_size = 0;
total_size += unknown_fields().size();
// repeated .variations.Study.Channel channel = 4;
{
size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->channel_size());for (unsigned int i = 0; i < count; i++) {
data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
this->channel(static_cast<int>(i)));
}
total_size += (1UL * count) + data_size;
}
// repeated .variations.Study.Platform platform = 5;
{
size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->platform_size());for (unsigned int i = 0; i < count; i++) {
data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
this->platform(static_cast<int>(i)));
}
total_size += (1UL * count) + data_size;
}
// repeated string locale = 6;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->locale_size());
for (int i = 0, n = this->locale_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->locale(i));
}
// repeated .variations.Study.FormFactor form_factor = 7;
{
size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->form_factor_size());for (unsigned int i = 0; i < count; i++) {
data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
this->form_factor(static_cast<int>(i)));
}
total_size += (1UL * count) + data_size;
}
// repeated string hardware_class = 8;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->hardware_class_size());
for (int i = 0, n = this->hardware_class_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->hardware_class(i));
}
// repeated string exclude_hardware_class = 9;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->exclude_hardware_class_size());
for (int i = 0, n = this->exclude_hardware_class_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->exclude_hardware_class(i));
}
// repeated string country = 10;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->country_size());
for (int i = 0, n = this->country_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->country(i));
}
// repeated string exclude_country = 11;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->exclude_country_size());
for (int i = 0, n = this->exclude_country_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->exclude_country(i));
}
// repeated string exclude_locale = 12;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->exclude_locale_size());
for (int i = 0, n = this->exclude_locale_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->exclude_locale(i));
}
// repeated .variations.Study.FormFactor exclude_form_factor = 14;
{
size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->exclude_form_factor_size());for (unsigned int i = 0; i < count; i++) {
data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
this->exclude_form_factor(static_cast<int>(i)));
}
total_size += (1UL * count) + data_size;
}
if (_has_bits_[0 / 32] & 31u) {
// optional string min_version = 2;
if (has_min_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->min_version());
}
// optional string max_version = 3;
if (has_max_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->max_version());
}
// optional int64 start_date = 1;
if (has_start_date()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->start_date());
}
// optional int64 end_date = 13;
if (has_end_date()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->end_date());
}
// optional bool is_low_end_device = 15;
if (has_is_low_end_device()) {
total_size += 1 + 1;
}
}
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 Study_Filter::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Study_Filter*>(&from));
}
void Study_Filter::MergeFrom(const Study_Filter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:variations.Study.Filter)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
channel_.MergeFrom(from.channel_);
platform_.MergeFrom(from.platform_);
locale_.MergeFrom(from.locale_);
form_factor_.MergeFrom(from.form_factor_);
hardware_class_.MergeFrom(from.hardware_class_);
exclude_hardware_class_.MergeFrom(from.exclude_hardware_class_);
country_.MergeFrom(from.country_);
exclude_country_.MergeFrom(from.exclude_country_);
exclude_locale_.MergeFrom(from.exclude_locale_);
exclude_form_factor_.MergeFrom(from.exclude_form_factor_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 31u) {
if (cached_has_bits & 0x00000001u) {
set_has_min_version();
min_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.min_version_);
}
if (cached_has_bits & 0x00000002u) {
set_has_max_version();
max_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.max_version_);
}
if (cached_has_bits & 0x00000004u) {
start_date_ = from.start_date_;
}
if (cached_has_bits & 0x00000008u) {
end_date_ = from.end_date_;
}
if (cached_has_bits & 0x00000010u) {
is_low_end_device_ = from.is_low_end_device_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Study_Filter::CopyFrom(const Study_Filter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:variations.Study.Filter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Study_Filter::IsInitialized() const {
return true;
}
void Study_Filter::Swap(Study_Filter* other) {
if (other == this) return;
InternalSwap(other);
}
void Study_Filter::InternalSwap(Study_Filter* other) {
channel_.InternalSwap(&other->channel_);
platform_.InternalSwap(&other->platform_);
locale_.InternalSwap(&other->locale_);
form_factor_.InternalSwap(&other->form_factor_);
hardware_class_.InternalSwap(&other->hardware_class_);
exclude_hardware_class_.InternalSwap(&other->exclude_hardware_class_);
country_.InternalSwap(&other->country_);
exclude_country_.InternalSwap(&other->exclude_country_);
exclude_locale_.InternalSwap(&other->exclude_locale_);
exclude_form_factor_.InternalSwap(&other->exclude_form_factor_);
min_version_.Swap(&other->min_version_);
max_version_.Swap(&other->max_version_);
std::swap(start_date_, other->start_date_);
std::swap(end_date_, other->end_date_);
std::swap(is_low_end_device_, other->is_low_end_device_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::std::string Study_Filter::GetTypeName() const {
return "variations.Study.Filter";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Study_Filter
// optional int64 start_date = 1;
bool Study_Filter::has_start_date() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Study_Filter::set_has_start_date() {
_has_bits_[0] |= 0x00000004u;
}
void Study_Filter::clear_has_start_date() {
_has_bits_[0] &= ~0x00000004u;
}
void Study_Filter::clear_start_date() {
start_date_ = GOOGLE_LONGLONG(0);
clear_has_start_date();
}
::google::protobuf::int64 Study_Filter::start_date() const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.start_date)
return start_date_;
}
void Study_Filter::set_start_date(::google::protobuf::int64 value) {
set_has_start_date();
start_date_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Filter.start_date)
}
// optional int64 end_date = 13;
bool Study_Filter::has_end_date() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Study_Filter::set_has_end_date() {
_has_bits_[0] |= 0x00000008u;
}
void Study_Filter::clear_has_end_date() {
_has_bits_[0] &= ~0x00000008u;
}
void Study_Filter::clear_end_date() {
end_date_ = GOOGLE_LONGLONG(0);
clear_has_end_date();
}
::google::protobuf::int64 Study_Filter::end_date() const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.end_date)
return end_date_;
}
void Study_Filter::set_end_date(::google::protobuf::int64 value) {
set_has_end_date();
end_date_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Filter.end_date)
}
// optional string min_version = 2;
bool Study_Filter::has_min_version() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Study_Filter::set_has_min_version() {
_has_bits_[0] |= 0x00000001u;
}
void Study_Filter::clear_has_min_version() {
_has_bits_[0] &= ~0x00000001u;
}
void Study_Filter::clear_min_version() {
min_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_min_version();
}
const ::std::string& Study_Filter::min_version() const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.min_version)
return min_version_.GetNoArena();
}
void Study_Filter::set_min_version(const ::std::string& value) {
set_has_min_version();
min_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Filter.min_version)
}
#if LANG_CXX11
void Study_Filter::set_min_version(::std::string&& value) {
set_has_min_version();
min_version_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Filter.min_version)
}
#endif
void Study_Filter::set_min_version(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_min_version();
min_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.min_version)
}
void Study_Filter::set_min_version(const char* value, size_t size) {
set_has_min_version();
min_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.min_version)
}
::std::string* Study_Filter::mutable_min_version() {
set_has_min_version();
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.min_version)
return min_version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Filter::release_min_version() {
// @@protoc_insertion_point(field_release:variations.Study.Filter.min_version)
clear_has_min_version();
return min_version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Filter::set_allocated_min_version(::std::string* min_version) {
if (min_version != NULL) {
set_has_min_version();
} else {
clear_has_min_version();
}
min_version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), min_version);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Filter.min_version)
}
// optional string max_version = 3;
bool Study_Filter::has_max_version() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Study_Filter::set_has_max_version() {
_has_bits_[0] |= 0x00000002u;
}
void Study_Filter::clear_has_max_version() {
_has_bits_[0] &= ~0x00000002u;
}
void Study_Filter::clear_max_version() {
max_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_max_version();
}
const ::std::string& Study_Filter::max_version() const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.max_version)
return max_version_.GetNoArena();
}
void Study_Filter::set_max_version(const ::std::string& value) {
set_has_max_version();
max_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.Filter.max_version)
}
#if LANG_CXX11
void Study_Filter::set_max_version(::std::string&& value) {
set_has_max_version();
max_version_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.Filter.max_version)
}
#endif
void Study_Filter::set_max_version(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_max_version();
max_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.max_version)
}
void Study_Filter::set_max_version(const char* value, size_t size) {
set_has_max_version();
max_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.max_version)
}
::std::string* Study_Filter::mutable_max_version() {
set_has_max_version();
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.max_version)
return max_version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study_Filter::release_max_version() {
// @@protoc_insertion_point(field_release:variations.Study.Filter.max_version)
clear_has_max_version();
return max_version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study_Filter::set_allocated_max_version(::std::string* max_version) {
if (max_version != NULL) {
set_has_max_version();
} else {
clear_has_max_version();
}
max_version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), max_version);
// @@protoc_insertion_point(field_set_allocated:variations.Study.Filter.max_version)
}
// repeated .variations.Study.Channel channel = 4;
int Study_Filter::channel_size() const {
return channel_.size();
}
void Study_Filter::clear_channel() {
channel_.Clear();
}
::variations::Study_Channel Study_Filter::channel(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.channel)
return static_cast< ::variations::Study_Channel >(channel_.Get(index));
}
void Study_Filter::set_channel(int index, ::variations::Study_Channel value) {
assert(::variations::Study_Channel_IsValid(value));
channel_.Set(index, value);
// @@protoc_insertion_point(field_set:variations.Study.Filter.channel)
}
void Study_Filter::add_channel(::variations::Study_Channel value) {
assert(::variations::Study_Channel_IsValid(value));
channel_.Add(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.channel)
}
const ::google::protobuf::RepeatedField<int>&
Study_Filter::channel() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.channel)
return channel_;
}
::google::protobuf::RepeatedField<int>*
Study_Filter::mutable_channel() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.channel)
return &channel_;
}
// repeated .variations.Study.Platform platform = 5;
int Study_Filter::platform_size() const {
return platform_.size();
}
void Study_Filter::clear_platform() {
platform_.Clear();
}
::variations::Study_Platform Study_Filter::platform(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.platform)
return static_cast< ::variations::Study_Platform >(platform_.Get(index));
}
void Study_Filter::set_platform(int index, ::variations::Study_Platform value) {
assert(::variations::Study_Platform_IsValid(value));
platform_.Set(index, value);
// @@protoc_insertion_point(field_set:variations.Study.Filter.platform)
}
void Study_Filter::add_platform(::variations::Study_Platform value) {
assert(::variations::Study_Platform_IsValid(value));
platform_.Add(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.platform)
}
const ::google::protobuf::RepeatedField<int>&
Study_Filter::platform() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.platform)
return platform_;
}
::google::protobuf::RepeatedField<int>*
Study_Filter::mutable_platform() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.platform)
return &platform_;
}
// repeated string locale = 6;
int Study_Filter::locale_size() const {
return locale_.size();
}
void Study_Filter::clear_locale() {
locale_.Clear();
}
const ::std::string& Study_Filter::locale(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.locale)
return locale_.Get(index);
}
::std::string* Study_Filter::mutable_locale(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.locale)
return locale_.Mutable(index);
}
void Study_Filter::set_locale(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.locale)
locale_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Filter::set_locale(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.locale)
locale_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Filter::set_locale(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
locale_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.locale)
}
void Study_Filter::set_locale(int index, const char* value, size_t size) {
locale_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.locale)
}
::std::string* Study_Filter::add_locale() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Filter.locale)
return locale_.Add();
}
void Study_Filter::add_locale(const ::std::string& value) {
locale_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.locale)
}
#if LANG_CXX11
void Study_Filter::add_locale(::std::string&& value) {
locale_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Filter.locale)
}
#endif
void Study_Filter::add_locale(const char* value) {
GOOGLE_DCHECK(value != NULL);
locale_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Filter.locale)
}
void Study_Filter::add_locale(const char* value, size_t size) {
locale_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Filter.locale)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Filter::locale() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.locale)
return locale_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Filter::mutable_locale() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.locale)
return &locale_;
}
// repeated string exclude_locale = 12;
int Study_Filter::exclude_locale_size() const {
return exclude_locale_.size();
}
void Study_Filter::clear_exclude_locale() {
exclude_locale_.Clear();
}
const ::std::string& Study_Filter::exclude_locale(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.exclude_locale)
return exclude_locale_.Get(index);
}
::std::string* Study_Filter::mutable_exclude_locale(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.exclude_locale)
return exclude_locale_.Mutable(index);
}
void Study_Filter::set_exclude_locale(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_locale)
exclude_locale_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Filter::set_exclude_locale(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_locale)
exclude_locale_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Filter::set_exclude_locale(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
exclude_locale_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.exclude_locale)
}
void Study_Filter::set_exclude_locale(int index, const char* value, size_t size) {
exclude_locale_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.exclude_locale)
}
::std::string* Study_Filter::add_exclude_locale() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Filter.exclude_locale)
return exclude_locale_.Add();
}
void Study_Filter::add_exclude_locale(const ::std::string& value) {
exclude_locale_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_locale)
}
#if LANG_CXX11
void Study_Filter::add_exclude_locale(::std::string&& value) {
exclude_locale_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_locale)
}
#endif
void Study_Filter::add_exclude_locale(const char* value) {
GOOGLE_DCHECK(value != NULL);
exclude_locale_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Filter.exclude_locale)
}
void Study_Filter::add_exclude_locale(const char* value, size_t size) {
exclude_locale_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Filter.exclude_locale)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Filter::exclude_locale() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.exclude_locale)
return exclude_locale_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Filter::mutable_exclude_locale() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.exclude_locale)
return &exclude_locale_;
}
// repeated .variations.Study.FormFactor form_factor = 7;
int Study_Filter::form_factor_size() const {
return form_factor_.size();
}
void Study_Filter::clear_form_factor() {
form_factor_.Clear();
}
::variations::Study_FormFactor Study_Filter::form_factor(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.form_factor)
return static_cast< ::variations::Study_FormFactor >(form_factor_.Get(index));
}
void Study_Filter::set_form_factor(int index, ::variations::Study_FormFactor value) {
assert(::variations::Study_FormFactor_IsValid(value));
form_factor_.Set(index, value);
// @@protoc_insertion_point(field_set:variations.Study.Filter.form_factor)
}
void Study_Filter::add_form_factor(::variations::Study_FormFactor value) {
assert(::variations::Study_FormFactor_IsValid(value));
form_factor_.Add(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.form_factor)
}
const ::google::protobuf::RepeatedField<int>&
Study_Filter::form_factor() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.form_factor)
return form_factor_;
}
::google::protobuf::RepeatedField<int>*
Study_Filter::mutable_form_factor() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.form_factor)
return &form_factor_;
}
// repeated .variations.Study.FormFactor exclude_form_factor = 14;
int Study_Filter::exclude_form_factor_size() const {
return exclude_form_factor_.size();
}
void Study_Filter::clear_exclude_form_factor() {
exclude_form_factor_.Clear();
}
::variations::Study_FormFactor Study_Filter::exclude_form_factor(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.exclude_form_factor)
return static_cast< ::variations::Study_FormFactor >(exclude_form_factor_.Get(index));
}
void Study_Filter::set_exclude_form_factor(int index, ::variations::Study_FormFactor value) {
assert(::variations::Study_FormFactor_IsValid(value));
exclude_form_factor_.Set(index, value);
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_form_factor)
}
void Study_Filter::add_exclude_form_factor(::variations::Study_FormFactor value) {
assert(::variations::Study_FormFactor_IsValid(value));
exclude_form_factor_.Add(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_form_factor)
}
const ::google::protobuf::RepeatedField<int>&
Study_Filter::exclude_form_factor() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.exclude_form_factor)
return exclude_form_factor_;
}
::google::protobuf::RepeatedField<int>*
Study_Filter::mutable_exclude_form_factor() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.exclude_form_factor)
return &exclude_form_factor_;
}
// repeated string hardware_class = 8;
int Study_Filter::hardware_class_size() const {
return hardware_class_.size();
}
void Study_Filter::clear_hardware_class() {
hardware_class_.Clear();
}
const ::std::string& Study_Filter::hardware_class(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.hardware_class)
return hardware_class_.Get(index);
}
::std::string* Study_Filter::mutable_hardware_class(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.hardware_class)
return hardware_class_.Mutable(index);
}
void Study_Filter::set_hardware_class(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.hardware_class)
hardware_class_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Filter::set_hardware_class(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.hardware_class)
hardware_class_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Filter::set_hardware_class(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
hardware_class_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.hardware_class)
}
void Study_Filter::set_hardware_class(int index, const char* value, size_t size) {
hardware_class_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.hardware_class)
}
::std::string* Study_Filter::add_hardware_class() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Filter.hardware_class)
return hardware_class_.Add();
}
void Study_Filter::add_hardware_class(const ::std::string& value) {
hardware_class_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.hardware_class)
}
#if LANG_CXX11
void Study_Filter::add_hardware_class(::std::string&& value) {
hardware_class_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Filter.hardware_class)
}
#endif
void Study_Filter::add_hardware_class(const char* value) {
GOOGLE_DCHECK(value != NULL);
hardware_class_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Filter.hardware_class)
}
void Study_Filter::add_hardware_class(const char* value, size_t size) {
hardware_class_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Filter.hardware_class)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Filter::hardware_class() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.hardware_class)
return hardware_class_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Filter::mutable_hardware_class() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.hardware_class)
return &hardware_class_;
}
// repeated string exclude_hardware_class = 9;
int Study_Filter::exclude_hardware_class_size() const {
return exclude_hardware_class_.size();
}
void Study_Filter::clear_exclude_hardware_class() {
exclude_hardware_class_.Clear();
}
const ::std::string& Study_Filter::exclude_hardware_class(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.exclude_hardware_class)
return exclude_hardware_class_.Get(index);
}
::std::string* Study_Filter::mutable_exclude_hardware_class(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.exclude_hardware_class)
return exclude_hardware_class_.Mutable(index);
}
void Study_Filter::set_exclude_hardware_class(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_hardware_class)
exclude_hardware_class_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Filter::set_exclude_hardware_class(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_hardware_class)
exclude_hardware_class_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Filter::set_exclude_hardware_class(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
exclude_hardware_class_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.exclude_hardware_class)
}
void Study_Filter::set_exclude_hardware_class(int index, const char* value, size_t size) {
exclude_hardware_class_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.exclude_hardware_class)
}
::std::string* Study_Filter::add_exclude_hardware_class() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Filter.exclude_hardware_class)
return exclude_hardware_class_.Add();
}
void Study_Filter::add_exclude_hardware_class(const ::std::string& value) {
exclude_hardware_class_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_hardware_class)
}
#if LANG_CXX11
void Study_Filter::add_exclude_hardware_class(::std::string&& value) {
exclude_hardware_class_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_hardware_class)
}
#endif
void Study_Filter::add_exclude_hardware_class(const char* value) {
GOOGLE_DCHECK(value != NULL);
exclude_hardware_class_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Filter.exclude_hardware_class)
}
void Study_Filter::add_exclude_hardware_class(const char* value, size_t size) {
exclude_hardware_class_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Filter.exclude_hardware_class)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Filter::exclude_hardware_class() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.exclude_hardware_class)
return exclude_hardware_class_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Filter::mutable_exclude_hardware_class() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.exclude_hardware_class)
return &exclude_hardware_class_;
}
// repeated string country = 10;
int Study_Filter::country_size() const {
return country_.size();
}
void Study_Filter::clear_country() {
country_.Clear();
}
const ::std::string& Study_Filter::country(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.country)
return country_.Get(index);
}
::std::string* Study_Filter::mutable_country(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.country)
return country_.Mutable(index);
}
void Study_Filter::set_country(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.country)
country_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Filter::set_country(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.country)
country_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Filter::set_country(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
country_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.country)
}
void Study_Filter::set_country(int index, const char* value, size_t size) {
country_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.country)
}
::std::string* Study_Filter::add_country() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Filter.country)
return country_.Add();
}
void Study_Filter::add_country(const ::std::string& value) {
country_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.country)
}
#if LANG_CXX11
void Study_Filter::add_country(::std::string&& value) {
country_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Filter.country)
}
#endif
void Study_Filter::add_country(const char* value) {
GOOGLE_DCHECK(value != NULL);
country_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Filter.country)
}
void Study_Filter::add_country(const char* value, size_t size) {
country_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Filter.country)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Filter::country() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.country)
return country_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Filter::mutable_country() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.country)
return &country_;
}
// repeated string exclude_country = 11;
int Study_Filter::exclude_country_size() const {
return exclude_country_.size();
}
void Study_Filter::clear_exclude_country() {
exclude_country_.Clear();
}
const ::std::string& Study_Filter::exclude_country(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.exclude_country)
return exclude_country_.Get(index);
}
::std::string* Study_Filter::mutable_exclude_country(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.Filter.exclude_country)
return exclude_country_.Mutable(index);
}
void Study_Filter::set_exclude_country(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_country)
exclude_country_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void Study_Filter::set_exclude_country(int index, ::std::string&& value) {
// @@protoc_insertion_point(field_set:variations.Study.Filter.exclude_country)
exclude_country_.Mutable(index)->assign(std::move(value));
}
#endif
void Study_Filter::set_exclude_country(int index, const char* value) {
GOOGLE_DCHECK(value != NULL);
exclude_country_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:variations.Study.Filter.exclude_country)
}
void Study_Filter::set_exclude_country(int index, const char* value, size_t size) {
exclude_country_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:variations.Study.Filter.exclude_country)
}
::std::string* Study_Filter::add_exclude_country() {
// @@protoc_insertion_point(field_add_mutable:variations.Study.Filter.exclude_country)
return exclude_country_.Add();
}
void Study_Filter::add_exclude_country(const ::std::string& value) {
exclude_country_.Add()->assign(value);
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_country)
}
#if LANG_CXX11
void Study_Filter::add_exclude_country(::std::string&& value) {
exclude_country_.Add(std::move(value));
// @@protoc_insertion_point(field_add:variations.Study.Filter.exclude_country)
}
#endif
void Study_Filter::add_exclude_country(const char* value) {
GOOGLE_DCHECK(value != NULL);
exclude_country_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:variations.Study.Filter.exclude_country)
}
void Study_Filter::add_exclude_country(const char* value, size_t size) {
exclude_country_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:variations.Study.Filter.exclude_country)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
Study_Filter::exclude_country() const {
// @@protoc_insertion_point(field_list:variations.Study.Filter.exclude_country)
return exclude_country_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
Study_Filter::mutable_exclude_country() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.Filter.exclude_country)
return &exclude_country_;
}
// optional bool is_low_end_device = 15;
bool Study_Filter::has_is_low_end_device() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Study_Filter::set_has_is_low_end_device() {
_has_bits_[0] |= 0x00000010u;
}
void Study_Filter::clear_has_is_low_end_device() {
_has_bits_[0] &= ~0x00000010u;
}
void Study_Filter::clear_is_low_end_device() {
is_low_end_device_ = false;
clear_has_is_low_end_device();
}
bool Study_Filter::is_low_end_device() const {
// @@protoc_insertion_point(field_get:variations.Study.Filter.is_low_end_device)
return is_low_end_device_;
}
void Study_Filter::set_is_low_end_device(bool value) {
set_has_is_low_end_device();
is_low_end_device_ = value;
// @@protoc_insertion_point(field_set:variations.Study.Filter.is_low_end_device)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Study::kNameFieldNumber;
const int Study::kExpiryDateFieldNumber;
const int Study::kConsistencyFieldNumber;
const int Study::kDefaultExperimentNameFieldNumber;
const int Study::kExperimentFieldNumber;
const int Study::kFilterFieldNumber;
const int Study::kRandomizationSeedFieldNumber;
const int Study::kActivationTypeFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Study::Study()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_study_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:variations.Study)
}
Study::Study(const Study& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
experiment_(from.experiment_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
default_experiment_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_default_experiment_name()) {
default_experiment_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_experiment_name_);
}
if (from.has_filter()) {
filter_ = new ::variations::Study_Filter(*from.filter_);
} else {
filter_ = NULL;
}
::memcpy(&expiry_date_, &from.expiry_date_,
static_cast<size_t>(reinterpret_cast<char*>(&activation_type_) -
reinterpret_cast<char*>(&expiry_date_)) + sizeof(activation_type_));
// @@protoc_insertion_point(copy_constructor:variations.Study)
}
void Study::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
default_experiment_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&filter_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&activation_type_) -
reinterpret_cast<char*>(&filter_)) + sizeof(activation_type_));
}
Study::~Study() {
// @@protoc_insertion_point(destructor:variations.Study)
SharedDtor();
}
void Study::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
default_experiment_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) {
delete filter_;
}
}
void Study::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Study& Study::default_instance() {
protobuf_study_2eproto::InitDefaults();
return *internal_default_instance();
}
Study* Study::New(::google::protobuf::Arena* arena) const {
Study* n = new Study;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Study::Clear() {
// @@protoc_insertion_point(message_clear_start:variations.Study)
experiment_.Clear();
if (_has_bits_[0 / 32] & 7u) {
if (has_name()) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (has_default_experiment_name()) {
GOOGLE_DCHECK(!default_experiment_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*default_experiment_name_.UnsafeRawStringPointer())->clear();
}
if (has_filter()) {
GOOGLE_DCHECK(filter_ != NULL);
filter_->::variations::Study_Filter::Clear();
}
}
if (_has_bits_[0 / 32] & 120u) {
::memset(&expiry_date_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&activation_type_) -
reinterpret_cast<char*>(&expiry_date_)) + sizeof(activation_type_));
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Study::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
&::google::protobuf::internal::InternalMetadataWithArenaLite::
mutable_unknown_fields));
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string, false);
// @@protoc_insertion_point(parse_start:variations.Study)
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)) {
// required string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
} else {
goto handle_unusual;
}
break;
}
// optional int64 expiry_date = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u)) {
set_has_expiry_date();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &expiry_date_)));
} else {
goto handle_unusual;
}
break;
}
// optional .variations.Study.Consistency consistency = 7 [default = SESSION];
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(56u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_Consistency_IsValid(value)) {
set_consistency(static_cast< ::variations::Study_Consistency >(value));
} else {
unknown_fields_stream.WriteVarint32(56u);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else {
goto handle_unusual;
}
break;
}
// optional string default_experiment_name = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(66u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_default_experiment_name()));
} else {
goto handle_unusual;
}
break;
}
// repeated .variations.Study.Experiment experiment = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(74u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_experiment()));
} else {
goto handle_unusual;
}
break;
}
// optional .variations.Study.Filter filter = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(82u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_filter()));
} else {
goto handle_unusual;
}
break;
}
// optional uint32 randomization_seed = 11;
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(88u)) {
set_has_randomization_seed();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &randomization_seed_)));
} else {
goto handle_unusual;
}
break;
}
// optional .variations.Study.ActivationType activation_type = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(96u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::variations::Study_ActivationType_IsValid(value)) {
set_activation_type(static_cast< ::variations::Study_ActivationType >(value));
} else {
unknown_fields_stream.WriteVarint32(96u);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:variations.Study)
return true;
failure:
// @@protoc_insertion_point(parse_failure:variations.Study)
return false;
#undef DO_
}
void Study::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:variations.Study)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
// optional int64 expiry_date = 3;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->expiry_date(), output);
}
// optional .variations.Study.Consistency consistency = 7 [default = SESSION];
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
7, this->consistency(), output);
}
// optional string default_experiment_name = 8;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8, this->default_experiment_name(), output);
}
// repeated .variations.Study.Experiment experiment = 9;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->experiment_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
9, this->experiment(static_cast<int>(i)), output);
}
// optional .variations.Study.Filter filter = 10;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
10, *this->filter_, output);
}
// optional uint32 randomization_seed = 11;
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->randomization_seed(), output);
}
// optional .variations.Study.ActivationType activation_type = 12;
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
12, this->activation_type(), output);
}
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:variations.Study)
}
size_t Study::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:variations.Study)
size_t total_size = 0;
total_size += unknown_fields().size();
// required string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// repeated .variations.Study.Experiment experiment = 9;
{
unsigned int count = static_cast<unsigned int>(this->experiment_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->experiment(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 126u) {
// optional string default_experiment_name = 8;
if (has_default_experiment_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->default_experiment_name());
}
// optional .variations.Study.Filter filter = 10;
if (has_filter()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
*this->filter_);
}
// optional int64 expiry_date = 3;
if (has_expiry_date()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->expiry_date());
}
// optional .variations.Study.Consistency consistency = 7 [default = SESSION];
if (has_consistency()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->consistency());
}
// optional uint32 randomization_seed = 11;
if (has_randomization_seed()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->randomization_seed());
}
// optional .variations.Study.ActivationType activation_type = 12;
if (has_activation_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->activation_type());
}
}
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 Study::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Study*>(&from));
}
void Study::MergeFrom(const Study& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:variations.Study)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
experiment_.MergeFrom(from.experiment_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 127u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_default_experiment_name();
default_experiment_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_experiment_name_);
}
if (cached_has_bits & 0x00000004u) {
mutable_filter()->::variations::Study_Filter::MergeFrom(from.filter());
}
if (cached_has_bits & 0x00000008u) {
expiry_date_ = from.expiry_date_;
}
if (cached_has_bits & 0x00000010u) {
consistency_ = from.consistency_;
}
if (cached_has_bits & 0x00000020u) {
randomization_seed_ = from.randomization_seed_;
}
if (cached_has_bits & 0x00000040u) {
activation_type_ = from.activation_type_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Study::CopyFrom(const Study& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:variations.Study)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Study::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (!::google::protobuf::internal::AllAreInitialized(this->experiment())) return false;
return true;
}
void Study::Swap(Study* other) {
if (other == this) return;
InternalSwap(other);
}
void Study::InternalSwap(Study* other) {
experiment_.InternalSwap(&other->experiment_);
name_.Swap(&other->name_);
default_experiment_name_.Swap(&other->default_experiment_name_);
std::swap(filter_, other->filter_);
std::swap(expiry_date_, other->expiry_date_);
std::swap(consistency_, other->consistency_);
std::swap(randomization_seed_, other->randomization_seed_);
std::swap(activation_type_, other->activation_type_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
}
::std::string Study::GetTypeName() const {
return "variations.Study";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Study
// required string name = 1;
bool Study::has_name() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Study::set_has_name() {
_has_bits_[0] |= 0x00000001u;
}
void Study::clear_has_name() {
_has_bits_[0] &= ~0x00000001u;
}
void Study::clear_name() {
name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_name();
}
const ::std::string& Study::name() const {
// @@protoc_insertion_point(field_get:variations.Study.name)
return name_.GetNoArena();
}
void Study::set_name(const ::std::string& value) {
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.name)
}
#if LANG_CXX11
void Study::set_name(::std::string&& value) {
set_has_name();
name_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.name)
}
#endif
void Study::set_name(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.name)
}
void Study::set_name(const char* value, size_t size) {
set_has_name();
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.name)
}
::std::string* Study::mutable_name() {
set_has_name();
// @@protoc_insertion_point(field_mutable:variations.Study.name)
return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study::release_name() {
// @@protoc_insertion_point(field_release:variations.Study.name)
clear_has_name();
return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study::set_allocated_name(::std::string* name) {
if (name != NULL) {
set_has_name();
} else {
clear_has_name();
}
name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
// @@protoc_insertion_point(field_set_allocated:variations.Study.name)
}
// optional int64 expiry_date = 3;
bool Study::has_expiry_date() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Study::set_has_expiry_date() {
_has_bits_[0] |= 0x00000008u;
}
void Study::clear_has_expiry_date() {
_has_bits_[0] &= ~0x00000008u;
}
void Study::clear_expiry_date() {
expiry_date_ = GOOGLE_LONGLONG(0);
clear_has_expiry_date();
}
::google::protobuf::int64 Study::expiry_date() const {
// @@protoc_insertion_point(field_get:variations.Study.expiry_date)
return expiry_date_;
}
void Study::set_expiry_date(::google::protobuf::int64 value) {
set_has_expiry_date();
expiry_date_ = value;
// @@protoc_insertion_point(field_set:variations.Study.expiry_date)
}
// optional .variations.Study.Consistency consistency = 7 [default = SESSION];
bool Study::has_consistency() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Study::set_has_consistency() {
_has_bits_[0] |= 0x00000010u;
}
void Study::clear_has_consistency() {
_has_bits_[0] &= ~0x00000010u;
}
void Study::clear_consistency() {
consistency_ = 0;
clear_has_consistency();
}
::variations::Study_Consistency Study::consistency() const {
// @@protoc_insertion_point(field_get:variations.Study.consistency)
return static_cast< ::variations::Study_Consistency >(consistency_);
}
void Study::set_consistency(::variations::Study_Consistency value) {
assert(::variations::Study_Consistency_IsValid(value));
set_has_consistency();
consistency_ = value;
// @@protoc_insertion_point(field_set:variations.Study.consistency)
}
// optional string default_experiment_name = 8;
bool Study::has_default_experiment_name() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Study::set_has_default_experiment_name() {
_has_bits_[0] |= 0x00000002u;
}
void Study::clear_has_default_experiment_name() {
_has_bits_[0] &= ~0x00000002u;
}
void Study::clear_default_experiment_name() {
default_experiment_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_default_experiment_name();
}
const ::std::string& Study::default_experiment_name() const {
// @@protoc_insertion_point(field_get:variations.Study.default_experiment_name)
return default_experiment_name_.GetNoArena();
}
void Study::set_default_experiment_name(const ::std::string& value) {
set_has_default_experiment_name();
default_experiment_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:variations.Study.default_experiment_name)
}
#if LANG_CXX11
void Study::set_default_experiment_name(::std::string&& value) {
set_has_default_experiment_name();
default_experiment_name_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:variations.Study.default_experiment_name)
}
#endif
void Study::set_default_experiment_name(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_default_experiment_name();
default_experiment_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:variations.Study.default_experiment_name)
}
void Study::set_default_experiment_name(const char* value, size_t size) {
set_has_default_experiment_name();
default_experiment_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:variations.Study.default_experiment_name)
}
::std::string* Study::mutable_default_experiment_name() {
set_has_default_experiment_name();
// @@protoc_insertion_point(field_mutable:variations.Study.default_experiment_name)
return default_experiment_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Study::release_default_experiment_name() {
// @@protoc_insertion_point(field_release:variations.Study.default_experiment_name)
clear_has_default_experiment_name();
return default_experiment_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Study::set_allocated_default_experiment_name(::std::string* default_experiment_name) {
if (default_experiment_name != NULL) {
set_has_default_experiment_name();
} else {
clear_has_default_experiment_name();
}
default_experiment_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_experiment_name);
// @@protoc_insertion_point(field_set_allocated:variations.Study.default_experiment_name)
}
// repeated .variations.Study.Experiment experiment = 9;
int Study::experiment_size() const {
return experiment_.size();
}
void Study::clear_experiment() {
experiment_.Clear();
}
const ::variations::Study_Experiment& Study::experiment(int index) const {
// @@protoc_insertion_point(field_get:variations.Study.experiment)
return experiment_.Get(index);
}
::variations::Study_Experiment* Study::mutable_experiment(int index) {
// @@protoc_insertion_point(field_mutable:variations.Study.experiment)
return experiment_.Mutable(index);
}
::variations::Study_Experiment* Study::add_experiment() {
// @@protoc_insertion_point(field_add:variations.Study.experiment)
return experiment_.Add();
}
::google::protobuf::RepeatedPtrField< ::variations::Study_Experiment >*
Study::mutable_experiment() {
// @@protoc_insertion_point(field_mutable_list:variations.Study.experiment)
return &experiment_;
}
const ::google::protobuf::RepeatedPtrField< ::variations::Study_Experiment >&
Study::experiment() const {
// @@protoc_insertion_point(field_list:variations.Study.experiment)
return experiment_;
}
// optional .variations.Study.Filter filter = 10;
bool Study::has_filter() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Study::set_has_filter() {
_has_bits_[0] |= 0x00000004u;
}
void Study::clear_has_filter() {
_has_bits_[0] &= ~0x00000004u;
}
void Study::clear_filter() {
if (filter_ != NULL) filter_->::variations::Study_Filter::Clear();
clear_has_filter();
}
const ::variations::Study_Filter& Study::filter() const {
// @@protoc_insertion_point(field_get:variations.Study.filter)
return filter_ != NULL ? *filter_
: *::variations::Study_Filter::internal_default_instance();
}
::variations::Study_Filter* Study::mutable_filter() {
set_has_filter();
if (filter_ == NULL) {
filter_ = new ::variations::Study_Filter;
}
// @@protoc_insertion_point(field_mutable:variations.Study.filter)
return filter_;
}
::variations::Study_Filter* Study::release_filter() {
// @@protoc_insertion_point(field_release:variations.Study.filter)
clear_has_filter();
::variations::Study_Filter* temp = filter_;
filter_ = NULL;
return temp;
}
void Study::set_allocated_filter(::variations::Study_Filter* filter) {
delete filter_;
filter_ = filter;
if (filter) {
set_has_filter();
} else {
clear_has_filter();
}
// @@protoc_insertion_point(field_set_allocated:variations.Study.filter)
}
// optional uint32 randomization_seed = 11;
bool Study::has_randomization_seed() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Study::set_has_randomization_seed() {
_has_bits_[0] |= 0x00000020u;
}
void Study::clear_has_randomization_seed() {
_has_bits_[0] &= ~0x00000020u;
}
void Study::clear_randomization_seed() {
randomization_seed_ = 0u;
clear_has_randomization_seed();
}
::google::protobuf::uint32 Study::randomization_seed() const {
// @@protoc_insertion_point(field_get:variations.Study.randomization_seed)
return randomization_seed_;
}
void Study::set_randomization_seed(::google::protobuf::uint32 value) {
set_has_randomization_seed();
randomization_seed_ = value;
// @@protoc_insertion_point(field_set:variations.Study.randomization_seed)
}
// optional .variations.Study.ActivationType activation_type = 12;
bool Study::has_activation_type() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Study::set_has_activation_type() {
_has_bits_[0] |= 0x00000040u;
}
void Study::clear_has_activation_type() {
_has_bits_[0] &= ~0x00000040u;
}
void Study::clear_activation_type() {
activation_type_ = 0;
clear_has_activation_type();
}
::variations::Study_ActivationType Study::activation_type() const {
// @@protoc_insertion_point(field_get:variations.Study.activation_type)
return static_cast< ::variations::Study_ActivationType >(activation_type_);
}
void Study::set_activation_type(::variations::Study_ActivationType value) {
assert(::variations::Study_ActivationType_IsValid(value));
set_has_activation_type();
activation_type_ = value;
// @@protoc_insertion_point(field_set:variations.Study.activation_type)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// @@protoc_insertion_point(namespace_scope)
} // namespace variations
// @@protoc_insertion_point(global_scope)